Hello all, I'm running into this error during start up:
"Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN"
I’m currently trying to port a demo on to the iMX6 SL board using Integrity 11.4.4 RTOS. I’ve use a example base tutorial as a starting point(Vivante\vdk\es20\tutorial3) and it runs on the Target fine when built. However, after adding all of the necessary files into the project from the port, everything built successfully as well, but the uimage has grown to about 8.3 MB in size and I’m not able to start it up due to the 8MB size restriction. Here’s the error log:
switch to partitions #0, OK
mmc1 is current device
reading / MyDemo.uimage
8679912 bytes read in 575 ms (14.4 MiB/s)
reading /imx6q-sabrelite.dtb
38203 bytes read in 21 ms (1.7 MiB/s)
## Booting kernel from Legacy Image at 20000000 ...
Image Name:
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 8679848 Bytes = 8.3 MiB
Load Address: 18000000
Entry Point: 18000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 30000000
Booting using the fdt blob at 0x30000000
Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover
resetting ...
I’ve tried to change the CONFIG_SYS_BOOTM_LEN to a larger size and reset, but it didn’t work because it’s not an environment variable I can edit, it only ends up creating a copy. Log:
CONFIG_SYS_BOOTM_LEN=help
CONFIG_SYS_BOOTM_LEN=0XF00000
baudrate=115200
board=sabrelite
bootargs=device=0 ether=${ethaddr} ipaddr=10.10.9.157 netmask=255.255.254.0 gateway=10.10.8.1 nameserver=192.168.1.14 hostname=sabreauto
bootcmd=mmc dev 1; fatload mmc 1:0 20000000 / MyDemo.uimage; fatload mmc 1:0 30000000 /imx6q-sabrelite.dtb; bootm 20000000 - 30000000
bootdelay=3
...
I’ve also tried to compress the uimage and it yielded no results due to the files being compressed already when built using the .elf file from Integrity instructions. Log:
glsbuild@glsbuild-VirtualBox:~/Desktop/BuildFolder$ mkimage -A arm -O linux -C gzip -a 18000000 -d MyDemo.elf MyDemo.uimage
Image Name:
Created: Wed Apr 24 16:26:01 2019
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 8628608 Bytes = 8426.38 kB = 8.23 MB
Load Address: 18000000
Entry Point: 18000000
glsbuild@glsbuild-VirtualBox:~/Desktop/BuildFolder$
What are my options from this point on? Do I have the ability to adjust/increase the CONFIG_SYS_BOOTM_LEN size at all? Is this the case where I need to somehow separate the kernel from the actual project into different partitions to get around the kernel size limitations?(If so, can someone point me to some example/documentation on how to do it, since all of the Greenhills samples that I can see only uses one partition.)
If there's a chance that an upgrade to the Uboot will resolve this, here’s the log for that if it’s helpful:
=> ver
U-Boot 2015.07-15178-g73588dc-dirty (Sep 12 2016 - 14:20:21 -0400)
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1) 4.8.4
GNU ld (GNU Binutils for Ubuntu) 2.24
Thanks in advance for any help!
Thanks for the suggestion Igor.
I've tried to build a new uboot following the documentation you linked to, but I'm still stuck.
After many issues resolved along the way, I finally got to the last step of building it using it "make", and am stuck on the same location as this person in this thread: cross compiling - cc1: error: bad value (armv5) for -march= switch - Stack Overflow
Below is the log of the error I'm encountering from a VM running Ubuntu 18.04 with gcc 7 installed:
alvin@alvin-VirtualBox:~/Desktop/uboot-imx/uboot-imx$ make mx6sabreauto_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
alvin@alvin-VirtualBox:~/Desktop/uboot-imx/uboot-imx$ make
scripts/kconfig/conf --syncconfig Kconfig
CHK include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk
GEN include/autoconf.mk.dep
CFG spl/u-boot.cfg
GEN spl/include/autoconf.mk
CHK include/config/uboot.release
UPD include/config/uboot.release
CHK include/generated/version_autogenerated.h
UPD include/generated/version_autogenerated.h
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CC lib/asm-offsets.s
cc1: error: bad value (‘armv5’) for ‘-march=’ switch
cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 bonnell atom silvermont slm knl x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2
Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1434: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
alvin@alvin-VirtualBox:~/Desktop/uboot-imx/uboot-imx$ export CROSS_COMPILE=arm-linux-gnueabi-
alvin@alvin-VirtualBox:~/Desktop/uboot-imx/uboot-imx$ export ARCH=arm
alvin@alvin-VirtualBox:~/Desktop/uboot-imx/uboot-imx$ make am335x_evm_config
#
# configuration written to .config
#
alvin@alvin-VirtualBox:~/Desktop/uboot-imx/uboot-imx$ make
make: arm-linux-gnueabi-gcc: Command not found
scripts/kconfig/conf --syncconfig Kconfig
./scripts/binutils-version.sh: line 18: arm-linux-gnueabi-as: command not found
CHK include/config.h
UPD include/config.h
CFG u-boot.cfg
/bin/sh: 1: arm-linux-gnueabi-gcc: not found
scripts/Makefile.autoconf:77: recipe for target 'u-boot.cfg' failed
make[1]: *** [u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
alvin@alvin-VirtualBox:~/Desktop/uboot-imx/uboot-imx$
Please let me know if you have any further thoughts on this, thanks!
Hi Alvin
one can try to follow sect.3 Host Setup attached Yocto Guide from
linux documentation page
Best regards
igor
Hi Alvin
in general this can depend on greenhills uboot 2015.07
and one can try with nxp uboot with linux and suggestions on below link
add CONFIG_SYS_BOOTM_LEN size error help
Linux documentation
https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/i.mx-6ser...
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------