From patchwork Sat Jan 3 20:32:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1250 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767472390; bh=G+MH5ATQLxN4MZn3nRVAO5/qjkvhYdz7ebMuLVJjjs0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=V5O0rhYFDyYoGqHph86zPQZ/4Yo6VZ1M9KoxMNb5ga7JnTcSvaEhHuQ4kCAAJ5swD 21rw23VeIbOx8HXZrQpisL3oCFTHrI0Y5z++kQu98bnUVwtHJe7ATGY1rYCB1A//hL pOKnAQiezznZUkFXNunKHiCU/eMuSwuKeS+63poR19mEk5malkg/DSN0hed918Ra8f 4C2CdsAo9z1+7H6fCc0IEWQnGqB2tEoFJcrkQqnY4wN7T1lsgbyRV0XCzwqYedoDIa Q/s0JO9Ipz2SROYiuF9uBDraSkDYVs0r+Qx/+nZ4r+N+lDq0NmIcCEsnzKdk7DNKtS PzNJ4K25Te/Lg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 727C668F71 for ; Sat, 3 Jan 2026 13:33:10 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id If8VJqIgP7AR for ; Sat, 3 Jan 2026 13:33:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767472390; bh=G+MH5ATQLxN4MZn3nRVAO5/qjkvhYdz7ebMuLVJjjs0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=V5O0rhYFDyYoGqHph86zPQZ/4Yo6VZ1M9KoxMNb5ga7JnTcSvaEhHuQ4kCAAJ5swD 21rw23VeIbOx8HXZrQpisL3oCFTHrI0Y5z++kQu98bnUVwtHJe7ATGY1rYCB1A//hL pOKnAQiezznZUkFXNunKHiCU/eMuSwuKeS+63poR19mEk5malkg/DSN0hed918Ra8f 4C2CdsAo9z1+7H6fCc0IEWQnGqB2tEoFJcrkQqnY4wN7T1lsgbyRV0XCzwqYedoDIa Q/s0JO9Ipz2SROYiuF9uBDraSkDYVs0r+Qx/+nZ4r+N+lDq0NmIcCEsnzKdk7DNKtS PzNJ4K25Te/Lg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5E888690BC for ; Sat, 3 Jan 2026 13:33:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767472389; bh=brRKZWrNRkCu2BYbXKhDItsTnbAhMY3H5kjFf5XZxSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hPYX7Bxnhd75nJ+HToG59wOBAD4wEjRsCVTV9oBlES9jEi5l3sRajp69eBIGktF72 KhmyxdeG/G/iC5GlYsWmA7uJREgZxNa0l16Tqrc4zgKGv+XQ7LKNoJflyI6VfpqFPr s1pPGYACHwryYm7susGRC2g+Ng77BQBQI0ldx+1JDUnzp1q039PwsOXWYM/Szz2KJx dVyVSuCm/nQOa3Rb4htOh+A2WXR2z+53yrFr5x4pk5t6/DaMxKC2alQGCGaDqngxz9 ImLB4kkkTRZ2S6ugv5RmemX+njdyqZEUGAWxjNxVTi+XB8n7g8knUQ6D3ig08+hRpw LFyilPWMhhHfQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 651D068F71; Sat, 3 Jan 2026 13:33:09 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 2RqazW-auKXf; Sat, 3 Jan 2026 13:33:09 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767472385; bh=edFdXL7LO8K3ZUgNZwOloCsVN8Ta3xbVxmzkB6rWxyQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e1LiL7yRt+u6y3/4Y+YBJjegTSqtmBDR7NlgQ8lFyls5aqANmr4vofxoZMpcWN2kK 7NfCw7hL50kJCfwbHdLqLf2SxN/UradBvTmkjJM23a0PU/uGh1ox8yAm3kORgmmhGt PE3FImMBaWc+KJgGds3ALaKJ4m24BvAdWT+pOp9nX64tEIGXxlwlKnadGFps8DKorU L/hfEIwyQkJRzsD4Oo0JZ1oqsfeV4EcjPklS0F3vCPuqMjt+TM5JV2+Jsh7zi1erhY Hte1r+K1TlhXparSkU390YFyn9v/xiweQA4QNbf8iM6PudWtIXl/CklCksFAzxmJva Pxh5pNj13HaUw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E45EA68FC8; Sat, 3 Jan 2026 13:33:04 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sat, 3 Jan 2026 13:32:29 -0700 Message-ID: <20260103203243.3727493-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260103203243.3727493-1-sjg@u-boot.org> References: <20260103203243.3727493-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: EZS6AWPYR5NH3C2LEAWQA7NRIEAROHOT X-Message-ID-Hash: EZS6AWPYR5NH3C2LEAWQA7NRIEAROHOT X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 03/12] buildman: Extract arch fixups from scan() into separate function List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Move the architecture fixup logic (aarch64 and riscv adjustments) into a new _fixup_arch() method to reduce complexity of scan(). Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/buildman/boards.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index f503d8ef208..9dc5f9158d0 100644 --- a/tools/buildman/boards.py +++ b/tools/buildman/boards.py @@ -301,6 +301,19 @@ class KconfigScanner: params['target'] = expect_target + self._fixup_arch(params) + + return params, warnings + + def _fixup_arch(self, params): + """Fix up architecture names + + Handle cases where the architecture name needs adjustment based on + CPU type or other configuration. + + Args: + params (dict): Board parameters to update in place + """ # fix-up for aarch64 if params['arch'] == 'arm' and params['cpu'] == 'armv8': params['arch'] = 'aarch64' @@ -316,8 +329,6 @@ class KconfigScanner: else: params['arch'] = 'riscv64' - return params, warnings - class MaintainersDatabase: