Skip to content

Commit adf3f14

Browse files
deps: PR opencomputeproject#1130 (kernel 6.18 LTS + machine kernel configs)
Squashed content of PR opencomputeproject#1130 (delta over opencomputeproject#1129), pulled in as a dependency. Signed-off-by: Brad House <bhouse@nexthop.ai>
1 parent dc00bdd commit adf3f14

166 files changed

Lines changed: 10826 additions & 654 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build-config/conf/kernel/linux.armv8a.config

Lines changed: 7021 additions & 0 deletions
Large diffs are not rendered by default.

build-config/conf/kernel/linux.x86_64.config

Lines changed: 3732 additions & 0 deletions
Large diffs are not rendered by default.

build-config/make/kernel-download.make

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#-------------------------------------------------------------------------------
1717
# Need the Linux kernel downloaded before building xtools
1818

19-
LINUX_VERSION ?= 5.4
19+
LINUX_VERSION ?= 6.18
2020
LINUX_MAJOR_VERSION = $(firstword $(subst ., ,$(LINUX_VERSION)))
21-
LINUX_MINOR_VERSION ?= 86
21+
LINUX_MINOR_VERSION ?= 35
2222
LINUX_RELEASE ?= $(LINUX_VERSION).$(LINUX_MINOR_VERSION)
2323
LINUX_TARBALL ?= linux-$(LINUX_RELEASE).tar.xz
2424
export LINUX_TARBALL

build-config/make/kernel.make

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414

1515
#-------------------------------------------------------------------------------
1616

17-
LINUX_CONFIG ?= conf/kernel/$(LINUX_RELEASE)/linux.$(ONIE_ARCH).config
17+
# Prefer a version-specific kernel config if a platform ships one (the legacy
18+
# per-version configs under conf/kernel/<release>/ are kept for the older
19+
# machine kernels), otherwise fall back to the shared, non-versioned base.
20+
# olddefconfig (see the .config recipe below) reconciles whichever base to the
21+
# kernel actually being built, so a kernel bump needs no new committed config.
22+
LINUX_CONFIG ?= $(firstword $(wildcard conf/kernel/$(LINUX_RELEASE)/linux.$(ONIE_ARCH).config) conf/kernel/linux.$(ONIE_ARCH).config)
1823
KERNELDIR = $(MBUILDDIR)/kernel
1924
LINUXDIR = $(KERNELDIR)/linux
2025

@@ -82,12 +87,25 @@ $(KERNEL_PATCH_STAMP): $(KERNEL_SRCPATCHDIR)/* $(MACHINE_KERNEL_PATCHDIR)/* $(KE
8287
$(Q) $(SCRIPTDIR)/apply-patch-series $(KERNEL_PATCHDIR)/series $(LINUXDIR)
8388
$(Q) touch $@
8489

85-
$(LINUXDIR)/.config : $(LINUX_CONFIG) $(KERNEL_PATCH_STAMP)
90+
# olddefconfig (below) runs the kernel kconfig, which probes the cross
91+
# compiler via scripts/Kconfig.include, so the toolchain must already be
92+
# built. Order-only so a toolchain rebuild does not force a config regen.
93+
$(LINUXDIR)/.config : $(LINUX_CONFIG) $(KERNEL_PATCH_STAMP) | $(XTOOLS_BUILD_STAMP)
8694
$(Q) echo "==== Copying $(LINUX_CONFIG) to $(LINUXDIR)/.config ===="
8795
$(Q) cp -v $< $@
8896
# $(Q) cat $(MACHINE_KERNEL_PATCHDIR)/config >> $(LINUXDIR)/.config
8997
$(Q) echo "==== Merging patches from $(MACHINE_KERNEL_PATCHDIR)/config to $(LINUXDIR)/.config ===="
9098
$(Q) $(LINUXDIR)/scripts/kconfig/merge_config.sh -r -m -O $(LINUXDIR) $(LINUXDIR)/.config $(MACHINE_KERNEL_PATCHDIR)/config
99+
$(Q) echo "==== Reconciling kernel config to $(LINUX_RELEASE) (olddefconfig) ===="
100+
$(Q) PATH='$(CROSSBIN):$(PATH)' $(MAKE) -C $(LINUXDIR) ARCH=$(KERNEL_ARCH) CROSS_COMPILE=$(CROSSPREFIX) olddefconfig
101+
# Modern kernels resolve CONFIG_MODULE_SIG_KEY relative to the build tree
102+
# and dropped the MODULE_SIG_KEY_SRCPREFIX mechanism, so rewrite a
103+
# configured module-signing key to the absolute path of the generated key.
104+
$(Q) if grep -q '^CONFIG_MODULE_SIG_KEY=' $(LINUXDIR)/.config && [ -n "$(ONIE_MODULE_SIG_KEY_SRCPREFIX)" ]; then \
105+
k=$$(sed -n 's/^CONFIG_MODULE_SIG_KEY="\(.*\)"/\1/p' $(LINUXDIR)/.config) ; \
106+
sed -i "s|^CONFIG_MODULE_SIG_KEY=.*|CONFIG_MODULE_SIG_KEY=\"$(abspath $(ONIE_MODULE_SIG_KEY_SRCPREFIX))/$$(basename $$k)\"|" $(LINUXDIR)/.config ; \
107+
echo "==== Set CONFIG_MODULE_SIG_KEY to $(abspath $(ONIE_MODULE_SIG_KEY_SRCPREFIX))/$$(basename $$k) ====" ; \
108+
fi
91109

92110

93111
# Interactive update. User selects options, or not
@@ -129,7 +147,6 @@ $(KERNEL_BUILD_STAMP): $(KERNEL_SOURCE_STAMP) $(LINUX_NEW_FILES) $(LINUXDIR)/.co
129147
$(MAKE) -C $(LINUXDIR) \
130148
ARCH=$(KERNEL_ARCH) \
131149
CROSS_COMPILE=$(CROSSPREFIX) \
132-
MODULE_SIG_KEY_SRCPREFIX=$(ONIE_MODULE_SIG_KEY_SRCPREFIX)/ \
133150
$(KERNEL_OLD_GCC_COMPAT) \
134151
V=$(V) \
135152
all

machine/accton/accton_833435_b21/machine.make

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ I2CTOOLS_SYSEEPROM = no
3030
# Console parameters
3131
CONSOLE_DEV = 1
3232

33-
# Specify Linux kernel version
34-
LINUX_VERSION = 5.4
35-
LINUX_MINOR_VERSION = 86
3633

3734

3835
#-------------------------------------------------------------------------------

machine/accton/accton_as4222_28pe/machine.make

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ VENDOR_ID = 259
3333
UEFI_ENABLE = yes
3434
PXE_EFI64_ENABLE = yes
3535

36-
# Set Linux kernel version
37-
LINUX_VERSION = 5.4
38-
LINUX_MINOR_VERSION = 86
3936

4037

4138
#-------------------------------------------------------------------------------

machine/accton/accton_as4620_54pe/machine.make

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ PXE_EFI64_ENABLE = yes
2929
# Console parameters
3030
CONSOLE_DEV = 1
3131

32-
# Set Linux kernel version
33-
LINUX_VERSION = 5.4
34-
LINUX_MINOR_VERSION = 86
3532

3633

3734
#-------------------------------------------------------------------------------

machine/accton/accton_as4625/machine.make

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ PXE_EFI64_ENABLE = yes
3131
# Console parameters
3232
CONSOLE_DEV = 0
3333

34-
# Set Linux kernel version
35-
LINUX_VERSION = 5.4
36-
LINUX_MINOR_VERSION = 86
3734

3835

3936
#-------------------------------------------------------------------------------

machine/accton/accton_as5512_54x/machine.make

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ I2CTOOLS_SYSEEPROM = no
3030
# Console parameters
3131
CONSOLE_DEV = 1
3232

33-
# Set Linux kernel version
34-
LINUX_VERSION = 5.4
35-
LINUX_MINOR_VERSION = 86
3633

3734

3835
#-------------------------------------------------------------------------------

machine/accton/accton_as5712_54x/machine.make

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ I2CTOOLS_SYSEEPROM = no
3030
# Console parameters
3131
CONSOLE_DEV = 1
3232

33-
# Set Linux kernel version
34-
LINUX_VERSION = 5.4
35-
LINUX_MINOR_VERSION = 86
3633

3734

3835
#-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)