From mboxrd@z Thu Jan 1 00:00:00 1970 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 E4EEDC43334 for ; Tue, 12 Jul 2022 01:06:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 34C3A840D2; Tue, 12 Jul 2022 03:05:33 +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="IOFbb1Uu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B6EFA840B2; Tue, 12 Jul 2022 03:05:01 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 08B7F840A7 for ; Tue, 12 Jul 2022 03:04:47 +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-x436.google.com with SMTP id f2so9088551wrr.6 for ; Mon, 11 Jul 2022 18:04:47 -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=CIp/HqUUgjRMiaDkX52KusIsltdggX529nSqqWb/shA=; b=IOFbb1Uu57Fl4R6a2VfK8RF9z+PotTe0L0ompsAieV8d8IIydsw01IAm7rXImgdGfj psNwPUI2L7HNIJC6myiqac1luTkE1NRK37aSyeIH77RXurtWZ0XndAGzUCU6X2lXzuqW ojuvO9PjkNf9g30R31njJfxKJFQvZAHisxtGI= 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=CIp/HqUUgjRMiaDkX52KusIsltdggX529nSqqWb/shA=; b=UbTtaBBkoQ+6r/PyIrD15rbQxsPam9LI/lLziAFFXziOazwQFL0zMcH6aO0+d6y3un OjdtvDzWl5QUelh7LffK4Sh4XRHeqQ52ZOyVb78SkvZIDBjKymiqwEXI4gbHOAp6UjSw 3dlPdrbHdk5TASSwRJDJoAzb/aGD3sy/XH5wUptwiQS2/ox0X9UStQbFwCRBlLyasiaW t0xvPP6G1/KIYLg8tm9MAZRbF+qr3dRrcbJkDzrTSYMx656kYzXOuiyoh1/YFB4mW32z YlMY3ONuFaP76P1aHz8/R+zoP6W2VEaGms/3ihYEi9sQNxEACL1ZNpDljaC/G25okTmR t6qQ== X-Gm-Message-State: AJIora+boC8HelEqj7QUK2pAIiKkOhYoECXfyV7WQYR3kPgwy2mNHGkR 35hyzsxYpvEj8buxIPrIj/ttWElVV5uc9voz X-Google-Smtp-Source: AGRyM1uy/WfcDgILnZlqroHFBqCBkiwjCSQwFzlHtrt9SkaIdCb5EBznbh0EYh4vR1f3/qGR/nWZ+A== X-Received: by 2002:a5d:6dad:0:b0:21d:976e:6e86 with SMTP id u13-20020a5d6dad000000b0021d976e6e86mr14627585wrs.160.1657587886431; Mon, 11 Jul 2022 18:04:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 18:04:46 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Alexandru Gagniuc , Alper Nebi Yasak , Angelo Dureghello , Heinrich Schuchardt , Patrick Delaunay , Steffen Jaeckel Subject: [PATCH 13/19] Revert "Revert "global: Remove CONFIG_SYS_EXTRA_OPTIONS support"" Date: Mon, 11 Jul 2022 19:04:07 -0600 Message-Id: <20220712010413.331984-14-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 is not needed now that CONFIG_SYS_TARGET_NAME is correctly determined when scanning Kconfig. This reverts commit 25b8acee2ea11a9edc100c42a61f5d6187eb6167. Signed-off-by: Simon Glass Suggested-by: Tom Rini --- boot/Kconfig | 13 -------- doc/README.kconfig | 7 ---- doc/develop/moveconfig.rst | 3 +- scripts/Makefile.autoconf | 4 --- scripts/build-whitelist.sh | 23 ++------------ tools/moveconfig.py | 65 -------------------------------------- 6 files changed, 4 insertions(+), 111 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index 17438b566d5..37880af5519 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -452,19 +452,6 @@ config OF_STDOUT_VIA_ALIAS incorrect when used with device tree as this option does not exist / should not be used. -config SYS_EXTRA_OPTIONS - string "Extra Options (DEPRECATED)" - help - The old configuration infrastructure (= mkconfig + boards.cfg) - provided the extra options field. If you have something like - "HAS_BAR,BAZ=64", the optional options - #define CONFIG_HAS - #define CONFIG_BAZ 64 - will be defined in include/config.h. - This option was prepared for the smooth migration from the old - configuration to Kconfig. Since this option will be removed sometime, - new boards should not use this option. - config HAVE_SYS_TEXT_BASE bool depends on !NIOS2 && !XTENSA diff --git a/doc/README.kconfig b/doc/README.kconfig index 0689f66c2cd..808cf56e59c 100644 --- a/doc/README.kconfig +++ b/doc/README.kconfig @@ -99,7 +99,6 @@ Kconfig. Each field of boards.cfg was converted as follows: Vendor -> CONFIG_SYS_VENDOR defined by Kconfig Board -> CONFIG_SYS_BOARD defined by Kconfig Target -> File name of defconfig (configs/_defconfig) - Options -> CONFIG_SYS_EXTRA_OPTIONS defined by Kconfig Maintainers -> "M:" entry of MAINTAINERS @@ -140,12 +139,6 @@ When removing an obsolete board, the following steps are generally needed: TODO ---- -- The option field of boards.cfg, which was used for the pre-Kconfig - configuration, moved to CONFIG_SYS_EXTRA_OPTIONS verbatim now. - Board maintainers are expected to implement proper Kconfig options - and switch over to them. Eventually CONFIG_SYS_EXTRA_OPTIONS will go away. - CONFIG_SYS_EXTRA_OPTIONS should not be used for new boards. - - In the pre-Kconfig, a single board had multiple entries in the boards.cfg file with differences in the option fields. The corresponding defconfig files were auto-generated when switching to Kconfig. Now we have too many diff --git a/doc/develop/moveconfig.rst b/doc/develop/moveconfig.rst index 2f53ea52b71..bfb7aff3582 100644 --- a/doc/develop/moveconfig.rst +++ b/doc/develop/moveconfig.rst @@ -295,8 +295,7 @@ Available options -y, --yes Instead of prompting, automatically go ahead with all operations. This - includes cleaning up headers, CONFIG_SYS_EXTRA_OPTIONS, the config whitelist - and the README. + includes cleaning up headers, the config whitelist and the README. To see the complete list of supported options, run:: diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf index 3fa4d50f1ea..5a4a1489553 100644 --- a/scripts/Makefile.autoconf +++ b/scripts/Makefile.autoconf @@ -112,10 +112,6 @@ vpl/include/autoconf.mk: vpl/u-boot.cfg # Prior to Kconfig, it was generated by mkconfig. Now it is created here. define filechk_config_h (echo "/* Automatically generated - do not edit */"; \ - for i in $$(echo $(CONFIG_SYS_EXTRA_OPTIONS) | sed 's/,/ /g'); do \ - echo \#define CONFIG_$$i \ - | sed '/=/ {s/=/ /;q; } ; { s/$$/ 1/; }'; \ - done; \ echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\ echo \#include \; \ echo \#include \; \ diff --git a/scripts/build-whitelist.sh b/scripts/build-whitelist.sh index 6feb9b67cf5..37630c0271c 100755 --- a/scripts/build-whitelist.sh +++ b/scripts/build-whitelist.sh @@ -10,30 +10,13 @@ # export LC_ALL=C LC_COLLATE=C -# There are two independent greps. The first pulls out the component parts -# of CONFIG_SYS_EXTRA_OPTIONS. An example is: +# Looks for the rest of the CONFIG options, but exclude those in Kconfig and +# defconfig files. # -# SUN7I_GMAC,AHCI,SATAPWR=SUNXI_GPB(8) -# -# We want this to produce: -# CONFIG_SUN7I_GMAC -# CONFIG_AHCI -# CONFIG_SATAPWR -# -# The second looks for the rest of the CONFIG options, but excludes those in -# Kconfig and defconfig files. -# -( -git grep CONFIG_SYS_EXTRA_OPTIONS |sed -n \ - 's/.*CONFIG_SYS_EXTRA_OPTIONS="\(.*\)"/\1/ p' \ - | tr , '\n' \ - | sed 's/ *\([A-Za-z0-9_]*\).*/CONFIG_\1/' - git grep CONFIG_ | \ egrep -vi "(Kconfig:|defconfig:|README|\.py|\.pl:)" \ | tr ' \t' '\n\n' \ - | sed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' -) \ + | sed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' \ |sort |uniq >scripts/config_whitelist.txt.tmp1; # Finally, we need a list of the valid Kconfig options to exclude these from diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 84bc875fff8..09617a07f91 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -443,70 +443,6 @@ def cleanup_headers(configs, args): cleanup_one_header(header_path, patterns, args) cleanup_empty_blocks(header_path, args) -def cleanup_one_extra_option(defconfig_path, configs, args): - """Delete config defines in CONFIG_SYS_EXTRA_OPTIONS in one defconfig file. - - Args: - defconfig_path: path to the cleaned defconfig file. - configs: A list of CONFIGs to remove. - args (Namespace): program arguments - """ - - start = 'CONFIG_SYS_EXTRA_OPTIONS="' - end = '"' - - lines = read_file(defconfig_path) - - for i, line in enumerate(lines): - if line.startswith(start) and line.endswith(end): - break - else: - # CONFIG_SYS_EXTRA_OPTIONS was not found in this defconfig - return - - old_tokens = line[len(start):-len(end)].split(',') - new_tokens = [] - - for token in old_tokens: - pos = token.find('=') - if not (token[:pos] if pos >= 0 else token) in configs: - new_tokens.append(token) - - if new_tokens == old_tokens: - return - - tolines = copy.copy(lines) - - if new_tokens: - tolines[i] = start + ','.join(new_tokens) + end - else: - tolines.pop(i) - - show_diff(lines, tolines, defconfig_path, args.color) - - if args.dry_run: - return - - write_file(defconfig_path, tolines) - -def cleanup_extra_options(configs, args): - """Delete config defines in CONFIG_SYS_EXTRA_OPTIONS in defconfig files. - - Args: - configs: A list of CONFIGs to remove. - args (Namespace): program arguments - """ - if not confirm(args, 'Clean up CONFIG_SYS_EXTRA_OPTIONS?'): - return - - configs = [ config[len('CONFIG_'):] for config in configs ] - - defconfigs = get_all_defconfigs() - - for defconfig in defconfigs: - cleanup_one_extra_option(os.path.join('configs', defconfig), configs, - args) - def cleanup_whitelist(configs, args): """Delete config whitelist entries @@ -1803,7 +1739,6 @@ doc/develop/moveconfig.rst for documentation.''' if configs: cleanup_headers(configs, args) - cleanup_extra_options(configs, args) cleanup_whitelist(configs, args) cleanup_readme(configs, args) -- 2.37.0.144.g8ac04bfd2-goog