From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Date: Thu, 6 Dec 2018 11:04:30 -0200 Subject: [U-Boot] [PATCH] Enable expression support for CONFIG_BOARD_SIZE_LIMIT In-Reply-To: <20181205095202.027A5242268@gemini.denx.de> References: <20181204154035.16299-1-wd@denx.de> <20181205095202.027A5242268@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 spl/u-boot-spl.bin > CFGS spl/u-boot-spl.cfgout > MKIMAGE SPL > OBJCOPY u-boot.srec > OBJCOPY u-boot-nodtb.bin > u-boot-nodtb.bin exceeds file size limit: > limit: 1024 bytes > actual: 480172 bytes > excess: 479148 bytes > make: *** [Makefile:1071: u-boot-nodtb.bin] Error 1 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: arithmetic expression: expecting primary: ""(1 * 1024)"" SYM u-boot.sym COPY u-boot.bin MKIMAGE u-boot.img LD spl/drivers/usb/host/built-in.o LD spl/drivers/built-in.o LD spl/u-boot-spl OBJCOPY spl/u-boot-spl-nodtb.bin COPY spl/u-boot-spl.bin CFGS spl/u-boot-spl.cfgout MKIMAGE SPL 2. The overlap is not detected anymore. In the example below I forced #define CONFIG_BOARD_SIZE_LIMIT (1 * 1024)