Multiple USB devices -booting fails-

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Multiple USB devices -booting fails-

Postby RichardP » Sun Jan 23, 2011 4:35 pm

Hi all,

I have a Pogoplug v2 (pink) with 4 USB ports on it. I install the Arch Linux ARM and all the toys on a USB stick which is all cool. But now I have a USB stick and a USB HDD plugged in and the device boots in-to the PogoPlug Cloudengines system when the External HDD is present.

Is there a specific USB port on the PP to use for to make the USB stick primary and boot from it?

Best Regards,
Richard
RichardP
 
Posts: 5
Joined: Sun Jan 23, 2011 4:32 pm

Re: Multiple USB devices -booting fails-

Postby peaslaker » Wed Jan 26, 2011 7:46 pm

There are two approaches. 1. hack your U-Boot parameters until you have a sensible cascading sequence that always finds your system; 2. Install the kernel to NAND... which will always be found, no matter how many drives you have plugged in.

Option 2 will at least get the kernel up and running at which point there are better options (a ramdisk) for parsing the available drives to find your root filesystem than any you will find in U-Boot.

I'm looking for a someone to test UBIT on the Pogoplug Pink, so if you are up for a bit of experimentation to get a kernel and ramdisk in NAND booting to your satisfaction, let me know.
peaslaker
 
Posts: 101
Joined: Tue Sep 07, 2010 10:40 pm

Re: Multiple USB devices -booting fails-

Postby RichardP » Wed Jan 26, 2011 8:09 pm

$this->bbcode_second_pass_quote('peaslaker', 'T')here are two approaches. 1. hack your U-Boot parameters until you have a sensible cascading sequence that always finds your system; 2. Install the kernel to NAND... which will always be found, no matter how many drives you have plugged in.

Option 2 will at least get the kernel up and running at which point there are better options (a ramdisk) for parsing the available drives to find your root filesystem than any you will find in U-Boot.

I'm looking for a someone to test UBIT on the Pogoplug Pink, so if you are up for a bit of experimentation to get a kernel and ramdisk in NAND booting to your satisfaction, let me know.


Always up for a try.... just need to know the risks
High/Medium/Low : The chances of creating a brick
Restoring back to Original PogoPlug OS?

If its gone bad, is serial reqiured? Can it be recovered without JTAG.
RichardP
 
Posts: 5
Joined: Sun Jan 23, 2011 4:32 pm

Re: Multiple USB devices -booting fails-

Postby peaslaker » Wed Jan 26, 2011 10:12 pm

$this->bbcode_second_pass_quote('RichardP', '
')Always up for a try.... just need to know the risks
High/Medium/Low : The chances of creating a brick
Restoring back to Original PogoPlug OS?

If its gone bad, is serial reqiured? Can it be recovered without JTAG.


The big risk is if we get into replacing U-Boot (but you're running Jeff Doozan's 'Dockstar' U-Boot anyway, aren't you). The small risk is in setting up U-Boot parameters. With both it is quite possible to get a non-booting solution, but it is much safer if we just muck about with parameters.

Returning the system to Pogoplug is a standard feature of UBIT for the Dockstar and GoFlex Net, but to be sure of a solution on the Pogoplug I need to get my hands on verifiable backups of the MTD0 partition. i.e. if you followed the instructions you will have the backups.

The trick for restoring the backups is only to restore the first 512KB of mtd0. If you overwrite the original U-Boot environment it destroys the checksum and you suddenly need a serial cable. None of my modifications touch mtd1 and mtd2, so those are still in place when the original U-Boot is restored.

Don't install Jeff's Rescue system if you want to get back to Pogoplug. Jeff's rescue system overwrites mtd2, so getting back is extra complicated. UBIT provides rescue system functionality anyway, so shouldn't be a problem.
peaslaker
 
Posts: 101
Joined: Tue Sep 07, 2010 10:40 pm

Re: Multiple USB devices -booting fails-

Postby RichardP » Thu Jan 27, 2011 8:04 am

$this->bbcode_second_pass_quote('peaslaker', '')$this->bbcode_second_pass_quote('RichardP', '
')Always up for a try.... just need to know the risks
High/Medium/Low : The chances of creating a brick
Restoring back to Original PogoPlug OS?

If its gone bad, is serial reqiured? Can it be recovered without JTAG.


The big risk is if we get into replacing U-Boot (but you're running Jeff Doozan's 'Dockstar' U-Boot anyway, aren't you). The small risk is in setting up U-Boot parameters. With both it is quite possible to get a non-booting solution, but it is much safer if we just muck about with parameters.

Returning the system to Pogoplug is a standard feature of UBIT for the Dockstar and GoFlex Net, but to be sure of a solution on the Pogoplug I need to get my hands on verifiable backups of the MTD0 partition. i.e. if you followed the instructions you will have the backups.

The trick for restoring the backups is only to restore the first 512KB of mtd0. If you overwrite the original U-Boot environment it destroys the checksum and you suddenly need a serial cable. None of my modifications touch mtd1 and mtd2, so those are still in place when the original U-Boot is restored.

Don't install Jeff's Rescue system if you want to get back to Pogoplug. Jeff's rescue system overwrites mtd2, so getting back is extra complicated. UBIT provides rescue system functionality anyway, so shouldn't be a problem.


Sounds OK to me.. full MTD backups as per the instructions to get Plugos in the device... I have the booting feature enaled so that the Pogoplug boots the stock-standard OS if the USB stick fails.

Are three instructions for UBIT ?
RichardP
 
Posts: 5
Joined: Sun Jan 23, 2011 4:32 pm
Top

Re: Multiple USB devices -booting fails-

Postby peaslaker » Thu Jan 27, 2011 9:44 am

The existing instructions presume installing a new U-Boot for Dockstar and GoFlex Net. What we are doing is a little bit different. All we need though is the U-Boot environment to contain the appropriate boot sequence and to correctly describe the NAND layout to the kernel.

We need to add in the following helper definitions to the U-Boot environment:
$this->bbcode_second_pass_code('', ' nc_test=ping $ncip
nc_start=setenv stdin nc; setenv stdout nc; setenv stderr nc; version
bootcmd_fast=run ubi_boot; run usb_boot; run chain
bootcmd_go=run usb_boot; run ubi_boot; run chain
usb_boot=usb start; run usb_args ext2_kern ext2_boot; run ext2_rd ubi_fallback; usb stop
usb_args=setenv ext2_dev usb 0:1; setenv dev_args root=/dev/sda3 rootdelay=10 rootfstype=ext3; run set_bootargs
ubi_boot=run $ubi_args ubi_rd ubi_fallback
ubi_args=ubi_args_default
ubi_args_default=setenv dev_args ubi.mtd=root root=/dev/sda1; run set_bootargs
ubi_args_tmpfs=setenv dev_args ubi.mtd=root rootfstype=tmpfs; run set_bootargs
chain=nand read.e 0x800000 0x480000 0x80000; go 0x800200
mtdids=nand0=orion_nand
partition=nand0,2
ethact=egiga0
console=ttyS0,115200
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(pogoplug),-(root)
set_bootargs=setenv bootargs console=$console $mtdparts $dev_args netconsole=@$ipaddr/eth0,@$ncipk/
ext2_kern=mw $addr_kern 0 1; ext2load $ext2_dev $addr_kern /boot/uImage
ext2_rd=mw $addr_rd 0 1; ext2load $ext2_dev $addr_rd /uInitrd
ext2_boot=run ext2_rd boot_rd; run boot_kern
ubi_kern=mw $addr_kern 0 1; ubifsmount boot; ubifsload $addr_kern /boot/uImage
ubi_rd=mw $addr_rd 0 1; ubifsmount ramdisk; ubifsload $addr_rd /uInitrd\0" \
ubi_fallback=run ubi_kern boot_rd
boot_kern=bootm $addr_kern
boot_rd=bootm $addr_kern $addr_rd

addr_kern=0x680000
addr_rd=0x1100000
ipaddr=10.10.10.6
ncip=10.10.10.5
ncipk=10.10.10.4
serverip=10.10.10.3
')

Pay close attention to this line and modify it as appropriate for your existing, working, single disk boot - in particular, change root= and rootfstype= as appropriate:
$this->bbcode_second_pass_code('', '
usb_args=setenv ext2_dev usb 0:1; setenv dev_args root=/dev/sda3 rootdelay=10 rootfstype=ext3; run set_bootargs
')

When you are confident that all of those are correctly installed, you can switch the boot sequence over to use 'bootcmd_go':

$this->bbcode_second_pass_code('', '
bootcmd=ubi part root; run bootcmd_go
preboot=run nc_test nc_start
')

This should still boot correctly on your old single drive, but we can now start using some of the UBIT features such as the netconsole.

Next thing to do is to follow the instructions for setting up an install disk. We are not doing a full install so these will need to be modified, but see if you can get this far for now.

UBIT is documented at: http://Arch Linux ARM.com/index.php5?title=Arch Linux ARM:UBIT
peaslaker
 
Posts: 101
Joined: Tue Sep 07, 2010 10:40 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 3 guests