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 7E030C001DF for ; Sun, 16 Jul 2023 00:39:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B043A86622; Sun, 16 Jul 2023 02:38: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=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="joGTp57E"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6246C862E2; Sun, 16 Jul 2023 02:37:40 +0200 (CEST) Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (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 A6C7B862B9 for ; Sun, 16 Jul 2023 02:37:34 +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-il1-x132.google.com with SMTP id e9e14a558f8ab-3459baa237bso19148195ab.3 for ; Sat, 15 Jul 2023 17:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467853; x=1692059853; 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=kShtECpXK7O/GN8I8E9TeNDyXbsOHIJ8TlJHCAG1wC8=; b=joGTp57ENdj0+omoO0rru+uRRKsjZL3lzLsg+cKmUz0moJYsU2CojlM/c9mkHP32DU E0dGoKhqDW+BDINYpevY5WmEmMrzAeO67EfbyqNi1NxYPjF9n2rbyYvWgFT/XMK4UEkH 7nh0UKAl3dWHQn0Jww9pOPRBNoc+8BA94HVO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467853; x=1692059853; 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=kShtECpXK7O/GN8I8E9TeNDyXbsOHIJ8TlJHCAG1wC8=; b=ebj07wSHLB09fKqSBMGf7XideJQ5BOKCJQwQdEpmHR8Z+jvdol5HxQ7Kym0q1kNSah nahknPYF/+bZYM8+ns28qa9PMUbPyLMIrJU3QKzmKgSucZa9Hw8G7VSCTZwPXLUspD4c pX/buPtH32hqgO1JRNzoQQfBuGIIFvhSjNCL6gkKf3CuOyN1Y0Pk3GIdxyKuOeazWGZU wpk+bouHjmmEL+7d1c9PFI5VOSU42PzogHtgCLzrDWlmS1eFeK1tzzfDiuvH5Bqkipjz D0svYYbCda9ez8t9LJauP5Eg9fcJUWs24UqKoLDjPYqILCfbvl5CzUsXEt/DhHVfbVei xfUw== X-Gm-Message-State: ABy/qLYHr5OGZ3N816sqDEUxeihp9VxNUZxvqH9xtgVANREH+MWBPXJ4 xukzZLQXH3I6sI9SIcO4WhzhMSogTr/LUPYEnxk= X-Google-Smtp-Source: APBJJlErY1umWwvHk8D4D/fnR0QaTCbBDBciJq54D6QlgLvGDyLf56ds8je1uziCvm2hNGMWXs8sTQ== X-Received: by 2002:a92:502:0:b0:347:69b8:d407 with SMTP id q2-20020a920502000000b0034769b8d407mr8440552ile.25.1689467853295; Sat, 15 Jul 2023 17:37:33 -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 t3-20020a05663801e300b0042b52dc77e3sm3510512jaq.158.2023.07.15.17.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:37:33 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 14/81] buildman: Detect boards with no CONFIG_TARGET defined Date: Sat, 15 Jul 2023 18:35:42 -0600 Message-ID: <20230716003718.231903-15-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.455.g037347b96a-goog In-Reply-To: <20230716003718.231903-1-sjg@chromium.org> References: <20230716003718.231903-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 --- 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 31831f383750..209fb28eccbc 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 e7e22da62b15..812b3d8a6777 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.455.g037347b96a-goog