From patchwork Fri Jun 10 15:20:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 69790 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp350434qgf; Fri, 10 Jun 2016 08:21:41 -0700 (PDT) X-Received: by 10.28.234.16 with SMTP id i16mr6697612wmh.36.1465572100972; Fri, 10 Jun 2016 08:21:40 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id 15si44704727wmv.61.2016.06.10.08.21.40; Fri, 10 Jun 2016 08:21:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 214BAA76A3; Fri, 10 Jun 2016 17:21:40 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fPqClkYjwF6L; Fri, 10 Jun 2016 17:21:40 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AD46EA760D; Fri, 10 Jun 2016 17:21:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 00B25A760D for ; Fri, 10 Jun 2016 17:21:36 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wHLhnNE41pad for ; Fri, 10 Jun 2016 17:21:35 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by theia.denx.de (Postfix) with ESMTPS id 22D0C4B98B for ; Fri, 10 Jun 2016 17:21:31 +0200 (CEST) Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-11.nifty.com with ESMTP id u5AFKVxj025967; Sat, 11 Jun 2016 00:20:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com u5AFKVxj025967 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1465572056; bh=6E9+VSrhrM036xINzNo+gbAvhNOAEWZ5WPS0/FnIeIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jYiTBoSj7HwKBluk0TPBEA7aOPxjk/PElCN6H4/x79vH1ux7T5dRz9xdPZXtmf6Mu 6LFjpd36SDCi0oOMax2Vx/HuYM2+mGeIE5PA5rzf+XO5lEpic3HWc81kVPkzG8vh4P DNpznaPDPbdAmfcFzNMaMv07ObS/Kf3eemUUeBML6MEWd4lrYhY/b/rLb+7hMS5zgt otSqrcxL3Vl+/TnQitrN+L0rM86IvA8Qbt1EMUg3GWrFQy7nnQBAG8vEoETevy9YJc n9hSruYpiCQrCPKwuoqOJ+CY9+LD3kBuPUCPBgN342ggavQbHOFB7HavfMFgjrF16v 6IrbbdlSoUoyg== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sat, 11 Jun 2016 00:20:19 +0900 Message-Id: <1465572021-13692-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465572021-13692-1-git-send-email-yamada.masahiro@socionext.com> References: <1465572021-13692-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini , Viresh Kumar Subject: [U-Boot] [PATCH 3/5] tools: fix define2mk.sed to not add quotes around negative integers X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The sed script, tools/scripts/define2mk.sed, converts config defines from C headers into include/autoconf.mk for the use in Makefiles. I found the tool adds quotes around negative integer values. For example, at the point of the v2016.07-rc1 tag, include/configs/microblaze-generic.h defines #define CONFIG_BOOTDELAY -1 /* -1 disables auto-boot */ Because it is an integer option, it should be converted to: CONFIG_BOOTDELAY=-1 But, the script actually converts it to: CONFIG_BOOTDELAY="-1" This is a fatal problem for the tools/moveconfig.py because it parses include/autoconf.mk for the config defines from the board headers. CONFIG_BOOTDELAY="-1" is considered as a string type option and it is dropped due to the type mismatch from the entry in Kconfig. Before commit bb597c0eeb7e ("common: bootdelay: move CONFIG_BOOTDELAY into a Kconfig option"), several boards defined CONFIG_BOOTDELAY as -1 but they are all gone now. I will fix the mis-converted options right away, but first I need to fix the script so that tools/moveconfig.py can convert integer config options with a negative value correctly. Signed-off-by: Masahiro Yamada --- tools/scripts/define2mk.sed | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/tools/scripts/define2mk.sed b/tools/scripts/define2mk.sed index c641edf..0f00285 100644 --- a/tools/scripts/define2mk.sed +++ b/tools/scripts/define2mk.sed @@ -22,6 +22,8 @@ s/=\(..*\)/="\1"/; # but remove again from decimal numbers s/="\([0-9][0-9]*\)"/=\1/; + # ... and from negative decimal numbers + s/="\(-[1-9][0-9]*\)"/=\1/; # ... and from hex numbers s/="\(0[Xx][0-9a-fA-F][0-9a-fA-F]*\)"/=\1/; # ... and from configs defined from other configs