[U-Boot] [PATCH] Enable expression support for CONFIG_BOARD_SIZE_LIMIT
Fabio Estevam
festevam at gmail.com
Thu Dec 6 13:04:30 UTC 2018
Hi Wolfgang,
On Wed, Dec 5, 2018 at 7:52 AM Wolfgang Denk <wd at denx.de> 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)
More information about the U-Boot
mailing list