When run "make dist-rpm", there are errors as below:
filter-modules.sh: Failed to filter out external modules, broken depmod:
depmod: WARNING: /drivers/misc/cardreader/rtsx_pci.ko needs unknown symbol mfd_add_devices
depmod: WARNING: /drivers/misc/cardreader/rtsx_pci.ko needs unknown symbol mfd_remove_devices
depmod: WARNING: /drivers/misc/cardreader/rtsx_usb.ko needs unknown symbol mfd_add_devices
depmod: WARNING: /drivers/misc/cardreader/rtsx_usb.ko needs unknown symbol mfd_remove_devices
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_db_free
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_core_destroy_mkey
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_vf_get_core_dev
depmod: WARNING: /drivers/vfio/pci/mlx5/mlx5-vfio-pci.ko needs unknown symbol mlx5_core_alloc_pd
......
Add mfd-core and mlx5_core to "overrides", which will let them back into
kernel-core*.rpm, and sovle "broken depmod" as above.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
OC release need keep consistent with the community's conventions.
Spliting out modules-public and modules-public-removable-media rpm is
inconsistent with the community's conventions.
Revert:
commit 4faa03afdc ("dist: add a modules-public rpm subpackage")
commit 83c70cfab6 ("dist: rename modules-removable-media to
modules-public-removable-media")
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
Upstream: no
RPM NVR expects a decimal starting release. Previously dist build try to
respect git tag as much as possible, but for this case we need to be
careful about breaking RPM specs.
Signed-off-by: Kairui Song <kasong@tencent.com>
Upstream: no
Clean up how unamer is being formatted, ensure it's set in
lib-version.sh and else where can simply use it.
Signed-off-by: Kairui Song <kasong@tencent.com>
git log --topo-order will keep the real merge order, and make the changelog
more readable.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
lorax image need arch info in /boot/vmlinuz-* file name, so, revert
the commit "do not include tl and arch info in uname -r".
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
When run "make dist-rpm", there are warnnings as below:
Generating kernel RPM spec: /data/tencentos/tkernel5/dist/rpm/SOURCES/kernel.spec
warning: Macro expanded in comment on line 377: %{rpm_name}-debuginfo-common
To avoid warnning, do not using MICRO in annotations.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
Upstream: no
Adds LoongArch64 processor architecture support in the Makefile.
Also add a soft link to the loongson3_defconfig config file.
Signed-off-by: Ming Wang <wangming01@loongson.cn>
The following errors are showing up when compiling nvidia driver:
/home/builder/rpmbuild/BUILD/gpu_src/kernel/nvidia/nv-pat.c: In function 'nv_disable_caches':
/home/builder/rpmbuild/BUILD/gpu_src/kernel/nvidia/nv-pat.c:66:5: error: implicit declaration of function '__flush_tlb'; did you
mean '__flush_tlb_all'? [-Werror=implicit-function-declaration]
66 | __flush_tlb();
| ^~~~~~~~~~~
| __flush_tlb_all
cc1: some warnings being treated as errors
Solve these issues by:
enable CONFIG_X86_PAT
Signed-off-by: Zeng Jingxiang <linuszeng@tencent.com>
If using CONFIG="eks-release", will no CONFIG_DEBUG_INFO_BTF.
If no CONFIG_DEBUG_INFO_BTF and no /sys/kernel/btf/vmlinux in build env,
make dist-rpm will fail, fixt it.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
TK have some kernel modules (such rue.ko) only used in private release version,
split them into modules-private subpackage.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Upstream: no
For some reason, we don't distribute debuginfo-common easily (and I have
no say in it) since it contains source code. So let's break the dependency
chain. This will cause trouble for crash debugging but that's what we
want.
Signed-off-by: Kairui Song <kasong@tencent.com>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
This enables CONFIG_TEXT_UNEVICTABLE on x86 and arm64
Backport-reason: Add code segment unevictable feature support [PATCH 8/8]
Signed-off-by: Xin Hao <vernhao@tencent.com>
Upstream: no
Provides kabi check/update/create commands for local users:
1. Check whether TencentOS Kennel KABI is compatible
2. Update TencentOS Kennel KABI file
3. Create TencentOS Kennel KABI file
Signed-off-by: Yongliang Gao <leonylgao@tencent.com>
Reviewed-by: Jianping Liu <frankjpliu@tencent.com>
spec: add dependency on libtool to build on koji.
Signed-off-by: Sinong Chen <costinchen@tencent.com>
Reviewed-by: Jianping Liu <frankjpliu@tencent.com>
TK have some kernel modules (such nvidia.ko) only uesd in public release verison,
split them into modules-public subpackage.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
Modules in kernle*modules-removable-media*.rpm are the drivers for removable
media. Using them will rise attack risck, and they are not used in private
release, only used in public release. So, rename it.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
Tk4 have this sub package, try to be compatible, and use
filter-modules.sh instead which does a depmod check after splitting, to
avoid depmod failure after some modules are split into subpackage.
Signed-off-by: Kairui Song <kasong@tencent.com>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Tkci depending on "make tencentconfig", add it. And this is compatible
with TK4.
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: aurelianliu <aurelianliu@tencent.com>
Upstream: no
Dynamic tar name is causing trouble if distro want to bump suffix
version and rebuild, so fix tarname here.
Signed-off-by: Kairui Song <kasong@tencent.com>
Upstream: no
Intel-SIG: no upstream x86: configs: Add Intel In Field Scan(IFS) kernel config
Backport to support IFS SAF & Array BIST on GNR & SRF
Signed-off-by: Aichun Shi <aichun.shi@intel.com>
Upstream: no
This kabi list is collected with following script:
(first compile the kernel with make)
- Collect top 800 commonly used kABI:
find -name "*.ko" -exec ./dist/scripts/helper/gen-module-kabi.sh \{\} \; | \
| grep -v "NO-KABI" | awk '{print $3}' | sort | uniq -c | sort -nr | head -n 800 | awk '{print $2}' > top-800.kabi
- kABI collected from specified ko file:
./dist/scripts/helper/gen-module-kabi.sh ./nvidia.ko ./smartpqi.ko | grep -v "NO-KABI" | awk '{print $3}' > modules.kabi
- kABI from CentOS:
curl https://git.centos.org/rpms/kernel/raw/c8s/f/SOURCES/Module.kabi_x86_64 | awk '{print $2}' > rhel.kabi
Then merge them, and get the CRC:
cat top-800.kabi modules.kabi rhel.kabi oc.kabi | sort | uniq | \
while read sym; do grep "\b$sym\b.*vmlinux" Module.symvers; done
Signed-off-by: Kairui Song <kasong@tencent.com>
Upstream: no
- Update for 6.6
- Enabled downstream features
- DWARF5 requires gcc 11+, let's be compatible with gcc 8.5 use DWARF4
Signed-off-by: Kairui Song <kasong@tencent.com>
Upstream: no
Add two config target, generic-release and generic-debug.
generic-release is inherited from OCKS 2207, which is based on Centos 9
and TK4, with following key changes:
- Disabled Firewire, ATM, Memstick, TIPC, and some really legacy drivers
- Enable more NETFILTER, NET_ACT, NET_SCHE, NET_VENDOR, fit requirement
from TK4.
- Enable some drivers that are enabled in TK4 but not in RHEL, like some
IR_DECODER, network card drivers like QLCNIC, we can disable them
later if not needed.
- Enable compatibility options like USELIB and LEGACY_VSYSCALL.
- I thought about dropping DVBs, but RHEL/Fedora have them enabled, we
can disable them later if no one uses it.
Also enabled some configs even for defconfig, so the build process is
unified.
Signed-off-by: Kairui Song <kasong@tencent.com>
Upstream: no
Check-Patch: no
Imported from OCKS-2303:
https://github.com/openCloudOS/OpenCloudOS-Kernel-Stream/tree/ocks-2303
This build system is re-written from scratch except some code snips:
- Compatible with systems that were using TK kernel.
- Compatible with RHEL-like systems.
- Resolved tons of hacks and workaround from TK/RHEL. (leftovers are
marked as TODO)
- All RPM builtin debuginfo utilities are well leveraged (buildid
re-generate, dwarf compression, etc...)
- For bpftool and BTF info extracting, this package will try self-bootstrap
and don't depend on host kernel during build time.
- Well commented, and targeted for maximum compatibility.
- Integrated config management system.
- Integrated with version management system.
- Provides many utils.
- Cross-build and cross packaging, also cross kABI checking/updating.
- ...
To start, just run:
make dist-rpm
And for help, just run:
make dist-help
It will build following packages:
kernel
Main meta package, empty, depend on kernel-core and kernel-modules
kernel-core
The package contains kernel image and core modules, able to boot
all machines, all kinds of VMs etc.
kernel-modules
Contains extra modules and drivers, most modules that are not
required for VMs and common hardware should go into this pacakge.
kernel-devel
Devel files for building custom kernel modules.
kernel-headers
Kernel headers.
perf
python3-perf
Userspace tool perf.
kernel-tools
kernel-tools-libs
kernel-tools-libs-devel
Userspace tools like cpupower, slabinfo, etc...
bpftool
bpftool
kernel-debuginfo
kernel-debuginfo-common
perf-debuginfo
python3-perf-debuginfo
kernel-tools-debuginfo
bpftool-debuginfo
All kinds of debuginfo
Signed-off-by: Kairui Song <kasong@tencent.com>