diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass index 6eb7362dd8..d2a163ea34 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-kernel.eclass @@ -195,7 +195,7 @@ install_build_source() { | grep -v dt-bindings )) # remove the broken symlinks referencing $ROOT - rm "${D}/usr/lib/modules/${KV_FULL}/build" || die + rm "${D}/usr/lib/modules/${KV_FULL}"/{source,build} || die # Compose list of architectures to be excluded from the kernel modules # tree in the final image. It is an array to be used as a pattern for diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.6.3.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.6.3.ebuild index 910bceba94..8455b97202 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.6.3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/coreos-modules-6.6.3.ebuild @@ -49,7 +49,7 @@ src_install() { INSTALL_FW_PATH="${T}/fw" \ modules_install rm "${D}/usr/lib/debug/usr/lib/modules/${KV_FULL}/"modules.* || die - rm "${D}/usr/lib/debug/usr/lib/modules/${KV_FULL}/build" || die + rm "${D}/usr/lib/debug/usr/lib/modules/${KV_FULL}"/{build,source} || die # Clean up the build tree shred_keys diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-sources/coreos-sources-6.6.3.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-sources/coreos-sources-6.6.3.ebuild index 6104707a58..b3d825cd45 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-sources/coreos-sources-6.6.3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-sources/coreos-sources-6.6.3.ebuild @@ -37,4 +37,5 @@ IUSE="" UNIPATCH_LIST=" ${PATCH_DIR}/z0001-kbuild-derive-relative-path-for-srctree-from-CURDIR.patch \ ${PATCH_DIR}/z0002-revert-pahole-flags.patch \ + ${PATCH_DIR}/z0003-revert-source-removal.patch \ " diff --git a/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-sources/files/6.6/z0003-revert-source-removal.patch b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-sources/files/6.6/z0003-revert-source-removal.patch new file mode 100644 index 0000000000..6b641e6360 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-sources/files/6.6/z0003-revert-source-removal.patch @@ -0,0 +1,183 @@ +diff --git a/Makefile b/Makefile +index 5c418efbe89b..03ca30e2bf9c 100644 +--- a/Makefile ++++ b/Makefile +@@ -1462,8 +1462,44 @@ modules: modules_prepare + modules_prepare: prepare + $(Q)$(MAKE) $(build)=scripts scripts/module.lds + ++export modules_sign_only := ++ ++ifeq ($(CONFIG_MODULE_SIG),y) ++PHONY += modules_sign ++modules_sign: modules_install ++ @: ++ ++# modules_sign is a subset of modules_install. ++# 'make modules_install modules_sign' is equivalent to 'make modules_install'. ++ifeq ($(filter modules_install,$(MAKECMDGOALS)),) ++modules_sign_only := y ++endif ++endif ++ + endif # CONFIG_MODULES + ++modinst_pre := ++ifneq ($(filter modules_install,$(MAKECMDGOALS)),) ++modinst_pre := __modinst_pre ++endif ++ ++modules_install: $(modinst_pre) ++PHONY += __modinst_pre ++__modinst_pre: ++ @rm -rf $(MODLIB)/kernel ++ @rm -f $(MODLIB)/source ++ @mkdir -p $(MODLIB) ++ifdef CONFIG_MODULES ++ @ln -s $(abspath $(srctree)) $(MODLIB)/source ++ @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ ++ rm -f $(MODLIB)/build ; \ ++ ln -s $(CURDIR) $(MODLIB)/build ; \ ++ fi ++ @sed 's:^\(.*\)\.o$$:kernel/\1.ko:' modules.order > $(MODLIB)/modules.order ++endif ++ @cp -f modules.builtin $(MODLIB)/ ++ @cp -f $(objtree)/modules.builtin.modinfo $(MODLIB)/ ++ + ### + # Cleaning is done on three levels. + # make clean Delete most generated files +@@ -1800,39 +1836,19 @@ help: + @echo ' rust-analyzer - generate rust-project.json rust-analyzer support file' + @echo '' + +-ifndef CONFIG_MODULES +-modules modules_install: __external_modules_error + __external_modules_error: + @echo >&2 '***' + @echo >&2 '*** The present kernel disabled CONFIG_MODULES.' + @echo >&2 '*** You cannot build or install external modules.' + @echo >&2 '***' + @false +-endif + + endif # KBUILD_EXTMOD + + # --------------------------------------------------------------------------- + # Modules + +-PHONY += modules modules_install modules_sign modules_prepare +- +-modules_install: +- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst \ +- sign-only=$(if $(filter modules_install,$(MAKECMDGOALS)),,y) +- +-ifeq ($(CONFIG_MODULE_SIG),y) +-# modules_sign is a subset of modules_install. +-# 'make modules_install modules_sign' is equivalent to 'make modules_install'. +-modules_sign: modules_install +- @: +-else +-modules_sign: +- @echo >&2 '***' +- @echo >&2 '*** CONFIG_MODULE_SIG is disabled. You cannot sign modules.' +- @echo >&2 '***' +- @false +-endif ++PHONY += modules modules_install modules_prepare + + ifdef CONFIG_MODULES + +@@ -1850,9 +1866,17 @@ PHONY += modules_check + modules_check: $(MODORDER) + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh $< + ++modules_install: ++ $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst ++ + else # CONFIG_MODULES + +-modules: ++# Modules not configured ++# --------------------------------------------------------------------------- ++ ++PHONY += __external_modules_error ++ ++modules modules_install: __external_modules_error + @: + + KBUILD_MODULES := +diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst +index 0afd75472679..680c458b76c9 100644 +--- a/scripts/Makefile.modinst ++++ b/scripts/Makefile.modinst +@@ -11,33 +11,6 @@ include $(srctree)/scripts/Kbuild.include + + install-y := + +-ifeq ($(KBUILD_EXTMOD)$(sign-only),) +- +-# remove the old directory and symlink +-$(shell rm -fr $(MODLIB)/kernel $(MODLIB)/build) +- +-install-$(CONFIG_MODULES) += $(addprefix $(MODLIB)/, build modules.order) +- +-$(MODLIB)/build: FORCE +- $(call cmd,symlink) +- +-quiet_cmd_symlink = SYMLINK $@ +- cmd_symlink = ln -s $(CURDIR) $@ +- +-$(MODLIB)/modules.order: modules.order FORCE +- $(call cmd,install_modorder) +- +-quiet_cmd_install_modorder = INSTALL $@ +- cmd_install_modorder = sed 's:^\(.*\)\.o$$:kernel/\1.ko:' $< > $@ +- +-# Install modules.builtin(.modinfo) even when CONFIG_MODULES is disabled. +-install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo) +- +-$(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo): $(MODLIB)/%: % FORCE +- $(call cmd,install) +- +-endif +- + modules := $(call read-file, $(MODORDER)) + + ifeq ($(KBUILD_EXTMOD),) +@@ -58,7 +31,7 @@ suffix-$(CONFIG_MODULE_COMPRESS_ZSTD) := .zst + modules := $(patsubst $(extmod_prefix)%.o, $(dst)/%.ko$(suffix-y), $(modules)) + install-$(CONFIG_MODULES) += $(modules) + +-__modinst: $(install-y) ++__modinst: $(modules) + @: + + # +@@ -104,7 +77,7 @@ quiet_cmd_sign = SIGN $@ + cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) "$(sig-key)" certs/signing_key.x509 $@ \ + $(if $(KBUILD_EXTMOD),|| true) + +-ifeq ($(sign-only),) ++ifeq ($(modules_sign_only),) + + # During modules_install, modules are signed only when CONFIG_MODULE_SIG_ALL=y. + ifndef CONFIG_MODULE_SIG_ALL +@@ -120,16 +93,14 @@ $(dst)/%.ko: $(extmod_prefix)%.ko FORCE + $(call cmd,strip) + $(call cmd,sign) + +-ifdef CONFIG_MODULES + __modinst: depmod + + PHONY += depmod +-depmod: $(install-y) ++depmod: $(modules) + $(call cmd,depmod) + + quiet_cmd_depmod = DEPMOD $(MODLIB) + cmd_depmod = $(srctree)/scripts/depmod.sh $(KERNELRELEASE) +-endif + + else + diff --git a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.6.ebuild b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.6.ebuild index cc9b5489c8..87acf823e1 100644 --- a/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.6.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-kernel/linux-headers/linux-headers-6.6.ebuild @@ -17,7 +17,7 @@ SRC_URI=" " S="${WORKDIR}/linux-${PV}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" BDEPEND=" app-arch/xz-utils