This commit is contained in:
Brian C. Lane 2022-03-07 10:49:43 +08:00 committed by GitHub
commit 872c45c2ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 52 deletions

View File

@ -1,9 +1,7 @@
<%page args="kernels, runtime_img, basearch, inroot, outroot, product, isolabel, extra_boot_args"/>
<%
configdir="tmp/config_files/x86"
SYSLINUXDIR="usr/share/syslinux"
PXEBOOTDIR="images/pxeboot"
BOOTDIR="isolinux"
KERNELDIR=PXEBOOTDIR
LIVEDIR="LiveOS"
LORAXDIR="usr/share/lorax/"
@ -29,24 +27,6 @@ mkdir ${LIVEDIR}
install ${runtime_img} ${LIVEDIR}/squashfs.img
treeinfo stage2 mainimage ${LIVEDIR}/squashfs.img
## install bootloader and config files
mkdir ${BOOTDIR}
install ${SYSLINUXDIR}/isolinux.bin ${BOOTDIR}
install ${SYSLINUXDIR}/vesamenu.c32 ${BOOTDIR}
install ${SYSLINUXDIR}/ldlinux.c32 ${BOOTDIR}
install ${SYSLINUXDIR}/libcom32.c32 ${BOOTDIR}
install ${SYSLINUXDIR}/libutil.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
replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/isolinux.cfg
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:
@ -59,8 +39,6 @@ mkdir ${KERNELDIR}
%endif
%endfor
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if basearch == 'x86_64':
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
@ -83,7 +61,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%>
%for img, hybrid in images:
<%
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot {1}".format(img, hybrid)
efiargs += " --efi-boot {0} {1}".format(img, hybrid)
efigraft += " {0}={1}/{0}".format(img,outroot)
%>
treeinfo images-${basearch} ${img|basename} ${img}
@ -120,11 +98,8 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
## make boot.iso
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
-boot-load-size 4 -boot-info-table -no-emul-boot \
${efiargs} -R -J -V '${isolabel}' \
-graft-points \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${LIVEDIR}=${outroot}/${LIVEDIR} \
${efigraft} ${filegraft}

View File

@ -64,7 +64,7 @@ installpkg glibc-all-langpacks
installpkg grub2-efi-ia32-cdboot>=${GRUB2VER}
%endif
%if basearch in ("i386", "x86_64"):
installpkg biosdevname syslinux
installpkg biosdevname
installpkg grub2-tools>=${GRUB2VER} grub2-tools-minimal>=${GRUB2VER}
installpkg grub2-tools-extra>=${GRUB2VER}
%endif

View File

@ -1,10 +1,8 @@
<%page args="kernels, runtime_img, runtime_base, basearch, inroot, outroot, product, isolabel"/>
<%
configdir="tmp/config_files/x86"
SYSLINUXDIR="usr/share/syslinux"
PXEBOOTDIR="images/pxeboot"
STAGE2IMG="images/install.img"
BOOTDIR="isolinux"
KERNELDIR=PXEBOOTDIR
LORAXDIR="usr/share/lorax/"
@ -29,23 +27,6 @@ mkdir images
install ${runtime_img} ${STAGE2IMG}
treeinfo stage2 mainimage images/${runtime_base}
## install bootloader and config files
mkdir ${BOOTDIR}
install ${SYSLINUXDIR}/isolinux.bin ${BOOTDIR}
install ${SYSLINUXDIR}/vesamenu.c32 ${BOOTDIR}
install ${SYSLINUXDIR}/ldlinux.c32 ${BOOTDIR}
install ${SYSLINUXDIR}/libcom32.c32 ${BOOTDIR}
install ${SYSLINUXDIR}/libutil.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@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:
@ -60,8 +41,6 @@ mkdir ${KERNELDIR}
%endif
%endfor
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if basearch == 'x86_64':
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
@ -84,7 +63,7 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%>
%for img, hybrid in images:
<%
efiargs += " -eltorito-alt-boot -e {0} -no-emul-boot {1}".format(img, hybrid)
efiargs += " --efi-boot {0} {1}".format(img, hybrid)
efigraft += " {0}={1}/{0}".format(img,outroot)
%>
treeinfo images-${basearch} ${img|basename} ${img}
@ -122,13 +101,10 @@ hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
## make boot.iso
runcmd xorrisofs ${isoargs} -o ${outroot}/images/boot.iso \
-isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
-b ${BOOTDIR}/isolinux.bin -c ${BOOTDIR}/boot.cat \
-boot-load-size 4 -boot-info-table -no-emul-boot \
${efiargs} -R -J -V '${isolabel}' \
-graft-points \
.discinfo=${outroot}/.discinfo \
${STAGE2IMG}=${outroot}/${STAGE2IMG} \
${BOOTDIR}=${outroot}/${BOOTDIR} \
${KERNELDIR}=${outroot}/${KERNELDIR} \
${efigraft} ${filegraft}
treeinfo images-${basearch} boot.iso images/boot.iso