Skip to content

Commit cbf4510

Browse files
kernel-hwe: Introduce kernel-hwe and support files for building 6.12.40.1 (microsoft#13977)
1 parent 7486476 commit cbf4510

File tree

29 files changed

+12636
-43
lines changed

29 files changed

+12636
-43
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,6 +2295,7 @@
22952295
"keda",
22962296
"keras",
22972297
"kernel-64k-signed",
2298+
"kernel-hwe-signed",
22982299
"kernel-mshv-signed",
22992300
"kernel-signed",
23002301
"kernel-uki",
@@ -2809,6 +2810,8 @@
28092810
"kernel",
28102811
"kernel-64k",
28112812
"kernel-headers",
2813+
"kernel-hwe",
2814+
"kernel-hwe-headers",
28122815
"kernel-ipe",
28132816
"kernel-lpg-innovate",
28142817
"kernel-mshv",

SPECS-EXTENDED/kernel-ipe/kernel-ipe.spec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
Summary: Linux Kernel
3434
Name: kernel-ipe
3535
Version: 6.6.96.2
36-
Release: 1%{?dist}
36+
Release: 2%{?dist}
3737
License: GPLv2
3838
Vendor: Microsoft Corporation
3939
Distribution: Azure Linux
@@ -87,6 +87,7 @@ Conflicts: kernel
8787
Conflicts: kernel-64k
8888
Conflicts: kernel-lpg-innovate
8989
Conflicts: kernel-rt
90+
Conflicts: kernel-hwe
9091
%{?grub2_configuration_requires}
9192
# When updating the config files it is important to sanitize them.
9293
# Steps for updating a config file:
@@ -459,6 +460,10 @@ echo "initrd of kernel %{uname_r} removed" >&2
459460
%{_sysconfdir}/bash_completion.d/bpftool
460461

461462
%changelog
463+
* Fri Aug 22 2025 Siddharth Chintamaneni <[email protected]> - 6.6.96.2-2
464+
- Added kernel-hwe as conflict.
465+
- Bump release to match kernel
466+
462467
* Fri Aug 15 2025 CBL-Mariner Servicing Account <[email protected]> - 6.6.96.2-1
463468
- Auto-upgrade to 6.6.96.2
464469

SPECS-EXTENDED/kernel-lpg-innovate/kernel-lpg-innovate.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
Summary: Linux Kernel
3030
Name: kernel-lpg-innovate
3131
Version: 6.6.89.2
32-
Release: 1002%{?dist}
32+
Release: 1003%{?dist}
3333
License: GPLv2
3434
Vendor: Microsoft Corporation
3535
Distribution: Azure Linux
@@ -80,6 +80,7 @@ Conflicts: kernel
8080
Conflicts: kernel-64k
8181
Conflicts: kernel-ipe
8282
Conflicts: kernel-rt
83+
Conflicts: kernel-hwe
8384
%{?grub2_configuration_requires}
8485
# When updating the config files it is important to sanitize them.
8586
# Steps for updating a config file:
@@ -469,6 +470,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
469470
%{_sysconfdir}/bash_completion.d/bpftool
470471

471472
%changelog
473+
* Fri Aug 22 2025 Siddharth Chintamaneni <[email protected]> - 6.6.89.2-1003
474+
- Introducing kernel-hwe
475+
472476
* Wed 11 Jun 2025 Harshit Gupta <[email protected]> - 6.6.89.2-1002
473477
- Add Conflicts with other kernels
474478
- Rename bpftool and python3-perf to be kernel specific

SPECS-EXTENDED/kernel-rt/kernel-rt.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
Summary: Realtime Linux Kernel
2626
Name: kernel-rt
2727
Version: 6.6.85.1
28-
Release: 2%{?dist}
28+
Release: 3%{?dist}
2929
License: GPLv2
3030
Vendor: Microsoft Corporation
3131
Distribution: Azure Linux
@@ -80,6 +80,7 @@ Conflicts: kernel
8080
Conflicts: kernel-64k
8181
Conflicts: kernel-ipe
8282
Conflicts: kernel-lpg-innovate
83+
Conflicts: kernel-hwe
8384
ExclusiveArch: x86_64
8485
# When updating the config files it is important to sanitize them.
8586
# Steps for updating a config file:
@@ -425,6 +426,9 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg
425426
%{_sysconfdir}/bash_completion.d/bpftool
426427

427428
%changelog
429+
* Fri Aug 22 2025 Siddharth Chintamaneni <[email protected]> - 6.6.85.1-3
430+
- Introducing kernel-hwe
431+
428432
* Tue Jun 10 2025 Harshit Gupta <[email protected]> - 6.6.85.1-2
429433
- Rename bpftool and python3-perf to be kernel specific
430434

SPECS-SIGNED/kernel-64k-signed/kernel-64k-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Summary: Signed Linux Kernel for %{buildarch} systems
88
Name: kernel-64k-signed-%{buildarch}
99
Version: 6.6.96.2
10-
Release: 1%{?dist}
10+
Release: 2%{?dist}
1111
License: GPLv2
1212
Vendor: Microsoft Corporation
1313
Distribution: Azure Linux
@@ -105,6 +105,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
105105
%exclude /module_info.ld
106106

107107
%changelog
108+
* Fri Aug 22 2025 Siddharth Chintamaneni <[email protected]> - 6.6.96.2-2
109+
- Bump release to match kernel
110+
108111
* Fri Aug 15 2025 CBL-Mariner Servicing Account <[email protected]> - 6.6.96.2-1
109112
- Auto-upgrade to 6.6.96.2
110113

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
%global debug_package %{nil}
2+
%global buildarch aarch64
3+
%define uname_r %{version}-%{release}
4+
Summary: Signed Linux Kernel for %{buildarch} systems
5+
Name: kernel-hwe-signed-%{buildarch}
6+
Version: 6.12.40.1
7+
Release: 1%{?dist}
8+
License: GPLv2
9+
Vendor: Microsoft Corporation
10+
Distribution: Azure Linux
11+
Group: System Environment/Kernel
12+
URL: https://github.com/microsoft/CBL-Mariner-Linux-Kernel
13+
# This package's "version" and "release" must reflect the unsigned version that
14+
# was signed.
15+
# An important consequence is that when making a change to this package, the
16+
# unsigned version/release must be increased to keep the two versions consistent.
17+
# Ideally though, this spec will not change much or at all, so the version will
18+
# just track the unsigned package's version/release.
19+
#
20+
# To populate these sources:
21+
# 1. Build the unsigned packages as normal
22+
# 2. Sign the desired binary
23+
# 3. Place the unsigned package and signed binary in this spec's folder
24+
# 4. Build this spec
25+
Source0: kernel-hwe-%{version}-%{release}.%{buildarch}.rpm
26+
Source1: vmlinuz-%{uname_r}
27+
ExclusiveArch: aarch64
28+
BuildRequires: cpio
29+
BuildRequires: grub2-rpm-macros
30+
BuildRequires: openssl
31+
BuildRequires: sed
32+
%{?grub2_configuration_requires}
33+
34+
%description
35+
This package contains the Linux kernel package with kernel signed with the production key
36+
37+
%package -n kernel-hwe
38+
Summary: Linux Kernel
39+
Group: System Environment/Kernel
40+
Requires: filesystem
41+
Requires: kmod
42+
Requires(post): coreutils
43+
Requires(postun): coreutils
44+
45+
%description -n kernel-hwe
46+
The kernel package contains the signed Linux kernel.
47+
48+
%prep
49+
50+
%build
51+
mkdir rpm_contents
52+
pushd rpm_contents
53+
54+
# This spec's whole purpose is to inject the signed kernel binary
55+
rpm2cpio %{SOURCE0} | cpio -idmv
56+
cp %{SOURCE1} ./boot/vmlinuz-%{uname_r}
57+
58+
popd
59+
60+
%install
61+
pushd rpm_contents
62+
63+
# Don't use * wildcard. It does not copy over hidden files in the root folder...
64+
cp -rp ./. %{buildroot}/
65+
66+
popd
67+
68+
%triggerin -n kernel-hwe -- initramfs
69+
mkdir -p %{_localstatedir}/lib/rpm-state/initramfs/pending
70+
touch %{_localstatedir}/lib/rpm-state/initramfs/pending/%{uname_r}
71+
echo "initrd generation of kernel %{uname_r} will be triggered later" >&2
72+
73+
%triggerun -n kernel-hwe -- initramfs
74+
rm -rf %{_localstatedir}/lib/rpm-state/initramfs/pending/%{uname_r}
75+
rm -rf /boot/initramfs-%{uname_r}.img
76+
echo "initrd of kernel %{uname_r} removed" >&2
77+
78+
%postun -n kernel-hwe
79+
%grub2_postun
80+
81+
%post -n kernel-hwe
82+
/sbin/depmod -a %{uname_r}
83+
%grub2_post
84+
85+
%files -n kernel-hwe
86+
%defattr(-,root,root)
87+
%license COPYING
88+
/boot/System.map-%{uname_r}
89+
/boot/config-%{uname_r}
90+
/boot/vmlinuz-%{uname_r}
91+
%defattr(0644,root,root)
92+
/lib/modules/%{uname_r}/*
93+
%exclude /lib/modules/%{uname_r}/build
94+
%exclude /lib/modules/%{uname_r}/kernel/drivers/gpu
95+
%exclude /lib/modules/%{uname_r}/kernel/sound
96+
%exclude /module_info.ld
97+
98+
%changelog
99+
* Fri Aug 15 2025 Siddharth Chintamaneni <[email protected]> - 6.12.40.1-1
100+
- Original version for Azure Linux
101+
- License verified

SPECS-SIGNED/kernel-signed/kernel-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Summary: Signed Linux Kernel for %{buildarch} systems
1111
Name: kernel-signed-%{buildarch}
1212
Version: 6.6.96.2
13-
Release: 1%{?dist}
13+
Release: 2%{?dist}
1414
License: GPLv2
1515
Vendor: Microsoft Corporation
1616
Distribution: Azure Linux
@@ -145,6 +145,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
145145
%exclude /module_info.ld
146146

147147
%changelog
148+
* Fri Aug 22 2025 Siddharth Chintamaneni <[email protected]> - 6.6.96.2-2
149+
- Bump release to match kernel
150+
148151
* Fri Aug 15 2025 CBL-Mariner Servicing Account <[email protected]> - 6.6.96.2-1
149152
- Auto-upgrade to 6.6.96.2
150153

SPECS-SIGNED/kernel-uki-signed/kernel-uki-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: Signed Unified Kernel Image for %{buildarch} systems
77
Name: kernel-uki-signed-%{buildarch}
88
Version: 6.6.96.2
9-
Release: 1%{?dist}
9+
Release: 2%{?dist}
1010
License: GPLv2
1111
Vendor: Microsoft Corporation
1212
Distribution: Azure Linux
@@ -68,6 +68,9 @@ popd
6868
/boot/efi/EFI/Linux/vmlinuz-uki-%{kernelver}.efi
6969

7070
%changelog
71+
* Fri Aug 22 2025 Siddharth Chintamaneni <[email protected]> - 6.6.96.2-2
72+
- Bump release to match kernel
73+
7174
* Fri Aug 15 2025 CBL-Mariner Servicing Account <[email protected]> - 6.6.96.2-1
7275
- Auto-upgrade to 6.6.96.2
7376

SPECS/kernel-64k/kernel-64k.spec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
Summary: Linux Kernel
2828
Name: kernel-64k
2929
Version: 6.6.96.2
30-
Release: 1%{?dist}
30+
Release: 2%{?dist}
3131
License: GPLv2
3232
Vendor: Microsoft Corporation
3333
Distribution: Azure Linux
@@ -76,6 +76,7 @@ Conflicts: kernel
7676
Conflicts: kernel-ipe
7777
Conflicts: kernel-lpg-innovate
7878
Conflicts: kernel-rt
79+
Conflicts: kernel-hwe
7980
%{?grub2_configuration_requires}
8081
# When updating the config files it is important to sanitize them.
8182
# Steps for updating a config file:
@@ -379,6 +380,9 @@ echo "initrd of kernel %{uname_r} removed" >&2
379380
%{_sysconfdir}/bash_completion.d/bpftool
380381

381382
%changelog
383+
* Fri Aug 22 2025 Siddharth Chintamaneni <[email protected]> - 6.6.96.2-2
384+
- Bump release to match kernel
385+
382386
* Fri Aug 15 2025 CBL-Mariner Servicing Account <[email protected]> - 6.6.96.2-1
383387
- Auto-upgrade to 6.6.96.2
384388

0 commit comments

Comments
 (0)