ppc.tmpl: clarify comments, fix yaboot.conf for Apple systems
So there's actually two copies of yaboot on a PPC image, and they each use different config files: ppc/chrp/yaboot --> /etc/yaboot.conf ppc/mac/yaboot --> /ppc/ppc{32,64}/yaboot.conf So we need two copies of yaboot.conf - one in each place - to boot properly (or all three if we're making hybrid images). Whee! The comments should now make this more clear for future reference.
This commit is contained in:
parent
e587f893d8
commit
86937d2c0a
@ -11,21 +11,27 @@ WRAPPER_DATA="usr/"+libdir+"/kernel-wrapper"
|
|||||||
|
|
||||||
bitsizes = set()
|
bitsizes = set()
|
||||||
prepboot = ""
|
prepboot = ""
|
||||||
|
rootarg = "root=live:CDLABEL=%s" % udev(isolabel)
|
||||||
%>
|
%>
|
||||||
|
|
||||||
mkdir ${LIVEDIR}
|
mkdir ${LIVEDIR}
|
||||||
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
||||||
|
|
||||||
## install bootloaders
|
## install bootloaders.
|
||||||
|
## NOTE: there's two different bootloader setups here:
|
||||||
|
## ppc/chrp: for normal PPC systems. needs 'addnote' run on yaboot.
|
||||||
|
## uses /etc/yaboot.conf, as is the default.
|
||||||
|
## ppc/mac: for PowerMacs. no 'addnote' (it breaks some Macs!)
|
||||||
|
## ofboot.b picks one of /ppc/ppc{32,64}/yaboot.conf for yaboot,
|
||||||
|
## thus automatically booting the correct kernel for the machine.
|
||||||
mkdir ${BOOTDIR}
|
mkdir ${BOOTDIR}
|
||||||
## basic ppc stuff
|
## boot stuff for normal (CHRP/PREP) PPC systems
|
||||||
install ${configdir}/bootinfo.txt ${BOOTDIR}
|
install ${configdir}/bootinfo.txt ${BOOTDIR}
|
||||||
install boot/efika.forth ${BOOTDIR}
|
install boot/efika.forth ${BOOTDIR}
|
||||||
## boot dir for CHRP systems
|
|
||||||
mkdir ${BOOTDIR}/chrp
|
mkdir ${BOOTDIR}/chrp
|
||||||
install usr/lib/yaboot/yaboot ${BOOTDIR}/chrp
|
install usr/lib/yaboot/yaboot ${BOOTDIR}/chrp
|
||||||
runcmd ${inroot}/usr/lib/yaboot/addnote ${outroot}/${BOOTDIR}/chrp/yaboot
|
runcmd ${inroot}/usr/lib/yaboot/addnote ${outroot}/${BOOTDIR}/chrp/yaboot
|
||||||
## boot dir for PowerMacs
|
## special boot dir for PowerMacs
|
||||||
mkdir ${MACDIR}
|
mkdir ${MACDIR}
|
||||||
install usr/lib/yaboot/yaboot ${MACDIR}
|
install usr/lib/yaboot/yaboot ${MACDIR}
|
||||||
install ${configdir}/ofboot.b ${MACDIR}
|
install ${configdir}/ofboot.b ${MACDIR}
|
||||||
@ -47,9 +53,12 @@ install ${configdir}/ofboot.b ${MACDIR}
|
|||||||
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||||
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||||
|
|
||||||
## install bootloader config
|
## install arch-specific bootloader config
|
||||||
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
||||||
replace @BITS@ ${bits} ${KERNELDIR}/yaboot.conf
|
replace @BITS@ ${bits} ${KERNELDIR}/yaboot.conf
|
||||||
|
replace @PRODUCT@ ${product.name} ${KERNELDIR}/yaboot.conf
|
||||||
|
replace @VERSION@ ${product.version} ${KERNELDIR}/yaboot.conf
|
||||||
|
replace @ROOT@ "${rootarg}" ${KERNELDIR}/yaboot.conf
|
||||||
|
|
||||||
## kernel-wrapper magic that makes the netboot combined ppc{32,64}.img
|
## kernel-wrapper magic that makes the netboot combined ppc{32,64}.img
|
||||||
runcmd ${inroot}/${WRAPPER} -p of \
|
runcmd ${inroot}/${WRAPPER} -p of \
|
||||||
@ -65,21 +74,19 @@ install ${configdir}/ofboot.b ${MACDIR}
|
|||||||
%endif
|
%endif
|
||||||
%endfor
|
%endfor
|
||||||
|
|
||||||
## copy correct yaboot.conf into /etc
|
## choose correct yaboot.conf
|
||||||
mkdir etc
|
mkdir etc
|
||||||
%if len(bitsizes) == 2:
|
%if len(bitsizes) == 2:
|
||||||
## hybrid - use the magic hybrid config
|
## both kernels means hybrid - use the magic hybrid config
|
||||||
install ${configdir}/yaboot.conf.3264 etc/yaboot.conf
|
install ${configdir}/yaboot.conf.3264 etc/yaboot.conf
|
||||||
|
replace @PRODUCT@ ${product.name} etc/yaboot.conf
|
||||||
|
replace @VERSION@ ${product.version} etc/yaboot.conf
|
||||||
|
replace @ROOT@ "${rootarg}" etc/yaboot.conf
|
||||||
%else:
|
%else:
|
||||||
## single arch - use the yaboot.conf we created above
|
## single arch - use the arch-specific yaboot.conf from above
|
||||||
copy ${KERNELDIR}/yaboot.conf etc/yaboot.conf
|
copy ${KERNELDIR}/yaboot.conf etc/yaboot.conf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
## configure bootloader
|
|
||||||
replace @PRODUCT@ ${product.name} etc/yaboot.conf
|
|
||||||
replace @VERSION@ ${product.version} etc/yaboot.conf
|
|
||||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' etc/yaboot.conf
|
|
||||||
|
|
||||||
## make boot.iso
|
## make boot.iso
|
||||||
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
||||||
${prepboot} -part -hfs -T -r -l -J \
|
${prepboot} -part -hfs -T -r -l -J \
|
||||||
@ -93,9 +100,6 @@ runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
|||||||
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \
|
||||||
${LIVEDIR}=${outroot}/${LIVEDIR}
|
${LIVEDIR}=${outroot}/${LIVEDIR}
|
||||||
|
|
||||||
%if len(bitsizes) == 2:
|
%for kernel in kernels:
|
||||||
treeinfo images-ppc boot.iso images/boot.iso
|
|
||||||
treeinfo images-ppc64 boot.iso images/boot.iso
|
|
||||||
%else:
|
|
||||||
treeinfo images-${kernel.arch} boot.iso images/boot.iso
|
treeinfo images-${kernel.arch} boot.iso images/boot.iso
|
||||||
%endif
|
%endfor
|
||||||
|
Loading…
Reference in New Issue
Block a user