[U-Boot] [PATCH] Enable expression support for CONFIG_BOARD_SIZE_LIMIT

Wolfgang Denk wd at denx.de
Fri Dec 7 15:21:27 UTC 2018


Dear Fabio,

In message <CAOMZO5CnnmJrc9Y_9LQpxQYWQNcGeTUw=vgPtSpdmEPwavhU6g at mail.gmail.com> you wrote:
>
> > /bin/sh: 1: arithmetic expression: expecting primary: ""(1 * 1024)""

D*mn.  I really thought I had tried this in a dash based
environment, too.  Sorry for causing such confusion.

> SHELL = /bin/bash"

Yes, if this is really a bash only feature that would be an easy way
to fix it.

> And by forcing the SHELL variable to bash, then your patch works fine here:

Yes, this would work - but I'm not sure if everybody would appreciate
such a change?

This should also work - replace the line

	@(echo $$(($(CONFIG_BOARD_SIZE_LIMIT))); wc -c $@ ) | \

by

	@(awk "END { print $$(echo $(CONFIG_BOARD_SIZE_LIMIT)) }" /dev/null; wc -c $@ ) | \


Can you please try this out?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Everyting looks interesting until you do it. Then you find it's  just
another job.                     - Terry Pratchett, _Moving Pictures_


More information about the U-Boot mailing list