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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>