From patchwork Sat Sep 24 20:53:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1681965 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MZh812dN3z1yq3 for ; Sun, 25 Sep 2022 06:53:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 020FD409C3; Sat, 24 Sep 2022 20:53:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 020FD409C3 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JmoKW2Zpt1Hq; Sat, 24 Sep 2022 20:53:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 574104093D; Sat, 24 Sep 2022 20:53:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 574104093D X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id BF4A51BF28D for ; Sat, 24 Sep 2022 20:53:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 971D24093D for ; Sat, 24 Sep 2022 20:53:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 971D24093D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W4QWCC1xbfLK for ; Sat, 24 Sep 2022 20:53:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org ED16B408E9 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by smtp4.osuosl.org (Postfix) with ESMTPS id ED16B408E9 for ; Sat, 24 Sep 2022 20:53:43 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 239DBE0002; Sat, 24 Sep 2022 20:53:41 +0000 (UTC) To: Romain Naour , Buildroot List , Max Filippov Date: Sat, 24 Sep 2022 22:53:23 +0200 Message-Id: <20220924205327.1489102-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1664052822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=VtFtWaWxH6FsEe2aa1Ba/mCwkRQS36XOpvlQwSZUVK0=; b=nNvVd7KzzEqqbSyTKA4oY7FyTjcIts475HAE4pTfzPp9ZkR10iE6vgVFHWdsFyJ3vbcVjL GmmR+yAiQ5J1N78MVxGxPZlBtzh3P+lKaV2WHlSWDdys5/bLQL+0oO9ibHHlTQOkeKljnl a7zDjGhiNHYHskzD78CUWRIOpy9Y4qwXY6r28E10K3SC4j5dlGE8eLg9Xj9KoEcUj3bx1Q zxNTvxUUzfgEzOAsm9D+IvypJjsemyfB6ZAn+y5qI24qEB4ip6OmiTkI6NCxofb3CITBaX iwP45XITVV40HBQWj/ZfFZhHwewlyGCmLRhvKWEtDtNgP51kVZtkbJptTwbyNg== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=nNvVd7Kz Subject: [Buildroot] [PATCH 1/4] arch/Config.in.xtensa: adjust endianness logic to avoid bogus configurations X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Jonathan Ben Avraham , Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The Xtensa architecture supports both LE and BE configurations. When BR2_XTENSA_CUSTOM is chosen, a choice in menuconfig to choose between LE and BE. However, if using the internal toolchain backend, when the BR2_XTENSA_OVERLAY_FILE is empty, in practice, the configuration will always be big endian. But the choice being present, random configuration testing ends up testing configurations where BR2_XTENSA_OVERLAY_FILE is empty, but the endianness selected is LE, which is incorrect. This commit fixes this by: (1) Showing the overlay file option only when building an internal toolchain. For external toolchain configurations, it does not make sense to show it as it will have no effect. (2) Showing the endianness choice either for internal toolchain configurations with non-empty BR2_XTENSA_OVERLAY_FILE, or for external toolchain configurations. (2) Defaulting to BE when BR2_XTENSA_OVERLAY_FILE is empty. Fixes: http://autobuild.buildroot.net/results/702e2886156f291466375dfcf412c20f1aa5857d/ Signed-off-by: Thomas Petazzoni --- arch/Config.in.xtensa | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa index f9d5adb4c9..e9263f888e 100644 --- a/arch/Config.in.xtensa +++ b/arch/Config.in.xtensa @@ -14,7 +14,7 @@ endchoice config BR2_XTENSA_OVERLAY_FILE string "Overlay file for custom configuration" - depends on BR2_XTENSA_CUSTOM + depends on BR2_XTENSA_CUSTOM && BR2_TOOLCHAIN_BUILDROOT help Enter the path to the overlay tarball for a custom processor configuration. @@ -31,6 +31,7 @@ choice prompt "Target Architecture Endianness" default BR2_XTENSA_LITTLE_ENDIAN depends on BR2_XTENSA_CUSTOM + depends on BR2_XTENSA_OVERLAY_FILE != "" || BR2_TOOLCHAIN_EXTERNAL config BR2_XTENSA_LITTLE_ENDIAN bool "Little endian" @@ -51,7 +52,9 @@ config BR2_XTENSA_USE_MMU config BR2_ENDIAN default "LITTLE" if BR2_XTENSA_LITTLE_ENDIAN - default "BIG" if BR2_xtensa_fsf || BR2_XTENSA_BIG_ENDIAN + default "BIG" if BR2_XTENSA_BIG_ENDIAN + default "BIG" if BR2_xtensa_fsf + default "BIG" if BR2_XTENSA_CUSTOM && BR2_XTENSA_OVERLAY_FILE = "" config BR2_ARCH default "xtensa" if BR2_xtensa