• Home
  • Help
  • Search
  • Login
  • Register
Pages: 1 [2] 3
Author Topic: GuruPlug Server Plus Boot from microSD  (Read 27866 times)
flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #15 on: May 14, 2010, 10:25:34 AM »

So far I get a 4th device (and a valid partition table) only for a CF-card in an USB card reader. I don't see my external USB HDD, or several memory sticks I've tried. And the USB HDD makes a "click" when I "usb reset".
Logged

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

dacota
Newbie
*

Karma: 2
Posts: 8


View Profile
« Reply #16 on: May 16, 2010, 09:01:19 AM »

Can anyone confirm or identify what version of UBoot originally shipped with the GuruPlugs ? I'm curious if the patch, mentioned here: http://git.denx.de/?p=u-boot/u-boot-marvell.git;a=commit;h=36338b868f471e1ca9a0c3261d0709cd6997e69e, got picked up properly.
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #17 on: May 16, 2010, 10:12:19 AM »

I don't remember which version it was shipped with. But I imagine that it wouldn't work at all without that patch (hardware configuration in guruplug.h).
Logged

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

dacota
Newbie
*

Karma: 2
Posts: 8


View Profile
« Reply #18 on: May 16, 2010, 11:41:04 AM »

I may be wrong here, and i'm not trying to be a troll or cause any sort of arguement; but what's listed for the SheevaPlug dev kit and the Guruplug..

SheevaPlug: http://www.globalscaletechnologies.com/t-sheevaplugdetails.aspx#component
GuruPlug: http://www.globalscaletechnologies.com/t-guruplugdetails.aspx#component

Seem to point to simular hardware arch (same processing core, same microcontroller, etc); the only flaw I can see in my argument based on the block diagrams, is the wireless/bluetooth isn't on the SheevaPlug and that does seem to be working properly; So I would think that is is possible that the hardware would work without the patch.

I want to say that the version I saw (I'm not near my plug) was a 2009 build date; but I have no way to confirm.  If your re-compile of uboot came from the git repository then I'll drop this line of thinking.

.....
After thinking about this all more and looking on the site some more, I came across something that made me curious...
"1x Internal MicroSD Socket for Optional Kernel System"

Then I remembered this thread about the standard version: http://plugcomputer.org/plugforum/index.php?topic=1568.0

So, has anyone opened up the guruplug to see if the internal uSD slot is populated (read: there) and if that is the device that shows up on the usb scan ? -- i'm sure this is way off in left field, but the above thread mentions that there is no socket on the non-plus version but the FCC pictures do show what looks to be an internal uSD socket.
« Last Edit: May 16, 2010, 12:19:09 PM by dacota » Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #19 on: May 16, 2010, 02:42:22 PM »

I don't know if an old u-boot would work or not. I've just seen numerous hardware-specific stuff in the guruplug files in u-boot (hardware addresses, memory configuration, etc.).

I just found in my notes what I think was the shipped version of u-boot (but it might also be the version that can be found in the "guruplug-installer" tarball:

U-Boot 2009.11-rc1-00602-gff67d57 (Feb 08 2010 - 03:53:16)

And yes I opened it and I didn't see much. I didn't wanted to take the two PCBs apart and there was a big massive cooling plate mounted to the sandwich as well. On the top layer there was an unpopulated space that might for a sd card slot. I didn't look to closely and I didn't take any pictures. And "lsusb"

On the usb bus I see the "05e3:0726 Genesys Logic, Inc." storage device that apparently is the sd card reader. I don't know how to read the following "lsusb" output. There are two "endpoint descriptors".. whatever that means..

Code:
Bus 001 Device 003: ID 05e3:0726 Genesys Logic, Inc.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0726
  bcdDevice           99.09
  iManufacturer           0
  iProduct                1 USB Storage
  iSerial                 2 000000009909
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)
Logged

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

dacota
Newbie
*

Karma: 2
Posts: 8


View Profile
« Reply #20 on: May 16, 2010, 04:00:29 PM »

Since I haven't had time to actually start to try to hack my GuruPlug yet, I can't confirm what version is on mine right now, in a day or two when i'm back home I'll take a peek.

The two endpoint devices from the lsusb seems consistent with the block diagram that was in the FCC documents.

https://fjallfoss.fcc.gov/prod/oet/forms/blobs/retrieve.cgi?attachment_id=1271698&native_or_pdf=pdf

bEndpointAddress     0x81  EP 1 IN  : would seem to indicate the internal one (I'm guessing here)
bEndpointAddress     0x02  EP 2 OUT : would seem to indicate the external one (also guessing)

I'm also going to see if i can tear mine apart and take a picture or two, to see if the uSD slot is there.  I'll post my mindings.  However what i was refering to when mentioning the picture that shows 2x uSD slots is this:
https://fjallfoss.fcc.gov/prod/oet/forms/blobs/retrieve.cgi?attachment_id=1271704&native_or_pdf=pdf

The second image (lower part of first page) shows the view with the sd card slot and a metal cover that says lock/unlock the metal cover should be the internal uSD slot.

(Update) I've confirmed that J3 is unpopulated which means no internal card reader, it seems very peculiar but nothing that can be done about it unless someone wants to try to mount a socket there.

Shot of the internal board, you can see the unpopulated spot
http://picasaweb.google.com/lh/photo/2-RfgldjO95d_3pXXLUbm6v5OmN6hYgphgZBdvkzj4E?feat=directlink

(edit) Provided picture of the internals of my GuruPlug Server Plus, as well as corrected link to FCC internal pictures. (/edit)
« Last Edit: May 17, 2010, 08:37:43 AM by dacota » Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #21 on: May 17, 2010, 02:25:57 AM »

OK, nice to know.

My kernel assigns two USB "SCSI" devices, /dev/sda and /dev/sdb. The latter is the uSD card. The former would probably be the unused slot.

I'm currently loading the kernel from flash. Then I use the nand/ubi "root" partition (507MiB) as / and I mount swap (512M), /var (1G), /tmp (1G) and /usr (the rest) from an 8GB uSD card. I had to add some delay (sleep 20) as /etc/rcS.d/S01wait.sh so that the USB partitions are ready when the later start scripts want to mount /var, /tmp etc. One should probably do a proper "wait for /dev/sdb[1234] to become available" but the sleep 20 works fine, too..

I'm fine with all that for now and I plan to focus more on setting the plug up as access point, router, NAS etc.
Logged

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

dacota
Newbie
*

Karma: 2
Posts: 8


View Profile
« Reply #22 on: May 17, 2010, 08:44:21 AM »

I really appreciate the info that you have found that works flipflip.  I'm wanting to get the entire fs on the uSD more so for the ease of it.  But until I can find something that works, I might replicate what you have done.

Are the steps to what you have done on the site that you referenced earlier?

TIA

btw, I've decided to try to populate the internal uSD slot myself, and I have ordered a part that I am hoping will work, if it does and i don't fry my guruplug trying to install it, i will provide a direct link to the part.
Logged

flipflip
Jr. Member
**

Karma: 4
Posts: 50


Hopplaschorsch!


View Profile
« Reply #23 on: May 17, 2010, 09:23:19 AM »

Yes. What I did is this:

1. built new u-boot from sources with more options
2. flashed that u-boot
3. built a custom kernel
4. installed that kernel into the rootfs
5. flashed the kernel
6. dist-upgraded the system to debian squeeze
7. moved some stuff to the sd card (/var, /tmp, /usr, and swap)

You can use the u-boot from my page (http://oinkzwurgl.org/guruplug) but it's probably not necessary, it should work with the shipped one as well.
You can also use the kernel from my page. It would probably also work with the shipped kernel.

Then you need to copy the rootfs to the sd card. You can just copy it or use dbootstrap to install a vanilla one (don't forget to install a suitable kernel into it then!). You should then be able to boot using "root=/dev/sdb1" kernel arguments (or whatever device/partition the system is on).

I didn't change the root fs, i.e. I don't really know if root=/dev/sdb1 works because the usb subsystem needs some time to find all the devices and the kernel tries to mount the root fs possibly before it is available. Maybe the kernel tries several times or there's an option for a delay. I kept the root fs on the flash and added a 15'' delay as the very first boot script so that the other partitions will be available once the bootscripts want mount them.

If you create a new system don't forget to save the /usr/bin/uaputl and /lib/firmware/mrvl/* files.
Logged

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

popon
Newbie
*

Karma: 3
Posts: 24


View Profile
« Reply #24 on: May 26, 2010, 04:19:34 AM »

I finally found out a simple method to boot from microSD.
I refered :
http://plugcomputer.org/plugwiki/index.php/SD_Card_As_Root_File_System
http://paulfedora.wordpress.com/
The procedure is :

1) My guruplug server plus recognizes the microSD as /dev/sdb, prepare microSD as:
  #fdisk /dev/sdb
   press "o"  / create a new partition table
   press "n"  / create a new partition
   press "p"  / it's a primary partition
   press "1"  / partition #1
   press enter / default first cylinder
   press enter / default last cylinder
   press "a"  / set the boot flag
   press "1" / ... for partition #1
   press "w" / save changes
   
#mkfs -t  ext3 /dev/sdb1
#mkdir /mnt/sdcard
#mount /dev/sdb1 /mnt/sdcard

2) copy files of Guruplug into microSD as:
#cp -axv / /mnt/sdcard
#cp -av /dev /mnt/sdcard
 By about two steps, the bootable microSD is available

3)  The next is how to boot the microSD,  do
#ls -l /dev/sd*
brw-rw---- 1 root floppy 8,  0 2009-08-08 16:48 /dev/sda
brw-rw---- 1 root floppy 8, 16 2009-08-08 16:48 /dev/sdb
brw-rw---- 1 root floppy 8, 17 2009-08-08 16:48 /dev/sdb1
the major and minor device numbers for /dev/sdb1′ which I put the rootfs on, are 8 and 17 respectively.
That number needs to be converted to hex, for entry in Uboot -- 8,17 in decimal converts to 8,11 in Hex,
for entry in Uboot this will be entered as 0811′.

4) Reboot the GuruPlug and this time hit any key before the system boots into Debian. Once at the Marvell prompt type:
Marvell>> nand read.e 0x6400000 0x100000 0x400000
Marvell>> setenv bootargs console=ttyS0,115200 root=0811 rootdelay=10
Marvell>> bootm 0x6400000

This should  boot the debian from microSD.
#df
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   256716         0    256716   0% /lib/init/rw
udev                     10240       716      9524   7% /dev
tmpfs                   256716         4    256712   1% /dev/shm
rootfs                 3846128    571692   3079064  16% /
tmpfs                   256716         0    256716   0% /var/cache/apt

If you want to save the paramaters, and let it be true in the next time to boot, do
Marvell>> editenv x_bootargs_root
edit: ubi.mtd=2 root=0811 rootdelay=10
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x40000 -- 100% complete.
Writing to Nand... done
Marvell>> reset

That all.

Logged

TheDOC
Newbie
*

Karma: 1
Posts: 15


View Profile
« Reply #25 on: May 26, 2010, 09:50:37 AM »

@popon: Well, what you are doing is booting the rootfs from the microsd card. How this can be achieved is explained very early in this thread. The problem is getting the kernel from inside uboot out of the microsd filesystem (and accessing the microsd card from uboot at all).
Logged

popon
Newbie
*

Karma: 3
Posts: 24


View Profile
« Reply #26 on: May 26, 2010, 03:26:06 PM »

What I wrote is available to the guruplug server plus shipped out  ( U-Boot 2009.11-rc1-00602-g28a9c08-dirty ).
In this case, some commands of U-boot as mentioned  early in this thread is not available, at least in my case.
As you pointed out it does not solve the kernel problem, I think it is useful to the people who does not want to
update the version of U-boot.


Logged

uwgandalf
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #27 on: May 30, 2010, 08:39:15 AM »

I've followed the instructions and copied files to sd then boot to sd with kernel line 'root=/dev/sdb1' works ok, but df and mount show weird stuff, it's correctly reporting a 8GB sd card, but shows the filesystem type as rootfs, while the sd card is mounted and partitioned as ext4.
Logged

uwgandalf
Newbie
*

Karma: 0
Posts: 10


View Profile
« Reply #28 on: May 30, 2010, 10:16:36 AM »

fixed that, had to add a root entry in /etc/fstab
Logged

guidol
Full Member
***

Karma: 10
Posts: 128



View Profile
« Reply #29 on: June 08, 2010, 08:03:05 AM »

fixed that, had to add a root entry in /etc/fstab

could you please post your root entry? THX :-)

BTW: Martin Michlmayr is searching for Boot-Install-Tester with the guruplug-device:
http://lists.debian.org/debian-arm/2010/06/msg00013.html
or for Sheevaplug eSATA take a look at
http://lists.debian.org/debian-arm/2010/06/msg00012.html
« Last Edit: June 09, 2010, 05:22:08 AM by guidol » Logged

Pages: 1 [2] 3
Print
Jump to: