Commit Graph

12 Commits

Author SHA1 Message Date
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 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 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
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 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 680e6d50a3 dist: add a modules-private rpm subpackage
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>
2024-04-08 13:18:38 +08:00
Jianping Liu 4faa03afdc dist: add a modules-public rpm subpackage
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>
2024-03-15 12:12:14 +08:00
Jianping Liu 83c70cfab6 dist: rename modules-removable-media to modules-public-removable-media
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>
2024-03-15 12:06:30 +08:00
Jianping Liu 2596824741 dist: tks: add a removable media modules pkg
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>
2024-03-15 11:55:08 +08:00
Kairui Song cf5d03932d dist: initial support
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>
2023-12-12 15:56:34 +08:00