• Home
  • Help
  • Search
  • Login
  • Register
Pages: 1 [2]
Author Topic: Env setup for: uboot from mmccard, if fails then boot from usb sequence  (Read 4489 times)
restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #15 on: September 09, 2009, 11:43:10 AM »

Normally, I wouldn't respond here, since I have little of value to add, but since this seems addressed to me:

Frankly, I've never attempted to boot from a USB device (except to load the OS from a thumb drive as part of alpha-6).  I consider the USB subsystem to be too fragile to reliably boot from, especially if you use a hub and several USB devices.  (This seems to be more of a Uboot phenomenon;  once booted, Ubuntu seems to be much more robust in how USB devices are handled.)

I am a bit curious though:  What does an SDcard presented through a USB reader look like?  Does it look like an mmc device or an sd device, or something else?  It sounds like it presents itself as a usb device.  In that case, I would guess "ext2load usb 0:1 0x800000 /uImage" would be in order, although this is sheer speculation as I've never tried anything like this.
Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #16 on: September 09, 2009, 01:49:20 PM »

I am a bit curious though:  What does an SDcard presented through a USB reader look like?  Does it look like an mmc device or an sd device, or something else? 
It will look like a USB device.  The adaptor you put it into makes it look like USB - just as that adaptor in an external USB disk drive makes an PATA/SATA device look like a USB one.
Logged

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #17 on: September 09, 2009, 07:30:03 PM »

restamp, birdman,

Yes, I confirm birdman's last post.  I was trying to boot as restamp suggested.  In fact that was based on what I had success with when the kernel is in nand.  After that the same sdcard can booted as an sdcard in the mmc slot or as a usb device in the usb slot thru the adapter. 

Furthermore, with identical ext2 filesystems, and the whole set of files copied over to a usb hardrive (with rsync),  for rootfs booting purposes from the harddrive, or the sdcard thru the adapter in the usb slot, no enviroment changes are needed in uboot.  Simply put one or the other in and hit boot; for me the usb drive needed a 10 delay, and the sdcard may work with a 5 sec delay, but I use 10 sec for both.

With the uImage on the rootfs externally as /uImage, the commands in the multi boot wiki worked fine --- I test as single boot also.  But I cannot get either the sdcard or the usbdrive to boot from the usb.

So I repeat my quetiion:  does anybody know for the multi boot in our Wiki for usb boot, are the parameters given when the uImage is in the same boot partition as the rootfs, or there was a separate volume for the uImage?

I have not done this yet, but I feel I can get a mixed-type of multi boot working by booting from the sdcard slot as in the wiki, and then using my older kernel in nand, rootfs in usb bootcmd portion as he second in the mutliboot chain.  Of course this would not allow nand boot as the third one...
« Last Edit: September 09, 2009, 07:36:08 PM by CqCn » Logged

Cordially, CqCn

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #18 on: September 10, 2009, 09:39:13 PM »

Two related questions:

1. In the multi boot wiki page there are references to both usb0:1 and usb 0:1.  Are both forms correct?  What is he semantics of usb0:1 ?

2.  There is also an initird section there, what is that for?
Code:
bootargs_usb=console=ttyS0,115200 root=/dev/sda1 ro panic=10 rootdelay=10
bootcmd_usb1=setenv bootargs $(bootusb_args); usb start; ext2load usb 0:1 0x00200000 /boot/uImage
bootcmd_usb2=ext2load usb 0:1 0x01100000 /boot/uInitrd; bootm 0x00200000 0x01100000
bootcmd=run bootcmd_usb1; run bootcmd_usb2; run bootcmd_nand
Logged

Cordially, CqCn

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #19 on: September 11, 2009, 07:51:49 PM »

Until today, I was too busy; was getting only a half hour or so everyday to work on my plug.  So today I methodically manually tested it.  Suspecting multiple problems was the reason I kept asking all those clarifications, I did have multiple problems!!

1.  The multi boot wiki page had a type it has to be 'usb 0:1', not as shown there 'usb0:1'.   When I asked my question in a couple of posts ago, I might not have been clear about it; I had other problems that is why I could not find it by simply trying it.  [In fact I had post a question about this at the Wiki page about this, yesterday I think.]

2.  With the above correction,  the boot now succeeds but not every time, from the sdcard in usbslot (w/ adapter).  There appears to be some 'mode' type problem or 'timing'.  I have a feeling if I simply repeat the same command 3 times (not tried yet) in the multiboot line, it might succeed a lot more frequently.

3.  My usb hardrive has not succeeded once yet, I do not not again it is the same type of problem where it might succeed only say once in 10, or the drive is incompatible.  When I try to do manually usb start, sometimes it sees two usb devices, some times one ( I have only one), but most time it does not see my drive; but a few times it see the drive.  So I surmise, if I keep repeating the command, once in a while the usb drive might  work too.

I know that for the linux load there is that delay, I wonder if that delay is effective for the kernel boot too, or even a higher delay is needed when the kernel comes off of the usb drive.  [I hope not all got tired of this thread and at least a few people would see the results --- it took a long time of experimentation -- I gave up all tennis watching today Smiley ]
« Last Edit: September 11, 2009, 07:53:21 PM by CqCn » Logged

Cordially, CqCn

CqCn
Full Member
***

Karma: 0
Posts: 169



View Profile
« Reply #20 on: September 12, 2009, 01:32:55 PM »

This is a followup to my own last post here.

My guess beiw about a buggy 'mode' in the usb start interface (?) appears right.  If I add 3 repetitions of the same run usb boot in the multiboot cmd chain, then every time it fails on the first time, and every time so far, it boots on the second attempt!!  Probably a subset of the command is all that is needed before the actual usb boot run cmd; but just repeating the full commands adds less than 2 seconds to the whole boot!  In about 10 consecutive boots under various conditions, with usb drive or sdcard from usb adapter, third repetition was never hit once!



Logged

Cordially, CqCn

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #21 on: September 12, 2009, 05:13:07 PM »

If I add 3 repetitions of the same run usb boot in the multiboot cmd chain, then every time it fails on the first time, and every time so far, it boots on the second attempt!!
This alternating miss/hit behavior -- if it fails, it always succeeds on the second attempt -- has been reported before, although I cannot point you to the thread where it was first observed.  It was some time ago, though.
Logged

Pages: 1 [2]
Print
Jump to: