Endless reboot + image too large

Hello,

I flashed my TK1 with an image build with LinuxBSP2.7
Now when i boot my device the following error occours and the board restarts in a loop.
Please would be appreciated.

U-Boot 2016.11 (Feb 17 2017 - 10:26:46 +0100)


TEGRA124
DRAM:  2 GiB
MMC:   
Tegra SD/MMC: 0, 
Tegra SD/MMC: 1, 
Tegra SD/MMC: 2
In:    serial
Out:   serial
Err:   serial
Model: Toradex Apalis TK1 2GB V1.0B, Serial# 02822969
Net:   
No ethernet found.
Hit any key to stop autoboot:  0 
Booting from internal eMMC chip...
reading tegra124-apalis-eval.dtb
49723 bytes read in 16 ms (3 MiB/s)
reading uImage
5469236 bytes read in 139 ms (37.5 MiB/s)
## Booting kernel from Legacy Image at 81000000 ...
Image Name:   Angstrom/3.10.40+gitr19722d4d90e
Image Type:   ARM Linux Kernel Image (gzip compressed)
Data Size:    5469172 Bytes = 5.2 MiB
Load Address: 80008000
Entry Point:  80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 82000000
Booting using the fdt blob at 0x82000000
Uncompressing Kernel Image ... 
Error: inflate() returned -5
Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover
resetting ...

I believe I have once seen this before. It has to do with the way your kernel binary is compressed within its uImage container. By default we instruct U-Boot’s mkimage tool not to compress it but rather use an already self compressed zImage which mkimage reports as following:

[user@host Apalis_TK1_LinuxImageV2.7]$ mkimage -l apalis-tk1_bin/uImage--3.10.40+gitr19722d4d90e711d7826ec7f6461216aa61f2f937-v2.7b1-apalis-tk1-20170111213909.bin
Image Name:   Linux-3.10.40-v2.7b1+g19722d4
Created:      Wed Jan 11 22:40:57 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    5471784 Bytes = 5343.54 kB = 5.22 MB
Load Address: 80008000
Entry Point:  80008000

However I would expect a clean V2.7 build to work fine in this respect. Or did you change anything in that area?

Have you tried building the kernel outside the Yocto build system as explained here?

Hi

I guess you made a copy of conf/apalis-tk1.conf and did not apply changes we did later to this file.

I.e. This commit probably fixes your issue, although we added it to fix a different issue.

(For the T20/T30 based modules we actually saw your ‘Error: inflate() returned -5’ message, so you might want to read this commit message too.)

Max

Exactly. You save my day. Thanks!