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

2018-12-07 Thread Wolfgang Denk
Dear Fabio, In message you wrote: > > I replaced it on the main Makefile and also in the imx one and it > works as expected now. Thanks. > When you send the v2, you can add: > > Tested-by: Fabio Estevam Done. Thanks for your patience. Best regards, Wolfgang Denk -- DENX Software

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

2018-12-07 Thread Fabio Estevam
Hi Wolfgang, On Fri, Dec 7, 2018 at 1:21 PM Wolfgang Denk wrote: > 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

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

2018-12-07 Thread Wolfgang Denk
Dear Fabio, In message 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

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

2018-12-06 Thread Fabio Estevam
Hi Wolfgang, [Adding Andy] On Thu, Dec 6, 2018 at 12:41 PM Fabio Estevam wrote: > I am running top of tree mainline U-Boot + your patch from this thread, plus: > > --- a/include/configs/pico-imx7d.h > +++ b/include/configs/pico-imx7d.h > @@ -134,7 +134,8 @@ > /* FLASH and environment

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

2018-12-06 Thread Fabio Estevam
Hi Philipp, On Thu, Dec 6, 2018 at 12:50 PM Philipp Tomsich wrote: > If you take a look at how CONFIG_BOARD_SIZE_LIMIT is used > ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) > BOARD_SIZE_CHECK = \ > @actual=`wc -c $@ | awk '{print $$1}'`; \ > limit=`printf

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

2018-12-06 Thread Fabio Estevam
On Thu, Dec 6, 2018 at 12:58 PM Fabio Estevam wrote: > > On Thu, Dec 6, 2018 at 12:44 PM Andy Pont wrote: > > > > Fabio wrote... > > > > $ /bin/sh --version > > /bin/sh: 0: Illegal option -- > > > > In my system /bin/sh points to bash: > > $ ls -al /bin/sh > > lrwxrwxrwx 1 root root 4 mai 2

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

2018-12-06 Thread Fabio Estevam
On Thu, Dec 6, 2018 at 12:44 PM Andy Pont wrote: > > Fabio wrote... > > $ /bin/sh --version > /bin/sh: 0: Illegal option -- > > In my system /bin/sh points to bash: > $ ls -al /bin/sh > lrwxrwxrwx 1 root root 4 mai 2 2018 /bin/sh -> dash > > Just to pick up on the obvious… /bin/sh is showing as

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

2018-12-06 Thread Philipp Tomsich
Fabio, let me chime in (I had to do a quick ‘git grep’ on this, as I couldn’t ignore the mail traffic any longer)... > On 06.12.2018, at 15:41, Fabio Estevam wrote: > > Hi Wolfgang, > > On Thu, Dec 6, 2018 at 12:23 PM Wolfgang Denk wrote: > >> This makes really no sense to me. Can you

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

2018-12-06 Thread Andy Pont
Fabio wrote... $ /bin/sh --version /bin/sh: 0: Illegal option -- In my system /bin/sh points to bash: $ ls -al /bin/sh lrwxrwxrwx 1 root root 4 mai 2 2018 /bin/sh -> dash Just to pick up on the obvious… /bin/sh is showing as linked to dash not bash! Using (( … )) for arithmetic expansion

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

2018-12-06 Thread Fabio Estevam
Hi Wolfgang, On Thu, Dec 6, 2018 at 12:23 PM Wolfgang Denk wrote: > This makes really no sense to me. Can you please send me (off list) > a git diff of the tree that is not building for you against the > nearest mainline commit? I am running top of tree mainline U-Boot + your patch from this

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

2018-12-06 Thread Wolfgang Denk
Dear Fabio, In message you wrote: > > Previously I tested on a machine running Ubuntu 16.04 and today I also > tested on another machine running Ubuntu 18.04. > > The results are the same on both machines: > > 1. I get a "expecting primary" warning: > > OBJCOPY u-boot-nodtb.bin > /bin/sh: 1:

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

2018-12-06 Thread Fabio Estevam
Hi Wolfgang, On Wed, Dec 5, 2018 at 7:52 AM Wolfgang Denk wrote: > Please try it on the shell: > > -> echo $(( ((768 - 69) * 1024) )) > 715776 > -> echo $(( (1 * 1024) )) > 1024 This works fine. > It does for me, if I set the limit low: > > OBJCOPY spl/u-boot-spl-nodtb.bin > COPY

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

2018-12-05 Thread Wolfgang Denk
Dear Fabio, In message you wrote: > > Still not working for me. I do see a warning now: > > LD spl/u-boot-spl > /bin/sh: 1: arithmetic expression: expecting primary: ""((768 - 69) * 1024)"" > COPYu-boot.bin > MKIMAGE u-boot.img > OBJCOPY spl/u-boot-spl-nodtb.bin > COPY

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

2018-12-04 Thread Fabio Estevam
Hi Wolfgang, On Tue, Dec 4, 2018 at 1:40 PM Wolfgang Denk wrote: > > So far, the use of CONFIG_BOARD_SIZE_LIMIT would only work with > plain numeric constants. Extend it to allow for expressions, so one > can for example use > > #define CONFIG_BOARD_SIZE_LIMIT (768 << 10) > > in the

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

2018-12-04 Thread Otavio Salvador
On Tue, Dec 4, 2018 at 1:40 PM Wolfgang Denk wrote: > > So far, the use of CONFIG_BOARD_SIZE_LIMIT would only work with > plain numeric constants. Extend it to allow for expressions, so one > can for example use > > #define CONFIG_BOARD_SIZE_LIMIT (768 << 10) > > in the board