ARM 64 Bit: walkthrough of the Mustang

The Dragon Propulsion Laboratory recently acquired an Applied Micro Mustang board thanks to a developer promotion Jon pointed me to, and the arrival of the holidays finally gave me a chance to take the device for a spin.

The Mustang, or more properly the X-Gene X-C1 evaluation kit, is APM’s evaluation board for the APM883208-X1 processor, an 8-core, 64-bit ARM processor that is one of the earliest incarnations of ARM’s v8 architecture, ARM’s silver bullet for the server market.

APM XC-1 Mustang test setup

Hardware Setup #

The board is a mini-ITX form factor platform meant to evaluate the processor, and is not a production device. My Lian Li test bench was not designed for this form factor, but it was nothing that a quick drill and tap action would not swiftly rectify. I developed a deep-seated allergy to boards sitting free on my desk during my days an embedded developer - the sanity and consistency that a test bench brings are not to be underestimated. If you do not have a test bench handy, the board comes with a set of insulated plastic standoffs you are hereby strongly encouraged to use.

Thermaltake TR2

Once installed, the board is powered by an oversized Thermaltake TR2 supplying up to 430W of power (the kit includes a FLEX form factor power supply that I’ll be promptly repurposing as a cold spare for my OpenStack test cluster). Next to it is a new Intel 320 SSD from an eBay auction where recently I grabbed a handful - and for $30 each, who wouldn’t? Small at 80 GB, but perfect for system tests not requiring SATA 3.0’s 6 Gbps thruput. But I digress.

Interfacing with the board’s console is via serial interface, and the gender-changer supplied to interface the kit’s USB cable and the board’s DB-9 connector unfortunately has an extra set of screw terminals that get in the way - cue the pliers. Once those terminals are removed without incident, the board is finally set up for testing.

Lian Li test bench

The Processor #

The X-Gene, named after the mutant factor in Marvel comics, is APM’s ARM v8 silicon implementation. This processor configuration is codenamed “Storm”, 8-cores running at 1.6 GHz etched with a 40nm process. There may be some room for over-clocking with the fastest samples today running at 2.4 GHz.

Storm APM X-Gene X-C1

HP recently announced the Proliant m400 cartridge as part of project Moonshot, which uses the same silicon in a production, rack-friendly configuration (quad channel 64BG ECC memory, dual 10GE) and shipped certified for Ubuntu Server from the onset.

the Mustang in operation

The Board #

The Mustang is sold in two versions, plus sporting a higher clock speed, and basic with more limited connectivity options and a lower CPU clock speed.

The basic board itself is unusual in that not all the connectors physically present are actually functional - for example, of the four SATA interfaces present, only one is active, the others are plugged to avoid any confusion as to which one to use. The connectivity complement may improve over time with newer firmware releases (or hacks), as it appears that both the basic and plus boards were made in a single production run, with the cheaper board’ functionality somehow selectively disabled in hardware or firmware.

SATA ports detail

Here is what the specs promise for the basic version:

Mustang labeled

The documentation skips over the empty 10Gb SFP fiber port located between ethernet and USB, as does the fact that there are three physical ethernet ports, but only two are itemized in the board specs. The single 1Gb Ethernet over the USB ports is labeled “management” in the documentation, but don’t let that term mislead you into thinking there’s a BMC on the board. Rumour has it there was a plan for a BMC, but it never made it into the final version. All of these ports are fully functional in the plus version of the board, so check your documentation first to avoid unnecessary frustration.

Side view - ports on the APM Mustang

Bringing up Ubuntu #

The instructions itemize the steps to set up a development host with a serial connection to the board. On a Linux host, there is just a single command you really need to know about:

sudo screen /dev/ttyUSB0 115200

if you power cycle the device, you will see U-Boot quickly initializing Applied Micro Linux, a BSP custom-made by the manufacturer.

Ubuntu has been certified for the Storm SoC since it first shipped, and we will set it up on the intel 320 SSD. Using an Apricorn SATA-to-USB cable to mount the drive on the host system, launch gparted.

Intel 320 SSD partitioning with Apricorn cable

sudo gparted /dev/sdb

Using a sensible 8GB for swap and allowing 2GB for /boot just in case we wind up adding a variety of kernels in our experiments, we partition the system and allocate all remaining space to the root filesystem. I elected not to use LVM for simplicity, but that should not stop you if you think your filesystem may need resizing later.

gparted's view of the SSD

I set the boot flag on /boot, and used an ext3 filesystem for added compatibility with older U-Boot releases, as it makes the drive more “portable” to other devices.

Now head over to http://ports.ubuntu.com/ubuntu-port… and download all three files found there. Place the files in the /boot partition, adding the .installer extension to keep them from being overwritten later, and your drive is ready to boot.

Check the connections for serial, SATA (use the open port), ethernet (use the port above the USB A sockets), and the all important power plug — now flick the switch and let the juice flow, you should be ready to connect. On your host system, you want to attach screen to the first virtual serial port:

sudo screen /dev/ttyUSB0 115200

U-Boot prompt

To start, interrupt U-Boot’s startup sequence during its timeout period by hitting the enter. Instructions on the Ubuntu Wiki detail how to carry out a netboot install from a remote TFTP server, but we have no desire to do all that network setup, we just bootstrap the installer live from memory using U-Boot instead:

scsi init
ext4ls scsi 0:1

You should have the three files you just placed in /boot listed in response. Now let’s load them into RAM and execute the installer straight from there:

ext4load scsi 0 ${kernel_addr_r} uImage.installer
ext4load scsi 0 ${ramdisk_addr_r} uInitrd.installer
ext4load scsi 0 ${fdt_addr_r} apm-mustang.dtb.installer
run addtty
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

Ubuntu's netboot installer

As you work through the installer’s questions, Ubuntu is being set up on the SSD drive. After you reboot, halt U-Boot’ startup once again, and configure the board to boot from SATA:

setenv bootcmd_old ${bootcmd}
setenv bootcmd scsi init; ext4load scsi 0 ${script_addr_r} boot.scr; source ${script_addr_r}
saveenv

You are done. For this time only, you will need to instruct U-Boot to proceed with the startup - in future bootups, it will do so automatically.

boot

Done!

Sauron welcomes you to Mordor.

Comments? Discuss on Hacker News.

UPDATE
You can activate all four SATA ports by setting the following parameter in the U-Boot environment:

setenv SATA 0x3c
saveenv
reset 
 
116
Kudos
 
116
Kudos

Now read this

Ceph Storage — Enterprise Meets Community

with Sage Weil (Red Hat) Sage and I renewed the now annual tradition of delivering a recorded roadmap session for the Red Hat Summit virtual audience. This year, we have been selected for the launch of Red Hat TV, which will happen later... Continue →