From be7f46566bbf4e0ac2c14f99cc2dd044be6c0f65 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 7 Aug 2025 11:41:44 -0700 Subject: [PATCH] 80-rhel: Remove unused templates and config files The arm.tmpl and ppc.tmpl templates are not used. Most of the ppc config files are also not used (only bootinfo.txt and grub.cfg.in are used by ppc64le.tmpl so they remain). Resolves: RHEL-108149 --- 80-rhel/arm.tmpl | 58 -------- 80-rhel/config_files/ppc/mapping | 28 ---- 80-rhel/config_files/ppc/ofboot.b | 74 ---------- 80-rhel/config_files/ppc/yaboot.conf.3264 | 16 --- 80-rhel/config_files/ppc/yaboot.conf.in | 9 -- 80-rhel/live/arm.tmpl | 52 ------- 80-rhel/live/config_files/ppc/mapping | 27 ---- 80-rhel/live/config_files/ppc/ofboot.b | 74 ---------- .../live/config_files/ppc/yaboot.conf.3264 | 16 --- 80-rhel/live/config_files/ppc/yaboot.conf.in | 9 -- 80-rhel/live/ppc.tmpl | 127 ------------------ 80-rhel/ppc.tmpl | 117 ---------------- 12 files changed, 607 deletions(-) delete mode 100644 80-rhel/arm.tmpl delete mode 100644 80-rhel/config_files/ppc/mapping delete mode 100644 80-rhel/config_files/ppc/ofboot.b delete mode 100644 80-rhel/config_files/ppc/yaboot.conf.3264 delete mode 100644 80-rhel/config_files/ppc/yaboot.conf.in delete mode 100644 80-rhel/live/arm.tmpl delete mode 100644 80-rhel/live/config_files/ppc/mapping delete mode 100644 80-rhel/live/config_files/ppc/ofboot.b delete mode 100644 80-rhel/live/config_files/ppc/yaboot.conf.3264 delete mode 100644 80-rhel/live/config_files/ppc/yaboot.conf.in delete mode 100644 80-rhel/live/ppc.tmpl delete mode 100644 80-rhel/ppc.tmpl diff --git a/80-rhel/arm.tmpl b/80-rhel/arm.tmpl deleted file mode 100644 index d96e26b..0000000 --- a/80-rhel/arm.tmpl +++ /dev/null @@ -1,58 +0,0 @@ -<%page args="kernels, runtime_img, runtime_base, basearch, outroot, arch"/> -<% -configdir="tmp/config_files/uboot" -PXEBOOTDIR="images/pxeboot" -DTBDIR="images/pxeboot/dtb" -BOOTDIR="boot" -KERNELDIR=PXEBOOTDIR -STAGE2IMG="images/install.img" -LORAXDIR="usr/share/lorax/" - -# keep a comma-delimited list of platforms installed to add to .treeinfo -platforms = "" -delimiter = '' - -from os.path import basename -%> - -mkdir images -install ${runtime_img} ${STAGE2IMG} -treeinfo stage2 mainimage ${STAGE2IMG} - -mkdir ${DTBDIR} -install boot/dtb-*/*dtb ${DTBDIR}/ - -## install kernels -mkdir ${KERNELDIR} -%for kernel in kernels: - %if kernel.flavor: - installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor} - installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img -<% - platforms = platforms + delimiter + kernel.flavor - delimiter = ',' -%> - %else: - installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz - installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img - %endif -%endfor - -# add platform to treeinfo for Beaker support -treeinfo ${basearch} platforms ${platforms} - -# Create optional product.img and updates.img -<% images=["product", "updates"] %> -%for img in images: - %if exists("%s/%s/" % (LORAXDIR, img)): - installimg --xz -9 --memlimit-compress=3700MiB ${LORAXDIR}/${img}/ images/${img}.img - treeinfo images-${basearch} ${img}.img images/${img}.img - %endif -%endfor - -# Add the license files -%for f in glob("/usr/share/licenses/*-release/*"): - install ${f} ${f|basename} -%endfor - -## FIXME: ARM may need some extra boot config diff --git a/80-rhel/config_files/ppc/mapping b/80-rhel/config_files/ppc/mapping deleted file mode 100644 index c3eec9e..0000000 --- a/80-rhel/config_files/ppc/mapping +++ /dev/null @@ -1,28 +0,0 @@ -# Example filename mapping file -# -# yaboot Raw 'UNIX' 'boot' "Bootstrap" -# vmlinux Raw 'UNIX' 'boot' "Bootstrap" -# -# EXTN XLate CREATOR TYPE Comment -COPYING Ascii 'ttxt' 'ttro' "Text File" -CREDITS Ascii 'ttxt' 'ttro' "Text File" -README Ascii 'ttxt' 'ttro' "Text File" -RPM-GPG-KEY Ascii 'ttxt' 'ttro' "Text File" -RELEASE_NOTES Ascii 'ttxt' 'ttro' "Text File" -.b Raw 'chrp' 'tbxi' "Macintosh Toolbox ROM file" -.gif Raw '8BIM' 'GIFf' "Gif File" -.jpg Raw '8BIM' 'JPEG' "Jpeg File" -.tif Raw '8BIM' 'TIFF' "Photoshop TIFF image" -.hqx Ascii 'BnHq' 'TEXT' "BinHex file" -.doc Raw 'MSWD' 'WDBN' "Word file" -.mov Raw 'TVOD' 'MooV' "QuickTime Movie" -.html Ascii 'MOSS' 'TEXT' "HTML File" -.htm Ascii 'MOSS' 'TEXT' "HTML File" -.conf Ascii 'ttxt' 'TEXT' "config file" -.txt Ascii 'ttxt' 'TEXT' "Text File" -.tbxi Raw 'chrp' 'tbxi' "Macintosh Toolbox ROM file" -.sea Raw 'aust' 'APPL' "Self Expanding Archive" -.sit Raw 'SIT!' 'SITD' "Stuffit Expander file" -core.elf Raw 'chrp' 'tbxi' "Bootable GRUB2 executable." -* Raw '????' '????' "Unknown" - diff --git a/80-rhel/config_files/ppc/ofboot.b b/80-rhel/config_files/ppc/ofboot.b deleted file mode 100644 index c811894..0000000 --- a/80-rhel/config_files/ppc/ofboot.b +++ /dev/null @@ -1,74 +0,0 @@ - - -MacRISC MacRISC3 MacRISC4 - - - -Boot Chooser - - - -" screen" output -load-base release-load-area -" /cpus/@0" find-package if - " 64-bit" rot get-package-property 0= if - 2drop - " boot cd:,\ppc\mac\yaboot conf=cd:,\ppc\ppc64\yaboot.conf" eval - else - " boot cd:,\ppc\mac\yaboot conf=cd:,\ppc\ppc32\yaboot.conf" eval - then -then - - - -1010 -000000000000F8FEACF6000000000000 -0000000000F5FFFFFEFEF50000000000 -00000000002BFAFEFAFCF70000000000 -0000000000F65D5857812B0000000000 -0000000000F5350B2F88560000000000 -0000000000F6335708F8FE0000000000 -00000000005600F600F5FD8100000000 -00000000F9F8000000F5FAFFF8000000 -000000008100F5F50000F6FEFE000000 -000000F8F700F500F50000FCFFF70000 -00000088F70000F50000F5FCFF2B0000 -0000002F582A00F5000008ADE02C0000 -00090B0A35A62B0000002D3B350A0000 -000A0A0B0B3BF60000505E0B0A0B0A00 -002E350B0B2F87FAFCF45F0B2E090000 -00000007335FF82BF72B575907000000 -000000000000ACFFFF81000000000000 -000000000081FFFFFFFF810000000000 -0000000000FBFFFFFFFFAC0000000000 -000000000081DFDFDFFFFB0000000000 -000000000081DD5F83FFFD0000000000 -000000000081DDDF5EACFF0000000000 -0000000000FDF981F981FFFF00000000 -00000000FFACF9F9F981FFFFAC000000 -00000000FFF98181F9F981FFFF000000 -000000ACACF981F981F9F9FFFFAC0000 -000000FFACF9F981F9F981FFFFFB0000 -00000083DFFBF981F9F95EFFFFFC0000 -005F5F5FDDFFFBF9F9F983DDDD5F0000 -005F5F5F5FDD81F9F9E7DF5F5F5F5F00 -0083DD5F5F83FFFFFFFFDF5F835F0000 -000000FBDDDFACFBACFBDFDFFB000000 -000000000000FFFFFFFF000000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFFFF00000000 -00000000FFFFFFFFFFFFFFFFFF000000 -00000000FFFFFFFFFFFFFFFFFF000000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFF000000 - - diff --git a/80-rhel/config_files/ppc/yaboot.conf.3264 b/80-rhel/config_files/ppc/yaboot.conf.3264 deleted file mode 100644 index 7aa6305..0000000 --- a/80-rhel/config_files/ppc/yaboot.conf.3264 +++ /dev/null @@ -1,16 +0,0 @@ -init-message = "\nWelcome to the @PRODUCT@ @VERSION@ installer!\nUse 'linux32' for 32-bit kernel.\n\n" -timeout=6000 -default=linux - -image=/ppc/ppc64/vmlinuz - label=linux64 - alias=linux - initrd=/ppc/ppc64/ramdisk.image.gz - read-only - append="@ROOT@" - -image=/ppc/ppc32/vmlinuz - label=linux32 - initrd=/ppc/ppc32/ramdisk.image.gz - read-only - append="@ROOT@" diff --git a/80-rhel/config_files/ppc/yaboot.conf.in b/80-rhel/config_files/ppc/yaboot.conf.in deleted file mode 100644 index 0a6bafc..0000000 --- a/80-rhel/config_files/ppc/yaboot.conf.in +++ /dev/null @@ -1,9 +0,0 @@ -init-message = "\nWelcome to the @BITS@-bit @PRODUCT@ @VERSION@ installer!\nHit for boot options.\n\n" -timeout=6000 -default=linux - -image=/ppc/ppc@BITS@/vmlinuz - label=linux - initrd=/ppc/ppc@BITS@/initrd.img - read-only - append="@ROOT@" diff --git a/80-rhel/live/arm.tmpl b/80-rhel/live/arm.tmpl deleted file mode 100644 index 30f1222..0000000 --- a/80-rhel/live/arm.tmpl +++ /dev/null @@ -1,52 +0,0 @@ -<%page args="kernels, runtime_img, runtime_base, basearch, outroot, arch"/> -<% -configdir="tmp/config_files/uboot" -PXEBOOTDIR="images/pxeboot" -BOOTDIR="boot" -KERNELDIR=PXEBOOTDIR -LIVEDIR="LiveOS" -LORAXDIR="usr/share/lorax/" - -from os.path import basename -%> - -mkdir ${LIVEDIR} -install ${runtime_img} ${LIVEDIR}/squashfs.img -treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img - -## install kernels -mkdir ${KERNELDIR} -%for kernel in kernels: - %if kernel.flavor: - installkernel images-${kernel.flavor}-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor} - installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img - - treeinfo images-${kernel.flavor}-${basearch} uimage ${KERNELDIR}/uImage-${kernel.flavor} - treeinfo images-${kernel.flavor}-${basearch} uinitrd ${KERNELDIR}/uInitrd-${kernel.flavor} - - %else: - installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz - installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img - - treeinfo images-${basearch} uimage ${KERNELDIR}/uImage - treeinfo images-${basearch} uinitrd ${KERNELDIR}/uInitrd - - %endif -%endfor - -# Create optional product.img and updates.img -<% images=["product", "updates"] %> -%for img in images: - %if exists("%s/%s/" % (LORAXDIR, img)): - installimg --xz -9 --memlimit-compress=3700MiB ${LORAXDIR}/${img}/ images/${img}.img - treeinfo images-${basearch} ${img}.img images/${img}.img - %endif -%endfor - -# Add the license files -%for f in glob("/usr/share/licenses/*-release/*"): - install ${f} ${f|basename} -%endfor - -## FIXME: ARM may need some extra boot config - diff --git a/80-rhel/live/config_files/ppc/mapping b/80-rhel/live/config_files/ppc/mapping deleted file mode 100644 index cf83076..0000000 --- a/80-rhel/live/config_files/ppc/mapping +++ /dev/null @@ -1,27 +0,0 @@ -# Example filename mapping file -# -# yaboot Raw 'UNIX' 'boot' "Bootstrap" -# vmlinux Raw 'UNIX' 'boot' "Bootstrap" -# -# EXTN XLate CREATOR TYPE Comment -COPYING Ascii 'ttxt' 'ttro' "Text File" -CREDITS Ascii 'ttxt' 'ttro' "Text File" -README Ascii 'ttxt' 'ttro' "Text File" -RPM-GPG-KEY Ascii 'ttxt' 'ttro' "Text File" -RELEASE_NOTES Ascii 'ttxt' 'ttro' "Text File" -.b Raw 'chrp' 'tbxi' "Macintosh Toolbox ROM file" -.gif Raw '8BIM' 'GIFf' "Gif File" -.jpg Raw '8BIM' 'JPEG' "Jpeg File" -.tif Raw '8BIM' 'TIFF' "Photoshop TIFF image" -.hqx Ascii 'BnHq' 'TEXT' "BinHex file" -.doc Raw 'MSWD' 'WDBN' "Word file" -.mov Raw 'TVOD' 'MooV' "QuickTime Movie" -.html Ascii 'MOSS' 'TEXT' "HTML File" -.htm Ascii 'MOSS' 'TEXT' "HTML File" -.conf Ascii 'ttxt' 'TEXT' "config file" -.txt Ascii 'ttxt' 'TEXT' "Text File" -.tbxi Raw 'chrp' 'tbxi' "Macintosh Toolbox ROM file" -.sea Raw 'aust' 'APPL' "Self Expanding Archive" -.sit Raw 'SIT!' 'SITD' "Stuffit Expander file" -* Raw '????' '????' "Unknown" - diff --git a/80-rhel/live/config_files/ppc/ofboot.b b/80-rhel/live/config_files/ppc/ofboot.b deleted file mode 100644 index c811894..0000000 --- a/80-rhel/live/config_files/ppc/ofboot.b +++ /dev/null @@ -1,74 +0,0 @@ - - -MacRISC MacRISC3 MacRISC4 - - - -Boot Chooser - - - -" screen" output -load-base release-load-area -" /cpus/@0" find-package if - " 64-bit" rot get-package-property 0= if - 2drop - " boot cd:,\ppc\mac\yaboot conf=cd:,\ppc\ppc64\yaboot.conf" eval - else - " boot cd:,\ppc\mac\yaboot conf=cd:,\ppc\ppc32\yaboot.conf" eval - then -then - - - -1010 -000000000000F8FEACF6000000000000 -0000000000F5FFFFFEFEF50000000000 -00000000002BFAFEFAFCF70000000000 -0000000000F65D5857812B0000000000 -0000000000F5350B2F88560000000000 -0000000000F6335708F8FE0000000000 -00000000005600F600F5FD8100000000 -00000000F9F8000000F5FAFFF8000000 -000000008100F5F50000F6FEFE000000 -000000F8F700F500F50000FCFFF70000 -00000088F70000F50000F5FCFF2B0000 -0000002F582A00F5000008ADE02C0000 -00090B0A35A62B0000002D3B350A0000 -000A0A0B0B3BF60000505E0B0A0B0A00 -002E350B0B2F87FAFCF45F0B2E090000 -00000007335FF82BF72B575907000000 -000000000000ACFFFF81000000000000 -000000000081FFFFFFFF810000000000 -0000000000FBFFFFFFFFAC0000000000 -000000000081DFDFDFFFFB0000000000 -000000000081DD5F83FFFD0000000000 -000000000081DDDF5EACFF0000000000 -0000000000FDF981F981FFFF00000000 -00000000FFACF9F9F981FFFFAC000000 -00000000FFF98181F9F981FFFF000000 -000000ACACF981F981F9F9FFFFAC0000 -000000FFACF9F981F9F981FFFFFB0000 -00000083DFFBF981F9F95EFFFFFC0000 -005F5F5FDDFFFBF9F9F983DDDD5F0000 -005F5F5F5FDD81F9F9E7DF5F5F5F5F00 -0083DD5F5F83FFFFFFFFDF5F835F0000 -000000FBDDDFACFBACFBDFDFFB000000 -000000000000FFFFFFFF000000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFF0000000000 -0000000000FFFFFFFFFFFFFF00000000 -00000000FFFFFFFFFFFFFFFFFF000000 -00000000FFFFFFFFFFFFFFFFFF000000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 -00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 -000000FFFFFFFFFFFFFFFFFFFF000000 - - diff --git a/80-rhel/live/config_files/ppc/yaboot.conf.3264 b/80-rhel/live/config_files/ppc/yaboot.conf.3264 deleted file mode 100644 index 7aa6305..0000000 --- a/80-rhel/live/config_files/ppc/yaboot.conf.3264 +++ /dev/null @@ -1,16 +0,0 @@ -init-message = "\nWelcome to the @PRODUCT@ @VERSION@ installer!\nUse 'linux32' for 32-bit kernel.\n\n" -timeout=6000 -default=linux - -image=/ppc/ppc64/vmlinuz - label=linux64 - alias=linux - initrd=/ppc/ppc64/ramdisk.image.gz - read-only - append="@ROOT@" - -image=/ppc/ppc32/vmlinuz - label=linux32 - initrd=/ppc/ppc32/ramdisk.image.gz - read-only - append="@ROOT@" diff --git a/80-rhel/live/config_files/ppc/yaboot.conf.in b/80-rhel/live/config_files/ppc/yaboot.conf.in deleted file mode 100644 index 5d5d872..0000000 --- a/80-rhel/live/config_files/ppc/yaboot.conf.in +++ /dev/null @@ -1,9 +0,0 @@ -init-message = "\nWelcome to the @BITS@-bit @PRODUCT@ @VERSION@ installer!\nHit for boot options.\n\n" -timeout=6000 -default=linux - -image=/ppc/ppc@BITS@/vmlinuz - label=linux - initrd=/ppc/ppc@BITS@/initrd.img - read-only - append="@ROOT@ rd.live.image quiet" diff --git a/80-rhel/live/ppc.tmpl b/80-rhel/live/ppc.tmpl deleted file mode 100644 index 9b883f7..0000000 --- a/80-rhel/live/ppc.tmpl +++ /dev/null @@ -1,127 +0,0 @@ -<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel, extra_boot_args"/> -<% -configdir="tmp/config_files/ppc" -BOOTDIR="ppc" -GRUBDIR="boot/grub" -LIVEDIR="LiveOS" -MACDIR=BOOTDIR+"/mac" -NETBOOTDIR="images/netboot" -LORAXDIR="usr/share/lorax/" - -WRAPPER="usr/sbin/wrapper" -WRAPPER_DATA="usr/"+libdir+"/kernel-wrapper" - -prepboot = "" - -## NOTE: yaboot freaks out and stops parsing its config if it sees a '\', -## so we can't use the udev escape sequences in the root arg. -## Instead we'll just replace any non-ASCII characters in the isolabel -## with '_', which means we won't need any udev escapes. -isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel) - -from os.path import basename -%> - -## Test ${runtime_img} to see if udf is needed -<% - import os - from pylorax.sysutils import joinpaths - if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3: - udfargs = "-allow-limited-size" - else: - udfargs = "" -%> - -mkdir ${LIVEDIR} -install ${runtime_img} ${LIVEDIR}/squashfs.img -treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img - -## 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} -## boot stuff for normal (CHRP/PREP) PPC systems -install ${configdir}/bootinfo.txt ${BOOTDIR} - -mkdir ${GRUBDIR}/powerpc-ieee1275 -runcmd grub2-mkimage -O powerpc-ieee1275 -d /usr/lib/grub/powerpc-ieee1275 -p '()/boot/grub' \ --o ${outroot}/${GRUBDIR}/powerpc-ieee1275/core.elf iso9660 ext2 ofnet net tftp http -install /usr/lib/grub/powerpc-ieee1275/*.mod ${GRUBDIR}/powerpc-ieee1275 -install /usr/lib/grub/powerpc-ieee1275/*.lst ${GRUBDIR}/powerpc-ieee1275 - - -install ${configdir}/grub.cfg.in ${GRUBDIR}/grub.cfg -replace @PRODUCT@ '${product.name}' ${GRUBDIR}/grub.cfg -replace @VERSION@ ${product.version} ${GRUBDIR}/grub.cfg -replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${GRUBDIR}/grub.cfg -replace @EXTRA@ '${extra_boot_args}' ${GRUBDIR}/grub.cfg - -install ${configdir}/mapping ${BOOTDIR} - -## NOTE: PPC is kind of funky. There's three possible "arch" setups here: -## ppc, ppc64, ppc64le 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 in ("ppc64", "ppc64le") else 32 - ## separate dirs/images for each arch - KERNELDIR=BOOTDIR+"/ppc%s" % bits - NETIMG=NETBOOTDIR+"/ppc%s.img" % bits - %> - ## install kernel - mkdir ${KERNELDIR} ${NETBOOTDIR} - installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz - installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img - - ## kernel-wrapper magic that makes the netboot combined ppc{32,64}.img - runcmd ${inroot}/${WRAPPER} -p of \ - -D ${inroot}/${WRAPPER_DATA} \ - -i ${outroot}/${KERNELDIR}/initrd.img \ - ${outroot}/${KERNELDIR}/vmlinuz \ - -o ${outroot}/${NETIMG} - treeinfo images-${kernel.arch} zimage ${NETIMG} - ## PReP is 32-bit only - %if bits == 32: - ## Yes, this is supposed to be a relative path - <% prepboot="-prep-boot " + NETIMG %> - %endif -%endfor - -# Create optional product.img and updates.img -<% filegraft=""; images=["product", "updates"] %> -%for img in images: - %if exists("%s/%s/" % (LORAXDIR, img)): - installimg ${LORAXDIR}/${img}/ images/${img}.img - treeinfo images-${basearch} ${img}.img images/${img}.img - <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %> - %endif -%endfor - -# Add the license files -%for f in glob("/usr/share/licenses/*-release/*"): - install ${f} ${f|basename} - <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %> -%endfor - -## 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}' \ - -volset "${product.version}" -volset-size 1 -volset-seqno 1 \ - -hfs-volid ${product.version} -hfs-bless ${outroot}/${MACDIR} \ - -map ${inroot}/${configdir}/mapping \ - -no-desktop -allow-multidot ${udfargs} \ - -graft-points \ - ${BOOTDIR}=${outroot}/${BOOTDIR} \ - ${GRUBDIR}=${outroot}/${GRUBDIR} \ - ${NETBOOTDIR}=${outroot}/${NETBOOTDIR} \ - ${LIVEDIR}=${outroot}/${LIVEDIR} ${filegraft} - -%for kernel in kernels: - treeinfo images-${kernel.arch} boot.iso images/boot.iso -%endfor diff --git a/80-rhel/ppc.tmpl b/80-rhel/ppc.tmpl deleted file mode 100644 index b86d020..0000000 --- a/80-rhel/ppc.tmpl +++ /dev/null @@ -1,117 +0,0 @@ -<%page args="kernels, runtime_img, basearch, libdir, inroot, outroot, product, isolabel"/> -<% -configdir="tmp/config_files/ppc" -BOOTDIR="ppc" -GRUBDIR="boot/grub" -STAGE2IMG="images/install.img" -MACDIR=GRUBDIR+"/powerpc-ieee1275" -LORAXDIR="usr/share/lorax/" - -## NOTE: yaboot freaks out and stops parsing its config if it sees a '\', -## so we can't use the udev escape sequences in the root arg. -## Instead we'll just replace any non-ASCII characters in the isolabel -## with '_', which means we won't need any udev escapes. -isolabel = ''.join(ch if ch.isalnum() else '_' for ch in isolabel) - -## Anaconda finds the CDROM device automatically -rootarg = "" - -from os.path import basename -%> - -## Test ${runtime_img} to see if udf is needed -<% - import os - from pylorax.sysutils import joinpaths - if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3: - udfargs = "-allow-limited-size" - else: - udfargs = "" -%> - -mkdir images -install ${runtime_img} ${STAGE2IMG} -treeinfo stage2 mainimage ${STAGE2IMG} - -## 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} -## boot stuff for normal (CHRP/PREP) PPC systems -install ${configdir}/bootinfo.txt ${BOOTDIR} - -mkdir ${GRUBDIR}/powerpc-ieee1275 -## "()" means the current device to grub2 -runcmd grub2-mkimage --format=powerpc-ieee1275 --directory=/usr/lib/grub/powerpc-ieee1275 --prefix="()/"${GRUBDIR} \ ---output=${outroot}/${GRUBDIR}/powerpc-ieee1275/core.elf iso9660 ext2 ofnet net tftp http -install /usr/lib/grub/powerpc-ieee1275/*.mod ${GRUBDIR}/powerpc-ieee1275 -install /usr/lib/grub/powerpc-ieee1275/*.lst ${GRUBDIR}/powerpc-ieee1275 - -install ${configdir}/grub.cfg.in ${GRUBDIR}/grub.cfg -replace @PRODUCT@ '${product.name}' ${GRUBDIR}/grub.cfg -replace @VERSION@ ${product.version} ${GRUBDIR}/grub.cfg -replace @ROOT@ "${rootarg}" ${GRUBDIR}/grub.cfg - -install ${configdir}/mapping ${BOOTDIR} - -## NOTE: PPC is kind of funky. There's three possible "arch" setups here: -## ppc, ppc64, ppc64le, 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 - ## separate dirs/images for each arch - KERNELDIR=BOOTDIR+"/ppc%s" % bits - %> - ## install kernel - mkdir ${KERNELDIR} - installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz - installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img - - treeinfo images-${kernel.arch} zimage -%endfor - -# Create optional product.img and updates.img -<% filegraft=""; images=["product", "updates"] %> -%for img in images: - %if exists("%s/%s/" % (LORAXDIR, img)): - installimg ${LORAXDIR}/${img}/ images/${img}.img - treeinfo images-${basearch} ${img}.img images/${img}.img - <% filegraft += " images/{0}.img={1}/images/{0}.img".format(img, outroot) %> - %endif -%endfor - -# Inherit iso-graft/ if it exists from external templates -<% - import os - if os.path.exists(workdir + "/iso-graft"): - filegraft += " " + workdir + "/iso-graft" -%> - -# Add the license files -%for f in glob("/usr/share/licenses/*-release/*"): - install ${f} ${f|basename} - <% filegraft += " {0}={1}/{0}".format(basename(f), outroot) %> -%endfor - -## make boot.iso -runcmd mkisofs -o ${outroot}/images/boot.iso -chrp-boot -U \ - -part -hfs -T -r -l -J \ - -A "${product.name} ${product.version}" -sysid PPC -V '${isolabel}' \ - -volset "${product.version}" -volset-size 1 -volset-seqno 1 \ - -hfs-volid ${product.version} -hfs-bless ${outroot}/${MACDIR} \ - -map ${inroot}/${configdir}/mapping \ - -no-desktop -allow-multidot ${udfargs} -graft-points \ - .discinfo=${outroot}/.discinfo \ - ${BOOTDIR}=${outroot}/${BOOTDIR} \ - ${GRUBDIR}=${outroot}/${GRUBDIR} \ - ${STAGE2IMG}=${outroot}/${STAGE2IMG} ${filegraft} - -%for kernel in kernels: - treeinfo images-${kernel.arch} boot.iso images/boot.iso -%endfor