diff --git a/enable-efi-boot-for-loongarch64.patch b/enable-efi-boot-for-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..947ad6f894a5de102b266568156a21fb28322810 --- /dev/null +++ b/enable-efi-boot-for-loongarch64.patch @@ -0,0 +1,159 @@ +From 0ce08888a373f5fbedc39db81e49b1cd05d837ea Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Wed, 24 Jul 2024 08:53:51 +0800 +Subject: [PATCH] enable efi boot for loongarch64 + +--- + .../loongarch64/livecd/live/loongarch64.tmpl | 4 +- + isomaker/iso.sh | 45 +++++++++++++++---- + 2 files changed, 39 insertions(+), 10 deletions(-) + +diff --git a/isomaker/config/loongarch64/livecd/live/loongarch64.tmpl b/isomaker/config/loongarch64/livecd/live/loongarch64.tmpl +index daf68c1..b18ffc9 100644 +--- a/isomaker/config/loongarch64/livecd/live/loongarch64.tmpl ++++ b/isomaker/config/loongarch64/livecd/live/loongarch64.tmpl +@@ -65,9 +65,11 @@ mkdir ${KERNELDIR} + + %if exists("boot/efi/EFI/*/grubloongarch64.efi"): + ## make boot.iso +-runcmd mkisofs -o ${outroot}/images/boot.iso \ ++runcmd xorriso as mkisofs -o ${outroot}/images/boot.iso \ + ${efiargs} -R -J -V '${isolabel}' -T ${udfargs} \ + -graft-points \ ++ -efi-boot-part \ ++ --efi-boot-image \ + ${KERNELDIR}=${outroot}/${KERNELDIR} \ + ${LIVEDIR}=${outroot}/${LIVEDIR} \ + ${efigraft} ${filegraft} +diff --git a/isomaker/iso.sh b/isomaker/iso.sh +index 3badcd7..6cedbe9 100644 +--- a/isomaker/iso.sh ++++ b/isomaker/iso.sh +@@ -26,9 +26,13 @@ function gen_debug_iso() + if [ "$ARCH" == "x86_64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${DBG_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${DBG_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ # Enable EFI boot loongarch64 ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${DBG_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + implantisomd5 "${OUTPUT_DIR}/${DBG_ISO_NAME}" + return 0 +@@ -40,9 +44,12 @@ function gen_standard_iso() + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${STANDARD_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 + isohybrid -u "${OUTPUT_DIR}/${STANDARD_ISO_NAME}" +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${STANDARD_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${STANDARD_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + implantisomd5 "${OUTPUT_DIR}/${STANDARD_ISO_NAME}" + return 0 +@@ -57,9 +64,12 @@ function gen_edge_iso() + if [ "$ARCH" == "x86_64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${EDGE_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${EDGE_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${EDGE_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + implantisomd5 "${OUTPUT_DIR}/${EDGE_ISO_NAME}" + return 0 +@@ -74,9 +84,12 @@ function gen_desktop_iso() + if [ "$ARCH" == "x86_64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${DESKTOP_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${DESKTOP_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${DESKTOP_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + implantisomd5 "${OUTPUT_DIR}/${DESKTOP_ISO_NAME}" + return 0 +@@ -91,9 +104,12 @@ function gen_src_iso() + if [ "$ARCH" == "x86_64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${SRC_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${SRC_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${SRC_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + return 0 + } +@@ -110,9 +126,12 @@ function gen_everything_iso() + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 + isohybrid -u /result/"${EVE_ISO_NAME}" +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + implantisomd5 /result/"${EVE_ISO_NAME}" + return 0 +@@ -129,9 +148,12 @@ function gen_everything_debug_iso() + if [ "$ARCH" == "x86_64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_DEBUG_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_DEBUG_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_DEBUG_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + implantisomd5 /result/"${EVE_DEBUG_ISO_NAME}" + return 0 +@@ -148,9 +170,12 @@ function gen_everything_src_iso() + if [ "$ARCH" == "x86_64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_SRC_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_SRC_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_SRC_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ [ $? != 0 ] && return 1 + fi + implantisomd5 /result/"${EVE_SRC_ISO_NAME}" + return 0 +@@ -162,8 +187,10 @@ function gen_netinst_iso() + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${NETINST_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + [ $? != 0 ] && return 1 + isohybrid -u /result/"${NETINST_ISO_NAME}" +- elif [ "$ARCH" == "aarch64" ] || [ "$ARCH" == "loongarch64" ]; then ++ elif [ "$ARCH" == "aarch64" ]; then + mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${NETINST_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso ++ elif [ "$ARCH" == "loongarch64" ]; then ++ xorriso as mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${NETINST_ISO_NAME}" -efi-boot-part --efi-boot-image -e images/efiboot.img -no-emul-boot "${BUILD}"/iso + fi + implantisomd5 /result/"${NETINST_ISO_NAME}" + return 0 +-- +2.43.0 + diff --git a/normal_loongarch64.xml b/normal_loongarch64.xml index f752c6fab5b3f9cda3fd097aceeecf6bab631663..2507449b6a8c5cd65fb26d52d66cb99bf9148271 100644 --- a/normal_loongarch64.xml +++ b/normal_loongarch64.xml @@ -1255,6 +1255,7 @@ libvirt-libs libvirt-nss python3-libvirt + edk2-ovmf-loongarch64 qemu-help qemu qemu-block-iscsi diff --git a/oemaker.spec b/oemaker.spec index af2c9b5e9bffca7d0fd4bc6a20ab5f93b7fbc9b7..ee924f3823df2d2ec1cbf9e95be84f89e94cb8f7 100644 --- a/oemaker.spec +++ b/oemaker.spec @@ -15,7 +15,7 @@ Summary: a building tool for DVD ISO making and ISO cutting License: Mulan PSL v2 Group: System/Management Version: 3.1.0 -Release: 11 +Release: 12 BuildRoot: %{_tmppath}/%{name} Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz @@ -34,6 +34,9 @@ Source12: normal_riscv64.xml Requires: createrepo dnf-plugins-core genisoimage isomd5sum grep bash libselinux-utils libxml2 anaconda libselinux-utils Requires: lorax >= 19.6.78-1 +%ifarch loongarch64 +Requires: xorriso +%endif # Patch here Patch0001: 0001-fix-createrepo-data-error.patch @@ -43,6 +46,7 @@ Patch0003: 0001-add-riscv64-support.patch %endif Patch0004: add-loongarch64-support-for-livecd.patch Patch0005: add-ls2k500sfb.ko-for-loongarch64.patch +Patch0006: enable-efi-boot-for-loongarch64.patch %description a building tool for DVD ISO making and ISO cutting @@ -214,6 +218,14 @@ rm -rf %{buildroot} rm -rf $RPM_BUILD_DIR/%{name} %changelog +* Tue Jun 04 2024 Wenlong Zhang - 3.1.0-12 +- ID:NA +- SUG:NA +- DESC: add edk2 for loongarch64 + add everything support for loongarch64 + enable efi boot for loongarch64 + modify rpmlist for loongarch64 + * Wed May 29 2024 Wenlong Zhang - 3.1.0-11 - ID:NA - SUG:NA diff --git a/rpmlist_loongarch64.xml b/rpmlist_loongarch64.xml index fd594ee15a5f0641d36c1c0be0cd3dde970e9c97..91710538f7265beaa54cfbf2509558d422994ccf 100644 --- a/rpmlist_loongarch64.xml +++ b/rpmlist_loongarch64.xml @@ -16,24 +16,55 @@ python3-abrt-container-addon - texlive-collection-bibtexextra - texlive-collection-mathscience - texlive-collection-latexextra - texlive-collection-fontsextra - texlive-ctanupload - texlive-exceltex - texlive-latexindent - texlive-biblatex-apa - texlive-collection-binextra - texlive-collection-fontutils - texlive-includernw - texlive-oldstandard - texlive-scheme-full - texlive-scheme-gust - texlive-scheme-medium - texlive-scheme-tetex - gnome-boxes - nodejs-grunt-contrib-watch + abrt-atomic + abrt-cli + abrt-console-notification + abrt-desktop + apptainer + apptainer-suid + castor + castor-maven-plugin + compat-openssl11-devel + gnome-boxes + ibus-table-chinese-array + ldapjdk + libcmpiCppImpl0 + libev-libevent-devel + moby-client + moby-engine + moby + nfs-utils-min + nodejs-grunt-contrib-watch + oncn-bwm-devel + pcp-pmda-bpftrace + pcp-testsuite + postgresql-private-devel + protobuf2-compiler + protobuf2-devel + protobuf2-lite-devel + protobuf2-lite-static + protobuf2-static + protobuf2-vim + python3-abrt-addon + python3-keras-rl2 + python3-pytype + texlive-biblatex-apa + texlive-collection-bibtexextra + texlive-collection-binextra + texlive-collection-fontsextra + texlive-collection-fontutils + texlive-collection-latexextra + texlive-collection-mathscience + texlive-ctanupload + texlive-exceltex + texlive-includernw + texlive-latexindent + texlive-oldstandard + texlive-scheme-full + texlive-scheme-gust + texlive-scheme-medium + texlive-scheme-tetex + tomcatjss drbd @@ -64,6 +95,7 @@ shim + edk2-ovmf-loongarch64 grub2-efi-loongarch64 grub2-efi-loongarch64-modules @@ -288,6 +320,8 @@ e2fsprogs-devel e2fsprogs-help ed + edk2-devel + edk2-help efibootmgr efibootmgr-help efivar @@ -1064,6 +1098,7 @@ python3-dmidecode python3-dnf python3-dnf-plugins-core + python3-edk2-devel python3-ethtool python3-firewall python3-flask