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.

No comments:

Post a Comment