ppc.tmpl: clean up zimage building

remove deprecated "mkzimage" stuff (gone since F10)
clean up the call to 'wrapper'
assume we'll always build zimages
This commit is contained in:
Will Woods 2011-07-01 13:05:11 -04:00
parent 41ca62d30b
commit c5bfdf0e71

View File

@ -4,12 +4,11 @@ BOOTDIR="ppc"
MACDIR=BOOTDIR+"/mac" MACDIR=BOOTDIR+"/mac"
NETBOOTDIR="images/netboot" NETBOOTDIR="images/netboot"
MKZIMAGE="usr/bin/mkzimage"
ZSTUB="usr/share/ppc64-utils/zImage.stub"
WRAPPER="usr/sbin/wrapper" WRAPPER="usr/sbin/wrapper"
WRAPPER_A="usr/"+libdir+"/kernel-wrapper/wrapper.a" WRAPPER_DATA="usr/"+libdir+"/kernel-wrapper"
MAPPING=ANABOOTDIR+"/mapping" MAPPING=ANABOOTDIR+"/mapping"
MAGIC=ANABOOTDIR+"/magic" MAGIC=ANABOOTDIR+"/magic"
bitsizes = set() bitsizes = set()
prepboot = "" prepboot = ""
macboot = "" macboot = ""
@ -52,28 +51,16 @@ install ofboot.b ${MACDIR}
## FIXME: root=%ROOT% should really be in the config somewhere ## FIXME: root=%ROOT% should really be in the config somewhere
replace "read-only" "read-only\n\tappend=\"root=live:CDLABEL=PBOOT\"" replace "read-only" "read-only\n\tappend=\"root=live:CDLABEL=PBOOT\""
## kernel-wrapper magic that makes the netboot combined ppc{32,64}.img
## Weirdo wrapper junk that makes the netboot combined ppc{32,64}.img runcmd ${inroot}/${WRAPPER} -D ${inroot}/${WRAPPER_DATA} \
%if exists(MKZIMAGE) and exists(ZSTUB): -i ${KERNELDIR}/initrd.img ${KERNELDIR}/vmlinuz \
copy usr/${libdir}/kernel-wrapper/zImage.lds ${KERNELDIR} -p openfirmware -o ${outroot}/${NETIMG}
runcmd chdir=${KERNELDIR} ${inroot}/${MKZIMAGE} vmlinuz no no initrd.img \ treeinfo images-${kernel.arch} zimage ${NETIMG}
${inroot}/${ZSTUB} ${outroot}/${NETIMG}
remove ${KERNELDIR}/zImage.lds
treeinfo images-${kernel.arch} zimage ${NETIMG}
%elif exists(WRAPPER) and exists(WRAPPER_A):
runcmd chdir=${KERNELDIR} ${inroot}/${WRAPPER} -o ${outroot}/${NETIMG} \
-i initrd.img -D ${inroot}/${os.path.dirname(WRAPPER_A)} vmlinuz
treeinfo images-${kernel.arch} zimage ${NETIMG}
%endif
%if exists(NETIMG) and bits == 32: %if exists(NETIMG) and bits == 32:
<% prepboot="-prep-boot " + NETIMG %> <% prepboot="-prep-boot " + NETIMG %>
%endif %endif
%endfor %endfor
%if not exists(NETBOOTDIR+"/*.img"):
remove ${NETBOOTDIR}
%endif
runcmd usr/lib/yaboot/addnote ${outroot}/${BOOTDIR}/chrp/yaboot runcmd usr/lib/yaboot/addnote ${outroot}/${BOOTDIR}/chrp/yaboot
%if len(bitsizes) == 2: %if len(bitsizes) == 2: