From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vitaly Andrianov Date: Thu, 6 Aug 2015 12:35:11 -0400 Subject: [U-Boot] [PATCH] ti_armv7_common: enable setexpr In-Reply-To: <20150806153125.GK25532@bill-the-cat> References: <1438872507-26253-1-git-send-email-nm@ti.com> <20150806150446.GJ25532@bill-the-cat> <55C3788B.8040702@ti.com> <20150806153125.GK25532@bill-the-cat> Message-ID: <55C38CBF.3000600@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/06/2015 11:31 AM, Tom Rini wrote: > On Thu, Aug 06, 2015 at 10:08:59AM -0500, Nishanth Menon wrote: >> On 08/06/2015 10:04 AM, Tom Rini wrote: >>> On Thu, Aug 06, 2015 at 09:48:27AM -0500, Nishanth Menon wrote: >>> >>>> This allows us to do basic math in hush shell. For example: >>>> U-Boot# r1=10 >>>> U-Boot# r2=20 >>>> U-Boot# setexpr.l r3 $r1 + $r2 >>>> U-Boot# echo $r3 >>>> 30 >>>> >>>> Reported-by: Vitaly Andrianov >>>> Suggested-by: Tom Rini >>>> Signed-off-by: Nishanth Menon >>> >>> This needs to be done in the configs/ files now instead as we have >>> CMD_EXPR there. In fact I'm not sure right now which would win, the >>> define here or the disable currently in the config files :) >>> >> yeah, I do many defconfigs define CONFIG_CMD_SETEXPR.. >> >> We dont have a common config file there(similar to ti_armv7_common) .. >> we'd have to introduce this for every board config then... is'nt that >> in-efficient? > > Much like the kernel we try and pick sensible defaults. In this case > you'd be removing a line from the defconfig files. > > But you're not the first to suggest that something better could be done > here and maybe further down the line we'll play with the upstream tools > for merging defconfig snippets so that we could have some common ones > pulled together. > I just curious whether setexpr.l will work with 64bit variable, which required to represent initrd address with LPAE enabled. Does the setexpr have uint_64_t version?