[U-Boot] [UBoot] Hows to boot Linux Kernel from USB

Hi All,
I would like to know how to boot linux kernel from USB. I have ported UBoot (support serial, USB driver) but didn't support CF card.
Would you please tell me how to boot Linux Kernel from USB Flash memory? I have many guide could help hows to boot Linux kernel from CF card or network but I didn't see help for USB Flash memory.
Here is step by step I did but didn't work. - First initialization USB
=> usb start
- List file on USB Flash memory
=> fatls usb 0:1 3876248 vmlinux.srec 1348231 vmlinux 2207942 vmlinux.bin . 1277956 zimage
- load zImage into SDRAM memory at base address 0x8c000000 + 200000
=> fatload usb 0:1 200000 zimage reading zimage . . . . ................................................................................ ............................................
1277956 bytes read
=> bootm Wrong Image Format for bootm command ERROR: can't get kernel image!
This seems here is wrong command. I should load uImage (not zImage) into SDRAM memory. Google booting kernel from USB on the internet but I didn't see any help. :(
Thank you for answer Best regards,

Albert ARIBAUD wrote:
thaoth a écrit :
This seems here is wrong command. I should load uImage (not zImage) into SDRAM memory.
Hmm... So why don't you ?
Amicalement,
Albert. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
I have tried but not ookay. the same issue.

thaoth a écrit :
Albert ARIBAUD wrote:
thaoth a écrit :
This seems here is wrong command. I should load uImage (not zImage) into SDRAM memory.
Hmm... So why don't you ?
Amicalement,
I have tried but not ookay. the same issue.
(please trim signatures in your replies)
Can you retry and copy-paste the console output? Also, on your development host, can you do a 'file uImage' and copy the result ?
Amicalement,

Can you retry and copy-paste the console output?
... (Re)start USB... USB: scanning bus for devices... cannot reset port 1!? 2 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found => fatload usb 0:1 0x8e000000 uImage reading uImage . . . . ................................................................................ ............................................
1278020 bytes read => bootm * kernel: default image load address = 0x8e000000 Wrong Image Format for bootm command ERROR: can't get kernel image! ...
can you do a 'file uImage' and copy the result ?
... [root@twiki boot]# file uImage uImage: PPCBoot image ...
I tried and send you its log.
Thank you for answer Best regards,

2008/10/1 thaoth thaoth@cybersoft-vn.com:
Can you retry and copy-paste the console output?
... (Re)start USB... USB: scanning bus for devices... cannot reset port 1!? 2 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found => fatload usb 0:1 0x8e000000 uImage reading uImage . . . . ................................................................................ ............................................
1278020 bytes read => bootm
- kernel: default image load address = 0x8e000000
Wrong Image Format for bootm command ERROR: can't get kernel image! ...
can you do a 'file uImage' and copy the result ?
... [root@twiki boot]# file uImage uImage: PPCBoot image ...
I tried and send you its log.
What is the kernel version that you use?

[root@twiki boot]# file uImage uImage: PPCBoot image ...
I tried and send you its log.
What is the kernel version that you use?
I'm using version 2.6.22.11.
Thank you for answer Best regards,

2008/10/1 thaoth thaoth@cybersoft-vn.com:
[root@twiki boot]# file uImage uImage: PPCBoot image ...
I tried and send you its log.
What is the kernel version that you use?
I'm using version 2.6.22.11.
I think that your linux kernel is too old. Please use newest linux kernel or backport arch/sh/boot/Makefile to your kernel.
Best regards, Nobuhiro

Hi,
Nobuhiro Iwamatsu wrote:
2008/10/1 thaoth thaoth@cybersoft-vn.com:
[root@twiki boot]# file uImage uImage: PPCBoot image ...
I tried and send you its log.
What is the kernel version that you use?
I'm using version 2.6.22.11.
I think that your linux kernel is too old. Please use newest linux kernel or backport arch/sh/boot/Makefile to your kernel.
Best regards, Nobuhiro
Use zImage and put cmdline in the zImage and try with this.
load at an address and go <address>
Regards Michael

Dear Michael,
In message 48E32520.20505@gandalf.sssup.it you wrote:
Use zImage and put cmdline in the zImage and try with this.
load at an address and go <address>
No. Please do not make such recommendations.
Even if it should be working for you, this is not the correct way to boot Linux.
Best regards,
Wolfgang Denk

Hi,
Wolfgang Denk wrote:
Dear Michael,
In message 48E32520.20505@gandalf.sssup.it you wrote:
Use zImage and put cmdline in the zImage and try with this.
load at an address and go <address>
No. Please do not make such recommendations.
Even if it should be working for you, this is not the correct way to boot Linux.
Sorry :)
of course this is not the correct way, I know but it can help him to boot linux.
Best regards,
Wolfgang Denk
Regards Michael

I think I made a mistake; I didn’t describe my problem clearly. So, now I fix it. My purpose is: find out a way to boot a Linux Kernel from USB (FAT16).
Here are the steps I‘ve made:
1. Get some kernel images (zImage, uImage) which I built (kernel version 2.6.22.11). 2. Go to the board (T-Engine/SH7727) which is ported U-boot and try some commands: a. usb start b. fatload usb 0:1 0x00200000 uimage c. bootm 0x00200000
And I always get this error: Wrong Image Format for bootm command ERROR: can't get kernel image!
I didn’t set ‘bootargs’ and root file system because I think they will have no effect NOTE: CFG_SDRAM_BASE = 0x8c000000 CFG_LOAD_ADDR = 0x8e000000 Some results, I checked:
[root@twiki boot]# file uImage uImage: PPCBoot image
I also tried: mkimage -A sh -O linux -T kernel -C gzip -a 0x8e000000 -e 0x8e000000 -n Linux -d linux.bin.gz uImage
best regards

Hi,
I tried to boot with ext2 file system and get this result: => usb start (Re)start USB... USB: scanning bus for devices... cannot reset port 1!? 2 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found =>ext2load usb 0:1 0x00200000 uImage ……. 1045127 bytes read => bootm 0x8c200000 * kernel: cmdline image address = 0x8c200000 ## Booting kernel from Legacy Image at 8c200000 ... Image Name: Linux-2.6.22.11 Image Type: SuperH Linux Kernel Image (gzip compressed) Data Size: 974852 Bytes = 952 kB Load Address: 8c002000 Entry Point: 8c002000 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image!
Could you tell me an advice?
NOTE: I think I can have a problem with “Load Address: 8c002000” ?
Best regard.

Hi,
Do i have a problem with "Verifying Checksum ... Bad Data CRC”?
Best regard.

Hi Michael,
Have you try to load your image using tftpboot and put it in memory?
My board don't have Eth port, so we can't try tftpboot
Are you sure that you don't have any problem with memory initialization?
i think i don't have any problem with memory initialization, because i can see my image(using iminfo) on memory.
Best regards,

thaoth a écrit :
can you do a 'file uImage' and copy the result ?
... [root@twiki boot]# file uImage uImage: PPCBoot image
When I look at my own uImages, they come out as:
$ file /var/lib/tftpboot/uImage /var/lib/tftpboot/uImage: u-boot/PPCBoot image
Not sure this is important though.
What version of u-boot mkimage are you using and how do you invoke it?
Amicalement,

On Tue, Sep 30, 2008 at 04:28:44AM -0700, thaoth wrote:
=> bootm Wrong Image Format for bootm command ERROR: can't get kernel image!
This seems here is wrong command. I should load uImage (not zImage) into
Thats it! Get yourself an uImage!
Markus
participants (6)
-
Albert ARIBAUD
-
Markus Klotzbücher
-
michael
-
Nobuhiro Iwamatsu
-
thaoth
-
Wolfgang Denk