a3e1a275ff
fedup is deprecated and abandoned. Let's save time and disk by not building `upgrade.img` when nothing is going to use it anymore. For the record, performing upgrades using an initramfs from the new system turns out to be fragile and hard to support: * dracut initramfs isn't generic enough to handle booting all systems (e.g. missing vconsole.conf means you get keymaps wrong, so users can't unlock encrypted disks) * The ABI differences between the two versions of plymouth, systemd, etc. requires nasty workarounds at best and causes nightmarish systemd crashes at worst This patch removes all the code that built and installed `upgrade.img`. For backwards compatibility, the API retains the `doupgrade` keyword argument, and the `--noupgrade` flag is still accepted.
63 lines
2.0 KiB
Cheetah
63 lines
2.0 KiB
Cheetah
<%page args="kernels, runtime_img, basearch, outroot, product, isolabel"/>
|
|
<%
|
|
configdir="tmp/config_files/aarch64"
|
|
PXEBOOTDIR="images/pxeboot"
|
|
KERNELDIR=PXEBOOTDIR
|
|
STAGE2IMG="images/install.img"
|
|
LORAXDIR="usr/share/lorax/"
|
|
%>
|
|
|
|
mkdir images
|
|
install ${runtime_img} ${STAGE2IMG}
|
|
treeinfo stage2 mainimage ${STAGE2IMG}
|
|
|
|
## install kernels
|
|
mkdir ${KERNELDIR}
|
|
%for kernel in kernels:
|
|
## normal aarch64
|
|
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
|
|
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
|
|
%endfor
|
|
|
|
#FIXME: this will need adjusted when we have a real bootloader.
|
|
## WHeeeeeeee, EFI.
|
|
## We could remove the basearch restriction someday..
|
|
<% efiargs=""; efigraft="" %>
|
|
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
|
|
<%
|
|
efiarch = 'AA64'
|
|
efigraft="EFI/BOOT={0}/EFI/BOOT".format(outroot)
|
|
images = ["images/efiboot.img"]
|
|
for img in images:
|
|
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot".format(img)
|
|
efigraft += " {0}={1}/{0}".format(img,outroot)
|
|
%>
|
|
<%include file="efi.tmpl" args="configdir=configdir, KERNELDIR=KERNELDIR, efiarch=efiarch, isolabel=isolabel"/>
|
|
%endif
|
|
|
|
# Create optional product.img and updates.img
|
|
<% imggraft=""; images=["product", "updates"] %>
|
|
%for img in images:
|
|
%if exists("%s/%s/" % (LORAXDIR, img)):
|
|
installimg ${LORAXDIR}/${img}/ images/${img}.img
|
|
<% imggraft += " 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"):
|
|
imggraft += " " + workdir + "/iso-graft"
|
|
%>
|
|
|
|
%if exists("boot/efi/EFI/*/gcdaa64.efi"):
|
|
## make boot.iso
|
|
runcmd mkisofs -o ${outroot}/images/boot.iso \
|
|
${efiargs} -R -J -V '${isolabel}' -T -graft-points \
|
|
${KERNELDIR}=${outroot}/${KERNELDIR} \
|
|
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
|
|
${efigraft} ${imggraft}
|
|
treeinfo images-${basearch} boot.iso images/boot.iso
|
|
%endif
|