Uncompressing---Kernel Image ... Error: Bad gzipped data

Discussion about U-Boot and the kernel.

Uncompressing---Kernel Image ... Error: Bad gzipped data

Postby mycents » Mon Nov 15, 2021 2:58 pm

Hello,
I am not quite sure, if this is the correct forum - but I have not found any "general" other u-boot/kernel forum. However, it seems that I have bricked my VTH5241D (10" montior for IP doorbell) by flashing an old bootloader.

The orginal bootloader was "U-Boot 1.3.6 (jerry) (Mar 28 2017 - 19:34:15)", now I am running "U-Boot 1.3.6 (jerry) (May 8 2018 - 17:18:39)".

When starting the VTH:
$this->bbcode_second_pass_quote('', 'C')hecking DDR......OK

UBL Version: 1.46t(DM365)09:30:17 Sep 2 2014
Oscillator: 24MHZ
ARM Rate: 432 MHZ
DDR Rate: 340 MHZ
BootMode: SPI
Starting SPI Memory Copy...
DONE


U-Boot 1.3.6 (jerry) (Mar 28 2017 - 19:34:15)

DRAM: 128 MB
SF: Got idcode ef 40 19 00 00
SF: Unsupported Winbond ID 4019
*** Warning - probe error, using default environment

*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Ethernet PHY: GENERIC @ 0x01,id:1cc816
total gio 2
gio[22]=1
gio[25]=1
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Filename 'upgrade_info_7db780a713a4.txt'.
Load address: 0x80100000
Loading: #
done
Bytes transferred = 180 (b4 hex)
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Filename 'dm365_ubl_boot_16M.bin.img'.
Load address: 0x82000000
Loading: ##################
done
Bytes transferred = 260240 (3f890 hex)

## Checking Image at 0x82000000 ...
Header CRC Checking ... OK
Image Name: uboot
Image Type: ARM Linux Firmware (uncompressed)
Data Size: 260176 Bytes = 254.1 kB
Load Address: 02000000
Entry Point: 02040000
Data CRC Checking ... OK
Programing start at: 0x00000000
Environment SPI flash not initialized
Environment SPI flash not initialized
Environment SPI flash not initialized
write : 0%Environment SPI flash not initialized
Environment SPI flash not initialized
Environment SPI flash not initialized
write : 25%Environment SPI flash not initialized
Environment SPI flash not initialized
Environment SPI flash not initialized
write : 50%Environment SPI flash not initialized
Environment SPI flash not initialized
write : 100%
done
Failed to Handle a line
TFTP from server 192.168.254.254; our IP address is 192.168.1.108; sending through gateway 192.168.1.1
Filename 'failed.txt'.
Load address: 0x80200000
Loading: *
TFTP error: 'File not found or No Access' (1)
Not retrying...
==>use default images
Environment SPI flash not initialized
Error when Got kernel from SPI flash!
Environment SPI flash not initialized
Error when Got kernel from SPI flash!
DHBOOT# setenv HWID VTH5241D:0:4:2:1D:5:4:1:9:3:3:1:1B0:0:2:0:6:0:0:1
DHBOOT# saveenv
Saving Environment to SPI Flash...
Environment SPI flash not initialized
DHBOOT# sf probe 0:0
SF: Got idcode ef 40 19 00 00
SF: Unsupported Winbond ID 4019
Failed to initialize SPI flash at 0:0
DHBOOT#


As you can see the SPI is not inialized, so that I am alos not able to run "saveenev".

With the "good" bootloader, I had:
$this->bbcode_second_pass_code('', 'uboot printenv
{
"id": 31,
"params": {
"table": {
"appauto": "1",
"autogw": "192.168.1.1",
"autolip": "192.168.1.108",
"autonm": "255.255.255.0",
"autosip": "192.168.254.254",
"baudrate": "115200",
"bootargs": "console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=cramfs,nolock mem=190M newmem=190M video=davincifb:vid0=OFF:vid1=OFF:osd0=OFF:osd1=OFF",
"bootcmd": "fsload",
"bootdelay": "3",
"bootfile": "\"uImage\"",
"da": "protect off all;tftp 81a00000 dm365_ubl_boot_16M.bin.img;flwrite",
"dc": "tftp 81a00000 custom-x.cramfs.img; flwrite",
"dh_keyboard": "1",
"dk": "tftp 81a00000 kernel-x.cramfs.img; flwrite",
"dr": "tftp 81a00000 romfs-x.cramfs.img; flwrite",
"du": "tftp 81a00000 user-x.cramfs.img; flwrite",
"dw": "tftp 81a00000 web-x.cramfs.img; flwrite",
"eth1addr": "00:01:5b:00:55:66",
"ethaddr": "9C:14:63:5C:4A:CA",
"fileaddr": "81A00000",
"filesize": "D25C00",
"HWID": "VTH5241D:0:4:2:1D:5:4:1:11:3:3:1:1B0:0:2:0:6:0:0:1",
"ID": "4M00C84PAZ51005",
"ipaddr": "192.168.1.108",
"netmask": "255.255.255.0",
"serverip": "192.168.1.1",
"stderr": "serial",
"stdin": "serial",
"stdout": "serial",
"tk": "tftp 80800000 uImage; bootm 80800000",
"up": "tftp 81a00000 update.img; flwrite",
"ver": "U-Boot 1.3.6 (jerry) (May 8 2018 - 17:18:39)",
"wifiaddr": "9C:14:63:5C:4A:DE"
}
},
"result": true,
"session": 2147483641
}')

and with the "old":
$this->bbcode_second_pass_code('', 'bootargs=console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=cramfs,nolock mem=70M video=davincifb:vid0=OFF:vid1=OFF:osd0=OFF:osd1=OFF
bootcmd=fsload
bootdelay=3
baudrate=115200
ethaddr=00:01:5b:00:33:44
eth1addr=00:01:5b:00:55:66
eth2addr=00:01:5b:00:77:88
ipaddr=192.168.1.108
serverip=192.168.1.1
netmask=255.255.255.0
bootfile="uImage"
single=0
ID=000000000000000000
da=protect off all;tftp 81a00000 dm365_ubl_boot_16M.bin.img;flwrite
dc=tftp 81a00000 custom-x.cramfs.img; flwrite
dr=tftp 81a00000 romfs-x.cramfs.img; flwrite
du=tftp 81a00000 user-x.cramfs.img; flwrite
dd=tftp 81a00000 data-x.cramfs.img; flwrite
dw=tftp 81a00000 web-x.cramfs.img; flwrite
dg=tftp 81a00000 gui-x.cramfs.img; flwrite
dk=tftp 81a00000 kernel-x.cramfs.img; flwrite
up=tftp 81a00000 update.img; flwrite
tk=tftp 80800000 uImage; bootm 80800000
gionum=22.25
gioval=1.1
dh_com=0
autosip=192.168.254.254
autolip=192.168.1.108
autogw=192.168.1.1
autonm=255.255.255.0
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 1.3.6 (jerry) (Mar 28 2017 - 19:34:15)
dh_keyboard=1
appauto=1')

Due to that, I have set the following environment:
$this->bbcode_second_pass_code('', '
set ID 4M00C84PAZ51005
set HWID VTH5241D:0:4:2:1D:5:4:1:11:3:3:1:1B0:0:2:0:6:0:0:1
set bootargs console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=cramfs,nolock mem=190M newmem=190M video=davincifb:vid0=OFF:vid1=OFF:osd0=OFF:osd1=OFF
set dh_keyboard 0
set appauto 0
set fileaddr 82000000
')

After flashing kernel-x.cramfs.img:
$this->bbcode_second_pass_code('', 'tftp 0x82000000 kernel-x.cramfs.img')

and starting: bootm 82000000, I do get the following:
$this->bbcode_second_pass_code('', '## Booting kernel from Legacy Image at 82000000 ...
Image Name: linux
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 1827948 Bytes = 1.7 MB
Load Address: 02080000
Entry Point: 02280000
Verifying Checksum ... OK
Uncompressing---Kernel Image ... Error: Bad gzipped data
GUNZIP: uncompress or overwrite error - must RESET board to recover
Checking DDR......OK ')

I do not really know, what I can do to fix this problems. Have already tried to flash to a different addresses (81a00000, ...), but the result is always the same.

To be honest, I am a beginner and my "kernel" knowledge is very limited.

Any hint is really welcome and appreciated.
mycents
 
Posts: 1
Joined: Mon Nov 15, 2021 2:02 pm

Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 3 guests