From b478b5b06f6af23ef2828cd74d08f277eedb7603 Mon Sep 17 00:00:00 2001 From: "taifu.gc" Date: Tue, 6 Dec 2022 13:52:25 +0800 Subject: [PATCH 1/2] Modify kernel to 5.10 by default and add 5.10 kmod-ast pack --- 1001-install-kernel-with-version-suffixed.patch | 6 +++--- 1005-Add-5.10-kmod-pack.patch | 13 +++++++++++++ lorax-templates-anolis.spec | 7 ++++++- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 1005-Add-5.10-kmod-pack.patch diff --git a/1001-install-kernel-with-version-suffixed.patch b/1001-install-kernel-with-version-suffixed.patch index 88a1971..1d27e97 100644 --- a/1001-install-kernel-with-version-suffixed.patch +++ b/1001-install-kernel-with-version-suffixed.patch @@ -160,7 +160,7 @@ diff -Nur lorax-templates-anolis-8.3/80-anolis/efi.tmpl lorax-templates-anolis-8 - replace @INITRDPATH@ /${kdir}/initrd.img ${eficonf} + + %for kernel in kernels: -+ %if kernel.version.startswith("4.19.91-"): ++ %if kernel.version.startswith("5.10.134-"): + replace @ANCKKERNELNAME@ vmlinuz-${kernel.version} ${eficonf} + replace @ANCKKERNELPATH@ /${kdir}/vmlinuz-${kernel.version} ${eficonf} + replace @ANCKINITRDPATH@ /${kdir}/initrd-${kernel.version}.img ${eficonf} @@ -197,7 +197,7 @@ diff -Nur lorax-templates-anolis-8.3/80-anolis/runtime-install.tmpl lorax-templa +%else: + installpkg kernel-4.18.0 kernel-modules-4.18.0 kernel-modules-extra-4.18.0 +%endif -+installpkg kernel-4.19.91 kernel-modules-4.19.91 kernel-modules-extra-4.19.91 ++installpkg kernel-5.10.134 kernel-modules-5.10.134 kernel-modules-extra-5.10.134 + installpkg grubby %if basearch != "s390x": @@ -214,7 +214,7 @@ diff -Nur lorax-templates-anolis-8.3/80-anolis/x86.tmpl lorax-templates-anolis-8 + installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.version} + installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.version}.img %endif -+ %if kernel.version.startswith("4.19.91-"): ++ %if kernel.version.startswith("5.10.134-"): + replace @ANCK@ ${kernel.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg + %else: + replace @RHCK@ ${kernel.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg diff --git a/1005-Add-5.10-kmod-pack.patch b/1005-Add-5.10-kmod-pack.patch new file mode 100644 index 0000000..a26d9a8 --- /dev/null +++ b/1005-Add-5.10-kmod-pack.patch @@ -0,0 +1,13 @@ +diff --git a/80-anolis/runtime-install.tmpl b/80-anolis/runtime-install.tmpl +index 3f14dd5..6b920f3 100644 +--- a/80-anolis/runtime-install.tmpl ++++ b/80-anolis/runtime-install.tmpl +@@ -170,5 +170,8 @@ installpkg spice-vdagent + installpkg gdisk hexedit sg3_utils + installpkg perl-interpreter + ++## install kmod-ast ++installpkg kmod-ast ++ + ## actually install all the requested packages + run_pkg_transaction diff --git a/lorax-templates-anolis.spec b/lorax-templates-anolis.spec index fb36e1d..0bf1bd4 100644 --- a/lorax-templates-anolis.spec +++ b/lorax-templates-anolis.spec @@ -1,4 +1,4 @@ -%define anolis_release 9 +%define anolis_release 10 Name: lorax-templates-anolis Version: 8.3 Release: 4.%{anolis_release}%{?dist} @@ -15,6 +15,7 @@ Patch1002: 1002-correct-images_xen-tree-info.patch Patch1003: 1003-tmpl-update-kernels-for-aarch64-efi.patch Patch1004: 1004-shift-default-boot-number.patch Patch1005: 0001-add-BOOTLOONGARCH64.EFI-to-support-new-firmware.patch +Patch1006: 1005-Add-5.10-kmod-pack.patch # Where are these supposed to end up? %define templatedir %{_datadir}/lorax/templates.d/80-anolis @@ -31,6 +32,7 @@ placed in %{templatedir} %patch1003 -p1 %patch1004 -p1 %patch1005 -p1 +%patch1006 -p1 %build # nothing to build @@ -45,6 +47,9 @@ cp -a 80-anolis/* $RPM_BUILD_ROOT/%{templatedir} %{templatedir}/* %changelog +* Tue Dec 06 2022 Chang Gao - 8.3-4.10 +- Add 5.10 kernel kmod pack + * Wed Aug 03 2022 Wenlong Zhang - 8.3-4.9 - add BOOTLOONGARCH64.EFI to support new firmware -- Gitee From f6cfed9730921db677ba7a3101a9e365a332899b Mon Sep 17 00:00:00 2001 From: "taifu.gc" Date: Wed, 7 Dec 2022 13:42:48 +0800 Subject: [PATCH 2/2] Add kmod pack --- lorax-templates-anolis.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lorax-templates-anolis.spec b/lorax-templates-anolis.spec index 0bf1bd4..30b7ff2 100644 --- a/lorax-templates-anolis.spec +++ b/lorax-templates-anolis.spec @@ -1,4 +1,4 @@ -%define anolis_release 10 +%define anolis_release 11 Name: lorax-templates-anolis Version: 8.3 Release: 4.%{anolis_release}%{?dist} @@ -47,9 +47,12 @@ cp -a 80-anolis/* $RPM_BUILD_ROOT/%{templatedir} %{templatedir}/* %changelog -* Tue Dec 06 2022 Chang Gao - 8.3-4.10 +* Tue Dec 06 2022 Chang Gao - 8.3-4.11 - Add 5.10 kernel kmod pack +* Mon Dec 05 2022 Chang Gao - 8.3-4.10 +- Modify 4.19 kernel to 5.10 + * Wed Aug 03 2022 Wenlong Zhang - 8.3-4.9 - add BOOTLOONGARCH64.EFI to support new firmware -- Gitee