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 5741DC43334 for ; Tue, 12 Jul 2022 01:06:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8D9A284100; Tue, 12 Jul 2022 03:05:37 +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="ggQZtaOR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3DC7840D4; Tue, 12 Jul 2022 03:04:58 +0200 (CEST) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 7C30684097 for ; Tue, 12 Jul 2022 03:04:46 +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-wr1-x42a.google.com with SMTP id r10so2942313wrv.4 for ; Mon, 11 Jul 2022 18:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZLmOF1+Q76Otlgm+qX+BL19rEYdHHPvYqqFRzH5LKHE=; b=ggQZtaOR7j/o9FCG5xtCjkhfk0/c8gHQr53S/s89kx5EmDXNQQgkxABKogcxzQfry+ vn9eRfUibxnbp52Ms7CRHPlwz0QYj9JqyPOGiXBGyVmopiUtaEh3jWJtGt6lzvi+kcvz aFsuj3H60YEOdu7jsfgXOlI0Db2f+kwV8hmoI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZLmOF1+Q76Otlgm+qX+BL19rEYdHHPvYqqFRzH5LKHE=; b=BMFIzEBHcDFWJw2mEbC9Rk+/f3ub3p3DrCt4Zw68470AThzZkrZ7d+K62+We+AvVTo +YOguWLXjzckX3zR575iA3Qpv9NVqD0HepxLHynudx3UjU9Go50PmUrIw9fbNgy47sBM CKDNbabz9bm4JjTyIjaqsnjO2Br32/lG3f7AX4WR0nMCTYiOlvoH4ewIlvaMpd4XyTMh l+mZ/slilGiOMQ0w5TTw0CuOXm9+4VeBns02BY7FcVMat+u/0pQDAbeAP0izks/4QuYp FUvaWQVuybdy+9mTnf8hGdmnkCBVtQTmKeDYjIofTsol6rk1UXLbBc+Tth0mABP+ro5J HPiw== X-Gm-Message-State: AJIora9FnJR2Otcd81SjY6L+nTacqKBOyjZq8IT4k0Bqmof/qTCPxtqm tBX//RbzEatgXg9I5d11hCUcKtIoognc56dV X-Google-Smtp-Source: AGRyM1vxWYUUkrKI/dr6kPmx/Eb+mZne9u686S/u7xROnhJXEUw9e2PC1jjUZbYqaQMNpjqFR5UMQw== X-Received: by 2002:a05:6000:992:b0:21d:9240:4337 with SMTP id by18-20020a056000099200b0021d92404337mr18260464wrb.323.1657587885427; Mon, 11 Jul 2022 18:04:45 -0700 (PDT) Received: from sjg1.roam.corp.google.com (host-92-0-109-232.as13285.net. [92.0.109.232]) by smtp.gmail.com with ESMTPSA id p12-20020a5d48cc000000b0021d9d13bf6csm5541152wrs.97.2022.07.11.18.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 18:04:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH 12/19] buildman: Replace the Options column with config name Date: Mon, 11 Jul 2022 19:04:06 -0600 Message-Id: <20220712010413.331984-13-sjg@chromium.org> X-Mailer: git-send-email 2.37.0.144.g8ac04bfd2-goog In-Reply-To: <20220712010413.331984-1-sjg@chromium.org> References: <20220712010413.331984-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.6 at phobos.denx.de X-Virus-Status: Clean This appears in boards.cfg but we want to remove it. Drop support for generating it and reading it. Detect an old boards.cfg file that has this field and regenerate it, to avoid problems. Instead, add the config name in that place. This fixes a subtle bug in the generation code, since it uses 'target' for the config name and then overwrites the value in scan() by setting params['target'] to the name of the defconfig. The defconfig name is not the same as the SYS_CONFIG_NAME variable. With this change, we still have the config name and it can be searched by buildman, e.g. with: buildman -nv sun5i Signed-off-by: Simon Glass Reported-by: Tom Rini --- tools/buildman/board.py | 8 ++++---- tools/buildman/boards.py | 19 ++++++------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/tools/buildman/board.py b/tools/buildman/board.py index 3268b39e356..8ef905b8ce1 100644 --- a/tools/buildman/board.py +++ b/tools/buildman/board.py @@ -6,7 +6,7 @@ class Board: """A particular board that we can build""" - def __init__(self, status, arch, cpu, soc, vendor, board_name, target, options): + def __init__(self, status, arch, cpu, soc, vendor, board_name, target, cfg_name): """Create a new board type. Args: @@ -17,7 +17,7 @@ class Board: vendor: Name of vendor (e.g. armltd) board_name: Name of board (e.g. integrator) target: Target name (use make _defconfig to configure) - options: board-specific options (e.g. integratorcp:CM1136) + cfg_name: Config name """ self.target = target self.arch = arch @@ -25,7 +25,7 @@ class Board: self.board_name = board_name self.vendor = vendor self.soc = soc - self.options = options + self.cfg_name = cfg_name self.props = [self.target, self.arch, self.cpu, self.board_name, - self.vendor, self.soc, self.options] + self.vendor, self.soc, self.cfg_name] self.build_it = False diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py index e16f3268ab1..8832e40cd5d 100644 --- a/tools/buildman/boards.py +++ b/tools/buildman/boards.py @@ -28,7 +28,7 @@ COMMENT_BLOCK = f'''# # List of boards # Automatically generated by {__file__}: don't edit # -# Status, Arch, CPU, SoC, Vendor, Board, Target, Options, Maintainers +# Status, Arch, CPU, SoC, Vendor, Board, Target, Config, Maintainers ''' @@ -98,6 +98,8 @@ def output_is_new(output): # was generated with open(output, encoding="utf-8") as inf: for line in inf: + if 'Options,' in line: + return False if line[0] == '#' or line == '\n': continue defconfig = line.split()[6] + '_defconfig' @@ -186,7 +188,7 @@ class KconfigScanner: 'vendor' : 'SYS_VENDOR', 'board' : 'SYS_BOARD', 'config' : 'SYS_CONFIG_NAME', - 'options' : 'SYS_EXTRA_OPTIONS' + # 'target' is added later } def __init__(self): @@ -216,7 +218,7 @@ class KconfigScanner: defconfig (str): path to the defconfig file to be processed Returns: - Dictionary of board parameters. It has a form: + A dictionary of board parameters. It has a form of: { 'arch': , 'cpu': , @@ -225,7 +227,6 @@ class KconfigScanner: 'board': , 'target': , 'config': , - 'options': } """ # strip special prefixes and save it in a temporary file @@ -262,14 +263,6 @@ class KconfigScanner: if params['arch'] == 'arm' and params['cpu'] == 'armv8': params['arch'] = 'aarch64' - # fix-up options field. It should have the form: - # [:comma separated config options] - if params['options'] != '-': - params['options'] = params['config'] + ':' + \ - params['options'].replace(r'\"', '"') - elif params['config'] != params['target']: - params['options'] = params['config'] - return params @@ -708,7 +701,7 @@ class Boards: output (str): The path to the output file """ fields = ('status', 'arch', 'cpu', 'soc', 'vendor', 'board', 'target', - 'options', 'maintainers') + 'config', 'maintainers') # First, decide the width of each column max_length = {f: 0 for f in fields} -- 2.37.0.144.g8ac04bfd2-goog