• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2 3
Author Topic: GuruPlug Server Plus Boot from microSD  (Read 28429 times)
popon
Newbie
*

Karma: 3
Posts: 24


View Profile
« on: May 11, 2010, 04:23:35 AM »

 I bought a microSD (4GB class6 kingmax). It is success  to be recognized by guruplug.
  I noticed there is no information about how to prepare a microSD for booting.
  Could anyone  give me a hint about it?
Logged

peter a
Full Member
***

Karma: 0
Posts: 132


View Profile
« Reply #1 on: May 11, 2010, 05:49:30 AM »

How I did it for the Sheevaplug was with :-

http://www.cyrius.com/debian/kirkwood/sheevaplug/unpack.html

But I guess someone made to make a Guruplug tar ball now.
Logged

dacota
Newbie
*

Karma: 2
Posts: 8


View Profile
« Reply #2 on: May 11, 2010, 07:40:16 AM »

I have also been trying to do the same thing, but have encountered the following problems when using the various bits of information i could find.

1) Version of u-boot shipping with the Guruplug Server Plus does not have ext2load.  Also I haven't seen mmcinit anywhere in the help prompt.

2) I am pretty certain the microSD card is seen as a USB device, so the device shows up as sdb (on my system).

I've started going through the process to upgrade u-boot but I have no idea how to create the cross-compile tool chain on my amd64 install.  Also I don't know what version of u-boot shipped originally so I don't know if it's needed.  If anyone has guidance on how to boot from the microSD or thoughts on what to do, I would greatly appreciate it!
Logged

peter a
Full Member
***

Karma: 0
Posts: 132


View Profile
« Reply #3 on: May 11, 2010, 12:54:29 PM »

it looks like lots are been added to the plug web site by the hour , so I guess it won`t be long before we get all the bit.

http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=14
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #4 on: May 11, 2010, 04:50:26 PM »

I think the SD card is "mmc0", assigned to sdb, i.e. not usb:

Code:
nibbler:~# lsusb
Bus 001 Device 004: ID 1058:1010 Western Digital Technologies, Inc.
Bus 001 Device 003: ID 05e3:0726 Genesys Logic, Inc.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB [Hama]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I see only my external USB HDD (as sdc).

I have built a u-boot with the ext2 stuff in it. It runs but does not seem to boot the kernel correctly (nothing happens after "uncompressing kernel....ok" (or so).

I also tried to add the "UBI" stuff, which I think should be able to access the SD card (not sure, though). But that wouldn't link (missing reference to rb_first and other symbols, apparently stuff in include/linux/rbtree.h, no idea what that is).

I took some notes here: http://oinkzwurgl.org/guruplug

Regards,
flipflip
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

ChrisTyler
Newbie
*

Karma: 0
Posts: 7


View Profile WWW
« Reply #5 on: May 11, 2010, 05:08:39 PM »

1) Version of u-boot shipping with the Guruplug Server Plus does not have ext2load.  Also I haven't seen mmcinit anywhere in the help prompt.

2) I am pretty certain the microSD card is seen as a USB device, so the device shows up as sdb (on my system).

I think the SheevaPlug used SPI to communicate with the SD card. On microSD, SPI is an optional protocol. I'm not sure if the other protocol has been fully reverse-engineered, so the switch to microSD appears to have gone hand-in-hand with a switch to a USB-based interface (see the block diagram -- there's a 4-port hub connected to the microSD and the 2 external USB ports).

I suspect that you'll need to use the "usb scan" and "usb storage" commands to find/see your microSD on the guruplug, rather than the "mmcinit" command.
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #6 on: May 11, 2010, 05:29:45 PM »

Yeah, you might be right.
I see a usb device 0x05e3:0x0726 that might well be the card reader. http://www.linux-usb.org/usb.ids doesn't list it (might that be the problem?).

But then the kernel boot log suggests otherwise by talking about mmc and stuff. Need to have a closer look. It's late here.

"usb scan" won't do anything but display the help for the usb command (same as "help usb").
"usb storage" won't do much either (cannot remember what it says). I'll see later.
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

TheDOC
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #7 on: May 14, 2010, 05:50:29 AM »

I didn't try booting a kernel from the microSD card yet. What I did do here is to have the kernel in flash and make the kernel boot the rootfs from the microSD card by setting the environment in u-boot to:
Code:
x_bootargs_root=root=/dev/sdb1 rootdelay=10
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #8 on: May 14, 2010, 05:52:11 AM »

Yeah, that should work.
But I thought having the kernel on the SD card or other usb storage would be nice because you woudn't need to flash it. On the other hand, flashing it isn't a problem.
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

TheDOC
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #9 on: May 14, 2010, 06:32:13 AM »

Yes, I think having the Kernel on the microSD card would be the optimum that I'm working towards as well. Hoperfully the globalscale guys update the wiki with a tutorial how to boot the kernel from the microSD card. Smiley
Logged

TheDOC
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #10 on: May 14, 2010, 07:14:48 AM »

I've only managed to boot a kernel from an usb stick plugged into the guruplug and formatted with the fat filesystem (fat because the vanilla u-boot from plugcomputer.org doesn't contain ext2 support):

Code:
usb start
set bootargs 'console=ttyS0,115200 ro root=/dev/sdb1 rootdelay=10'
fatload usb 1:1 0x06400000 uimage-guruplug
bootm 0x06400000

Trying to create a fat partition on the microsd card, it isn't recognized by the u-boot plug. Then it actually should read
Code:
...
root=/dev/sdb2
...
fatload usb 0:1 0x06400000 uimage-guruplug
...
For that test I partitioned the first partition of the microsd card to be an 100MB fat partition and the second partition to be the ext3 holding the rootfs. Unfortunately the u-boot cannot read the fat on partition 1:
Code:
Marvell>> fatls usb 0:1
Device NOT ready
   Request Sense returned 02 3A 00
** Can't read from device 0 **

** Unable to use usb 0:1 for fatls **
whereas the fatls on the external usb stick succeeds:
Code:
Marvell>> fatls usb 1:1
  2688588   uimage-guruplug
  7173509   uimage-guruplug.vmlinux

2 file(s), 0 dir(s)

« Last Edit: May 14, 2010, 07:24:21 AM by TheDOC » Logged

TheDOC
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #11 on: May 14, 2010, 07:18:41 AM »


I also tried to add the "UBI" stuff, which I think should be able to access the SD card (not sure, though). But that wouldn't link (missing reference to rb_first and other symbols, apparently stuff in include/linux/rbtree.h, no idea what that is).
The UBI stuff is only usable on mtd devices, which the microsd card isn't. So you only need the UBI stuff for the internal flash of the guruplug.
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #12 on: May 14, 2010, 08:01:23 AM »

I've only managed to boot a kernel from an usb stick plugged into the guruplug and formatted with the fat filesystem (fat because the vanilla u-boot from plugcomputer.org doesn't contain ext2 support)

Hmm.. I only tried ext2 partitions of different size on different storage devices (built-in sdcard, external usb hdd, external memory sticks) but u.boot would only find the internal sdcard reader (i think) but is unable to load it:

Code:
GuruPlug>> usb start
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 3 USB Device(s) found
       scanning bus for storage devices... Device NOT ready
   Request Sense returned 02 3A 00
1 Storage Device(s) found

GuruPlug>> usb dev 0:3

USB device 0:
    Device 0: Vendor: Generic  Rev: 9909 Prod: STORAGE DEVICE 
            Type: Removable Hard Disk
            Capacity: not available
... is now current device

GuruPlug>> usb part
## Unknown partition table
GuruPlug>> usb info 3

config for device 3
3: Mass Storage,  USB Revision 2.0
 -  USB Storage 000000009909
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x05e3  Product 0x0726 Version 153.9
   Configuration: 1
   - Interfaces: 1 Bus Powered 500mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 In Bulk MaxPacket 512
     - Endpoint 2 Out Bulk MaxPacket 512

The UBI stuff is only usable on mtd devices, which the microsd card isn't. So you only need the UBI stuff for the internal flash of the guruplug.

I understood that now. I tried using it but it fails:

Code:
GuruPlug>>  setenv mtdids nand0=orion_nand
GuruPlug>> setenv mtdparts mtdparts=orion_nand:1m(u-boot),4m@1m(uImage),507m@5m(root)
GuruPlug>> setenv partition nand0,2
GuruPlug>>  ubi part root 2048
Creating 1 MTD partitions on "nand0":
0x000000500000-0x000020000000 : "mtd=2"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI error: validate_ec_hdr: bad VID header offset 512, expected 2048
UBI error: validate_ec_hdr: bad EC header
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error -22
GuruPlug>> ubifsmount root
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:root", error -19
Error reading superblock on volume 'ubi:root'!

The kernel thinks differently about the partitons:

Code:
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "root"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
ata1: SATA link down (SStatus 0 SControl F300)
UBI: attached mtd2 to ubi0
UBI: MTD device name:            "root"
UBI: MTD device size:            507 MiB
UBI: number of good PEBs:        4056
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 4056
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 2/0
UBI: image sequence number: 0
UBI: background thread "ubi_bgt0d" started, PID 454

Any ideas?
Logged

GPS+ Debian Squeeze AP router firewall dhcpd named NAS Squeezebox OpenVPN All running fine.

TheDOC
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #13 on: May 14, 2010, 10:11:42 AM »

Hmm.. I only tried ext2 partitions of different size on different storage devices (built-in sdcard, external usb hdd, external memory sticks) but u.boot would only find the internal sdcard reader (i think) but is unable to load it:
You don't even get the partitions on the usb stick?
My guruplug states with the stick plugged in:
Code:
Marvell>> usb start                                                             
(Re)start USB...                                                               
USB:   Register 10011 NbrPorts 1                                               
USB EHCI 1.00                                                                   
scanning bus for devices... 4 USB Device(s) found                               
       scanning bus for storage devices... Device NOT ready                     
   Request Sense returned 02 3A 00                                             
2 Storage Device(s) found                                                       
Marvell>> usb tree                                                             
                                                                               
Device Tree:                                                                   
  1  Hub (480 Mb/s, 0mA)                                                       
  |  u-boot EHCI Host Controller                                               
  |                                                                             
  +-2  Hub (480 Mb/s, 100mA)                                                   
    |   USB2.0 Hub                                                             
    |                                                                           
    +-3  Mass Storage (480 Mb/s, 500mA)                                         
    |     USB Storage 000000009909                                             
    |                                                                           
    +-4  Mass Storage (480 Mb/s, 200mA)                                         
         Kingston DT 101 II xxxxxxxxxxxxxxxxxx
Logged

TheDOC
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #14 on: May 14, 2010, 10:13:08 AM »

Hmm.. I only tried ext2 partitions of different size on different storage devices (built-in sdcard, external usb hdd, external memory sticks) but u.boot would only find the internal sdcard reader (i think) but is unable to load it:
You don't even get the partitions on the usb stick?
My guruplug states with the stick plugged in:
Code:
Marvell>> usb start                                                             
(Re)start USB...                                                               
USB:   Register 10011 NbrPorts 1                                               
USB EHCI 1.00                                                                   
scanning bus for devices... 4 USB Device(s) found                               
       scanning bus for storage devices... Device NOT ready                     
   Request Sense returned 02 3A 00                                             
2 Storage Device(s) found                                                       
Marvell>> usb tree                                                             
                                                                               
Device Tree:                                                                   
  1  Hub (480 Mb/s, 0mA)                                                       
  |  u-boot EHCI Host Controller                                               
  |                                                                             
  +-2  Hub (480 Mb/s, 100mA)                                                   
    |   USB2.0 Hub                                                             
    |                                                                           
    +-3  Mass Storage (480 Mb/s, 500mA)                                         
    |     USB Storage 000000009909                                             
    |                                                                           
    +-4  Mass Storage (480 Mb/s, 200mA)                                         
         Kingston DT 101 II xxxxxxxxxxxxxxxxxx

And the partition table:
Code:
Marvell>> usb part                                                             
## Unknown partition table                                                     
                                                                               
                                                                               
Partition Map for USB device 1  --   Partition Type: DOS                       
                                                                               
Partition     Start Sector     Num Sectors     Type                             
    1                   63         7839657       6                             
    2              7839720              63      21                             
                                                                               
## Unknown partition table                                                     
                                                                               
## Unknown partition table                                                     
                                                                               
## Unknown partition table

Logged

Pages: [1] 2 3
Print
Jump to: