clean up config_files dir (and fix templates to match)
move arch-specific stuff to arch-specific subdirs and move all the common stuff to a subdir named 'common'. Also, rename '.profile' and '.bash_history' so you actually see them when you 'ls' the 'common' dir. also added some helpful(?) comments to the templates.
This commit is contained in:
parent
2f4b9c16b6
commit
0236440581
@ -1,6 +1,6 @@
|
||||
<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel"/>
|
||||
<%
|
||||
configdir="tmp/config_files"
|
||||
configdir="tmp/config_files/ppc"
|
||||
BOOTDIR="ppc"
|
||||
LIVEDIR="LiveOS"
|
||||
MACDIR=BOOTDIR+"/mac"
|
||||
@ -16,34 +16,40 @@ prepboot = ""
|
||||
mkdir ${LIVEDIR}
|
||||
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
||||
|
||||
## basic ppc stuff
|
||||
## install bootloaders
|
||||
mkdir ${BOOTDIR}
|
||||
## basic ppc stuff
|
||||
install ${configdir}/bootinfo.txt ${BOOTDIR}
|
||||
install boot/efika.forth ${BOOTDIR}
|
||||
## boot dir for CHRP systems
|
||||
mkdir ${BOOTDIR}/chrp
|
||||
install usr/lib/yaboot/yaboot ${BOOTDIR}/chrp
|
||||
runcmd ${inroot}/usr/lib/yaboot/addnote ${outroot}/${BOOTDIR}/chrp/yaboot
|
||||
## boot dir for PowerMacs
|
||||
mkdir ${MACDIR}
|
||||
install usr/lib/yaboot/yaboot ${MACDIR}
|
||||
install ${configdir}/ofboot.b ${MACDIR}
|
||||
|
||||
## NOTE: PPC is kind of funky. There's three possible "arch" setups here:
|
||||
## ppc, ppc64, and 'hybrid' (ppc userspace, both ppc & ppc64 kernels).
|
||||
|
||||
## Install kernel and bootloader config (in separate places for each arch)
|
||||
%for kernel in kernels:
|
||||
<%
|
||||
bits = 64 if kernel.arch == "ppc64" else 32
|
||||
## separate dirs/images for each arch
|
||||
KERNELDIR=BOOTDIR+"/ppc%s" % bits
|
||||
NETIMG=NETBOOTDIR+"/ppc%s.img" % bits
|
||||
bitsizes.add(bits)
|
||||
%>
|
||||
## install kernel
|
||||
mkdir ${KERNELDIR} ${NETBOOTDIR}
|
||||
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
||||
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
||||
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
|
||||
replace @PRODUCT@ ${product.name} ${KERNELDIR}/yaboot.conf
|
||||
replace @VERSION@ ${product.version} ${KERNELDIR}/yaboot.conf
|
||||
## install bootloader config
|
||||
install ${configdir}/yaboot.conf.in ${KERNELDIR}/yaboot.conf
|
||||
replace @BITS@ ${bits} ${KERNELDIR}/yaboot.conf
|
||||
replace @ROOT@ root=live:CDLABEL=PBOOT ${KERNELDIR}/yaboot.conf
|
||||
|
||||
## kernel-wrapper magic that makes the netboot combined ppc{32,64}.img
|
||||
runcmd ${inroot}/${WRAPPER} -p of \
|
||||
@ -59,20 +65,22 @@ install ${configdir}/ofboot.b ${MACDIR}
|
||||
%endif
|
||||
%endfor
|
||||
|
||||
runcmd ${inroot}/usr/lib/yaboot/addnote ${outroot}/${BOOTDIR}/chrp/yaboot
|
||||
|
||||
## copy yaboot.conf into /etc
|
||||
## copy correct yaboot.conf into /etc
|
||||
mkdir etc
|
||||
%if len(bitsizes) == 2:
|
||||
## magic ppc biarch tree! we need magic ppc biarch config.
|
||||
## hybrid - use the magic hybrid config
|
||||
install ${configdir}/yaboot.conf.3264 etc/yaboot.conf
|
||||
replace @PRODUCT@ ${product.name} etc/yaboot.conf
|
||||
replace @VERSION@ ${product.version} etc/yaboot.conf
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' etc/yaboot.conf
|
||||
%else:
|
||||
## single arch - use the yaboot.conf we created above
|
||||
copy ${KERNELDIR}/yaboot.conf etc/yaboot.conf
|
||||
%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
|
||||
runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \
|
||||
${prepboot} -part -hfs -T -r -l -J \
|
||||
-A "${product.name} ${product.version}" -sysid PPC -V '${isolabel}' \
|
||||
|
@ -9,6 +9,7 @@ KEYMAP_OVERRIDE = "usr/share/anaconda/keymaps-override-%s" % filearch
|
||||
SCREENFONT = "usr/share/anaconda/screenfont-%s.gz" % filearch
|
||||
PYTHONDIR = glob("usr/"+libdir+"/python?.?")[0]
|
||||
stubs = ("list-harddrives", "loadkeys", "raidstart", "raidstop")
|
||||
configdir = configdir + "/common"
|
||||
%>
|
||||
|
||||
## create_keymaps()
|
||||
@ -57,8 +58,8 @@ symlink /sbin/init init
|
||||
append etc/resolv.conf ""
|
||||
copy usr/share/anaconda/lang-table etc
|
||||
install ${configdir}/rsyslog.conf etc
|
||||
install ${configdir}/.bash_history root
|
||||
install ${configdir}/.profile root
|
||||
install ${configdir}/bash_history root/.bash_history
|
||||
install ${configdir}/profile root/.profile
|
||||
install ${configdir}/libuser.conf etc
|
||||
%if exists(root+"/etc/selinux/targeted"):
|
||||
install ${configdir}/selinux.config etc/selinux/config
|
||||
|
@ -1,6 +1,6 @@
|
||||
<%page args="kernels, runtime_img, basearch, outroot"/>
|
||||
<%
|
||||
configdir="tmp/config_files"
|
||||
configdir="tmp/config_files/s390"
|
||||
BOOTDIR="images"
|
||||
KERNELDIR=BOOTDIR
|
||||
INITRD_ADDRESS="0x02000000"
|
||||
@ -12,19 +12,27 @@ kernel = kernels[0]
|
||||
mkdir images
|
||||
install ${runtime_img} images
|
||||
|
||||
## install bootloader (such as it is) and bootloader config
|
||||
install ${configdir}/redhat.exec ${BOOTDIR}
|
||||
install ${configdir}/generic.prm ${BOOTDIR}
|
||||
install ${configdir}/generic.ins .
|
||||
|
||||
## configure bootloader
|
||||
replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
|
||||
|
||||
## install kernel
|
||||
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
||||
|
||||
## s390 needs some extra boot config
|
||||
runcmd usr/libexec/anaconda/addrsize ${INITRD_ADDRESS} ${KERNELDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd_addrsize
|
||||
|
||||
## s390 also has some special treeinfo data
|
||||
treeinfo images-${basearch} initrd.addrsize ${BOOTDIR}/initrd_addrsize
|
||||
treeinfo images-${basearch} generic.prm ${BOOTDIR}/generic.prm
|
||||
treeinfo images-${basearch} generic.ins generic.ins
|
||||
|
||||
## make cdboot.img
|
||||
runcmd ${MKCDBOOT} \
|
||||
-i ${outroot}/${kernel.path} \
|
||||
-r ${outroot}/${kernel.initrd.path} \
|
||||
|
@ -1,6 +1,6 @@
|
||||
<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
|
||||
<%
|
||||
configdir="tmp/config_files"
|
||||
configdir="tmp/config_files/sparc"
|
||||
BOOTDIR="boot"
|
||||
LIVEDIR="LiveOS"
|
||||
%>
|
||||
@ -8,20 +8,24 @@ LIVEDIR="LiveOS"
|
||||
mkdir ${LIVEDIR}
|
||||
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
||||
|
||||
## install bootloader and config files
|
||||
install boot/*.b ${BOOTDIR}
|
||||
install ${configdir}/silo.conf ${BOOTDIR}
|
||||
install ${configdir}/boot.msg.sparc ${BOOTDIR}/boot.msg
|
||||
install ${configdir}/boot.msg ${BOOTDIR}
|
||||
|
||||
## configure bootloader
|
||||
replace @VERSION@ ${product.version} ${BOOTDIR}/boot.msg
|
||||
replace @PRODUCT@ ${product.name} ${BOOTDIR}/boot.msg
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/silo.conf
|
||||
|
||||
## install kernels
|
||||
## FIXME: this will overwrite if there are multiple sparc kernels
|
||||
%for kernel in kernels:
|
||||
installkernel images-${basearch} ${kernel.path} ${BOOTDIR}/vmlinuz
|
||||
installinitrd images-${basearch} ${kernel.initrd.path} ${BOOTDIR}/initrd.img
|
||||
%endfor
|
||||
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/silo.conf
|
||||
|
||||
## make boot.iso
|
||||
runcmd mkisofs -R -J -T -G /${BOOTDIR}/isofs.b -B ... \
|
||||
-s /${BOOTDIR}/silo.conf -r -V '${isolabel}' \
|
||||
-A "${product.name} ${product.version}" \
|
||||
|
@ -1,6 +1,6 @@
|
||||
<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
|
||||
<%
|
||||
configdir="tmp/config_files"
|
||||
configdir="tmp/config_files/x86"
|
||||
SYSLINUXDIR="usr/share/syslinux"
|
||||
PXEBOOTDIR="images/pxeboot"
|
||||
BOOTDIR="isolinux"
|
||||
@ -11,18 +11,22 @@ LIVEDIR="LiveOS"
|
||||
mkdir ${LIVEDIR}
|
||||
install ${runtime_img} ${LIVEDIR}/squashfs.img
|
||||
|
||||
mkdir ${BOOTDIR} ${KERNELDIR}
|
||||
## install bootloader and config files
|
||||
mkdir ${BOOTDIR}
|
||||
install ${SYSLINUXDIR}/isolinux.bin ${BOOTDIR}
|
||||
install ${configdir}/isolinux.cfg ${BOOTDIR}/isolinux.cfg
|
||||
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
|
||||
install ${configdir}/boot.msg.x86 ${BOOTDIR}/boot.msg
|
||||
install ${SYSLINUXDIR}/vesamenu.c32 ${BOOTDIR}
|
||||
install ${configdir}/isolinux.cfg ${BOOTDIR}
|
||||
install ${configdir}/boot.msg ${BOOTDIR}
|
||||
install ${configdir}/grub.conf ${BOOTDIR}
|
||||
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
|
||||
|
||||
## configure bootloader
|
||||
replace @VERSION@ ${product.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
|
||||
replace @PRODUCT@ ${product.name} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
|
||||
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
|
||||
|
||||
## install kernels
|
||||
mkdir ${KERNELDIR}
|
||||
%for kernel in kernels:
|
||||
%if kernel.flavor:
|
||||
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
|
||||
@ -53,6 +57,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
|
||||
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch=efiarch"/>
|
||||
%endif
|
||||
|
||||
## make boot.iso
|
||||
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
||||
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
|
||||
-boot-load-size 4 -boot-info-table -no-emul-boot \
|
||||
|
Loading…
Reference in New Issue
Block a user