From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Date: Tue, 4 Dec 2018 14:15:30 -0200 Subject: [U-Boot] [PATCH] Enable expression support for CONFIG_BOARD_SIZE_LIMIT In-Reply-To: <20181204154035.16299-1-wd@denx.de> References: <20181204154035.16299-1-wd@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 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 configuration. > > Signed-off-by: Wolfgang Denk 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)"" COPY u-boot.bin MKIMAGE u-boot.img OBJCOPY spl/u-boot-spl-nodtb.bin COPY spl/u-boot-spl.bin CFGS spl/u-boot-spl.cfgout MKIMAGE SPL CFGCHK u-boot.cfg It does allow the build to proceed, but it is not really detecting the overlap anymore. For example: let's force the overlap by setting a very small CONFIG_BOARD_SIZE_LIMIT of only 1K: #define CONFIG_ENV_OFFSET (768 * 1024) #define CONFIG_BOARD_SIZE_LIMIT (1 * 1024) /bin/sh: 1: arithmetic expression: expecting primary: ""(1 * 1024)"" COPY u-boot.bin MKIMAGE u-boot.img LD spl/drivers/usb/gadget/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 CFGCHK u-boot.cfg It still allowed a successful build, but it should have thrown an error about the overlap.