Tonido Plug 2
The Tonido2 Plug computer is a powerful ARM computer. The plug computer is shipped from the factory in a default configuration. This configuration allows for access to your applications, files, photos, music and media from anywhere via a web browser or mobile applications.
The following page is dedicated to learning the secrets of the tonido2 plug computer. The computer will not be used in its default configuration. The tonido software will be not be used for its intended purpose. This isn't a step-by-step guide but more notes and useful information relating to the Tonido2 plug computer. The Tonido webpage states you may void your warranty if you make any modifications to the internal NAND flash. Please proceed carefully because the information below can result in your device being bricked. As of Nov 14th, 2011 no procedure has been provided by Codelathe, inc. to restore the Tonido2Plug computer back to the manufacture default configuration. This includes the boot flash and the user flash areas. Your warranty is good as long as you dont make any modifications to the internal flash. If you proceed further make sure you know what you are doing, I will not be held responsible for bricked devices. Hardware Description Processor: Marvell 88f6281 feroceon kirkwood
RAM: 512mb DDR2 NAND Flash: 512mb Dimensions:(L*W*D): 5.5" * 3" * 1" Power Requirements: 100-240V, 50/60HZ 2.5" Internal SATA HDD Bay Network: Gigabit Ethernet Interface: USB 2.0 OS: Linux (debian squeeze) Uboot 1.1.4 Marvell version 3.4.27 Marvell Development Board (LSP Version KW_LSP_5.0.3)-- DB-88F6282A-BP Soc: MV88F1155 Rev 1 LE Setup of the internal Flash #cat /proc/mtd
dev: size erasesize name mtd0: 00180000 00020000 "u-boot" mtd1: 00020000 00020000 "u-boot-env" mtd2: 00600000 00020000 "uImage" mtd3: 1f800000 00020000 "rootfs" Uboot output ** MARVELL BOARD: DB-88F6282A-BP LE
Backup original setupU-Boot 1.1.4 (Sep 13 2011 - 13:25:05) Marvell version: 3.4.27 USISH-SMB Ver: topkick1281p2-001-008-20110913-codelathe U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006D0120 Soc: MV88F1155 Rev 1 (DDR2) CPU running @ 800Mhz L2 running @ 400Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM unknown CAL tRP = 8 tRAS = 20 tRCD=8 DRAM CS[0] base 0x00000000 size 512MB DRAM Total size 512MB 16bit width Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done NAND:512 MB Flash: 0 kB CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled USB 0: host mode PEX 0: interface detected no Link. Net: egiga0 [PRIME] Hit any key to stop autoboot: 3 backup all partitions - not sure how useful this will be but I did it anyways. # dd if=/dev/mtd0ro of=/mnt/u-boot.mtd0 # dd if=/dev/mtd1ro of=/mnt/u-boot-env.mtd1 # dd if=/dev/mtd2ro of=/mnt/kernel.mtd2 # dd if=/dev/mtd3ro of=/mnt/rootfs.mtd3 LEDS:
The LEDs on the side of the tonido2 plug computer can be turned on/off using the following commands:
only works with the original topkick 2.36 kernel
mknod /dev/pwrctl c 221 0 (creates the power controller device)
pwrctl -o 702 (turns on the green led, returns 0 - successful)
LED codes
The pwrctl command also returns a 0-successful for the following codes, but the functions are unknown at this time:
10-16, 20-26, 100, 200, 300, 301, 305, 306, 307, 308, 400, 801
Access to the Uboot environment variables The uboot environment variables controls the way uboot boots the plug. Warning: modification of these variables can render the plug unbootable, proceed carefully!
# apt-get install uboot-envtools # fw_printenv - show all uboot environment variables # fw_saveenv - used to modify uboot environment variables /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility. # Up to two entries are valid, in this case the redundant # environment sector is assumed present. # Notice, that the "Number of sectors" is ignored on NOR. # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd1 0x0000 0x20000 0x20000 Mount Internal Flash rootfs #ubiattach /dev/ubi ctrl -m 3
#mount -t ubifs ubi0:rootfs /mnt
Power Consumption: All measurements are made using a kill-a-watt meter P4400. Power consumption will vary depending on the kernel being run, rootfs being used, software running, and other hardware. These number are shown to give an idea of the power usage of the plug and are not scientific.
Kernel 3.2 mainline no ethernet : 3.0-3.1watts (no load) , ethernet cable plugged in: 4.3-4.4watts (no load), ethernet cable plugged in, 8gb flash drive: 4.6-4.7watts (no load) ethernet cable plugged in, 8gb flash drive, 4port usb hub: 5.0-5.1watts (no load), 8gb Sandisk Cruzer, 4-port Belkin USB powered HUB F4U020 full load add .5watt Serial Port console access:
On the backside of the plug there is an serial access port. Lift the rubber piece to allow access to the serial port. This port can be used to gain serial access to the plug computer. This serial access can be used during the Uboot process to modify the boot sequence of the plug.
The port has a 5-pin connector with 4-pins and one missing pin.
x - missing pin
0 - ground
0 - Tx
0 - Rx
0 - Vcc +3.3v
A usb 2.0 to ttl uart serial converter is need to display the serial messages. Only three connections are needed:
ground -> ground
Tx -> Rx
Rx -> Tx
/etc/init/ttyS0.conf # ttyS0 - getty # # This service maintains a getty on tty1 from the point the system is # started until it is shut down again. description "Start getty on ttyS0" start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty -8 115200 ttyS0 Connecting to the Tonido2 using a serial connection on a Linux Computer: run the following command in a terminal to gain access
sudo screen /dev/ttyUSB0 115200 CTRL-A ESC - scroll , (ctrl-u up, ctrl-d down) press ESC to exit
CTRL-A K - kill current session
login: root
password: nosoup4u Kernel
Original Kernel:
uname -a
Linux tonido2 2.6.31.8-topkick1281p2-001-004-20101214 #1 Thu Jun 16 10:06:20 CST 2011 armv5tel GNU/Linux
Kernel 3.2 Kernel patch for 3.2 mainline
config file for 3.2 - config-3.2-techie2017 make ARCH=arm kirkwood_defconfig make ARCH=arm archprepare patch -p1 < tonido2-patch-3.2-techie2017 Download kernel 3.2 from kernel.org Kernel 3.5 Kernel patch for 3.5 mainline
Kernel 3.7config file for 3.5 - config-3.5-techie2017 make ARCH=arm kirkwood_defconfig make ARCH=arm archprepare patch -p1 < tonido2-patch-3.5-techie2017 Download kernel 3.5 from kernel.org Kernel patch for 3.7 mainline
Kernel 3.11.4config file for 3.7 - config-3.7-techie2017 Alternate config file topkick-3.7.7.config provided by Tony tonyp@nildram.co.uk - A lot more stuff is in modules rather than in kernel – mostly file system stuff. make ARCH=arm kirkwood_defconfig make ARCH=arm archprepare patch -p1 < tonido2-patch-3.7-techie2017 OR patch -p1 < topkick-3.7.7.config Download kernel 3.7 from kernel.org Kernel patch for 3.11.4 mainline
config file for 3.11.4 - config-3.11.4-techie2017 make ARCH=arm kirkwood_defconfig make ARCH=arm archprepare patch -p1 < tonido2-patch-3.11.4-techie2017 if you wish to use my config file: cp config-3.11.4-techie2017 .config
(it has everything loaded in the kernel, no modules. Basic support most stuff isn't enabled)
Cross compile kernel
Tonido 2 Cross Compile instructions from Tonido.com
ARCH=arm make menuconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make -j4 uImage modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=modules make -j4 modules_install sudo apt-get install uboot-mkimage uboot-envtools Enable the block layer -> Support for large (2TB+) block devices and files must be enabled in the kernel config or the system won't boot kernel 3.2 or higher. Setup u-boot for mainline kernel from u-Boot
Once mainlineLinux=yes is set the Tonido2 will no longer boot from the internal nand. To boot from the internal nand set mainlineLinux=no in the u-boot environment.
Kernel 2.6.31.8-topkick1281p2-001-004-20101214
setenv arcNumber 2097 setenv mainlineLinux=no saveenv Kernel 3.2
setenv arcNumber 9999
setenv mainlineLinux=yes saveenv Kernel 3.5 setenv arcNumber 4101 setenv mainlineLinux=yes saveenv Kernel 3.7 setenv arcNumber 4101 setenv mainlineLinux=yes saveenv Kernel 3.11.4 setenv arcNumber 4101 setenv mainlineLinux=yes saveenv Debian squeeze rootfs
Harddrive & USB Flash drive bootingUbuntu rootfs Ubuntu rootfs sudo rootstock --fqdn tonido2 --login root --password nosoup4u --imagesize 2G --dist oneiric --serial ttyS0 --seed ubuntu-minimal,vim,openssh-server,apt To boot debian from an internal harddrive, usb harddrive or USB flash drive use the same procedure. Basically you need a kernel, root filesystem, and modifications to the u-boot environment.
/dev/sda1 - 32mbs - ext3 - for uImage /dev/sda2 - rest of drive minus swap size - ext4 - for system /dev/sda3 - swap file - optional - size is 512mb Quick Guide in creating a bootable USB flash drive short version of creating the tonido a blank flash drive (only drive attached to system) while SSH or serial connecton into the original Tonido2 firmware.
insert USB flash drive into usb port ls /dev (look for device sda) fdisk /dev/sda p - print partition n - add a partition t - change partition type create a two partitions n, p, 1, enter (1st cylinder), +32M n, p, 2, enter, enter w mkfs.ext3 /dev/sda1 mkfs.ext4 /dev/sda2 mount /dev/sda1 /mnt copy uImage /mnt umount /mnt mount /dev/sda2 /mnt copy rootfs.tar.gz to /mnt cd /mnt tar xvfzp rootfs.tar.gz rm rootfs.tar.gz reboot check the uboot environment variables bootargs_usb=root=/dev/sda2 rw rootwait bootargs_sata=root=/dev/sda2 rw rootwait bootcmd_usb=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_usb); usb start; ext2load usb 0 0x800000 /uImage; bootm 0x800000 bootcmd_sata=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_sata); ide reset; ext2load ide 0:1 0x800000 /uImage; bootm 0x800000 df -h - check size of partitions
update-rc.d tonido remove (stop all tonido software from starting on init) SSH: Accessing the Tonido 2 plug computer though SSH is a great option. SSH allow remote administration of the system. Setting up SSH is pretty simple. There are lots of good guides on the internet. Setting up SSH or Ubuntu SSH guide can assist with setting up SSH.
ssh-keygen -t rsa -b 2048 -f Miscellaneous notes Primarily booting from sata drive change uboot environment variable to decrease boot time:
bootcmd=run bootcmd_sata; run bootcmd_usb; run bootcmd_nand Current use < 5 watt mythtv backend server.
My tonido 2 plug computer is currently being used as a Mythtv backend. I use a SiliconDust hdhr3 dual network tuner. I have installed a Sandisk 64gb SSD SDSSP-64-G25 disk drive. Although on the smaller side it currently meets my needs for OTA HD recording. Using a kill-a-watt meter the system idles at 4.5 watts. The system uses 4.7 watts for a single HD recording.
Todo List:My frontend is an AMD 3800+ with a geforce 8400gs. The frontend boots Mythbuntu diskless from the PXE & nbdserver daemons running on the tonido2 plug computer. The tonido2 plug computer also runs an NFS server. I get about 16mbs transfer speed from an NFS export using the dd benchmark. My goal is to replace this frontend with a low watt arm computer. Fstab setup running on SSD # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> UUID=a673e100-a36f-4267-90d2-89300aa74c27 / ext4 discard,noatime,errors=remount-ro,async 0 1 UUID=ea11b0bb-2f3a-4ada-94c8-05342f9afdcf /var/lib/mythtv ext4 discard,noatime,nosuid,nodev,async 0 0 #UUID=316c0c96-ebf5-48e0-9b5e-95a5607713dc none swap sw 0 0 tmpfs /tmp tmpfs defaults,noatime 0 0 tmpfs /var/tmp tmpfs defaults,noatime,mode=1777 0 0 tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/run tmpfs defaults,noatime 0 0 tmpfs /var/lock tmpfs defaults,noatime 0 0 ln -s /dev/null /etc/blkid.tab ln -s /proc/mounts /etc/mtab Support for kernel 3.12
|