From 362d72d6f4a4a0620f1c1a70d1f97342cb2cb348 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Sun, 29 Dec 2024 13:37:47 +0100 Subject: [PATCH] linux: select proper defconfig on PowerPC The handling of BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG is currently not doing a proper job: it is selecting ppc64le_defconfig if BR2_powerpc64le, and using the default of "defconfig" for everything else. However: - Since upstream commit 22f17b02f88b48c01d3ac38d40d2b0b695ab2d10, which landed in Linux 6.8, the default defconfig is ppc64le_defconfig and no longer ppc64_defconfig. This means that despite the condition in linux.mk, we are in fact now always building ppc64le_defconfig. - It doesn't handle the 32-bit case, as a 64-bit defconfig gets used by default. This causes build failures in the autobuilders. To fix this we explicitly handle BR2_powerpc64le, BR2_powerpc64 and BR2_powerpc, and use appropriate defconfigs for each case. Fixes: http://autobuild.buildroot.net/results/c15eaf2e7455aa265cc045e6d8be7cac5348d925/ (powerpc) Signed-off-by: Thomas Petazzoni Signed-off-by: Julien Olivain (cherry picked from commit 82326a3d8392d02f53c47bdaed21ff8012a6d978) Signed-off-by: Peter Korsgaard (cherry picked from commit 13250bf4aafbde9b0f946d5d07aaf3b6dc34d31f) Signed-off-by: Peter Korsgaard --- linux/linux.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/linux.mk b/linux/linux.mk index 97db5ff16a..2a47a20af9 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -330,6 +330,10 @@ LINUX_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig else ifeq ($(BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG),y) ifeq ($(BR2_powerpc64le),y) LINUX_KCONFIG_DEFCONFIG = ppc64le_defconfig +else ifeq ($(BR2_powerpc64),y) +LINUX_KCONFIG_DEFCONFIG = ppc64_defconfig +else ifeq ($(BR2_powerpc),y) +LINUX_KCONFIG_DEFCONFIG = ppc_defconfig else LINUX_KCONFIG_DEFCONFIG = defconfig endif