From patchwork Sat Jun 11 09:44:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 69825 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp687663qgf; Sat, 11 Jun 2016 02:45:22 -0700 (PDT) X-Received: by 10.28.174.141 with SMTP id x135mr3049735wme.48.1465638322255; Sat, 11 Jun 2016 02:45:22 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id wa2si18737257wjc.62.2016.06.11.02.45.21; Sat, 11 Jun 2016 02:45:22 -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 43364A75AA; Sat, 11 Jun 2016 11:45:21 +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 uA6LhzTk66IL; Sat, 11 Jun 2016 11:45:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 99C43A75D5; Sat, 11 Jun 2016 11:45:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7B7A0A75D5 for ; Sat, 11 Jun 2016 11:45:15 +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 LfebvB96pwfY for ; Sat, 11 Jun 2016 11:45:15 +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-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id B3B85A75AA for ; Sat, 11 Jun 2016 11:45:10 +0200 (CEST) Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-08.nifty.com with ESMTP id u5B9iDfW028579; Sat, 11 Jun 2016 18:44:34 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u5B9iDfW028579 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1465638274; bh=0YVwtqcn8IdxJJeHZe1W1UVFmdCmnxOQ1dEqSyxB/ko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fq7ZLjlR8UzLdEnjMGI4uA842A0rB6fvfKWxdkHI9Rw7y8/bzM9vEN3gC9a17IjNE G4Fmk6pR301yoou6CoUOSJswPu4U5kNru/PqNH1dQ81dw/tjSV4orvip78Im25rS7m LUXol48aIJQjLTsqAiMOPUrHb+iyHHOG6+efkiManqNS79kMid/ivvP/uqHPuUS4/n Tq7A2vNMa29GNz73VTkMcRvNrCZktbBGGe9bHLenWJO07SiaDRHHKOYF/fHuEWtZeT kR0J6nFyIFamU7lxYzo6phIWaI9KCC2TvMFOF+KneP8f9uLUDvkcEVWz8rQBGM8f/W 15WBZnyiPLtZg== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Sat, 11 Jun 2016 18:44:10 +0900 Message-Id: <1465638252-13196-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465638252-13196-1-git-send-email-yamada.masahiro@socionext.com> References: <1465638252-13196-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini , Viresh Kumar , Soeren Moch Subject: [U-Boot] [PATCH v2 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. This commit fixes the script so that the tools/moveconfig.py can correctly convert integer options with a negative value. Signed-off-by: Masahiro Yamada --- Changes in v2: None 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