[U-Boot-Users] how to enable autoboot feature in u-boot

Hi, u-boot folks,
I just program my u-boot port in to flash. After press board reset button, u-boot only enters prompt mode, like follows.
U-Boot 1.1.2 (May 6 2005 - 15:58:37)
U-Boot code: 03F80000 -> 03F920B8 BSS: -> 03F93938 RAM Configuration: Bank #0: 00000000 64 MB Flash: 4 MB In: serial Out: serial Err: serial U-Boot #
How to enable the "autoboot" feature? I would like u-boot to auto boot uClinux system after reset/power on.
Hit any key to stop autoboot: 0 ## Booting image at 20100000 ...
Thanks. Wayne

In message 200505060841.j468fA8R013734@ismp.csie.ncku.edu.tw you wrote:
How to enable the "autoboot" feature?
What's your definitions of "bootcmd" and "bootdelay" ?
Best regards,
Wolfgang Denk

WD, you got it. I do not add CONFIG_BOOTCOMMAND. Now the autoboot feature is enabled. :)
Thanks. Wayne
-----Original Message----- From: u-boot-users-admin@lists.sourceforge.net [mailto:u-boot-users-admin@lists.sourceforge.net] On Behalf Of Wolfgang Denk Sent: Friday, May 06, 2005 5:43 PM To: Wayne Lee Cc: 'u-boot-users' Subject: Re: [U-Boot-Users] how to enable autoboot feature in u-boot
In message 200505060841.j468fA8R013734@ismp.csie.ncku.edu.tw you wrote:
How to enable the "autoboot" feature?
What's your definitions of "bootcmd" and "bootdelay" ?
Best regards,
Wolfgang Denk

In message 200505061233.j46CXY8R016074@ismp.csie.ncku.edu.tw you wrote:
WD, you got it. I do not add CONFIG_BOOTCOMMAND. Now the autoboot feature is enabled. :)
Actually you don't have to change the configuration. Just defining the "bootcmd" environment variable will do as well.
Best regards,
Wolfgang Denk

hi,all i want to boot kernel from flash on TI p2-sample rev.6 board. i used:
1. erase 0x100000 0x3fffff (0x100000--0x3fffff is flash room for kernel) 2. loadb 0x100000 3. using kermit to transfer uImage from ttyS0 4. using "iminfo 0x100000", and i found "Bad Magic Number" 5. setenv bootcmd bootm 0x100000 6. boot, but i found "## Booting image at 00100000 ... Bad Magic Number"
i used this uImage file to boot kernel from memory, so kernel image is right! and i tried to use "tftp 0x100000" to download image to flash,and the result is identical.
and i did more testing: 1. tftp 0x10000000 (0x10000000 is ram address) 2. erase 0x100000 0x3fffff 3. cp.b 0x10000000 0x100000 $(filesize) 4. bootm 0x100000
the kernel boot successed! but if i rebooted, and "bootm 0x100000", the kernel stoped when mounted nfsroot fs. the boot information was: .............................. <6>Freeing initrd memory: 4096K Freeing initrd memory: 4096K <5>Looking up port of RPC 100003/2 on 172.16.6.79 Looking up port of RPC 100003/2 on 172.16.6.79
(172.16.6.79 is nfsroot server)
so, what's wrong with it?
thank you!

In message 1115544065.6600.7.camel@localhost you wrote:
- erase 0x100000 0x3fffff (0x100000--0x3fffff is flash room for kernel)
- loadb 0x100000
You cannot load directly to flash. Youmust always write to RAM first, and then use the "cp" command (or cp.b etc.) to write to flash.
- using kermit to transfer uImage from ttyS0
- using "iminfo 0x100000", and i found "Bad Magic Number"
This means that your image was not written to flash (which is not a surprise, as "loadb" is NOT listed as a flash programming command in the manual -- ummm.... You did read the manual, didn't you? Before posting???
- setenv bootcmd bootm 0x100000
- boot, but i found "## Booting image at 00100000 ... Bad Magic Number"
This is to be expeted, too. If there was no valid image after download, it would take a certain amount of magic to be there now.
i used this uImage file to boot kernel from memory, so kernel image is right! and i tried to use "tftp 0x100000" to download image to flash,and the result is identical.
Of course. Because "tftp" is NOT listed as a flash programming command in the manual .. etc.
I REALLY recommend you to READ the manual.
and i did more testing:
- tftp 0x10000000 (0x10000000 is ram address)
- erase 0x100000 0x3fffff
- cp.b 0x10000000 0x100000 $(filesize)
- bootm 0x100000
the kernel boot successed! ...
Of course this works. That's the documented way to do things.
... but if i rebooted, and "bootm 0x100000", the kernel stoped when mounted nfsroot fs. the boot information was: .............................. <6>Freeing initrd memory: 4096K Freeing initrd memory: 4096K <5>Looking up port of RPC 100003/2 on 172.16.6.79 Looking up port of RPC 100003/2 on 172.16.6.79
(172.16.6.79 is nfsroot server)
Probably a configuration problem with your NFS server?
Best regards,
Wolfgang Denk

In message 1115547970.6600.13.camel@localhost you wrote:
Probably a configuration problem with your NFS server?
there isn't a configuration problem with my NFS server. because i can boot image from ram and can boot image from flash when not rebooting the board.
Well, if you had provided sufficient information (like the complete log of all boot messages including especially the boot arguments passed to the kernel [ideally for both the working and the non-working configurations]) there might have been a chance to help you.
Without such information I cn only say you're doing something wrong. The behaviour of the kernel does NOT depend on where it's been stored when running "bootm".
Best regards,
Wolfgang Denk

Well, if you had provided sufficient information (like the complete log of all boot messages including especially the boot arguments passed to the kernel [ideally for both the working and the non-working configurations]) there might have been a chance to help you.
i set bootargs blank, and set CONFIG_CMDLINE="root=/dev/nfs nfsroot=172.16.6.79:/opt/montavista/cee/devkit/arm/v4t_le/target ip=172.16.7.180:172.16.7.180:172.16.6.1:255.255.254.0 console=ttyS0,115200 mem=32M" when booting from ram and flash.
i used tcpdump on the nfs server, and found no packets from my board when booted from flash.
i did nothing different to boot kernel from ram and flash.

In message 1115622690.10065.15.camel@localhost you wrote:
i set bootargs blank, and set CONFIG_CMDLINE="root=/dev/nfs nfsroot=172.16.6.79:/opt/montavista/cee/devkit/arm/v4t_le/target ip=172.16.7.180:172.16.7.180:172.16.6.1:255.255.254.0 console=ttyS0,115200 mem=32M" when booting from ram and flash.
I bet you did set bootargs, and if just to the pre-configured value.
I really don't understand why you don't provide the information I asked for. You can as well stop posting your questions then because I won't be able to help anyway.
i used tcpdump on the nfs server, and found no packets from my board when booted from flash.
Maybe you should read the FAQ, especially http://www.denx.de/twiki/bin/view/DULG/EthernetDoesNotWorkInLinux
Best regards,
Wolfgang Denk

i'm sorry:) i found kernel not set Ethernet addr when booted from flash. i will read kernel/net-device_driver thanks!!!
boot log:
smc91x.c: v1.0, mar 07 2003 by Nicolas Pitre nico@cam.org smc91x.c: v1.0, mar 07 2003 by Nicolas Pitre nico@cam.org eth0: SMC91C94 (rev 9) at 0xe8000300 IRQ 38 [nowait] eth0: SMC91C94 (rev 9) at 0xe8000300 IRQ 38 [nowait] eth0: Ethernet addr: eth0: Ethernet addr: ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff ff
/************************/ when boot from ram:
eth0: Ethernet addr: eth0: Ethernet addr: 00:00:50:50:c2:c2:35:35:b0:b0:6a 6a /************************/
<6>OMAP730 I2C INFO: Driver ver. 1.1 OMAP730 I2C INFO: Driver ver. 1.1 <7>i2c-dev.o: Registered 'OMAP730 I2C adapter' as minor 0 OMAP730 NOR FLASH: MTD Self-Contained Driver ver. 1.0 OMAP730 NOR FLASH: MTD Self-Contained Driver ver. 1.0 <6>OMAP730 NOR FLASH: Intel 28F256L18T found OMAP730 NOR FLASH: Intel 28F256L18T found <5>Creating 4 MTD partitions on "OMAP730 NOR FLASH": Creating 4 MTD partitions on "OMAP730 NOR FLASH": <5>0x00000000-0x00100000 : "BootLoader and Params" 0x00000000-0x00100000 : "BootLoader and Params" <5>0x00100000-0x00400000 : "Kernel" 0x00100000-0x00400000 : "Kernel" <5>0x00400000-0x01fe0000 : "MainFS" 0x00400000-0x01fe0000 : "MainFS" <5>0x01fe0000-0x02000000 : "GsmFFS" 0x01fe0000-0x02000000 : "GsmFFS" <6>DSPLinux FB (c) 2001 RidgeRun, Inc. DSPLinux FB (c) 2001 RidgeRun, Inc. Console: switching Console: switching to colour frame buffer device 22x27 to colour frame buffer device 22x27 <6>NET4: Linux TCP/IP 1.0 for NET4.0 NET4: Linux TCP/IP 1.0 for NET4.0 <6>IP Protocols: IP Protocols: ICMP, ICMP, UDP, UDP, TCP TCP <6>IP: routing cache hash table of 512 buckets, 4Kbytes IP: routing cache hash table of 512 buckets, 4Kbytes <6>TCP: Hash tables configured (established 2048 bind 4096) TCP: Hash tables configured (established 2048 bind 4096) IP-Config: Complete:IP-Config: Complete: device=eth0 device=eth0, addr=172.16.7.180, addr=172.16.7.180, mask=255.255.254.0, mask=255.255.254.0, gw=172.16.6.1, gw=172.16.6.1, host=172.16.7.180, domain=, nis-domain=(none), host=172.16.7.180, domain=, nis-domain=(none), bootserver=172.16.7.180, bootserver=172.16.7.180, rootserver=172.16.6.79, rootserver=172.16.6.79, rootpath=, rootpath=
<6>NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. <4>NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com <5>RAMDISK: Couldn't find valid RAM disk image starting at 0. RAMDISK: Couldn't find valid RAM disk image starting at 0. <6>Freeing initrd memory: 4096K Freeing initrd memory: 4096K <5>Looking up port of RPC 100003/2 on 172.16.6.79 Looking up port of RPC 100003/2 on 172.16.6.79

In message 1115625341.10065.24.camel@localhost you wrote:
i'm sorry:)
You should be sorry. If you had posted the full log of the boot messages as I requested I might have spotted this before.
i found kernel not set Ethernet addr when booted from flash. i will read kernel/net-device_driver thanks!!!
boot log:
smc91x.c: v1.0, mar 07 2003 by Nicolas Pitre nico@cam.org smc91x.c: v1.0, mar 07 2003 by Nicolas Pitre nico@cam.org eth0: SMC91C94 (rev 9) at 0xe8000300 IRQ 38 [nowait] eth0: SMC91C94 (rev 9) at 0xe8000300 IRQ 38 [nowait] eth0: Ethernet addr: eth0: Ethernet addr: ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff ff
/************************/ when boot from ram:
eth0: Ethernet addr: eth0: Ethernet addr: 00:00:50:50:c2:c2:35:35:b0:b0:6a 6a
You seem to have moire poroblems, like the driver initialization being run twice.
Best regards,
Wolfgang Denk
participants (3)
-
Wayne Lee
-
Wolfgang Denk
-
朱 成