
This commit upgrades the Linux kernel to 6.12.18 from 6.6.x, which comes from the linux-yocto upstream. The following changes we made to support the kernel upgrade. For linux debian package deb_patches folder. We adapt the kernel related patch for 6.12.18, and cherry pick the following 8 commits to support to build the kernel 6.12.x. 1) commit f77deecbb5d4 "d/rules.real: Unset KBUILD_HOSTCFLAGS etc. instead of overriding to be empty" https://salsa.debian.org/kernel-team/linux/-/commit/f77deecbb5d4 2) commit 0d0d62b7d1cc "d/rules.d/Makefile.inc: Add scripts/include to header include path" https://salsa.debian.org/kernel-team/linux/-/commit/0d0d62b7d1cc 3) commit 4ad01663251d "[x86] linux-cpupower: Update turbostat Makefile to define BUILD_BUG_HEADER" https://salsa.debian.org/kernel-team/linux/-/commit/4ad01663251d 4) commit fced95b415be "hyperv-daemons: Update for upstream removal of hv_fcopy_daemon" https://salsa.debian.org/kernel-team/linux/-/commit/fced95b415be 5) commit 3a17dcbfe0be "d/rules.d/certs: Add newly required include directory to CPPFLAGS" https://salsa.debian.org/kernel-team/linux/-/commit/3a17dcbfe0be 6) commit 15b6859742d4 "Disable building rtla, since bullseye's libtraceevent and libtracefs are too old" https://salsa.debian.org/kernel-team/linux/-/commit/15b6859742d4 7) commit b4b93560d441 "[ia64] Drop all ia64 configs due to upstream dropping IA64 arch" https://salsa.debian.org/kernel-team/linux/-/commit/b4b93560d441 8) commit b93faa99519d "linux-kbuild: Add scripts/module-common.c (Closes: #1087495)" https://salsa.debian.org/kernel-team/linux/-/commit/b93faa99519d For the Linux source code patches folder. 1) We adapt the patch 0001, 0003, 0005, 0006, 0010, 0014 and 0017 based on kernel-6.12.18. 2) Remove all the ice port back patches because that has been included in our source code. For the kernel config. We enable CONFIG_CPUSETS_V1 and CONFIG_MEMCG_V1 to fix install issue. Verification: - Build kernel and out of tree modules success for rt and std. - Build iso success for rt and std. - Install success onto a All-in-One lab with rt kernel, and can switch to std kernel. - Boot up successfully in the lab. - The sanity testing was run and the test results PASS. - The cyclictest benchmark was also run on the starlingx lab, the result is "samples: 43199996 avg: 1656.295 std_dev: 67.617 max: 8827 99.9999th percentile: 8652“,It is worse than linux-6.6.x. - The network performance test had been done. For TCP, better than kernel-6.6.x, for UDP, a little worse than kernel-6.6.x, for STCP, can not do the test that is same with kernel-6.6.x. Story: 2011384 Task: 51856 Change-Id: I06ff2f3ab3620fe887f1e5e72ea9022a0cea6102 Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
73 lines
2.9 KiB
Bash
Executable File
73 lines
2.9 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2021 Wind River Systems, Inc.
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. The ASF licenses this
|
|
# file to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
|
|
# The only parameter is the name of the new directory that will contain
|
|
# the extracted source code. Be aware that this new directory will be
|
|
# created in the same directory as where this script is located when
|
|
# building.
|
|
# Tools needed: tar/sed
|
|
|
|
KERNEL_HEAD_COMMIT=7c2d49c69f3f7e59a598fa8f618b37836fd56404
|
|
DEBIAN_FILE=linux_6.1.27-1~bpo11%2B1.debian.tar.xz
|
|
|
|
tar xvf linux-yocto-${KERNEL_HEAD_COMMIT}.tar.gz
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "tar failed: linux-yocto source!"
|
|
exit 1
|
|
fi
|
|
mv linux-yocto-${KERNEL_HEAD_COMMIT} $1
|
|
|
|
cd $1
|
|
tar xvf ../${DEBIAN_FILE}
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "tar failed: debian folder for kernel!"
|
|
exit 1
|
|
fi
|
|
cd debian
|
|
cp "${MY_REPO_ROOT_DIR}"/cgcs-root/stx/kernel/kernel-rt/\
|
|
/debian/source/changelog ./
|
|
cp "${MY_REPO_ROOT_DIR}"/cgcs-root/stx/kernel/kernel-rt/\
|
|
/debian/source/config ./config/amd64/none
|
|
cd -
|
|
|
|
# The debian folder is written to build "linux". If use this folder
|
|
# to build similar things for kernel-rt, all the packages are renamed
|
|
# from "linux-xxx" to "linux-rt-xxx". Here replace those packages'
|
|
# name in those files of the debian folder which will affect building.
|
|
SED_LIST=" ./debian/bin ./debian/rules.d/tools/perf ./debian/rules ./debian/rules.real ./debian/signing_templates ./debian/templates ./debian/control"
|
|
sed -i "s/linux-headers/linux-rt-headers/g" `grep -rl "linux-headers" $SED_LIST`
|
|
sed -i "s/linux-image/linux-rt-image/g" `grep -rl "linux-image" $SED_LIST`
|
|
sed -i "s/linux-perf/linux-rt-perf/g" `grep -rl "linux-perf" $SED_LIST`
|
|
sed -i "s/linux-config/linux-rt-config/g" `grep -rl "linux-config" $SED_LIST`
|
|
sed -i "s/linux-kbuild/linux-rt-kbuild/g" `grep -rl "linux-kbuild" $SED_LIST`
|
|
sed -i "s/linux-libc-dev/linux-rt-libc-dev/g" `grep -rl "linux-libc-dev" $SED_LIST`
|
|
sed -i "s/linux-source/linux-rt-source/g" `grep -rl "linux-source" $SED_LIST`
|
|
sed -i "s/linux-support/linux-rt-support/g" `grep -rl "linux-support" $SED_LIST`
|
|
|
|
# The abiname is changed from "0.deb11.9" to "1-rt", so replace
|
|
# "6.1.0-0.deb11.9" with "6.6.0-1-rt" in init control file.
|
|
sed -i "s/6\.1\.0-0\.deb11\.9/6.6.0-1-rt/g" ./debian/control
|
|
|
|
# This is the only file name that involves renaming in debian
|
|
# folder.
|
|
mv debian/linux-image.NEWS debian/linux-rt-image.NEWS
|