Difference between revisions of "Marvell Plug Computer Booting"
(10 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
+ | Back to [[Amahi_Plug_Edition]] | ||
+ | |||
= SheevaPlug = | = SheevaPlug = | ||
− | Here's how to allow your SheevaPlug to boot from a USB drive.<br/> | + | Here's how to allow your SheevaPlug to boot from a USB drive or SD card.<br/> |
− | + | ||
+ | Connect to the serial console (use 2 stop bits & 115200 bps). | ||
+ | = JTAG serial console = | ||
+ | If you do not have access to a serial console on your plug then you will need a JTAG module to do this: | ||
* Connect the JTAG module to the SheevaPlug (be careful; connecting it the wrong way will fry it! See the warning sticker on the plug, and the photo on the box for proper connection), and connect the USB side to your computer (can be Windows, Linux or Mac). | * Connect the JTAG module to the SheevaPlug (be careful; connecting it the wrong way will fry it! See the warning sticker on the plug, and the photo on the box for proper connection), and connect the USB side to your computer (can be Windows, Linux or Mac). | ||
− | + | ||
− | + | '''Windows''' | |
− | + | ||
− | + | On Windows, install a driver | |
− | + | (Use the disc that came with plug or You can download it from [http://sourceforge.net/projects/esia/files/drivers/ here]), and [http://plugcomputer.org/plugwiki/index.php/SerialTerminal/Windows/PuTTY use PuTTY (serial)]. | |
− | + | ||
− | + | '''Linux''' | |
− | + | ||
− | + | On Linux, execute the following command: | |
− | + | cat > /etc/udev/rules.d/85-sheevaplug.rules <<'EOF' | |
− | + | # if no driver has claimed the interface yet, load ftdi_sio | |
− | + | ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \ | |
− | + | ATTRS{idVendor}=="1c0c", ATTRS{idProduct}=="0102", \ | |
− | + | DRIVER=="", \ | |
− | + | RUN+="/sbin/modprobe -b ftdi_sio" | |
− | + | ||
− | + | # add the sheevaplug VID and PID to the list of devices supported by ftdi_sio | |
− | + | ACTION=="add", SUBSYSTEM=="drivers", \ | |
− | + | ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \ | |
− | + | ATTR{new_id}="1c0c 0102" | |
+ | |||
+ | # optionally create a convenience symlink for the console device | ||
+ | ACTION=="add", KERNEL=="ttyUSB*", \ | ||
+ | ATTRS{interface}=="SheevaPlug JTAGKey FT2232D B", \ | ||
+ | ATTRS{bInterfaceNumber}=="01", \ | ||
+ | SYMLINK+="sheevaplug" | ||
+ | EOF | ||
+ | |||
Then use [http://sourceforge.net/projects/gtkterm/ gtkterm]: use 2 stop bits & 115200 bps speed when creating the profile; keep the defaults for the rest. Instead of gtkterm, you can also use the simpler screen: ''yum -y install screen; screen /dev/ttyUSB1 115200''<br/> | Then use [http://sourceforge.net/projects/gtkterm/ gtkterm]: use 2 stop bits & 115200 bps speed when creating the profile; keep the defaults for the rest. Instead of gtkterm, you can also use the simpler screen: ''yum -y install screen; screen /dev/ttyUSB1 115200''<br/> | ||
Once connected, if you want to close your terminal session, hit Ctrl-A followed by Shift-K. You'll be asked if you're sure you want to kill this window; just say yes! | Once connected, if you want to close your terminal session, hit Ctrl-A followed by Shift-K. You'll be asked if you're sure you want to kill this window; just say yes! | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | For [TAB], hit the TAB key; the value there will be unique to each SheevaPlug computer, so TAB will allow you to auto-fill the correct value. Type '''B''' after that value has been auto-filled. | + | '''Mac OS X''' |
+ | |||
+ | On Mac OS X, Install the [http://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_14.dmg FTDI driver], download [http://dl.dropbox.com/u/3022105/Amahi/sheeva/Info.plist.patch Info.plist.patch] to your desktop, then run the following commands to connect to the SheevaPlug console: | ||
+ | sudo patch -p0 < ~/Desktop/Info.plist.patch | ||
+ | sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext | ||
+ | sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext | ||
+ | |||
+ | Then plug in the device to USB: | ||
+ | |||
+ | screen /dev/tty.usbserial-[TAB]B 115200 | ||
+ | |||
+ | For [TAB], hit the TAB key; the value there will be unique to each SheevaPlug computer, so TAB will allow you to auto-fill the correct value. Type '''B''' after that value has been auto-filled. | ||
+ | |||
+ | = Once Connected via a serial console = | ||
+ | |||
Once connected, if you want to close your terminal session, hit Ctrl-A followed by Ctrl-K (or Shift-K on Linux). You'll be asked if you're sure you want to kill this window; just say yes! | Once connected, if you want to close your terminal session, hit Ctrl-A followed by Ctrl-K (or Shift-K on Linux). You'll be asked if you're sure you want to kill this window; just say yes! | ||
* Reset the SheevaPlug. | * Reset the SheevaPlug. | ||
* At the terminal, press enter a couple of seconds after boot to prevent it from booting using the onboard flash (Ubuntu). You should end up with a ''Marvell>>'' prompt. | * At the terminal, press enter a couple of seconds after boot to prevent it from booting using the onboard flash (Ubuntu). You should end up with a ''Marvell>>'' prompt. | ||
+ | |||
+ | '''arcNumber''' | ||
+ | |||
+ | The ArcNumber parameter references a particular mach-type/machine from the kernel's Arm machine table. This needs to be configured correctly for your device otherwise it may not boot or may not have all the features (eg. arcNumber=2678 is required for eSata Sheevaplug). | ||
+ | |||
+ | Find the correct arcNumber for your device [http://www.arm.linux.org.uk/developer/machines/ here]. | ||
+ | |||
+ | '''USB Boot''' | ||
+ | |||
* There are some commands you need to run to make it permanently boot from the USB port ('''NOTE:''' this step is only necessary once): | * There are some commands you need to run to make it permanently boot from the USB port ('''NOTE:''' this step is only necessary once): | ||
− | + | setenv mainlineLinux yes | |
− | + | setenv arcNumber 2097 | |
− | + | setenv bootargs_root 'root=/dev/sda1 rootdelay=15' | |
− | + | setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x6400000 /boot/uImage' | |
− | + | setenv bootcmd 'setenv bootargs $(console) $(bootargs_root); run bootcmd_usb; bootm 0x6400000' | |
− | saveenv | + | saveenv |
− | + | reset | |
+ | |||
+ | '''SD Card Boot''' | ||
+ | |||
+ | * If you want to make it permanently boot from the SD card, the commands you need to run are: | ||
+ | ('''NOTE:''' this step is only necessary once. I assume that the root partition is /dev/mmcblk0p1 and the swap partition is /dev/mmcblk0p2). | ||
+ | setenv mainlineLinux yes | ||
+ | setenv arcNumber 2097 | ||
+ | setenv bootargs_console console=ttyS0,115200 | ||
+ | setenv bootargs_root 'rw root=/dev/mmcblk0p1 rootdelay=15 rootfstype=ext3' | ||
+ | setenv bootcmd_mmc 'mmcinit; ext2load mmc 0:1 0x800000 /boot/uImage' | ||
+ | setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_mmc; bootm 0x0800000' | ||
+ | saveenv | ||
+ | reset | ||
+ | |||
+ | |||
+ | = GuruPlug = | ||
+ | |||
+ | Configuring [[Uboot for GuruPlug]] | ||
− | = DockStar = | + | = Pogoplug / DockStar = |
− | See the instructions here on how to allow the DockStar to boot from USB: http://plugapps.com/index.php5?title=PlugApps:Pogoplug_Setboot<br/> | + | See the instructions here on how to allow the PogoPlug & DockStar to boot from USB: http://plugapps.com/index.php5?title=PlugApps:Pogoplug_Setboot<br/> |
Stop after executing the ''pogo_u-boot_install.sh'' script in step 1. | Stop after executing the ''pogo_u-boot_install.sh'' script in step 1. | ||
+ | |||
+ | = OpenRD Client = | ||
+ | |||
+ | The instructions for the OpenRD client are roughly similar to the ones for Sheevaplug. There are a few notable differences though. | ||
+ | * If your serial port does not work you need to use VID 0403 and PID 9e90 | ||
+ | * the arcNumber for OpenRD Client is 2361 | ||
+ | * when booting from an usb device the device will be /dev/sdb if you also have an internal disk mounted. You need to change bootargs accordingly (e.g. root=/dev/sdb1) | ||
+ | * apparently doing 'usb start' twice from u-boot makes that the usb device is not re-detected. In that case it is needed to powercycle the device. | ||
+ | |||
+ | = OpenRD Base = | ||
+ | |||
+ | I have no OpenRD Base but the key difference between Base and Client as far as booting concerns is the arcNumber. OpenRD Base has arcNumber 2325<br> | ||
+ | If you manage to get things working with OpenRD Base please update this section. | ||
+ | |||
+ | = References = | ||
+ | * See also [https://fedoraproject.org/wiki/Architectures/ARM/SheevaplugUSB https://fedoraproject.org/wiki/Architectures/ARM/SheevaplugUSB] |
Latest revision as of 11:30, 15 July 2011
Back to Amahi_Plug_Edition
Contents
SheevaPlug
Here's how to allow your SheevaPlug to boot from a USB drive or SD card.
Connect to the serial console (use 2 stop bits & 115200 bps).
JTAG serial console
If you do not have access to a serial console on your plug then you will need a JTAG module to do this:
- Connect the JTAG module to the SheevaPlug (be careful; connecting it the wrong way will fry it! See the warning sticker on the plug, and the photo on the box for proper connection), and connect the USB side to your computer (can be Windows, Linux or Mac).
Windows
On Windows, install a driver (Use the disc that came with plug or You can download it from here), and use PuTTY (serial).
Linux
On Linux, execute the following command:
cat > /etc/udev/rules.d/85-sheevaplug.rules <<'EOF' # if no driver has claimed the interface yet, load ftdi_sio ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \ ATTRS{idVendor}=="1c0c", ATTRS{idProduct}=="0102", \ DRIVER=="", \ RUN+="/sbin/modprobe -b ftdi_sio" # add the sheevaplug VID and PID to the list of devices supported by ftdi_sio ACTION=="add", SUBSYSTEM=="drivers", \ ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \ ATTR{new_id}="1c0c 0102" # optionally create a convenience symlink for the console device ACTION=="add", KERNEL=="ttyUSB*", \ ATTRS{interface}=="SheevaPlug JTAGKey FT2232D B", \ ATTRS{bInterfaceNumber}=="01", \ SYMLINK+="sheevaplug" EOF
Then use gtkterm: use 2 stop bits & 115200 bps speed when creating the profile; keep the defaults for the rest. Instead of gtkterm, you can also use the simpler screen: yum -y install screen; screen /dev/ttyUSB1 115200
Once connected, if you want to close your terminal session, hit Ctrl-A followed by Shift-K. You'll be asked if you're sure you want to kill this window; just say yes!
Mac OS X
On Mac OS X, Install the FTDI driver, download Info.plist.patch to your desktop, then run the following commands to connect to the SheevaPlug console:
sudo patch -p0 < ~/Desktop/Info.plist.patch sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext sudo kextload /System/Library/Extensions/FTDIUSBSerialDriver.kext
Then plug in the device to USB:
screen /dev/tty.usbserial-[TAB]B 115200
For [TAB], hit the TAB key; the value there will be unique to each SheevaPlug computer, so TAB will allow you to auto-fill the correct value. Type B after that value has been auto-filled.
Once Connected via a serial console
Once connected, if you want to close your terminal session, hit Ctrl-A followed by Ctrl-K (or Shift-K on Linux). You'll be asked if you're sure you want to kill this window; just say yes!
- Reset the SheevaPlug.
- At the terminal, press enter a couple of seconds after boot to prevent it from booting using the onboard flash (Ubuntu). You should end up with a Marvell>> prompt.
arcNumber
The ArcNumber parameter references a particular mach-type/machine from the kernel's Arm machine table. This needs to be configured correctly for your device otherwise it may not boot or may not have all the features (eg. arcNumber=2678 is required for eSata Sheevaplug).
Find the correct arcNumber for your device here.
USB Boot
- There are some commands you need to run to make it permanently boot from the USB port (NOTE: this step is only necessary once):
setenv mainlineLinux yes setenv arcNumber 2097 setenv bootargs_root 'root=/dev/sda1 rootdelay=15' setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x6400000 /boot/uImage' setenv bootcmd 'setenv bootargs $(console) $(bootargs_root); run bootcmd_usb; bootm 0x6400000' saveenv reset
SD Card Boot
- If you want to make it permanently boot from the SD card, the commands you need to run are:
(NOTE: this step is only necessary once. I assume that the root partition is /dev/mmcblk0p1 and the swap partition is /dev/mmcblk0p2).
setenv mainlineLinux yes setenv arcNumber 2097 setenv bootargs_console console=ttyS0,115200 setenv bootargs_root 'rw root=/dev/mmcblk0p1 rootdelay=15 rootfstype=ext3' setenv bootcmd_mmc 'mmcinit; ext2load mmc 0:1 0x800000 /boot/uImage' setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_mmc; bootm 0x0800000' saveenv reset
GuruPlug
Configuring Uboot for GuruPlug
Pogoplug / DockStar
See the instructions here on how to allow the PogoPlug & DockStar to boot from USB: http://plugapps.com/index.php5?title=PlugApps:Pogoplug_Setboot
Stop after executing the pogo_u-boot_install.sh script in step 1.
OpenRD Client
The instructions for the OpenRD client are roughly similar to the ones for Sheevaplug. There are a few notable differences though.
- If your serial port does not work you need to use VID 0403 and PID 9e90
- the arcNumber for OpenRD Client is 2361
- when booting from an usb device the device will be /dev/sdb if you also have an internal disk mounted. You need to change bootargs accordingly (e.g. root=/dev/sdb1)
- apparently doing 'usb start' twice from u-boot makes that the usb device is not re-detected. In that case it is needed to powercycle the device.
OpenRD Base
I have no OpenRD Base but the key difference between Base and Client as far as booting concerns is the arcNumber. OpenRD Base has arcNumber 2325
If you manage to get things working with OpenRD Base please update this section.