Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DAEAC001B0 for ; Wed, 19 Jul 2023 23:52:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8774F867EA; Thu, 20 Jul 2023 01:50:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Wu5R2BN4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A6C4A8679B; Thu, 20 Jul 2023 01:50:17 +0200 (CEST) Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 34CE9867B3 for ; Thu, 20 Jul 2023 01:50:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-783546553ddso9126839f.0 for ; Wed, 19 Jul 2023 16:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689810610; x=1690415410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dnrSidYJvHz03VejOY1JyYMRbL6tHghdm8Un1XIJIww=; b=Wu5R2BN4aiduzyXVfdb0jTQ+NelzwI03t7Dn5xyh28gYEPsow9rXJsLwR9aMO4h992 J9FEg5t9RwWVMlPgrGg8980oGzXRkJEYr3otwxMxiRVVOuHslYNMW4cNW1rA9OCVeX7S iUs50y3fx2UmtM9qVowhfLR/Izhgg9fADaLog= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689810610; x=1690415410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dnrSidYJvHz03VejOY1JyYMRbL6tHghdm8Un1XIJIww=; b=BYEvxKXnFbuV/Zw9Y0qSdSniYgzMcONaIr7fLRSVOSySmDEFUS0BRaBoM/WyHQjyXR 1RxwdSjJRJyzpJ3owxdouW+LpXJGjUkq93ylGkmiNx7JnBjf1bejTx+/+PXcS18WaClh hRjSpgl0I/NI7JPa/n16DmZ5beaNvzGWRN5eR5EV6Rt26MuJ5lvBvJAkLARktlmxckA5 x1vl1V5UR7D1DkSQWNRw8nardBE+8Yj/I3nFfOK0/Nsm4l1+64Y0TLcZtUmWInHgh8fB 84ELpNN+O689kZUYjlVhpUzLsSWg8WPXX0RttGS0zcjVJSPBPok/BSW9vshsdA17UR3Y sjSw== X-Gm-Message-State: ABy/qLYOLvLpuUOXh+cY8wRkOCj37zbcj3oN6Bpl0ifNdQPlcTTC3AKS Oz8y9hI66JVwD0kWt2W3dBfORE2/bptFSxvgIm8= X-Google-Smtp-Source: APBJJlH+UuA13bPSTcOV2at8v8C8QCqqfZiiyOy0pN8seFxuXd5txdilUhQ7tGJx32cTt7hdJlUQqA== X-Received: by 2002:a5e:9503:0:b0:786:e966:5694 with SMTP id r3-20020a5e9503000000b00786e9665694mr6952939ioj.3.1689810609592; Wed, 19 Jul 2023 16:50:09 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id ed16-20020a056638291000b0042bb1779c18sm1551779jab.151.2023.07.19.16.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 16:50:09 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v4 14/83] buildman: Detect boards with no CONFIG_TARGET defined Date: Wed, 19 Jul 2023 17:48:22 -0600 Message-ID: <20230719234953.796101-15-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230719234953.796101-1-sjg@chromium.org> References: <20230719234953.796101-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean We generally expected exactly one of these. Add a check for it. Note: This warning is not displayed by default. An option will be added to enable it. Signed-off-by: Simon Glass --- (no changes since v3) Changes in v3: - Add new patch to detect boards with no CONFIG_TARGET defined tools/buildman/boards.py | 4 ++++ tools/buildman/func_test.py | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index 56fb6f4de628..dabf694e0d0c 100644 --- a/tools/buildman/boards.py +++ b/tools/buildman/boards.py @@ -262,6 +262,10 @@ class KconfigScanner: else: target = tname + if not target: + cfg_name = expect_target.replace('-', '_').upper() + warnings.append(f'WARNING: {leaf}: No TARGET_{cfg_name} enabled') + params['target'] = expect_target # fix-up for aarch64 diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 154fa61c08bd..71f3029f1530 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -951,6 +951,7 @@ Active aarch64 armv8 - armltd total_compute board2 # Add another TARGET to the Kconfig tools.write_file(main, data, binary=False) + orig_kc_data = tools.read_file(kc_file) extra = (b''' if TARGET_BOARD2 config TARGET_OTHER @@ -958,9 +959,19 @@ config TARGET_OTHER \tdefault y endif ''') - tools.write_file(kc_file, tools.read_file(kc_file) + extra) + tools.write_file(kc_file, orig_kc_data + extra) params_list, warnings = self._boards.build_board_list(config_dir, src) self.assertEquals(2, len(params_list)) self.assertEquals( ['WARNING: board2_defconfig: Duplicate TARGET_xxx: board2 and other'], warnings) + + # Remove the TARGET_BOARD0 Kconfig option + lines = [b'' if line == b'config TARGET_BOARD2\n' else line + for line in orig_kc_data.splitlines(keepends=True)] + tools.write_file(kc_file, b''.join(lines)) + params_list, warnings = self._boards.build_board_list(config_dir, src) + self.assertEquals(2, len(params_list)) + self.assertEquals( + ['WARNING: board2_defconfig: No TARGET_BOARD2 enabled'], + warnings) -- 2.41.0.487.g6d72f3e995-goog