Cover

Marvell® ARMADA™ 16x Development Kit User Manual

Doc. No. MV-S400320-00, Rev. - December 2010

Marvell. Moving Forward Faster

Marvell® ARMADA™ 16x Plug Computer Development Kit User Manual

Document Conventions

Note: Provides related information or information of special importance.

Caution: Indicates potential damage to hardware or software, or loss of data.

Warning: Indicates a risk of personal injury.

Document Status Doc Status: Preliminary Technical Publication: x.xx

For more information, visit our website at: www.marvell.com

Disclaimer No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, for any purpose, without the express written permission of Marvell. Marvell retains the right to make changes to this document at any time, without notice. Marvell makes no warranty of any kind, expressed or implied, with regard to any information contained in this document, including, but not limited to, the implied warranties of merchantability or fitness for any particular purpose. Further, Marvell does not warrant the accuracy or completeness of the information, text, graphics, or other items contained within this document. Marvell products are not designed for use in life-support equipment or applications that would cause a life-threatening situation if any such products failed. Do not use Marvell products in these types of equipment or applications. With respect to the products described herein, the user or recipient, in the absence of appropriate U.S. government authorization, agrees: 1) Not to re-export or release any such information consisting of technology, software or source code controlled for national security reasons by the U.S. Export Control Regulations ("EAR"), to a national of EAR Country Groups D:1 or E:2; 2) Not to export the direct product of such technology or such software, to EAR Country Groups D:1 or E:2, if such technology or software and direct products thereof are controlled for national security reasons by the EAR; and, 3) In the case of technology controlled for national security reasons under the EAR where the direct product of the technology is a complete plant or component of a plant, not to export to EAR Country Groups D:1 or E:2 the direct product of the plant or major component thereof, if such direct product is controlled for national security reasons by the EAR, or is subject to controls under the U.S. Munitions List ("USML"). At all times hereunder, the recipient of any such information agrees that they shall be deemed to have manually signed this document in connection with their receipt of any such information. Copyright © 1999–2010. Marvell International Ltd. All rights reserved. Marvell, Moving Forward Faster, the Marvell logo, Alaska, AnyVoltage, DSP Switcher, Fastwriter, Feroceon, Libertas, Link Street, PHYAdvantage, Prestera, TopDog, Virtual Cable Tester, Yukon, and ZJ are registered trademarks of Marvell or its affiliates. CarrierSpan, LinkCrypt, Powered by Marvell Green PFC, Qdeo, QuietVideo, Sheeva, TwinD, and VCT are trademarks of Marvell or its affiliates. Patent(s) Pending—Products identified in this document may be covered by one or more Marvell patents and/or patent applications.

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 2 December 2010

Table of Contents

Table of Contents

1 Introduction...... 7 1.1 GuruPlug Display (gplugD) Overview...... 7 1.2 gplugD Functionality...... 7 1.3 Hardware Overview...... 7 1.4 Marvell® ARMADA™ 168 Features...... 8 1.5 Support...... 8

2 Unpacking the gplugD ...... 9 2.1 Kit Contents...... 9 2.2 External Connectors...... 12

3 Getting Started with the gplugD...... 15 3.1 Console Access ...... 15 3.2 Remote Access with Secure Shell (SSH)...... 18 3.3 Using a Keyboard, Mouse, and HDMI Display...... 19 3.4 Remote Access with VNC ...... 21

4 File Systems and Partitions...... 25 4.1 Where are the microSDHC cards in /dev? ...... 25 4.2 Mounting Partitions ...... 27 4.3 New Boot Card Setup ...... 29

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 3

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 4 December 2010 List of Figures

List of Figures

1 Introduction...... 7

2 Unpacking the gplugD...... 9

3 Getting Started with the gplugD...... 15 Figure 1: PL-2303 USB Enumeration ...... 15 Figure 2: COM Port Assignment ...... 16 Figure 3: TeraTerm Serial Port Setup...... 16 Figure 4: gplugD Login Prompt ...... 17 Figure 5: U-Boot Start-Up ...... 17 Figure 6: TeraTerm SSH Setup ...... 18 Figure 7: SSH Unrecognized Host Warning Message...... 18 Figure 8: SSH Authentication...... 19 Figure 9: gplugD Shutdown ...... 20 Figure 10: System Halted Message...... 20 Figure 11: TightVNC Server Installation ...... 21 Figure 12: TightVNC Server Password Setup ...... 21 Figure 13: Plug IP Address ...... 22 Figure 14: TightVNC View New Connection Window ...... 22 Figure 15: TightVNC Password Entry ...... 23 Figure 16: TightVNC Viewer Screen Scaling ...... 23 Figure 17: TightVNC Server Shutdown...... 24

4 File Systems and Partitions...... 25 Figure 18: /dev Directory Listing ...... 25 Figure 19: Power-On microSDHC Slot Assignment...... 26 Figure 20: Warm Boot microSDHC Assignment ...... 26 Figure 21: Mounting Kernel Partition on Boot microSDHC Device ...... 27 Figure 22: Root File System Mounted on /dev/mmcblk0p2 in /etc/mtab...... 27 Figure 23: Free Space Available on Internal 8 GB microSDHC Card...... 28 Figure 24: USB Flash Drive on /dev/sda...... 28 Figure 25: Ubuntu “Live” Trial ...... 29 Figure 26: Ubuntu Automounts the New microSDHC Card ...... 30 Figure 27: Run the GParted Partition Editor ...... 30 Figure 28: Select the New microSDHC Card Device...... 31 Figure 29: Unmount Previously Mounted Partitions...... 31 Figure 30: Delete Existing Partitions...... 32 Figure 31: Creating a FAT16 Partition for the Kernel ...... 32 Figure 32: FAT16 Partition Parameters ...... 33 Figure 33: ext3 Partitions Parameters ...... 33

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 5

Marvell® ARMADA™ 16x Plug Computer Development Kit User Manual

Figure 34: Apply Pending Partition Modifications ...... 34 Figure 35: Launch the Disk Utility ...... 34 Figure 36: Mounting the FAT16 Partition ...... 35 Figure 37: Mount the ext3 Partition...... 35 Figure 38: Launch the Terminal ...... 36 Figure 39: Copy the Kernel zImage File to the FAT16 Partition ...... 36 Figure 40: Change Directory to the ext3 Partition for the Root File System ...... 37 Figure 41: Decompress and Extract the Root File System Tarball ...... 37 Figure 42: Safely Remove the microSDHC Card...... 38 Figure 43: Wait for Linux to Finish Before Removing the New microSDHC Card...... 38

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 6 December 2010 Introduction GuruPlug Display (gplugD) Overview

1 2 3 4 Introduction 5 1 6 7 8 1.1 GuruPlug Display (gplugD) Overview 9 10 The Marvell® ARMADA™ 16x Plug Computer Development Kit User Manual describes procedures 11 for operating the GuruPlug1 Display Development Kit, referred to throughout this document as the ® 12 “gplugD.” The gplugD device is an evaluation platform for the Marvell ARMADA™ 168 Applications 13 Processor. It takes the shape of a plug computer, a small form-factor computing platform created by 14 Marvell that integrates a high-performance, power-efficient system-on-a-chip processor with network 15 connectivity, peripheral expansion, and the Linux™ operating system. The entire system is housed 16 in an AC-to-DC adapter that plugs into a wall outlet, thus the term “plug computer.” 17 The gplugD expands upon existing plug computers by incorporating a display controller with an 18 HDMI output for a LCD TV or monitor, extra USB ports for connecting a keyboard and mouse, and 19 extra storage via internal and external microSDHC card slots. Quite simply, the 20 21 gplugD is a complete computer that is smaller than a traditional desktop PC power supply. 22 23 1.2 gplugD Functionality 24 25 Unlike other plug computers, which are limited to running applications that either are non-interactive 26 or deliver content via terminal console or web browser, the gplugD can drive a HDMI-capable display 27 with both bit-mapped graphics and sound. This makes it an ideal platform for developing 28 energy-efficient interactive kiosks and smart displays. 29 Without any optimization, the gplugD running MPlayer on Linux and X11 can render 30 fps 30 H.264-encoded CIF (352 x 240) video with a 48 kHz AAC LC stereo audio track. While higher 31 performance is possible using Marvell's Integrated Performance Primitives-based (IPP) multimedia 32 codecs, the gplugD is not intended to be a high-performance video playback device for home theatre 33 applications. 34 35 The gplugD runs Linux. It can access the complete range of Debian repositories with more 36 than 18,000 precompiled packages for armel (ARM EABI) targets. Add in projects from other Open 37 Source collaborative efforts and end user-developed software, and the gplugD becomes a flexible 38 and capable device for a wide range of applications. 39 40 41 1.3 Hardware Overview 42 Though about the same size as a typical notebook computer AC-to-DC power supply, the gplugD is 43 equipped with a full set of memories and peripherals: 44 ̈ Marvell ARMADA 168 processor (88AP168) running at 800 MHz 45 46 ̈ 512 Mbytes DDR2-800 SDRAM 47 ̈ 4-Mbit SPI boot flash holding the pre-boot loader and U-Boot 48 ̈ Two Class 6 microSDHC cards 49 • 4 GB in external slot with Debian Linux 5.0 50 51 • 8 GB on CPU and memory board 52 ̈ 4 high-speed USB ports 53 ̈ 10/100 Mbps Ethernet 54 ̈ HDMI 1.3 video and stereo audio output 55 56 57 1. GuruPlug is a registered trademark of Globalscale Technologies, Inc. 58

Copyright © 2010 Marvell CONFIDENTIAL Doc. No. MV-S158458-00 Rev. - December 7, 2010, Document Classification: Proprietary Information Page 7

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

̈ High-speed USB On-the-Go (OTG) micro AB port 1 ̈ USB mini-B connector for serial port console access 2 3 ® 4 1.4 Marvell ARMADA™ 168 Features 5 The gplugD is powered by the high-performance, low-power ARMADA 168 Applications Processor 6 that integrates a comprehensive set of peripherals for smart, interactive products. Flexible hardware 7 interfaces support a wide range of memory and I/O standards, and permit system designers to fine- 8 9 tune individual subsystems for cost and performance. Features of the ARMADA 168 include: 10 ® ̈ Marvell Sheeva™ PJ1 ARMv5TE-compatible CPU core capable of operation at up to 1 GHz 11 • 32-Kbyte direct-mapped L1 instruction cache 12 13 • 32-Kbyte 4-way set associative L1 data cache 14 • 128-Kbyte unified L2 cache 15 • Intel® Wireless MMX2™ compliant SIMD coprocessor 16 17 ̈ 32-channel DMA Controller with 92 peripheral device request sources 18 ̈ NAND Flash Controller for 1.8V and 3V SLC and MLC devices 19 ̈ 2-chip select static memory and VLIO Bus Controller 20 ̈ LPDDR1/DDR2/LVDDR2/DDR3 Dynamic Memory Controller 21 22 ̈ Flexible LCD Controller with hardware color conversion capable of driving up to WUXGA (1920 23 x 1200) class smart or dumb panels 24 ̈ Programmable 2D graphics accelerator with intelligent hardware color management unit 25 ̈ Up to 4 (e)MMC/SD/SDIO/CE-ATA Controller ports 26 ̈ XD, MS/MS Pro, and CompactFlash Card Controllers 27 28 ̈ CMOS video (up to 640 x 480) and still (up to 2 Mpixel) Camera Interface Controller 29 ̈ High-speed USB OTG and Host Controllers with integrated PHYs 30 ̈ 10/100 Mbps fast Ethernet Controller 31 ̈ Dual x1 lane PCI Express Controller and PHY 32 33 ̈ Up to 3 UARTs and 2 two-wire serial interfaces 2 34 ̈ Up to 5 synchronous serial ports with I S and SPI modes 35 ̈ AC '97 Audio Controller 36 ̈ Up to 4 independent PWM channels 37 ̈ Three 32-bit hardware timers 38 39 ̈ Up to 122 GPIO pins 40 41 1.5 Operating System Support 42 43 The gplugD ships with Debian Linux 5.0 which is based on the Linux 2.6.29 kernel. While not yet 44 released, the next version of Debian Linux presumably will be version 6.0. A kernel and root file 45 system for that can be installed on the gplugD and will be available for download at some point in the 46 future. The gplugD also supports Android, with a port of version 2.2 currently in development. 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S158458-00 Rev. - CONFIDENTIAL Copyright © 2010 Marvell Page 8 Document Classification: Proprietary Information December 7, 2010, Unpacking the gplugD Kit Contents

1 2 3 4 Unpacking the gplugD 5 2 6 7 8 2.1 Kit Contents 9 10 The GuruPlug Display (gplugD) Development Kit comes in a compact white box from Marvell partner 11 Globalscale Technologies, Inc. 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 A full complement of accessories comes with the kit, including all of the cables needed to connect to 33 the various I/O ports, such as HDMI… 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 9

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

Ethernet... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 A bendable USB extension gooseneck for a Wi-Fi or dongle… 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 10 December 2010 Unpacking the gplugD Kit Contents

A pair for USB OTG (micro AB plug to standard A receptacle and micro AB plug to standard A 1 plug)… 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 And a pair of USB mini B (one for the console serial port and the other for the JTAG debug adapter). 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 Just like other plug computers, the gplugD can be plugged directly into a wall outlet, operating 45 discretely and out of the way. The desktop adapter and extension cord keep the gplugD within easy 46 reach of a developer's workstation and nearby peripherals. 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 11

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Debug access using JTAG is provided through the gplugD second microSDHC card slot using one 21 of two enclosed adapters. The first is for use with existing JTAG hardware and is a passive circuit 22 board that simply maps the appropriate signals to the standard 20-pin debug header. The second is 23 a miniature USB debug module that is based on the Future Technology Devices International 24 FT2232H multi-purpose high-speed USB converter chip. Software support for this hardware is in 25 development. 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 2.2 External Connectors 49 I/O connectors occupy three of the four sides that are perpendicular to the gplugD internal printed 50 circuit-board assemblies as shown in the following figures: 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 12 December 2010 Unpacking the gplugD External Connectors

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 While not immediately obvious from these photographs, the printed circuit boards inside the gplugD 41 are mounted in such a way that the HDMI, high-speed USB, and microSDHC connectors are 42 inverted. Cables must be plugged in accordingly, and microSDHC cards must be inserted with 43 contacts up. 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 13

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 14 December 2010 Getting Started with the gplugD Console Access

1 2 3 4 Getting Started with the gplugD 5 3 6 7 8 3.1 Console Access 9 10 Embedded Linux systems typically provide console access for interacting with a boot loader, 11 observing start-up messages, editing configuration files, and issuing commands from a shell. A 12 Prolific Technology PL-2303 USB-to-serial Bridge Controller is used for the console serial port on the 13 gplugD. The following instructions assume a PC running Windows XP with appropriate user rights 14 and a terminal program such as a recent version of TeraTerm. 15 1. Visit http://www.prolific.com.tw to download the PL-2303 drivers for the, then run the installer. 16 17 2. Connect an available PC USB port to the gplugD serial port (the USB mini B receptacle above 18 the Ethernet RJ-45 jack) using one of the enclosed USB mini B cables. 19 3. Power-up the plug using the desktop adapter and extension cord. 20 4. Wait for Windows to enumerate the PL-2303 device and load its driver as shown in Figure 1. 21 22 23 Figure 1: PL-2303 USB Enumeration 24 25 26

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 5. Go to the Device Manager (Start Menu --> Settings --> Control Panel --> System --> Hardware --> 49 Device Manager). Expand the Ports (COM and LPT) drop-down and note the COM port 50 assigned to the PL-2303 (see Figure 2). 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 15

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 Figure 2: COM Port Assignment 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 6. Launch TeraTerm, and select “Serial port…” from the Setup menu. Choose the COM port 34 assigned to the Prolific driver in the Device Manager from the “Port” drop-down menu (Figure 3). 35 36 Figure 3: TeraTerm Serial Port Setup 37 38 39

40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 16 December 2010 Getting Started with the gplugD Console Access

If necessary, change the baud rate to 115200, data to 8 bit, and parity to none. Click “OK” to 1 apply the changes. 2 3 After the serial port is configured, start-up messages scroll by as Linux boots until the login prompt is 4 reached (see Figure 4). 5 6 Figure 4: gplugD Login Prompt 7 8

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Login as “root” with “nosoup4u” as the password. From this default shell, typical command line 30 programs are available. For example, dpkg –l | more lists the installed software packages. 31 U-Boot provides a short delay before loading the Linux kernel and launching the operating system. 32 From the shell, enter “reboot” to shutdown Linux and reset the chip. 33 34 7. Press any key to halt OS loading when the U-Boot start-up message appears (Figure 5). 35 36 37 Figure 5: U-Boot Start-Up 38 39

40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 17

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

Enter “help” to get a list of U-Boot commands. Enter “boot” to load the kernel and start Linux. 1 2 3 3.2 Remote Access with Secure Shell (SSH) 4 Secure Shell (SSH) can be used to access the gplugD when it is connected to a network. The steps 5 that follow assume either (a) that the Plug has been reconfigured to use a static IP address or (b) 6 that its dynamically assigned IP address is known. Any client that supports Version 2 of the SSH 7 protocol can be used, which makes TeraTerm a particularly convenient choice for this example. 8 9 1. Select “New connection…” from the File menu, enter the Plug’s IP address, select the SSH radio 10 button, chose “SSH2” from the SSH version drop-down menu, and click “OK” (see Figure 6). 11 12 13 Figure 6: TeraTerm SSH Setup 14 15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2. When connecting to any machine not explicitly listed in its “hosts” file, the SSH client displays a 35 warning message as shown in Figure 7: 36

37 38 Figure 7: SSH Unrecognized Host Warning Message 39 40 41

42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 18 December 2010 Getting Started with the gplugD Using a Keyboard, Mouse, and HDMI Display

Allow TeraTerm to add the gplugD IP address to its list of known hosts, if preferred. This warning 1 message is displayed any time TeraTerm connects to a machine that is not listed (either via IP 2 address or fully-qualified domain name) in its host file. Click “Continue.” 3 4 3. Enter “root” and “nosoup4u” for the user name and password, respectively, at the next prompt, 5 and click “OK” (see Figure 8). 6 7 Figure 8: SSH Authentication 8 9 10

11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 4. At the shell prompt, type “exit” or “logout” to disconnect. 33 34 35 3.3 Using a Keyboard, Mouse, and HDMI Display 36 37 With a network connection, keyboard, mouse, and flat panel display with HDMI, the gplugD can be 38 used as a standalone Linux machine. Follow these steps to boot the gplugD and use the Linux 39 desktop: 40 1. With the gplugD powered down, plug in a USB mouse, USB keyboard, and a flat panel display 41 with a free HDMI input using the provided cable. Connect the RJ-45 jack to a wired Ethernet 42 network. Do not connect power to the Plug yet. 43 2. Turn on the display and select the HDMI input to which the gplugD is connected. 44 45 3. Connect power to the Plug NOW. 46 Boot time is about 40 seconds with X initializing the display around the 30-second mark. On some 47 flat-panel monitors and TVs, the desktop toolbar may extend below the visible screen area. 48 Depending on the particular display make and model, this viewing area can be adjusted by 49 navigating to the picture settings or adjustment menu and selecting “just scan” or disabling 50 overscan. 51 52 To shutdown the gplugD from the desktop, click the monitor icon in the lower left corner, select 53 “Logout”, and then “Shutdown” (see Figure 9). 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 19

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 Figure 9: gplugD Shutdown 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Although the desktop icons and toolbar disappear, nothing else on the display indicates that the Plug 27 has shut down. On the console, however, status messages continue to be output, with a final 28 “System halted” message appearing after about 20 seconds (Figure 10). 29 30

31 Figure 10: System Halted Message 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 20 December 2010 Getting Started with the gplugD Remote Access with VNC

1 2 3.4 Remote Access with VNC 3 If there is no convenient way to connect a display to the gplugD, use the following procedure to 4 remotely access the desktop with VNC: 5 6 1. Visit http://www.tightvnc.com/ and download the Windows installer for TightVNC. Run the 7 installer, and at the “Choose Components” screen, uncheck “TightVNC Server” before continuing. 8 2. With the gplugD powered up and connected to a wired Ethernet network with Internet access, 9 get to the shell command prompt using the console serial port or SSH. Install TightVNC Server 10 by entering “apt-get install tightvncserver” at the command prompt, and approve the installation 11 of the “xbase-clients” and “tightvncserver packages” (see Figure 11). 12 13 14 Figure 11: TightVNC Server Installation 15 16 17

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 3. Launch TightVNC Server by issuing the command “tightvncserver.” Passwords are limited in 36 length to 8 characters by the VNC protocol, so use the gplugD root password “nosoup4u” when 37 prompted (see Figure 12). Also, do not create a view-only password. Take note of the X desktop 38 name, which should be “gplugD:1” the first time TightVNC Server is run. 39 40 41 Figure 12: TightVNC Server Password Setup 42 43

44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 21

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

4. The Plug IP address must be known to connect with VNC. If using the console serial port, enter 1 “ifconfig eth0” at the command prompt and note the IP address (see Figure 13). 2

3 4 Figure 13: Plug IP Address 5 6 7

8 9 10 11 12 13 14 15 16 17 18 19 5. Now run TightVNC Viewer (Start Menu --> Programs --> TightVNC --> TightVNC Viewer). Enter 20 21 the IP address of the gplugD followed by “:1” in the “TightVNC Server” box when prompted (see 22 Figure 14). 23

24 Figure 14: TightVNC View New Connection Window 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 6. When prompted for the password, enter “nosoup4u” just as was done in Step 3 when launching 49 TightVNC Server (Figure 15). 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 22 December 2010 Getting Started with the gplugD Remote Access with VNC

1 2 Figure 15: TightVNC Password Entry 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 7. If the remote desktop is too large to fit in the window, click the “Connection options...” button at 31 the left of the TightVNC Viewer toolbar and choose a suitable level from the Scale by dropdown 32 (see Figure 16). 33 34 Figure 16: TightVNC Viewer Screen Scaling 35 36 37

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 23

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

8. Shutdown VNC by entering “tightvncserver –kill :1” at the shell command prompt. When 1 TightVNC Server is next launched, it uses the password created in Step 3. If this is not 2 preferred, remove the local password file with “rm ~/.vnc/passwd” (see Figure 17). 3

4 5 Figure 17: TightVNC Server Shutdown 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 24 December 2010 File Systems and Partitions Where are the microSDHC cards in /dev?

1 2 3 4 File Systems and Partitions 5 4 6 7 8 4.1 Where are the microSDHC cards in /dev? 9 10 Linux device drivers are accessed via the /dev directory. This screenshot shows a listing of the /dev 11 directory on the gplugD with cards present in both external microSDHC slots and the internal slot 12 (Figure 18). 13 14 15 Figure 18: /dev Directory Listing 16 17 18

19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 Each partition on a microSDHC card also has its own /dev node. For example, the card from which 40 Linux boots, which is always instantiated as /dev/mmcblk0, has two partitions: /dev/mmcblk0p1 and 41 /dev/mmcblk0p2. 42 The /dev assignment of the internal and second external microSDHC card slots is not consistent 43 each time the gplugD boots. In Figure 19, the start-up messages that follow power-on show 44 assignment of the internal slot to /dev/mmcblk1 and the external slot to /dev/mmcblk2. As noted in 45 the introduction chapter, the gplugD comes with an 8 GB Class 6 microSDHC card installed in the 46 internal slot. 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 25

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 Figure 19: Power-On microSDHC Slot Assignment 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Upon warm boot (for example, pressing the reset button or issuing the shell “reboot” command), 28 however, the assignment is reversed: internal = /dev/mmcblk2 and external = /dev/mmcblk1. See 29 Figure 20 30 31 32 Figure 20: Warm Boot microSDHC Assignment 33 34 35

36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 26 December 2010 File Systems and Partitions Mounting Partitions

If no card is installed in the external slot or a card is not installed until after Linux boots, the internal 1 microSDHC card is always assigned /dev/mmcblk1. 2 3 4 4.2 Mounting Partitions 5 Mounting storage partitions on the gplugD is performed the same way as it is on other Linux 6 platforms. For example, to mount the kernel partition on the boot microSDHC device (see 7 Figure 21). 8

9 10 Figure 21: Mounting Kernel Partition on Boot microSDHC Device 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1. Create a mount point in a suitable directory. In the screen shot above, this task is performed by 28 issuing mkdir /mnt/plug_kernel. Placing storage mount points in the /mnt directory is standard 29 Linux practice. 30 31 2. Use “mount /dev/mmcblk0p1 /mnt/plug_kernel” to mount the kernel partition. Listing the 32 /mnt/plug_kernel directory shows that it holds a readme file and the compressed kernel zImage 33 file. 34 3. To unmount the kernel partition, simply use “umount /mnt/plug_kernel.” 35 The boot microSDHC card cannot be removed because the gplugD root file system / resides on the 36 /dev/mmcblk0p1 partition as shown in the /etc/mtab file (see Figure 22). 37 38 39 Figure 22: Root File System Mounted on /dev/mmcblk0p2 in /etc/mtab 40 41 42

43 44 45 46 47 48 49 50 51 52 53 54 55 Use the same procedure for the internal 8 GB microSDHC card. 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 27

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

In Figure 6, /mnt/internal_usdhc is used for the mount point. The “df -h” command shows that this 1 gplugD internal microSDHC card has approximately 7.2 GB of free space (Figure 23). 2 3

4 Figure 23: Free Space Available on Internal 8 GB microSDHC Card 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 External USB mass storage devices (hard drives, flash drives, and memory card readers) are 23 mounted in a similar fashion, but they use the Linux SCSI driver and use the /dev/sdX naming 24 convention (/dev/sda, /dev/sdb, etc). When using the console serial port, information about USB hot 25 plug events is shown (these same messages can be read with “dmesg | tail -20” when logged into the 26 gplugD via SSH). In Figure 24, /dev/sda is created for the USB flash drive, and its single partition is 27 mounted with “mount /dev/sda1 /mnt/.” 28

29 30 Figure 24: USB Flash Drive on /dev/sda 31 32 33

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 28 December 2010 File Systems and Partitions New Boot Card Setup

1 4.3 New Boot Card Setup 2 The gplugD boot microSDHC card has two partitions — one with a DOS file system and one with a 3 Linux file system — and cannot be recreated under any Windows operating system. In the 4 procedure that follows, a bootable SD card with a “live” Ubuntu Linux 10.10 distribution is used. The 5 new kernel image and file system archive for the gplugD are placed in a folder named “gplugD” in the 6 root directory of the SD card. Any recent version of Linux can also be used regardless of the boot 7 media. 8 9 The only additional requirement is some means of reading and writing a microSDHC card. In the 10 steps that follow, a USB card reader is used. Integrated SD card readers are found on many 11 notebook computers and may be used along with a microSD-to-SD adapter. The gplugD boot card is 12 a 4 GB microSDHC card, so when rebuilding it, the card reader must be SDHC-compatible. 13 However, the gplugD kernel needs only a 4 MB partition, and the uncompressed root file system is 14 on the order of 900 MB, so even a 1 GB card can be used, eliminating the need for a 15 SDHC-compatible reader. 16 17 Boot the Linux operating system. When using the Ubuntu Linux 10.10 “live” trial, select the “Try 18 Ubuntu” option when prompted. There is no need to install the operating system when following 19 these instructions. See Figure 25. 20 21 Figure 25: Ubuntu “Live” Trial 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 1. Insert the new microSDHC card into the card reader. Ubuntu automounts the card and opens it 48 in a file manager window. Close this window. See Figure 26. 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 29

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 Figure 26: Ubuntu Automounts the New microSDHC Card 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2. 3. Navigate to System --> Administration and select “GParted Partition Editor” (Figure 27). 27 28 29 Figure 27: Run the GParted Partition Editor 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 30 December 2010 File Systems and Partitions New Boot Card Setup

After GParted scans the available storage devices, select last entry from the drop-down menu in the 1 upper right corner of the GParted window. Linux assigns storage drivers dynamically and in order. 2 The last entry in the devices drop-down menu corresponds to the new microSDHC card as long as it 3 was inserted after Linux boots. (On notebook computers with integrated SD card readers, look for 4 /dev/mmcblk0 on the drop-down menu). See Figure 28. 5 6

7 Figure 28: Select the New microSDHC Card Device 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 3. Before the partition table on the SD card can be modified, any mounted partitions must be 27 unmounted. Right click on each partition listed (new cards and those used in digital cameras, 28 MP3 players, and other electronic devices likely have only a single partition), and select 29 Unmount. See Figure 29. 30

31 32 Figure 29: Unmount Previously Mounted Partitions 33 34 35

36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 4. Next, right click on each partition and select Delete from the menu (Figure 30). 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 31

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 Figure 30: Delete Existing Partitions 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 5. Create a new FAT16 partition for the kernel “zImage” file by right clicking on the unallocated 29 space and selecting New from the menu (Figure 31). 30

31 32 Figure 31: Creating a FAT16 Partition for the Linux Kernel 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 32 December 2010 File Systems and Partitions New Boot Card Setup

6. In the Create new Partition dialog box, (a) make the New size (MiB) big enough to hold the 1 “zImage” file (4 MiB is sufficient for the stock gplugD kernel), (b) select “fat16” for the File 2 system, (c) use “plug_kernel” for the new partition Label, and (d) click the Add button 3 (Figure 32). 4

5 6 Figure 32: FAT16 Partition Parameters 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 7. Repeat the same procedure for all of the remaining unallocated space. GParted will default to 30 all of the remaining space for the new partition size. Select “ext3” for the File system, use 31 “plug_rootfs” for the new partition, and then click the Add button (see Figure 33). 32 33 Figure 33: ext3 Partitions Parameters 34 35 36

37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 33

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

8. Now click the green check mark in the toolbar to execute the chosen partition modifications 1 (Figure 34). 2

3 4 Figure 34: Apply Pending Partition Modifications 5 6 7

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 9. Once GParted finishes, the new partitions must be mounted in order to copy the kernel image 31 and root file system onto them. Navigate to System --> Administration and select Disk Utility 32 (Figure 35). 33

34 35 Figure 35: Launch the Disk Utility 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 34 December 2010 File Systems and Partitions New Boot Card Setup

10. Select the SD card reader under peripheral devices. A graphical representation of the two 1 partitions created on the microSDHC will be shown. Select the plug_kernel partition, then click 2 the Mount Volume button. Notice that the FAT16 partition is mounted at /media/plug_kernel (see 3 Figure 36). 4

5 6 Figure 36: Mounting the FAT16 Partition 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 11. Now click the plug_rootfs partition, and mount it. Notice that the EXT3 partition is mounted at 29 /media/plug_rootfs (see Figure 37). 30 31

32 Figure 37: Mount the ext3 Partition 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 35

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

12. To copy the kernel image file and extract the root file system to their respective partitions, 1 navigate to Applications --> Accessories and select “Terminal” to get to the command shell 2 (Figure 38). 3

4 5 Figure 38: Launch the Terminal 6 7 8

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 13. At the command prompt, enter “cp /cdrom/gplugD/zImage/media/plug_kernel” (see Figure 39). 28 The “zImage” file resides in /cdrom/gplugD/ when using the Ubuntu Linux 10.10 “live” trial with 29 the kernel image and file system archive placed in a folder named “gplugD” in the root directory 30 of the bootable SD card or USB drive. The path to these files may be different if using either a 31 computer that already has Linux installed or the “live” trial of a different Linux distribution. 32 33 34 Figure 39: Copy the Kernel zImage File to the FAT16 Partition 35 36 37

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 36 December 2010 File Systems and Partitions New Boot Card Setup

14. The root file system archive must be extracted to the EXT3 partition now mounted at 1 /media/plug_rootfs. Make this the working directory by entering “cd/media/plug_rootfs” 2 (Figure 40). 3

4 5 Figure 40: Change Directory to the ext3 Partition for the Root File System 6 7 8

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 15. Extract the contents of the root file system archive with “sudo tar –xvjf 29 /cdrom/gplugD/gplugD_rootfs_v0.3.tar.bz2.” Use the appropriate file name if a new release of the 30 gplugD root file system has been made available. Version 0.3 of the root file system is about 31 470 MB and, depending upon the write speed of the microSDHC card used, it may take around 32 10 minutes to extract all of the files (see Figure 41). 33 34 35 Figure 41: Decompress and Extract the Root File System Tarball 36 37 38

39 40 41 42 43 44 45 46 47 48 49 50 16. When all of the files have been extracted, the SD card must be safely removed from the reader. 51 If using an integrated SD card reader, launch the Disk Utility (see Step 11), unmount the FAT16 52 and EXT3 partitions, and eject the card from the reader. USB card readers can be disconnected 53 by right-clicking on either the plug_kernel or the plug_rootfs icon and selecting Safely Remove 54 Drive (see Figure 42). 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 37

Marvell® ARMADA™ 16x Plug Computer Development Kit Users Manual

1 2 Figure 42: Safely Remove the microSDHC Card 3 4

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 File system writes to the microSDHC card may still be pending in the disk cache, and Ubuntu Linux 29 displays an activity message if this is the case. Do not remove the microSDHC card until this window 30 is dismissed (see Figure 43). The Plug can now be booted with the newly created card. Be sure to 31 insert the contacts up into the microSD socket on the right (nearest the reset button) before applying 32 power. 33

34 35 Figure 43: Wait for Linux to Finish Before Removing the New microSDHC Card 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Doc. No. MV-S400320-00 Rev. - Copyright © 2010 Marvell Page 38 December 2010 File Systems and Partitions New Boot Card Setup

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

Copyright © 2010 Marvell Doc. No. MV-S400320-00 Rev. - December 2010 Page 39 Back Cover

Marvell Semiconductor, Inc. 5488 Marvell Lane Santa Clara, CA 95054, USA Tel: 1.408.222.2500 Fax: 1.408.752.9028 www.marvell.com

Marvell. Moving Forward Faster