[U-Boot] [PATCH] Enable expression support for CONFIG_BOARD_SIZE_LIMIT
Fabio Estevam
festevam at gmail.com
Tue Dec 4 16:15:30 UTC 2018
Hi Wolfgang,
On Tue, Dec 4, 2018 at 1:40 PM Wolfgang Denk <wd at denx.de> 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 <wd at denx.de>
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.
More information about the U-Boot
mailing list