Thursday, September 30, 2010

GuruPlug Plus Gets a New OS - Redux, part 1 (connecting)

I should have mentioned in my first post about updating the GuruPlug what my goals were.  Here are my initial goals:
  • Modern uboot
  • Modern kernel
  • As little compiling of custom binaries as possible (leverage other peoples work)
  • Fedora ARM for the OS booted from a 8GB micro-SDHC card
  • eSATA support for the data drives
  • Logical Volume Management (LVM) for the data drives
  • LUKS encryption for the data drives
  • NFSv4 server
Previously I wrote about loading a new operating system on the GuruPlug Plus.  After that I did some work on upgrading uboot & the kernel.  Because upgrading uboot nukes some of the previous work, I'm going to present the 1,2,3 approach to upgrading uboot, the kernel, and getting a working Fedora ARM system with the least amount of work.  I'm writing specifically about the GuruPlug Plus, but in general it should also apply to the non-Plus model.

In order to do this upgrade, you should have a working tftp server, the GuruPlug JTAG board, and about an hour of time.


Connecting to the GuruPlug
The first thing you'll want to do is make sure you can communicate with the plug.  You'll need to hook up the JTAG board and mini-USB cable according to the directions in the Quick Start Guide.  I'm running Fedora 13 on x86_64 and for me it just worked.  When you plug the USB cable into your computer, you'll see something like this in dmesg:
kernel: usb 3-1: new full speed USB device using uhci_hcd and address 9
kernel: usb 3-1: New USB device found, idVendor=9e88, idProduct=9e8f
kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 3-1: Product: SheevaPlug JTAGKey FT2232D B
kernel: usb 3-1: Manufacturer: FTDI
kernel: usb 3-1: SerialNumber: FTTBJ9W7
kernel: usb 3-1: Ignoring serial port reserved for JTAG
kernel: ftdi_sio 3-1:1.1: FTDI USB Serial Device converter detected
kernel: usb 3-1: Detected FT2232C
kernel: usb 3-1: Number of endpoints 2
kernel: usb 3-1: Endpoint 1 MaxPacketSize 64
kernel: usb 3-1: Endpoint 2 MaxPacketSize 64
kernel: usb 3-1: Setting MaxPacketSize 64
kernel: usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0
From this output, you can tell that the communications for the GuruPlug serial port will happen on ttyUSB0 (yours may be different).  At this point you'll want to configure minicom on your computer.  This should be done as root:
$ sudo minicom -s
Under Serial Port Setup, change these settings:
  • Serial Device: /dev/ttyUSB0
  • Bps/Par/Bits: 115,200 8N1
  • Hardware Flow Control: No
  • Software Flow Control: No
Then select Save Setup as dfl.

This would also be a good time to plug in an Ethernet cable from your plug to a switch/hub.  Note that the top plug on a Plus model is eth0.  This is labelled as RJ45 #2 in the Quick Start Guide.

Now run:
$ minicom -o
to connect to the serial port and plug in power to the GuruPlug.  When it starts booting, you should see something similar to this:

U-Boot 2009.11-rc1-00602-g28a9c08-dirty (Feb 09 2010 - 18:15:21)               
Marvell-Plug2L                                                                 
                                                                               
SoC:   Kirkwood 88F6281_A0                                                     
DRAM:  512 MB                                                                  
NAND:  512 MiB                                                                 
                   
                                                                               
In:    serial                                                                  
Out:   serial                                                                  
Err:   serial                                                                  
Net:   egiga0, egiga1                                                          
88E1121 Initialized on egiga0                                                  
88E1121 Initialized on egiga1                                                  
Hit any key to stop autoboot:  0                                               
Marvell>>

Hit any key at this point to stop the autoboot.  See the next post regarding update of uboot and the kernel.

Sunday, September 26, 2010

GuruPlug Plus Gets a New OS

I won't bore you with the details of what a GuruPlug Plus is all about since it's been widely discussed in the media since the beginning of 2010.  But let's just say that Globalscale Technologies has had a few issue delivering on their promise.  Although the plug started shipping in April, the plugs had overheating problems when both ethernet connections were used at 1Gb/s.  This was only fixed in the production models recently and started shipping to customers in September.

So, having my plug finally in hand, I'm setting out to do a few upgrades and make it useful for my purposes.  This will include uboot update, kernel update, and OS update.  I'm going to take the same route as Paul Whalen with his blog post on putting Fedora 12 on a micro SDHC card for the root filesystem.

In creating the root filesystem on the SDHC, I would recommend one thing to amend Paul's instructions with.  Rather than a "cp -r" I would also use the "-a" option to preserve the mode, owenership, and timestamps of the files being copied.

I did want to create a LVM volume group and logical volume and mount it so that I'd have more flexibility in resizing the filesystems if needed.  However, it appears that the default kernel has no LVM capabilities.  So for now, I'll just stick to a partition for the root filesystem.

The Beginning

World blogging, not I
Popularity noticed
Reluctantly joined