[U-Boot] GUNZIP: uncompress, out-of-mem or overwrite error

Hello,
I have problem uncompressing the Kernel image by u-boot. It throws the message "GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to recover resetting ...".
I have compressed and created u-boot image of the linux kernel by the below commands:
arm-marvell-linux-gnueabi-objcopy -O binary vmlinux vmlinux.bin
gzip --best --force vmlinux.bin
u-boot/tools/mkimage -n 'Compressed kernel for Littleton' -A arm -O linux -T kernel -C gzip -a 0x80200000 -e 0x80208000 -d vmlinux.bin.gz vmlinux.ub
The file sizes were vmlinux - 5.7M vmlinux.bin - 3.1G vmlinux.bin.gz - 5.1M vmlinux.ub - 5.1M
After loading u-boot, from u-boot prompt I issued following commands to boot kernel
========================================================================= $ bdinfo arch_number = 0x0000056C env_t = 0x00000000 boot_params = 0x80000100 DRAM bank = 0x00000000 -> start = 0x80000000 -> size = 0x04000000 ethaddr = 00:50:43:09:01:1C ip_addr = 10.100.144.42 baudrate = 115200 bps
$ tftpboot 83a00000 vmlinux.ub SMC91111: MAC 00:50:43:09:01:1c Using SMC91111-0 device TFTP from server 10.100.144.245; our IP address is 10.100.144.42 Filename 'vmlinux.ub'. Load address: 0x83a00000 Loading: T T #T ##################T ###########T #######T ############################ ######T #################################T ##################T ######## ##############################################T ########T ########### #################T ################################################ ####T ################################T ########################T ##### #################################T #### done Bytes transferred = 5303381 (50ec55 hex) $ bootm 83a00000 ## Booting kernel from Legacy Image at 83a00000 ... Image Name: Android Kernel 2.6.29 Created: 2010-06-22 5:38:19 UTC Image Type: ARM Linux Kernel Image (gzip compressed) Data Size: 5303317 Bytes = 5.1 MiB Load Address: 80200000 Entry Point: 80208000 Verifying Checksum ... OK Uncompressing Kernel Image ... SYS_BOOTM_LEN = 0x00800000 loadaddr = 0x80200000 imagestartaddr = 0x83A00040 imagelen = 0x0050EC15 inflate: allocated inflate: reset offset = 22 inflate: dynamic codes block inflate: table sizes ok inflate: code lengths ok inflate: codes ok Error: inflate() returned -5 inflate: end GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to recover resetting ... =====================================================================================
I have enabled verbose debug messages in u-boot/lib/zlib.c
Why BUF_ERROR is (ie. inflate() returned -5) thrown by the zlib? Please let me know what could be wrong.
I am working on Littleton board with PXA310 processor and 64MB DDR SDRAM.
Regards, Unnamalai
DISCLAIMER: -----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------

Dear Unnamalai Kanchi Bashyam,
In message 6E8DF434294A2F49BB2C8BE9F27294D96BDBBB26@CHN-HCLT-EVS07.HCLT.CORP.HCL.IN you wrote:
I have problem uncompressing the Kernel image by u-boot. It throws the message "GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to recover resetting ...".
Which exact version of U-Boot are you running (please provide the git commit ID), and which exact board configuration?
I am working on Littleton board with PXA310 processor a and 64MB DDR SDRAM.
I haven't seen any such board supported in U-Boot yet. Please consider asking the vendor who provided the U-Boot port to you.
One hint: you may want to check to which RAM address the U-Boot image is linked to. Eventually it is sitting right in the middle of your RAM.
Best regards,
Wolfgang Denk

Dear Wolfgang Denk,
I am using a fork of the u-boot called u-boot-pxa and I have taken the 'openpxa' branch from it. git clone git://git.denx.de/u-boot-pxa.git -b openpxa
I have configured the TEXT_BASE as 0x8010_0000 in u-boot/board/littleton/config.mk file and I believe this is the location in RAM where u-boot will sit.
Any hints that I could check further?
Regards, Unnamalai
-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Tuesday, June 22, 2010 7:02 PM To: Unnamalai Kanchi Bashyam Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] GUNZIP: uncompress, out-of-mem or overwrite error
Dear Unnamalai Kanchi Bashyam,
In message 6E8DF434294A2F49BB2C8BE9F27294D96BDBBB26@CHN-HCLT-EVS07.HCLT.CORP.HCL.IN you wrote:
I have problem uncompressing the Kernel image by u-boot. It throws the message "GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to recover resetting ...".
Which exact version of U-Boot are you running (please provide the git commit ID), and which exact board configuration?
I am working on Littleton board with PXA310 processor a and 64MB DDR SDRAM.
I haven't seen any such board supported in U-Boot yet. Please consider asking the vendor who provided the U-Boot port to you.
One hint: you may want to check to which RAM address the U-Boot image is linked to. Eventually it is sitting right in the middle of your RAM.
Best regards,
Wolfgang Denk

Dear Unnamalai Kanchi Bashyam,
In message 6E8DF434294A2F49BB2C8BE9F27294D96BDBC2A3@CHN-HCLT-EVS07.HCLT.CORP.HCL.IN you wrote:
I have configured the TEXT_BASE as 0x8010_0000 in u-boot/ board/littleton/config.mk file and I believe this is the location in RAM where u-boot will sit.
And your RAM is mapped at 0x80000000 ? That means U-Boot has just 1 MB for malloc arena, global data and stack? That's asking for trouble...
Best regards,
Wolfgang Denk

Dear Wolfgang Denk,
And your RAM is mapped at 0x80000000 ? That means U-Boot has just 1 MB for malloc arena, global data and stack? That's asking for trouble...
Thanks for the clue. Now the kernel 'inflation' is working.
I loaded the u-boot image at 0x81000000, instead of 0x80100000.
And Instead of vmlinux.bin (which was 3.1G), I use arch/arm/boot/Image to create kernel uboot image.
gzip -9 arch/arm/boot/Image
$ mkimage -n 'Linux' -A arm -O linux -T kernel -C gzip -a 0x80008000 -e 0x80008000 -d arch/arm/boot/Image.gz kImage.ub
But upon booting kernel through u-boot, after inflation, I only get the message 'Starting kernel ...' and the system hangs.
The log as under:
====================================================================== $bootm 83a00000 ## Booting kernel from Legacy Image at 83a00000 ... Image Name: Linux Created: 2010-06-25 9:13:44 UTC Image Type: ARM Linux Kernel Image (gzip compressed) Data Size: 2611097 Bytes = 2.5 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK
Starting kernel ...
==========================================================================
The 'bootargs' env variable is
bootargs= root=/dev/nfs nfsroot=10.100.144.245:/android/android_rootfs,nolock,rsize=1024,wsize=1024 ip=10.100.144.42:10.100.144.245::255.255.255.0::eth0:on console=ttyS2,115200 init=/init mem=64M comm_v75 uart_dma android
Any further clues on what could be wrong for kernel not getting booted?
Regards, Unnamalai
DISCLAIMER: -----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------

Hi Unnamalai,
But upon booting kernel through u-boot, after inflation, I only get the message 'Starting kernel ...' and the system hangs.
Well control has passed to the linux kernel, so you need to start diagnosing Linux - U-Boot works fine now ;)
The log as under:
====================================================================== $bootm 83a00000 ## Booting kernel from Legacy Image at 83a00000 ... Image Name: Linux Created: 2010-06-25 9:13:44 UTC Image Type: ARM Linux Kernel Image (gzip compressed) Data Size: 2611097 Bytes = 2.5 MiB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK
Starting kernel ...
==========================================================================
The 'bootargs' env variable is
bootargs= root=/dev/nfs nfsroot=10.100.144.245:/android/android_rootfs,nolock,rsize=1024,wsize=1024 ip=10.100.144.42:10.100.144.245::255.255.255.0::eth0:on console=ttyS2,115200 init=/init mem=64M comm_v75 uart_dma android
Any further clues on what could be wrong for kernel not getting booted?
Is the "console" setting correct? I.e. are you connected to ttyS2? Does U-Boot pass the correct machine number (check with bdinfo) for the kernel you use?
If you can reset the board at this time, you can try to inspect the kernel logbuffer for output which Linux produced but which never reached your serial connection:
http://www.denx.de/wiki/view/DULG/LinuxPostMortemAnalysis
Cheers Detlev
participants (3)
-
Detlev Zundel
-
Unnamalai Kanchi Bashyam
-
Wolfgang Denk