[U-Boot-Users] autoscript and bootm problem at NIOS

Hi, I use board DK20K200E with NIOS, 64MB SDRAM module and CS8900. U-boot was get today (29-08-2005) from CVS.
I create gziped standalone images of kernel (2.4) and romfs. I use autoscript to load it from tftp server. The script is put on tftp server and downloaded after obtained ip address by dhcp.
The script correctly downloads both images and put in right place in memory. "iminfo" shows that CRC is correct for both images. But "bootm" show an error -4 Z_MEM_ERROR() in inflate() function.
I set "unc_len" to 0x800000. It's enough for kernel and romfs.
From /include/configs/20K200E.h:
#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 10240*1024)
Size of uncompressed: romfs image: 4965376 bytes, kernel image: 1044480 bytes.
But the problem disappears when I remove "bootm" from autoscript. And run: "bootm 5100000 5400000" by hand in console after downloading images by the script. The kernel boots and mounts romfs.
Below I put autoscript and log of deflating images.
Best Regards, Maciej Witaszek
-------------------- autoscript -------------------------- echo === U-boot sets === setenv kernel_img 5100000 setenv romfs_img 5400000 echo ============= Load uClinux kernel image =============== tftpboot $(kernel_img) uClinux
echo ============= Load ROMfs image =============== tftpboot $(romfs_img) uClinux_romfs
iminfo $(kernel_img) iminfo $(romfs_img)
bootm $(kernel_img) $(romfs_img) --------------------------------------------------------------
--------------- u-boot downloading images --------------- U-Boot 1.1.2 (Aug 29 2005 - 20:18:29) CPU: Nios-32 Rev. 3.3 (0x3038) Reg file size: 256 LO_LIMIT/HI_LIMIT: 1/14 Board: Altera Nios 20K200E Development Kit In: serial Out: serial Err: serial Hit any key to stop autoboot: 0 eth_init eth_reset CS8900 Ethernet chip found! BOOTP broadcast 1 DHCPHandler: got packet: (src=67, dst=68, len=300) state: 3 Filtering pkt = 0 DHCPHandler: got DHCP packet: (src=67, dst=68, len=300) state: 3 DHCP: state=SELECTING bp_file: "" TRANSITIONING TO REQUESTING STATE Bootfile: DhcpSendRequestPkt: Sending DHCPREQUEST Transmitting DHCPREQUEST packet: len = 343 DHCPHandler: got packet: (src=67, dst=68, len=300) state: 4 Filtering pkt = 0 DHCPHandler: got DHCP packet: (src=67, dst=68, len=300) state: 4 DHCP State: REQUESTING DHCP_ACK Bootfile: DHCP client bound to address 10.0.0.99 *** Warning: no boot file name; using '6300000A.img' TFTP from server 10.0.0.5; our IP address is 10.0.0.99 Filename '6300000A.img'. Load address: 0x40000 Loading: # done Bytes transferred = 405 (195 hex) ## Executing script at 00040000 ** Script length: 333 ** exec: "echo === U-boot sets ===" === U-boot sets === ** exec: "setenv kernel_img 5100000" ** exec: "setenv romfs_img 5400000" ** exec: "echo ============= Load uClinux kernel image ===============" ============= Load uClinux kernel image =============== ** exec: "tftpboot $(kernel_img) uClinux" eth_init eth_reset CS8900 Ethernet chip found! Interrupt vector 17: handler 0x3f81920 replacing 0x3f81920 TFTP from server 10.0.0.5; our IP address is 10.0.0.99 Filename 'uClinux'. Load address: 0x5100000 Loading: ################################################################# ################## done Bytes transferred = 423246 (6754e hex) ** exec: "echo ============= Load ROMfs image ===============" ============= Load ROMfs image =============== ** exec: "tftpboot $(romfs_img) uClinux_romfs" eth_init eth_reset CS8900 Ethernet chip found! Interrupt vector 17: handler 0x3f81920 replacing 0x3f81920 TFTP from server 10.0.0.5; our IP address is 10.0.0.99 Filename 'uClinux_romfs'. Load address: 0x5400000 Loading: ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# done Bytes transferred = 1662981 (196005 hex) ** exec: "iminfo $(kernel_img)" ## Checking Image at 05100000 ... Image Name: uCLinux Kernel Image for NIOS32 Image Type: Unknown Architecture Linux Kernel Image (gzip compressed) Data Size: 423182 Bytes = 413.3 kB Load Address: 04000000 Entry Point: 04000000 Verifying Checksum ... OK ** exec: "iminfo $(romfs_img)" ## Checking Image at 05400000 ... Image Name: uClinux ROM disk Image Type: Unknown Architecture Linux RAMDisk Image (gzip compressed) Data Size: 1662917 Bytes = 1.6 MB Load Address: 06000000 Entry Point: 06000000 Verifying Checksum ... OK ** exec: "bootm $(kernel_img) $(romfs_img)" Boot reached stage 1 ## Booting image at 05100000 ... Boot reached stage 2 Boot reached stage 3 Image Name: uCLinux Kernel Image for NIOS32 Image Type: Unknown Architecture Linux Kernel Image (gzip compressed) Data Size: 423182 Bytes = 413.3 kB Load Address: 04000000 Entry Point: 04000000 Verifying Checksum ... OK Boot reached stage 4 Boot reached stage 5 Boot reached stage 6 Uncompressing Kernel Image ... Error: inflate() returned -4 GUNZIP ERROR - must RESET board to recover Boot reached stage -6 ####### REBOOT is needed ####### Press reset button on your board FIXME - on production board do sth better Unhandled interrupt: 0x0 OK Boot reached stage 7 Boot reached stage 8 Boot reached stage 9 ## Loading Ramdisk Image at 05400000 ... Boot reached stage 10 Image Name: uClinux ROM disk Image Type: Unknown Architecture Linux RAMDisk Image (gzip compressed) Data Size: 1662917 Bytes = 1.6 MB Load Address: 06000000 Entry Point: 06000000 Verifying Checksum ... OK Boot reached stage 11 Uncompressing ROM image ...Error: inflateInit2() returned -4 GUNZIP ERROR - must RESET board to recover Boot reached stage -6 ####### REBOOT is needed ####### Press reset button on your board FIXME - on production board do sth better Unhandled interrupt: 0x0 OK Boot reached stage 15 Starting kernel at 0x04000000...
participants (1)
-
Maciej Witaszek