Plug notes
Warboard
For known issues, check the warboard
Getting the plug booting Fedora 12
Here are the steps to make the plug boot from USB
- General directions
- Connect the ethernet cable to your network (Mouton says: is this necessary now? Can't we just wait until the Amahi Install section below to connect the plug to the LAN?)
- 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).
- On Windows: install a driver (disc that came with plug), and use PuTTY (serial).
- On Linux, execute the following command, and 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
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
- On Mac, 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 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. Once connected, if you want to close your terminal session, hit Ctrl-A followed by Ctrl-K. You'll be asked if you're sure you want to kill this window; just say yes!
- Reset the device from the JTAG module (Mouton says: how? I tried to push the button, but that doesn't seem to reset the device... Do you mean login using the terminal emulator, and issue a reboot command..?)
- 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.
- 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
- In order to install the rootfs onto a flash or disk, mount the flash drive on a linux system and execute the create-clean-f12-disk.sh script. You'll need to have the amahi-marvell-0.2.tar.bz2 file in the current directory. It may take a while, but this must be done before booting up the plug and installing Amahi.
NOTE: This script is very dangerous (it can destroy the machine it is run on if not used properly). You will need to change the partition destination.
- Insert USB Flash Drive into the plug.
- Once this is complete, the JTAG module can be disconnected. There will be no need for serial connection any longer. Once the USB Flash Drive is connected and the plug booted, you will be able to connect via SSH (default root password is "fedoraarm").
Amahi Install
After booting from it,
- Configure a profile for the system in http://www.amahi.org. Pay attention to the IP of the HDA you configure. Let's call it PLUG_FIXED_IP.
- Ensure you have inserted the USB Flash Drive and boot the system
- SSH into it and adjust the date using ntpdate:
yum -y install ntp && ntpdate time.windows.com
- Until we optimize things, it will take 4 or 5 minutes to boot the first time.
- The first time it boots, it will try to use DHCP. In my case, I configured a static IP so that when it boots with DHCP I know what IP it has. This may be different than the static you configured above.
Note that the sticker on the SP device with the MAC address on it is sometimes wrong. i.e. the MAC address your device will use will be different from the address on this sticker. Use nmap or ping -b to find new devices on your LAN, if you can't find it on your DHCP server.
- Access the installer via http://IP_OR_NAME_OF_THE_PLUG_IN_DHCP:2000/
- Wait patiently if it does not respond. This does require internet connectivity
- The installer takes about 1 minute to install with that :)
- Input the install code for that system
- When asked to, click the big red button to reboot
- The reboot will take a minute or two
- Access it with the configured IP: http://IP_OR_NAME_OF_THE_PLUG/
- First login: admin/amahi. I will ask you to reset the password the first time
NOTE: With about 1/8th of the rpms on a typical x86 install, you will experience a lot of failures with apps (VPN does not work, apps will be missing deps, etc. etc.).
Reporting issues
These are mostly what matter for debugging:
/root/hda-install.log
egrep -v 'POST|GET|progress' /tmp/amahi-ruby-install.log
- See SP_warboard for documented issues.
Misc Notes
- restarting rpm db in chrooted environment:
rm /var/lib/rpm/__db* rpm --rebuilddb -vv
How to use two HDA on the same network
Make sure both HDA use different domain names.
You'll need to re-apply this fix on every update of hdactl.
You'll need to run the commands below on both your SP and main HDA.
On your SP: replace home.com with your main HDA domain name, and 192.168.1.10 with you HDA real IP address.
On your main HDA: replace home.com with your SP domain name, and 192.168.1.10 with your SP real IP address.
cat > named.patch << 'EOF' *** /usr/bin/hdactl 2010-05-17 12:04:57.994266656 -0400 --- /usr/bin/hdactl.new 2010-05-17 12:06:28.151265690 -0400 *************** *** 255,260 **** --- 255,265 ---- printf $hda "\tallow-update { key ddnskey; };\n"; printf $hda "\tcheck-names ignore;\n"; printf $hda "};\n\n"; + + printf $hda "zone \"home.com\" IN {\n"; + printf $hda "\ttype slave;\n"; + printf $hda "\tmasters { 192.168.1.10; };\n"; + printf $hda "};\n\n"; } sub print_void_info { EOF patch -p0 < named.patch service hdactl restart