Commit Graph

84 Commits

Author SHA1 Message Date
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 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
Jianping Liu 8c278a4725 dist: release 6.6.30-3
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-11 21:31:34 +08:00
Jianping Liu f97aaab320 dist: fix filter-modules error when make dist-rpm
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>
2024-05-11 20:46:30 +08:00
Jianping Liu 66aa0861d1 dist: release 6.6.30-2
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-05-11 20:27:02 +08:00
Jianping Liu f67246a0d7 dist: not split out modules-public and modules-public-removable-media rpm
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>
2024-05-09 16:26:44 +08:00
Jianping Liu 5071b58e39 config: enable CONFIG_DEBUG_INFO_BTF in eks config
eks container image build needing CONFIG_DEBUG_INFO_BTF, add it.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
2024-04-18 19:45:33 +08:00
Kairui Song 1ffa857af8 dist: ensure release start with decimal number
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>
2024-04-18 02:25:53 +00:00
Kairui Song afd9d2d0b6 dist: sanitize usage of unamer
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>
2024-04-18 02:25:53 +00:00
Kairui Song e9ee1b9837 dist: add missing place holder for loongarch64 kabi
Upstream: no

Ensure local build can pass.

Signed-off-by: Kairui Song <kasong@tencent.com>
2024-04-18 02:25:53 +00:00
Jianping Liu 1a77a55752 dist: release 6.6.26-1
Upstream: no

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-04-17 11:35:28 +08:00
Jianping Liu d2d3d7be5f dist: using --topo-order when run git log
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>
2024-04-17 09:56:19 +08:00
Jianping Liu b7c1d03b83 dist: revert "do not include tl and arch info in uname -r"
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>
2024-04-16 15:50:38 +08:00
Jianping Liu 1020a22959 dist: avoid "make dist-rpm" warnning
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>
2024-04-13 13:10:46 +08:00
Jianping Liu 5f0491ad7c Loongarch: support loongarch and add kvm support for loongarch
Merge pull request !128 from lixianglai/next
2024-04-12 20:51:12 +08:00