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

Fabio Estevam festevam at gmail.com
Thu Dec 6 15:17:15 UTC 2018


Hi Wolfgang,

[Adding Andy]

On Thu, Dec 6, 2018 at 12:41 PM Fabio Estevam <festevam at gmail.com> 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 organization */
>  #define CONFIG_ENV_SIZE                        SZ_8K
>
> -#define CONFIG_ENV_OFFSET                      (8 * SZ_64K)
> +#define CONFIG_ENV_OFFSET              (768 * 1024)
> +#define CONFIG_BOARD_SIZE_LIMIT                (1 * 1024)
>  #define CONFIG_SYS_FSL_USDHC_NUM               2
>
>  #define CONFIG_SYS_MMC_ENV_DEV                 0
>
> It does build fine, but as I have intentionally forced a small
> CONFIG_BOARD_SIZE_LIMIT  I wanted it to fail, but it does not fail as
> shown below:
>
>   OBJCOPY u-boot-nodtb.bin
> /bin/sh: 1: arithmetic expression: expecting primary: ""(1 * 1024)""

I read the link suggested by Andy Pont: https://wiki.ubuntu.com/DashAsBinSh

where it says:

"In Makefiles, you can set the following variable at the top:

SHELL = /bin/bash"

And by forcing the SHELL variable to bash, then your patch works fine here:

--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+

+SHELL = /bin/bash
 VERSION = 2019
 PATCHLEVEL = 01
 SUBLEVEL =


More information about the U-Boot mailing list