[U-Boot] [PATCH v4] pico-imx7d: Increase the CONFIG_ENV_OFFSET size
Wolfgang Denk
wd at denx.de
Tue Dec 4 09:37:49 UTC 2018
Dear Fabio,
In message <CAOMZO5DBvBag4qG7tRqHi1X1Dy7=bWfaQhN5wRCB2_WM1HhiGw at mail.gmail.com> you wrote:
>
> On Mon, Dec 3, 2018 at 1:52 PM Wolfgang Denk <wd at denx.de> wrote:
>
> > Can you live with something like this:
> >
> > #define CONFIG_ENV_OFFSET (768 * 1024)
> > #define CONFIG_BOARD_SIZE_LIMIT ((768 * 1024) - (69 * 1024))
>
> It does not work:
>
> /bin/sh: 1: printf: ((768 * 1024) - (69 * 1024)): expected numeric value
> u-boot-nodtb.bin exceeds file size limit:
> limit: 0 bytes
> actual: 482968 bytes
> excess: 482968 bytes
Is there any chance you mis-applied my patch?
Apparently you still have a shell printf command in your code, most
probably the old line
limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`;
But this should not be present any more with my patch applied. Here
again as reference:
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 53d9e5f42b..a7f02f9996 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -60,15 +60,13 @@ endif
ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
BOARD_SIZE_CHECK = \
- @actual=`wc -c $@ | awk '{print $$1}'`; \
- limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \
- if test $$actual -gt $$limit; then \
- echo "$@ exceeds file size limit:" >&2 ; \
- echo " limit: $$limit bytes" >&2 ; \
- echo " actual: $$actual bytes" >&2 ; \
- echo " excess: $$((actual - limit)) bytes" >&2; \
- exit 1; \
- fi
+ @wc -c $@ | \
+ awk '{ if ($$1 > $(CONFIG_BOARD_SIZE_LIMIT)) { \
+ printf "%s exceeds file size limit:\n", $$2; \
+ printf " limit: %d bytes\n", $(CONFIG_BOARD_SIZE_LIMIT); \
+ printf " actual: %d bytes\n", $$1; \
+ printf " excess: %d bytes\n", $$1 - $(CONFIG_BOARD_SIZE_LIMIT); \
+ exit 1; } }' >&2;
else
BOARD_SIZE_CHECK =
endif
As you can see, with the patch there is NO printf called before the
line which prints ""%s exceeds file size limit:\n", but in your
output the error message comes before that.
I have tested this code, and it works for me.
Please check the code again!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You don't have to worry about me. I might have been born yesterday...
but I stayed up all night.
More information about the U-Boot
mailing list