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 B1ED1C0015E for ; Sun, 16 Jul 2023 00:51:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA4F986784; Sun, 16 Jul 2023 02:40:58 +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="SLWEk9rY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 570FA86387; Sun, 16 Jul 2023 02:38:47 +0200 (CEST) Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (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 4CAB3865CF for ; Sun, 16 Jul 2023 02:38:21 +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-x12a.google.com with SMTP id e9e14a558f8ab-3476d0b5295so13816265ab.1 for ; Sat, 15 Jul 2023 17:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467900; x=1692059900; 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=TlBm7UCdm2amBOmJvtLyEXsOkyTkvwxAF2DwuAhXmXA=; b=SLWEk9rYB4YjupgfgJ0LhOT+5/goG1p3YFlhCvvfFLxAF1XwhhIPZvYgP0g/UkPVZZ Q5qWB9/Eu9IgXlFoXGrKwudi/J1kdScNMdpmabaFPThutY6WG0D5LipZxcDig1c8ecjc ChGCXbFsTAlO1EZmZ8DKnD42aY6vVB+opWhBY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467900; x=1692059900; 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=TlBm7UCdm2amBOmJvtLyEXsOkyTkvwxAF2DwuAhXmXA=; b=gKQd0DVTtFoHPu69lxJSKcoxFVqhp211eZhEja2VaNuBZhSTQ/tChVAGL3c6LJINlg WgJVy4x64NS0b0IWUPIZe9J54+U+ZapYdxCeQn9AeefAJPf6smklw8mGemSdYMQYg6pg ZIhQ819IFmcS88KyUFPFKwJ1h6Qwl1dJGNiQpd/Ken9PJZLglbQVk8nWaUrl8VYpuNdy E2fe4AGcb5EWRcNvKmX95IqwcWq9av8h1abTw6xLxXU5i0i4K+DxmiPmNsX8pqXIwbkW 4o8fBynvJfzx39mO9k1NF+ITUv019YEsW6GqA1lO2+0dnE9BgiqVK4T7+w8HRjllfuAo V2Fg== X-Gm-Message-State: ABy/qLZgKjqwDLbtn+7ULBSIoVrXXWdNJN3T4AdgNLOED49YP6nJvXco X77tLUEjtB8u/baJ/43zJU9e+c7aVlOJVnENI4U= X-Google-Smtp-Source: APBJJlGqVNwwD+YyI41HW31TxDuaQvD36DUsi9dcr97UorZiLij6yX8c4YZtYSBGFUUrHfwPNDF/FQ== X-Received: by 2002:a92:d792:0:b0:345:b923:971a with SMTP id d18-20020a92d792000000b00345b923971amr8192803iln.0.1689467899890; Sat, 15 Jul 2023 17:38:19 -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.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:38:19 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 80/81] buildman: Add an option to check maintainers and targets Date: Sat, 15 Jul 2023 18:36:48 -0600 Message-ID: <20230716003718.231903-81-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 In poking around it seems that many boards don't define a CONFIG_TARGET Kconfig variable. This is not strictly necessary, but add an option to buildman so these can be viewed. Signed-off-by: Simon Glass --- Changes in v3: - Add new patch with an option to check maintains and targets tools/buildman/buildman.rst | 4 ++++ tools/buildman/cmdline.py | 3 +++ tools/buildman/control.py | 14 +++++++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tools/buildman/buildman.rst b/tools/buildman/buildman.rst index f6905d499fcb..934fc79e6902 100644 --- a/tools/buildman/buildman.rst +++ b/tools/buildman/buildman.rst @@ -1328,6 +1328,10 @@ Use the `--maintainer-check` option to check this:: Buildman returns with an exit code of 2 if there area any warnings. +An experimental `--full-check option` also checks for boards which don't have a +CONFIG_TARGET_xxx where xxx corresponds to their defconfig filename. This is +not strictly necessary, but may be useful information. + Checking the command -------------------- diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py index 4331fbdab310..052e223597c8 100644 --- a/tools/buildman/cmdline.py +++ b/tools/buildman/cmdline.py @@ -60,6 +60,9 @@ def add_upto_m(parser): help="Fetch a toolchain for architecture FETCH_ARCH ('list' to list)." ' You can also fetch several toolchains separate by comma, or' " 'all' to download all") + parser.add_argument( + '--full-check', action='store_true', + help='Check maintainer entries and TARGET configs') parser.add_argument('-g', '--git', type=str, help='Git repo containing branch to build', default='.') parser.add_argument('-G', '--config-file', type=str, diff --git a/tools/buildman/control.py b/tools/buildman/control.py index c96018252a57..5c5720034b64 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -365,8 +365,8 @@ def get_toolchains(toolchains, col, override_toolchain, fetch_arch, return toolchains -def get_boards_obj(output_dir, regen_board_list, maintainer_check, threads, - verbose): +def get_boards_obj(output_dir, regen_board_list, maintainer_check, full_check, + threads, verbose): """Object the Boards object to use Creates the output directory and ensures there is a boards.cfg file, then @@ -376,6 +376,8 @@ def get_boards_obj(output_dir, regen_board_list, maintainer_check, threads, output_dir (str): Output directory to use regen_board_list (bool): True to just regenerate the board list maintainer_check (bool): True to just run a maintainer check + full_check (bool): True to just run a full check of Kconfig and + maintainers threads (int or None): Number of threads to use to create boards file verbose (bool): False to suppress output from boards-file generation @@ -386,8 +388,9 @@ def get_boards_obj(output_dir, regen_board_list, maintainer_check, threads, """ brds = boards.Boards() nr_cpus = threads or multiprocessing.cpu_count() - if maintainer_check: - warnings = brds.build_board_list(jobs=nr_cpus)[1] + if maintainer_check or full_check: + warnings = brds.build_board_list(jobs=nr_cpus, + warn_targets=full_check)[1] if warnings: for warn in warnings: print(warn, file=sys.stderr) @@ -614,7 +617,8 @@ def do_buildman(args, toolchains=None, make_func=None, brds=None, # Work out what subset of the boards we are building if not brds: brds = get_boards_obj(output_dir, args.regen_board_list, - args.maintainer_check, args.threads, args.verbose) + args.maintainer_check, args.full_check, + args.threads, args.verbose) if isinstance(brds, int): return brds -- 2.41.0.455.g037347b96a-goog