
Hi All,
I was wondering about the difference between the bootm and run flash_self commands. I understand that bootm command uncompresses and boots the kernel from a given memory location. The board hangs when I try to use bootm command to load the kernel whereas it works perfectly when I use "run flash_self" command.
The environment variables is same for both the scenarios. I've included the environment variables as well as command outputs below.
Enviroment variables ================== => printenv bootcmd=run flash_self baudrate=115200 loads_echo=1 preboot=echo;echo Type "run flash_nfs" to mount root filesystem over NFS;echo netdev=eth0 hostname=taishan nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} ramargs=setenv bootargs root=/dev/ram rw addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:$1addtty=setenv bootargs ${bootargs} console=ttyS1,${baudrate} flash_nfs=run nfsargs addip addtty;bootm ${kernel_addr} flash_self=run ramargs addip addtty;bootm ${kernel_addr} ${ramdisk_addr} net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;bootm rootpath=/opt/eldk/ppc_4xx load=tftp 100000 /tftpboot/taishan/u-boot.bin update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;cp.b 100000 fffc0000 40000;setenv filvupd=run load;run update fixedip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname)1dhcp=setenv bootargs $(bootargs) ip=dhcp kozio=bootm 0xffe00000 ethaddr=00:0c:4f:35:00:02 eth1addr=00:0c:4f:35:00:03 bootdelay=10 bootfile=uImage ethact=ppc_4xx_emac2 stdin=serial stdout=serial stderr=serial ver=U-Boot 1.1.4 (Oct 17 2006 - 18:06:51) kernel_addr=0x600000 ramdisk_addr=0x800000 fileaddr=800000 ipaddr=192.168.1.62 serverip=192.168.1.155
Environment size: 1321/16380 bytes =>
bootm command ============== I can't boot my kernel when I use bootm <kernel_addr> <ramdisk_addr>. It hangs after printing the following message.
=> bootm 0x600000 0x800000 ## Booting image at 00600000 ... Image Name: Linux-2.6.16.16 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1171270 Bytes = 1.1 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Loading RAMDisk Image at 00800000 ... Image Name: Taishan Ramdisk Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1198898 Bytes = 1.1 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Ramdisk to 0fd8d000, end 0feb1b32 ... OK
run flash_self =========== The system boots without any problems when I use the run flash_self command with the following value.
=> run flash_self ## Booting image at 00600000 ... Image Name: Linux-2.6.16.16 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1171270 Bytes = 1.1 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Loading RAMDisk Image at 00800000 ... Image Name: Taishan Ramdisk Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 1198898 Bytes = 1.1 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Ramdisk to 0fd8d000, end 0feb1b32 ... OK Linux version 2.6.16.16 (root@linux_box) (gcc version 4.0.0 (DENX ELDK 4.0 4.0.0)) #8 Wed Oct 186AMCC Taishan Board ............................. Built 1 zonelists Kernel command line: root=/dev/ram rw ip=192.168.1.62:192.168.1.155:::taishan:eth0:off panic=1 c0PID hash table entries: 2048 (order: 11, 32768 bytes) Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 255872k available (1792k kernel code, 568k data, 132k init, 0k highmem) Mount-cache hash table entries: 512 checking if image is initramfs...it isn't (no cpio magic); looks like an initrd Freeing initrd memory: 1170k freed NET: Registered protocol family 16 PCI: Probing PCI hardware JFFS2 version 2.2. (NAND) (SUMMARY) (C) 2001-2003 Red Hat, Inc. io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 4 ports, IRQ sharing enabled serial8250: ttyS0 at MMIO 0x0 (irq = 0) is a 16550A serial8250: ttyS1 at MMIO 0x0 (irq = 1) is a 16550A RAMDISK driver initialized: 16 RAM disks of 65536K size 1024 blocksize PPC 4xx OCP EMAC driver, version 3.54 mal0: initialized, 4 TX channels, 4 RX channels rgmii0: input 0 in RGMII mode eth0: emac2, MAC 00:0c:4f:35:00:02 eth0: found ET1011C Gigabit Ethernet PHY (0x01) rgmii0: input 1 in RGMII mode eth1: emac3, MAC 00:0c:4f:35:00:03 eth1: found ET1011C Gigabit Ethernet PHY (0x03) e100: Intel(R) PRO/100 Network Driver, 3.5.10-k2-NAPI e100: Copyright(c) 1999-2005 Intel Corporation PPP generic driver version 2.4.2 NET: Registered protocol family 24 TAISHAN flash mapping: Found 2 x16 devices at 0x0 in 32-bit bank Amd/Fujitsu Extended Query Table at 0x0040 TAISHAN flash mapping: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. Creating 5 MTD partitions on "TAISHAN flash mapping": 0x00000000-0x00180000 : "Kernel" 0x00180000-0x00380000 : "Ramdisk" 0x00380000-0x03e00000 : "FlashFS" 0x03e00000-0x03f80000 : "kDiags" 0x03f80000-0x04000000 : "U-Boot" i2c /dev entries driver IBM IIC driver v2.1 ibm-iic0: using standard (100 kHz) mode ibm-iic1: using standard (100 kHz) mode NET: Registered protocol family 2 IP route cache hash table entries: 4096 (order: 2, 16384 bytes) TCP established hash table entries: 16384 (order: 4, 65536 bytes) TCP bind hash table entries: 16384 (order: 4, 65536 bytes) TCP: Hash tables configured (established 16384 bind 16384) TCP reno registered TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 eth0: link is down IP-Config: Guessing netmask 255.255.255.0 IP-Config: Complete: device=eth0, addr=192.168.1.62, mask=255.255.255.0, gw=255.255.255.255 , host=taishan, domain=, nis-domain=(none), bootserver=192.168.1.155, rootserver=192.168.1.155, rootpath= RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem). Freeing unused kernel memory: 132k init eth0: link is up, 100 FDX, pause enabled AMCC Startup utility launched.
BusyBox v1.2.1 (2006.10.19 Please press Enter to activate this console.
BusyBox v1.2.1 (2006.10.19-23:15+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands.
~ #
I appreciate for your time and help.
Thanks,
Senthil