T'would be nice to have a single boot CD which handles all CHRP and Mac, 32-bit and 64-bit machines.
Created attachment 118031 [details] mk-images.ppc (et al) patch. This patch attempts it, and works on Mac32, Mac64 and apparently also CHRP32. Unfortunately it seems to have tripped over a firmware bug on some CHRP64 (IBM POWER5) boxen -- they don't like having &device; appear multiple times in the boot-script.
Evil attempt to avoid having more than one instance of '&device;'. Unfortunately still doesn't work on the POWER5 though: "/cpus, unknown word". <boot-script> : STRING+ ( bufaddr buftextlen addr len -- bufaddr buftextlen+len ) 2OVER + ( ba btl a l bta+btl ) SWAP DUP >R ( ba btl a bta+btl l ) ( r: l ) MOVE R> + ; : strdup ( addr len -- dupaddr duplen addr len ) dup ( addr len len) alloc-mem ( addr len dupaddr ) swap ( addr dupaddr len ) 2dup >r >r move r> r> ( dupaddr len ) ; " /cpus/@0" find-package if " 64-bit" rot get-package-property 0= if 2drop " 64" else " 32" then else " 32" then strdup " &device;" strdup 256 alloc-mem 0 " boot " string+ 2over \ 'device' 'boot ' 'device' '64' string+ \ 'boot device' 'device' '64' " :,\ppc\yaboot.chrp conf=" string+ \ 'boot...conf=' 'device' '64' 2swap \ 'device' 'boot dev...conf=' string+ \ 'boot...conf=device' '64' " :,\ppc\ppc" string+ \ 'boot...\ppc\ppc' '64' 2swap \ '64' 'boot...\ppc\ppc' string+ \ 'boot...\ppc\ppc64' " \yaboot.conf" string+ eval </boot-script>
According to IBM, their firmware will break if the _expanded_ boot-script becomes longer than 256 characters. We'll need to come up with an alternative way to choose between 64-bit and 32-bit; probably a hack in yaboot.
Note to self: Make sure the resulting single CD also has instructions on tftp-booting into the installer.
Created attachment 119031 [details] Replacement patch This version is tested successfully on mac32, mac64 and chrp64. It avoids the IBM firmware problems by using a single yaboot.conf with both 32-bit and 64-bit kernels and asking the user to choose between them instead of doing it automatically as we'd prefer, and as we do on the Mac.
Resulting CD image verified on CHRP32 too. Please apply.
Confirmed booting here and changes look ok. Commited.