From cc94aa9e16c456c9a7e47ca96b8106e9c6b04e96 Mon Sep 17 00:00:00 2001 From: "taifu.gc" Date: Tue, 6 Dec 2022 13:52:25 +0800 Subject: [PATCH] Modify kernel to 5.10 by default and add 5.10 kmod-ast pack --- ...rch-install-different-kernel-for-loongarch.patch | 2 +- 1001-install-kernel-with-version-suffixed.patch | 6 +++--- 1005-Add-5.10-kmod-pack.patch | 13 +++++++++++++ lorax-templates-anolis.spec | 10 +++++++++- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 1005-Add-5.10-kmod-pack.patch diff --git a/0001-loongarch-install-different-kernel-for-loongarch.patch b/0001-loongarch-install-different-kernel-for-loongarch.patch index 024efa2..ef4a43f 100644 --- a/0001-loongarch-install-different-kernel-for-loongarch.patch +++ b/0001-loongarch-install-different-kernel-for-loongarch.patch @@ -35,7 +35,7 @@ index 41c575b..655dd61 100644 %endif + +%if basearch != "loongarch64": - 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 +%else: +installpkg kernel-4.19.190 kernel-modules-4.19.190 kernel-modules-extra-4.19.190 +%endif 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 21770be..1f76787 100644 --- a/lorax-templates-anolis.spec +++ b/lorax-templates-anolis.spec @@ -1,4 +1,4 @@ -%define anolis_release 10 +%define anolis_release 12 Name: lorax-templates-anolis Version: 8.3 Release: 4.%{anolis_release}%{?dist} @@ -16,6 +16,7 @@ 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: 0001-loongarch-install-different-kernel-for-loongarch.patch +Patch1007: 1005-Add-5.10-kmod-pack.patch # Where are these supposed to end up? %define templatedir %{_datadir}/lorax/templates.d/80-anolis @@ -33,6 +34,7 @@ placed in %{templatedir} %patch1004 -p1 %patch1005 -p1 %patch1006 -p1 +%patch1007 -p1 %build # nothing to build @@ -47,6 +49,12 @@ cp -a 80-anolis/* $RPM_BUILD_ROOT/%{templatedir} %{templatedir}/* %changelog +* Tue Dec 06 2022 Chang Gao - 8.3-4.12 +- Merge a8 branch and a8-poc branch + +* Tue Dec 06 2022 Chang Gao - 8.3-4.11 +- Modify 4.19 kernel to 5.10 and kmod-ast pack + * Wed Nov 16 2022 Liwei Ge - 8.3-4.10 - install different kernel for loongarch64 -- Gitee