[U-Boot-Users] boot kernel from flash
Wolfgang Denk
wd at denx.de
Sun May 8 12:12:11 CEST 2005
In message <1115544065.6600.7.camel at localhost> you wrote:
>
> 1. erase 0x100000 0x3fffff (0x100000--0x3fffff is flash room for kernel)
> 2. 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.
> 3. using kermit to transfer uImage from ttyS0
> 4. 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???
> 5. setenv bootcmd bootm 0x100000
> 6. 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:
> 1. tftp 0x10000000 (0x10000000 is ram address)
> 2. erase 0x100000 0x3fffff
> 3. cp.b 0x10000000 0x100000 $(filesize)
> 4. 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
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have been over into the future, and it works.
- Lincoln Steffens in _Letters_ (1938) vol. 1, p. 463
More information about the U-Boot
mailing list