kernel/kernel-rt/debian/deb_patches/0001-kernel-rt-Adapt-the-debian-folder-for-new-source.patch
Li Zhou 79e7b8794c kernel-rt: upgrade to 6.6.7
Update kernel source to 6.6.7 from linux-yocto upstream.
Update "debian" folder source to 6.1.27-1~bpo11+1 from debian upstream,
because kernel 6.6.7 is ported to our bullseye platform now and
the newest "debian" folder from debian upstream for bullseye platform
is for 6.1.

Add an optimization for the StarlingX debian kernel building framework:
We used to always maintain kernel with patches on "debian" folder
and they are put at kernel/kernel-std(rt)/debian/deb_patches dir.
Most of these patches are about "changelog" (debian/changelog) and
"config" (debian/config/amd64/none/config). The patches in "deb_patches"
dir increased rapidly.
Next We will put "changelog" and "config" at the dir
kernel/kernel-std(rt)/debian/source and use them to replace
debian/changelog and debian/config/amd64/none/config
after the upstream "debian" folder is extracted. This can not only
keep a clean "deb_patches" folder, but also avoid using a big patch to
remove the "changelog" file in the upstream "debian" folder before any
kernel build.

Below are changes about "deb_patches"/"patches" for kernel-rt:
(We use the patches' serial number in their name to represent them
becuase so many patches are involved here.)

(1)about "deb_patches" folder:

(1.1)Because of the optimization, all the patches about changelog
and config for 5.10 can be abandoned and they will be changed directly
in the files under "source" dir for 6.6.
Patches for 5.10 that are abandoned because they are about config:
0003/0005/0006/0007/0008/0010/0011/0016/0018/0022/0026/0028
Patches for 5.10 that are abandoned because they are about changelog:
0001/0002/0007/0013/0020/0023/0024/0025/0027/0029/0030/0032/0033/0034

The "changelog" and "config" under "source" dir for 6.6 are verified
to be aligned with those for 5.10 build.
CONFIG_FANOTIFY is enabled in "config" as a new request.

(1.2)Patch 0017 for 5.10 is abandoned because the new commit
<Use parallel XZ for source tar generation> is available in new
version "debian" folder, which does the same work.
Refer to: https://salsa.debian.org/kernel-team/linux/-/commit/
50b61a14e6dbc50b19dfe938c4679ecda50b83ee

(1.3)Below patches for 5.10 are ported to 6.6:
0004/0009/0015 (0009/0015 are merged into 0004) compose patch 0001
for 6.6;
0014 is ported to 0002 for 6.6;
0021 is ported to 0003 for 6.6;
0005/0019 (0005 is merged into 0019) compose patch 0004 for 6.6;
0012 is ported to 0005 for 6.6;
0031 is ported to 0006 for 6.6.

List the new patches for 6.6:
New patches 0001-0006 are ported from "deb_patches" for 5.10;
New patches 0007-0010 are added for building kernel 6.6.7 with
6.1.27-1~bpo11+1 "debian" folder.

(2)about "patches" folder:

(2.1)Patches for 5.10 that are abandoned because they are already in
6.6.7 include:
0017-0027/0031-0038/0041-0056/0058-0071/0073-0081/0083

(2.2)Patch 0011 for 5.10 is abandoned for new upstream commit
<scsi: smartpqi: Expose SAS address for SATA drives> in 6.6.
Refer to: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=00598b056aa6d46c7a6819efa850ec9d0d690d76
The new upstream commit has done what 0011 does.

(2.3)Patch 0039 for 5.10 is abandoned for new upstream commit
<samples/bpf: replace broken overhead microbenchmark with
fib_table_lookup> in 6.6.
Refer to: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=58e975d014e1e31bd1586be7d2be6d61bd3e3ada
0038 isn't needed any more with the new commit merged.

(2.4)Patch 0030 for 5.10 is abandoned because the related code has
been changed in 6.6 and the issue was verified to disappear.

(2.5)Patch 0010 for 5.10 is abandoned and the issue will be fixed by
setting /config/target/iscsi/cpus_allowed_list to be same with kernel
parameter "kthread_cpus". Because the new patch
<scsi: target: Add iscsi/cpus_allowed_list in configfs>
adds iscsi/cpus_allowed_list in configfs. The available CPU set of
iSCSI connection RX/TX threads is allowed_cpus & online_cpus.
This will do the same thing with patch 0010 so long as we set
cpus_allowed_list properly.
Refer to: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?id=d72d827f2f2636d8d72f0f3ebe5b661c9a24d343>
This issue will be addressed by later patches on stx framework part.

(2.6)Patch 0015-0016 are abandoned because the issue has been fixed
from the user space side by using the stable /dev/disk/by-path/...
symbolic links instead of names like /dev/sda that can change
(confirmed by M. Vefa Bicakci).

(2.7)Below patches for 5.10 are ported to 6.6:
0001-0009/0012/0028-0029/0040/0057/0082

(3)about kernel config:
(3.1) Enable CONFIG_GNSS for the ice driver.

Test plan:
 The out of tree kernel modules for 6.6 aren't ready by now.
 So many tests can't be done yet because the related test environments
 need those OOT drivers. Here list the tests which have been done with
 a test patch to remove the OOT drivers from the ISO temporarily.
 There are also 2 patches as workaround for solving 2 issues met when
 installing lab in jenkins job.
 PASS: Build linux/linux-rt OK.
 PASS: Build ISO OK.
 PASS: Install and boot up OK on a AIO-SX lab with std/rt kernel.
 PASS: The 12 hours cyclictest result for rt kernel is:
       samples:  259199998	avg:   1658	max:   5455
       99.9999th percentile: 3725	overflows: 0

Story: 2011000
Task: 49365

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Change-Id: I6601fd2d7be4fc314ef2bc03b46f851eabebe3ea
(cherry picked from commit 06f53ed8e2a11676d4c8fca745c34dcaa3d889be)
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
2024-07-09 23:59:50 +00:00

319 lines
14 KiB
Diff

From 7e3c5b74c46bd25f4f3885b9f0a4777239d01a85 Mon Sep 17 00:00:00 2001
From: Li Zhou <li.zhou@windriver.com>
Date: Fri, 26 Nov 2021 20:17:45 +0800
Subject: [PATCH 1/5] kernel-rt: Adapt the debian folder for new source
Below are the changes on DEBIAN's kernel release's "debian" folder
for building linux-yocto kernel-rt source 6.6.7, besides the changes
about kernel configs / changelog file / replacing "linux" with
"linux-rt":
-Update debian/config/amd64/none/defines to disable debian cloud image
build, which isn't in use here;
-Update debian/config/defines to disable docs/installer packages'
build to avoid some build errors caused by docs and installer,
which aren't in use here;
-Update debian/lib/python/debian_linux/debian.py to remove an
unimportant format check for changelog because it conflicts with the
new build system;
-Update debian/patches/series to only keep the necessary patches to
support package build system and the lockdown feature, which are from
DEBIAN release.
-Update debian/rules to solve the issue that build paused after
gencontrol;
-Update debian/config/defines to disable rt feature. This linux-rt
isn't built using the rt feature, because linux-yocto rt source
is stored in its own branch and not as a set of patches against std.
Take the linux-rt code as a normal kernel with its special config file;
-Update debian/config/defines to disable unnecessary tool packages;
-Update debian/control to avoid the error:
<debrepack - ERROR - dpkg-source: error: source package has two
conflicting values - linux and linux-rt>
This is caused by the temp control file in the debian folder
downloaded.
-Update abiname.
Signed-off-by: Li Zhou <li.zhou@windriver.com>
[lz: Adapted the patch for upgrading kernel from 5.10 to 6.6]
Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
debian/config/amd64/none/defines | 8 --
debian/config/defines | 10 +-
debian/control | 2 +-
debian/lib/python/debian_linux/debian.py | 24 ++--
debian/patches/series | 134 -----------------------
debian/rules | 9 +-
6 files changed, 21 insertions(+), 166 deletions(-)
diff --git a/debian/config/amd64/none/defines b/debian/config/amd64/none/defines
index 1717c99..090dc41 100644
--- a/debian/config/amd64/none/defines
+++ b/debian/config/amd64/none/defines
@@ -1,11 +1,3 @@
[base]
flavours:
amd64
- cloud-amd64
-default-flavour: amd64
-quick-flavour: cloud-amd64
-
-[cloud-amd64_image]
-configs:
- config.cloud
- amd64/config.cloud-amd64
diff --git a/debian/config/defines b/debian/config/defines
index 1b4ee8f..37ee655 100644
--- a/debian/config/defines
+++ b/debian/config/defines
@@ -1,5 +1,5 @@
[abi]
-abiname: 0.deb11.9
+abiname: 1
ignore-changes:
__cpuhp_*
__udp_gso_segment
@@ -145,7 +145,6 @@ arches:
compiler: gcc-10
featuresets:
none
- rt
[build]
# Disable code signing by default; this can be overridden per-architecture
@@ -153,7 +152,7 @@ signed-code: false
trusted-certs: debian/certs/debian-uefi-certs.pem
[featureset-rt_base]
-enabled: true
+enabled: false
[description]
part-long-up: This kernel is not suitable for SMP (multi-processor,
@@ -171,3 +170,8 @@ gcc-10: gcc-10 <!stage1 !cross !pkg.linux.nokernel>, gcc-10-@gnu-type-package@ <
# initramfs-generators
initramfs-fallback: linux-initramfs-tool
initramfs-tools: initramfs-tools (>= 0.120+deb8u2)
+
+[packages]
+docs: false
+installer: false
+tools-unversioned: false
diff --git a/debian/control b/debian/control
index 493e8f3..f3e4742 100644
--- a/debian/control
+++ b/debian/control
@@ -1,4 +1,4 @@
-Source: linux
+Source: linux-rt
Section: kernel
Priority: optional
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
diff --git a/debian/lib/python/debian_linux/debian.py b/debian/lib/python/debian_linux/debian.py
index 8fca8fb..296c1e2 100644
--- a/debian/lib/python/debian_linux/debian.py
+++ b/debian/lib/python/debian_linux/debian.py
@@ -87,19 +87,17 @@ class Changelog(list):
v = Version(top_match.group('version'))
else:
bottom_match = self._bottom_re.match(line)
- if not bottom_match:
- raise Exception('invalid bottom line %d in changelog' %
- line_no)
-
- self.append(self.Entry(
- distribution=top_match.group('distribution'),
- source=top_match.group('source'),
- version=v,
- urgency=top_match.group('urgency'),
- maintainer=bottom_match.group('maintainer'),
- date=bottom_match.group('date')))
- top_match = bottom_match = None
-
+ # Don't raise exception any more if this bottom format
+ # checking fails because we have adpated the changelog format.
+ if bottom_match:
+ self.append(self.Entry(
+ distribution=top_match.group('distribution'),
+ source=top_match.group('source'),
+ version=v,
+ urgency=top_match.group('urgency'),
+ maintainer=bottom_match.group('maintainer'),
+ date=bottom_match.group('date')))
+ top_match = bottom_match = None
class Version(object):
_epoch_re = re.compile(r'\d+$')
diff --git a/debian/patches/series b/debian/patches/series
index 1f915ac..7326cee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,146 +1,12 @@
-debian/gitignore.patch
-
-# Disable features broken by exclusion of upstream files
-debian/dfsg/arch-powerpc-platforms-8xx-ucode-disable.patch
-debian/dfsg/drivers-media-dvb-dvb-usb-af9005-disable.patch
-debian/dfsg/vs6624-disable.patch
-debian/dfsg/drivers-net-appletalk-cops.patch
-debian/dfsg/video-remove-nvidiafb-and-rivafb.patch
-debian/dfsg/documentation-fix-broken-link-to-cipso-draft.patch
-
# Changes to support package build system
debian/version.patch
debian/uname-version-timestamp.patch
debian/kernelvariables.patch
-debian/ia64-hardcode-arch-script-output.patch
-debian/mips-disable-werror.patch
-debian/mips-boston-disable-its.patch
-debian/mips-ieee754-relaxed.patch
-debian/arch-sh4-fix-uimage-build.patch
-debian/tools-perf-perf-read-vdso-in-libexec.patch
-debian/tools-perf-install-python-bindings.patch
-debian/wireless-add-debian-wireless-regdb-certificates.patch
-debian/export-symbols-needed-by-android-drivers.patch
-debian/android-enable-building-ashmem-and-binder-as-modules.patch
-debian/documentation-drop-sphinx-version-check.patch
debian/perf-traceevent-support-asciidoctor-for-documentatio.patch
debian/kbuild-look-for-module.lds-under-arch-directory-too.patch
-debian/kbuild-abort-build-if-subdirs-used.patch
-debian/module-avoid-abi-changes-when-debug-info-is-disabled.patch
-debian/makefile-make-compiler-version-comparison-optional.patch
-
-# Fixes/improvements to firmware loading
-features/all/drivers-media-dvb-usb-af9005-request_firmware.patch
-debian/iwlwifi-do-not-request-unreleased-firmware.patch
-bugfix/all/firmware_class-log-every-success-and-failure.patch
-bugfix/all/firmware-remove-redundant-log-messages-from-drivers.patch
-bugfix/all/radeon-amdgpu-firmware-is-required-for-drm-and-kms-on-r600-onward.patch
-debian/firmware_class-refer-to-debian-wiki-firmware-page.patch
-bugfix/all/wifi-mt76-do-not-run-mt76_unregister_device-on-unregistered-hw.patch
-
-# Change some defaults for security reasons
-debian/af_802154-Disable-auto-loading-as-mitigation-against.patch
-debian/rds-Disable-auto-loading-as-mitigation-against-local.patch
-debian/dccp-disable-auto-loading-as-mitigation-against-local-exploits.patch
-debian/hamradio-disable-auto-loading-as-mitigation-against-local-exploits.patch
-debian/fs-enable-link-security-restrictions-by-default.patch
-
-# Set various features runtime-disabled by default
-debian/sched-autogroup-disabled.patch
-debian/yama-disable-by-default.patch
-debian/add-sysctl-to-disallow-unprivileged-CLONE_NEWUSER-by-default.patch
-features/all/security-perf-allow-further-restriction-of-perf_event_open.patch
-features/x86/intel-iommu-add-option-to-exclude-integrated-gpu-only.patch
-features/x86/intel-iommu-add-kconfig-option-to-exclude-igpu-by-default.patch
-
-# Disable autoloading/probing of various drivers by default
-debian/cdc_ncm-cdc_mbim-use-ncm-by-default.patch
-debian/snd-pcsp-disable-autoload.patch
-bugfix/x86/viafb-autoload-on-olpc-xo1.5-only.patch
-debian/fjes-disable-autoload.patch
-
-# Taint if dangerous features are used
-debian/fanotify-taint-on-use-of-fanotify_access_permissions.patch
-debian/btrfs-warn-about-raid5-6-being-experimental-at-mount.patch
-
-# Arch bug fixes
-bugfix/arm/arm-dts-kirkwood-fix-sata-pinmux-ing-for-ts419.patch
-bugfix/x86/perf-tools-fix-unwind-build-on-i386.patch
-bugfix/sh/sh-boot-do-not-use-hyphen-in-exported-variable-name.patch
-bugfix/arm/arm-mm-export-__sync_icache_dcache-for-xen-privcmd.patch
-bugfix/powerpc/powerpc-boot-fix-missing-crc32poly.h-when-building-with-kernel_xz.patch
-bugfix/arm64/arm64-acpi-Add-fixup-for-HPE-m400-quirks.patch
-bugfix/alpha/alpha-fix-missing-symbol-versions-for-str-n-cat-cpy.patch
-
-# Arch features
-features/arm64/dt-bindings-rockchip-Add-Hardkernel-ODROID-M1-board.patch
-features/arm64/arm64-dts-rockchip-Add-Hardkernel-ODROID-M1-board.patch
-features/arm64/arm64-dts-rockchip-add-thermal-support-to-ODROID-M1.patch
-features/arm64/arm64-dts-rockchip-Add-NOR-flash-to-ODROID-M1.patch
-features/arm64/arm64-dts-rockchip-Add-analog-audio-on-ODROID-M1.patch
-features/arm64/arm64-dts-rockchip-Enable-vop2-and-hdmi-tx-on-ODROID.patch
-features/arm64/arm64-dts-rockchip-Enable-HDMI-audio-on-ODROID-M1.patch
-features/arm64/arm64-dts-rockchip-Enable-the-GPU-on-ODROID-M1.patch
-features/arm64/arm64-dts-rockchip-Enable-the-USB-2.0-ports-on-ODROI.patch
-features/arm64/arm64-dts-rockchip-Enable-the-USB-3.0-ports-on-ODROI.patch
-features/arm64/arm64-dts-rockchip-Add-SATA-support-to-ODROID-M1.patch
-features/arm64/arm64-dts-rockchip-Add-PCIEe-v3-nodes-to-ODROID-M1.patch
-features/arm64/arm64-dts-rockchip-Add-IR-receiver-node-to-ODROID-M1.patch
-features/x86/x86-memtest-WARN-if-bad-RAM-found.patch
-features/x86/x86-make-x32-syscall-support-conditional.patch
-
-# Quartz64 bug fixes/patches
-bugfix/arm64/arm64-dts-rockchip-fix-spdif-fe460000-ordering-on-rk.patch
-features/arm64/quartz64/arm64-dts-rockchip-RK356x-Add-I2S2-device-node.patch
-features/arm64/quartz64/arm64-dts-rockchip-Enable-GPU-on-SOQuartz-CM4.patch
-features/arm64/quartz64/arm64-dts-rockchip-Enable-video-output-and-HDMI-on-S.patch
-features/arm64/quartz64/arm64-dts-rockchip-Enable-HDMI-sound-on-SOQuartz.patch
-features/arm64/quartz64/arm64-dts-rockchip-Enable-PCIe-2-on-SOQuartz-CM4IO.patch
-features/arm64/quartz64/dt-bindings-arm-rockchip-Add-SOQuartz-Blade.patch
-features/arm64/quartz64/arm64-dts-rockchip-Add-SOQuartz-blade-board.patch
-features/arm64/quartz64/dt-bindings-arm-rockchip-Add-SOQuartz-Model-A.patch
-features/arm64/quartz64/arm64-dts-rockchip-Add-SOQuartz-Model-A-baseboard.patch
-
-# Miscellaneous bug fixes
-bugfix/all/disable-some-marvell-phys.patch
-bugfix/all/fs-add-module_softdep-declarations-for-hard-coded-cr.patch
-bugfix/all/media-cx18-avoid-strlen-call-that-triggers-ice-in-gc.patch
# Miscellaneous features
# Lockdown missing pieces
features/all/lockdown/efi-add-an-efi_secure_boot-flag-to-indicate-secure-b.patch
features/all/lockdown/efi-lock-down-the-kernel-if-booted-in-secure-boot-mo.patch
-features/all/lockdown/mtd-disable-slram-and-phram-when-locked-down.patch
-features/all/lockdown/arm64-add-kernel-config-option-to-lock-down-when.patch
-
-# Improve integrity platform keyring for kernel modules verification
-features/all/db-mok-keyring/0003-MODSIGN-checking-the-blacklisted-hash-before-loading-a-kernel-module.patch
-features/all/db-mok-keyring/KEYS-Make-use-of-platform-keyring-for-module-signature.patch
-features/all/db-mok-keyring/trust-machine-keyring-by-default.patch
-
-# Security fixes
-debian/i386-686-pae-pci-set-pci-nobios-by-default.patch
-debian/ntfs-mark-it-as-broken.patch
-bugfix/all/netfilter-nf_tables-deactivate-anonymous-set-from-pr.patch
-
-# Fix exported symbol versions
-bugfix/all/module-disable-matching-missing-version-crc.patch
-
-# Tools bug fixes
-bugfix/all/usbip-document-tcp-wrappers.patch
-bugfix/all/kbuild-fix-recordmcount-dependency.patch
-bugfix/all/tools-perf-man-date.patch
-bugfix/all/tools-perf-remove-shebangs.patch
-bugfix/x86/revert-perf-build-fix-libunwind-feature-detection-on.patch
-bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch
-bugfix/all/cpupower-bump-soname-version.patch
-bugfix/all/cpupower-fix-checks-for-cpu-existence.patch
-bugfix/all/tools-perf-pmu-events-fix-reproducibility.patch
-bugfix/all/libapi-define-_fortify_source-as-2-not-empty.patch
-bugfix/all/tools-perf-fix-missing-ldflags-for-some-programs.patch
-
-# debian-installer fixes
-bugfix/powerpc/fbdev-offb-Update-expected-device-name.patch
-
-# ABI maintenance
diff --git a/debian/rules b/debian/rules
index b39c230..0234128 100755
--- a/debian/rules
+++ b/debian/rules
@@ -130,12 +130,7 @@ debian/control-real: debian/bin/gencontrol.py $(CONTROL_FILES)
# Hash randomisation makes the pickled config unreproducible
PYTHONHASHSEED=0 $<
md5sum $^ > debian/control.md5sum
- @echo
- @echo This target is made to fail intentionally, to make sure
- @echo that it is NEVER run during the automated build. Please
- @echo ignore the following error, the debian/control file has
- @echo been generated SUCCESSFULLY.
- @echo
- exit 1
+ @echo The debian/control file has been generated SUCCESSFULLY.
+ @echo Proceed to build!
.PHONY: binary binary-% build build-% clean debian/control-real orig setup source
--
2.17.1