Commit Graph

97 Commits

Author SHA1 Message Date
Jianping Liu 73d0b4372d Merge OCK linux-6.6/devel branch into TK5 release branch 2024-11-14 09:31:00 +08:00
Ming Wang b3d1694a02 dist: spec: Include bpftool man pages with correct extension in bpftool RPM
The previous kernel RPM spec file did not accurately specify the extension for
bpftool man pages. This could lead to build errors on certain architectures where
the generated man pages might use a different extension than the expected `.gz`.

For example, on LoongArch, building a kernel RPM could result in the following errors:
Error: File not found: ... /loongarch64/usr/share/man/man8/bpftool.8.gz
Error: File not found: ... /loongarch64/usr/share/man/man8/bpftool-*.8.gz

This is because the bpftool man pages are actually generated with the `.zst`
extension on LoongArch:
bpftool.8.zst      bpftool-cgroup.8.zst   bpftool-gen.8.zst   bpftool-link.8.zst
...

This commit modifies the kernel.template.spec file to use a wildcard extension
when including bpftool man pages. This ensures that all generated man pages are
included in the RPM package, regardless of their extension.

Signed-off-by: Ming Wang <wangming01@loongson.cn>
2024-11-14 08:58:53 +08:00
Jianping Liu 2062f089a2 dist: release 6.6.58-15
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-11-07 11:43:51 +08:00
frankjpliu 90f53db9f8 Merge branch 'haisu/master-tryrue-20240905-merge-honglin' into 'master' (merge request !197)
rue: Port MM/IO/NET functions for tkernel5

This MR including RUE MM/IO/NET functions for tkernel5.
Could be built as module or built-in.
The corresponding module code existed in [1].

Signed-off-by: Haisu Wang <haisuwang@tencent.com>
2024-09-29 01:56:56 +00:00
Jianping Liu 3910ca8de7 dist,spec: provide kernel-debug-debuginfo in debug version
When CONFIG="generic-release", %{rpm_name} is kernel,
when CONFIG="generic-debug", %{rpm_name} is kernel-debug.

So, using %{rpm_name}-debuginfo instead of kernel-debuginfo,
using %{rpm_name}-debuginfo-common instead of kernel-debuginfo-common.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-09-27 11:41:06 +08:00
Hongbo Li 5dc70a633d rue: init rue module
Add the init code of rue module.
Support both built-in and module(default) way.

Signed-off-by: Hongbo Li <herberthbli@tencent.com>
Signed-off-by: Haisu Wang <haisuwang@tencent.com>
Reviewed-by: Honglin Li <honglinli@tencent.com>
2024-09-27 11:13:29 +08:00
Jianping Liu 18e6e476e8 dist,sepc: supprot kernel-debug in core and modules and devel rpm
When CONFIG="generic-release", %{rpm_name} is kernel, when
CONFIG="generic-debug", %{rpm_name} is kernel-debug.

Provides: kernel-debug-core in kernel-debug-core rpm
Provides: kernel-debug-modules in kernel-debug-modules rpm
Provides: kernel-debug-devel in kernel-debug-devel rpm

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-09-26 20:46:54 +08:00
Jianping Liu 17dfacb539 dist,Makefile: inherit the existing value of the DISABLED variable
Change "DISABLED = ofed" to "override DISABLED := ofed $(DISABLED)".

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-09-25 19:15:34 +08:00
Jianping Liu 9689e83ae9 dist,Makefile: use override when set DISABLED again
Using override and add space character, let the code more readable.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-09-24 21:55:41 +08:00
Jianping Liu 9ff04f78b7 dist,Makefile: generic-debug config only build kernel rpm
We intend to archive kernle-debug rpm in yum. Release kernel will
build perf/tools/bpf-tools rpm, to avoid kernle-debug build the same
rpm, disable them.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-09-24 20:17:57 +08:00
Jianping Liu 6325da052c dist: using DIST to judge dist release
In dist/Makefile, KDIST is null. So, let's using DIST to judge dist
release.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-09-23 18:47:39 +08:00
Jianping Liu ad3f68afd9 dist: release 6.6.47-12
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-09-23 16:02:11 +08:00
Jianping Liu 8ebfc08eb9 dist: try to download mlnx driver from backup_url
If download mlnx driver fail from https://content.mellanox.com, try
to download mlnx driver from backup_url.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-09-20 18:58:22 +08:00
Jianping Liu 1f3200c4b9 dist,spec: change the keyword for grep in BuildInstMLNXOFED
In BuildInstMLNXOFED, it grep kernel version 5.4, which is unsuited
with TK5 kernel version.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-09-19 18:59:53 +08:00
Jianping Liu 41d84212f5 dist: release 6.6.47-12
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-09-03 11:21:49 +08:00
Jianping Liu 42be2152a4 drivers,thirdparty: add backup url for mlnx driver
If getting mlnx driver fail at https://content.mellanox.com, using
backup url for mlnx driver.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-29 12:43:18 +08:00
Jianping Liu 198d728bcc dist: check sha256 if mlnx tgz is already exist
In dist/sources/download-and-copy-drivers.sh, if mlnx tgz is greater
than 1024 byte, that stand for really mlnx tgz is exist. Script will
return 0, without check sha256. Change it to check sha256 anyway.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-29 10:21:59 +08:00
Jianping Liu 7a56ca3fca drivers,thirdparty: keep copy other thirdparty drivers if with_ofed is 0
If with_ofed is 0, only mlnx driver using kernel native driver. Other
drivers in drivers/thirdparty are commercial quality drivers, they should
be copied to override kernel native drivers before build.

In drivers/thirdparty/copy-drivers.sh, kernel native bnxt directory
is wrong. Fix it by the way.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-28 21:37:46 +08:00
Jianping Liu c92c287ac7 drivers,mlnx: add sha256 check for MLNX tgz
To ensure the down load file is correct, add sha256 check for MLNX tgz.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-28 14:32:34 +08:00
Jianping Liu 3353ce662c dist: delete useless code in kernel.template.spec
Now release-drivers is in three, so it needn't to judge whether
drivers/thirdparty/release-drivers/mlnx is exist.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-28 14:07:21 +08:00
Jianping Liu c3c178d349 dist: fix make dist-srpm warning
Fix warning as below:
Macro expanded in comment on line 520: %{?dist}" != ".tl4" && "%{?dist}" != ".oc9" && "%{?dist}" != ".tl3"

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-27 19:35:15 +08:00
Jianping Liu 8b5cff9dfa dist: exit 1 if download mlnx commercial drivers fail
If download mlnx commercial drivers fail, exit 1 to let users known
about it.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-27 19:32:42 +08:00
Jianping Liu 4eb6f1908f dist: not integrate mlnx commercial drivers in oc9
Some oc9 partners have nic driver, and the driver support RDMA and
the driver only compatble with kernel native infiniband.

If integrate mlnx driver, oc9 partners RDMA nic driver cloud not run.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-27 19:01:43 +08:00
Jianping Liu 3db1e8157b drivers/thirdparty: put release-drivers in tree
Only the size of mlnx driver tgz is very big, other drivers source size
is not very big. So, remove release-drivers submoule (sub git repo).

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-27 17:10:54 +08:00
Jianping Liu d791bba469 dist: add perl-sigtrap build requires
When building mlnx drivers, needing perl-sigtrap rpm. Otherwise,
it will have errors as below:
Can't locate sigtrap.pm in @INC (you may need to install the sigtrap module)
BEGIN failed--compilation aborted at ./install.pl line 44.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-27 16:12:17 +08:00
Jianping Liu 880dd21ab3 dist: release 6.6.47-11
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-08-27 10:59:09 +08:00
Jianping Liu 4d78ab6896 dist: fix mlnx driver compile error on oc9
When building kernel rpm on oc9, will have error as below:
cc1: error: code model kernel does not support PIC mode
OFED_topdir/BUILD/mlnx-ofa_kernel-23.10/obj/default/compat/main.o] Error 1

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-26 19:26:46 +08:00
Jianping Liu 63e2660c48 config,oc: support WLAN and MTD and more SND drivers
OpenCloud partner want use wireless card, sound card, so open the
config to support.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-26 16:33:47 +08:00
Jianping Liu 3a97f7bf0d dist: provide mlnx-ofed-dist rpm
Provide mlnx-ofed-dist-%{kernel_unamer}.rpm, which include the complete
set of MLNX drivers, such as mlnx's user space tools / libs.

Certainly, the kernel modules in mlnx-ofed-dist-%{kernel_unamer}.rpm have
been signed.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-22 11:42:59 +08:00
Jianping Liu 703faa70ad drivers,dist: add mlnx commercial quality drivers
Add mlnx driver of version MLNX_OFED_LINUX-23.10-3.2.2.0 .

Note: MLNX_OFED_LINUX-23.10-3.2.2.0-rhel9.4-x86_64.tgz have a sub tgz
which named MLNX_OFED_SRC-23.10-3.2.2.0.tgz. In MLNX_OFED_SRC-23.10-3.2.2.0.tgz,
there is mlnx-ofa_kernel-23.10-OFED.23.10.3.2.2.1.src.rpm .

Compile mlnx-ofa_kernel-23.10-OFED.23.10.3.2.2.1.src.rpm in ts4 mock env
(koji task using the env) will have lots of errors. So, don't compile
mlnx-ofa_kernel-23.10-OFED.23.10.3.2.2.1.src.rpm as a independent rpm.

MLNX_OFED_LINUX-23.10-3.2.2.0-rhel9.4-x86_64.tgz is too big, it's more
than 220MB. So, download it at first, and then integrate it into kernel
src rpm.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-08-20 19:05:53 +08:00
Jianping Liu 8b72acfebf dist/Makefile: add correct URL info when build tl4 rpm
In dist/Makefile, the VENDOR and URL are filled by OpenCloudOS info,
Change them to tencentos info when building tl4 rpm.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-07-30 15:01:25 +08:00
Kairui Song 85c40d2d2c dist: tk: enable keypkg by default
For non-tagged build, keypkg contains the build time key. Non-tagged
build are not suppose to be used for production servers so this only
making debugging easier.

For tagged koji build, keypkg contains a dummy empty key, sign-file is
hooked by tencent-kernel-signer so it's safe to do so too.

If for some special purpose the keypkg shouldn't be exposed to users,
just don't add the kernel-signing-keys to repo.

Signed-off-by: Kairui Song <kasong@tencent.com>
2024-07-25 09:15:50 +00:00
Kairui Song 88b5699fee dist: fix build error with debuginfo package
Fixes following error:

+ '%{__debug_install_post}'
/var/tmp/rpm-tmp.me90D2: line 86: fg: no job control

Signed-off-by: Kairui Song <kasong@tencent.com>
2024-07-25 09:15:50 +00:00
Jianping Liu dd05b94243 drivers/thirdparty: add copy-drivers.sh to using thirdparty drivers
copy-drivers.sh is used for:
1, Prepare git sub-module;
2, Copy thirdparty drivers to override kernel native drivers.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-07-19 20:12:06 +08:00
Jianping Liu 141ba6644b dist: release 6.6.34-9
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-06-19 18:56:36 +08:00
Jianping Liu a8725d1288 dist: do not run scripts fail in kernel.template.spec
In kernel.template.spec, if one scripts line not return 0, the scripts
will fail immediately. The fail log is similar as below:
error: %prein(kernel-modules-6.6.34-8.tl4.x86_64) scriptlet failed, exit status 1
error: kernel-modules-6.6.34-8.tl4.x86_64: install failed

When using "COMMAND_A && CCOMMAND_B", if COMMAND_A fail, the scripts
will fail immediately and will not run CCOMMAND_B. So using "COMMAND_A || CCOMMAND_B"
format instead of "COMMAND_A && CCOMMAND_B".

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-06-19 18:54:17 +08:00
Jianping Liu 5634366348 dist: release 6.6.34-8
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-06-17 16:39:01 +08:00
Jianping Liu 8e0d7786d7 dist: release 6.6.33-7
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-06-13 10:31:43 +08:00
Jianping Liu 38f4fdb968 dist: using "tk_private=1" to judge private release
Users may use kernel parameters which described in
Documentation/admin-guide/kernel-parameters.txt, to decouple from the
existing kernel parameters, add and use "tk_private=1" to judge private
release.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-27 10:56:55 +08:00
Jianping Liu a11e94beb2 dist: remove usb-storage.ko and nouveau.ko when install private release
For security reason, we don't need usb-storage.ko in private release.
Modprobe usb-storage.ko will cause /dev/sdx shift when BMC supply a usb
storage device, which will cause boot fail if some customer haven't using
UUID in /etc/fstab.

Inner customer will use commercial nvidia driver, which don't need kernel's
origin nouveau.ko.

For security reason, we don't need cfg80211.ko in private release; server
don't use wireless.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-26 18:05:48 +08:00
Jianping Liu 3179f252be dist: revert "add a modules-private rpm subpackage"
Private rpms are compiled as mod-xxx.rpm, and we do not need
kernel-modules-private*.rpm now.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-26 14:39:18 +08:00
mengensun d0e6e037be Kconfig: add more modules
we do some research on default kconfig of the same same industry
add some modules to curernt kernel.

Reviewed-by: frankjpliu <frankjpliu@tencent.com>
Reviewed-by: aurelianliu <aurelianliu@tencent.com>
Signed-off-by: mengensun <megnensun@tencent.com>
2024-05-26 06:30:49 +00:00
Kairui Song b06f941caa dist: don't parse kernel version unless needed
RPM version parsing need to search for git tag, which is slow if the
repo is skewed. Skip that if not needed.

Signed-off-by: Kairui Song <kasong@tencent.com>
2024-05-24 17:42:04 +08:00
Kairui Song db277b0d22 dist: optimize version parsing
Upstream: no

A minor optimization.

Signed-off-by: Kairui Song <kasong@tencent.com>
2024-05-24 17:35:24 +08:00
Kairui Song 7c237644c8 dist: stop using --show-toplevel for speed up
Dist folder struct is very stable now, no need to use git for retrieving
top dir path.

This alse clean up git usage so dist will be able to build out of repo
in the future.

Signed-off-by: Kairui Song <kasong@tencent.com>
2024-05-24 16:43:15 +08:00
Jianping Liu 54f6658540 dist: delete 5.17.0-0.20220314git47581bb4d9ae.rc7-tks in changelog
We are using linux 6.6; do not write
5.17.0-0.20220314git47581bb4d9ae.rc7-tks in changelog.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-05-22 16:44:11 +08:00
Jianping Liu 256aa06fb3 dist: release 6.6.31-6
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-21 17:13:48 +08:00
Jianping Liu 3c31f56c99 dist: release 6.6.30-5
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-17 15:59:27 +08:00
Kairui Song b5f9a9b6b5 dist: create a dummy key if keypkg disabled
Upstream: no

Some script may check [ -f PRIV_KEY ], a dangling symbol will fail that.

A hooked sign-file might be used so a dummy file can help it to work.

Signed-off-by: Kairui Song <kasong@tencent.com>
2024-05-15 12:12:38 +00:00
Jianping Liu 70618277b9 dist: release 6.6.30-4
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-13 18:59:25 +08:00