The new location is https://github.com/psanford/mirabox. I've turned it into a full git repository so that it is easier for others to contribute. This gist will not be updated anymore and I won't be checking the comments. Please open an issue or a pull request on the git repo.
There's not a lot of good documentation about Globalscale Technology's Mirabox so this page is intended to document everything I know about it. My goal is to run a modern kernel and bootloader on the Mirabox.
The Mirabox uses a Marvell Armada 370 SoC ARM chip. The Armada 370 uses the ARMv7-A architecture2. The Mirabox comes with:1
- 1GB of RAM
- 1GB of NAND flash
- 2 10/100/1000 ethernet ports
- 2 USB 3.0 host ports
- 1 microsd card reader (2? 1 external and 1 internal)
- 1 Mini PCIe expansion slot
- 3 GPIO LEDs
- 1 GPIO button
- 802.11b/g/n Wifi (88W8766)
- Bluetooth 4.0 (88W8766) (older hardware revs had BT 3.0)
In June 2014 Marvell released detail specs for the Armada 370 SoC:
- Product Brief: http://www.marvell.com/embedded-processors/armada-300/assets/Marvell_ARMADA_370_SoC.pdf
- Hardware Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-datasheet.pdf
- Functional Spec: http://www.marvell.com/embedded-processors/armada-300/assets/ARMADA370-FunctionalSpec-datasheet.pdf
The Mirabox originally came with a modified 2.6.35.9 kernel. More recent versions now ship with a modified 3.2.36 kernel.
Fortunately there is good support for the Armada 370 in more recent versions of the linux kernel.
What works in >= 3.14 kernel?
- USB
- LEDs
- Ethernet*
- SDCard
- Wireless**
- NAND flash (since 3.14)
*Ethernet works properly, but by default the NICs will have randomly assigned mac addresses. This can be done via uBoot10 if the mvneta is compiled into the kernel (not as a module). You can also read the uBoot variables for ethaddr and eth1addr using fw_printenv and set the mac addresses from an init script.
**Wireless works, but you must load the mvsdio kernel module with nodma=1 option11.
You will need a cross compiling toolchain to build the kernel. The easiest way to get that is by downloading the one provided by Globalscale. To actually build the kernel run the following commands:
export PATH="/home/build/armv7-marvell-linux-gnueabi/bin:$PATH"
make ARCH=arm CROSS_COMPILE=arm-marvell-linux-gnueabi- mvebu_defconfig
make ARCH=arm CROSS_COMPILE=arm-marvell-linux-gnueabi- zImage
make ARCH=arm CROSS_COMPILE=arm-marvell-linux-gnueabi- armada-370-mirabox.dtb
cp arch/arm/boot/zImage zImage-with-dtb
cat arch/arm/boot/dts/armada-370-mirabox.dtb >> zImage-with-dtb
./scripts/mkuboot.sh -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'Linux-marvell' -d zImage-with-dtb uImage
The uBoot version that ships with the Mirabox doesn't support device tree, you you need to append the device tree to the kernel (and select the Use appended device tree
option in the kernel config.
The Mirabox comes with an old version of U-Boot, modified to support the hardware. Currently there is no support in mainline U-Boot for the Mirabox.
Initial work has been done to support the Mirabox in the Barebox Bootloader by Free Electrons. This is currently limited to booting via serial port7.
You will need to extract a binary blob from an existing bootloader for the mirabox. The easiest way to do this is to download the u-boot image from Globalscale.
mkdir /tmp/mirabox
./scripts/kwbimage -x -i ~/downloads/u-boot-db88f6710bp_nand.bin -o /tmp/mirabox
To build barebox:
export PATH="/home/build/armv7-marvell-linux-gnueabi/bin:$PATH"
cp /tmp/mirabox/kwbimage.cfg kwbimage.cfg
sed -i -e 's/nand/uart/' kwbimage.cfg
make ARCH=arm CROSS_COMPILE=arm-marvell-linux-gnueabi- globalscale_mirabox_defconfig
make ARCH=arm CROSS_COMPILE=arm-marvell-linux-gnueabi- make
To boot to barebox, run the following command:
./scripts/kwboot -t -b barebox-flash-image -B 115200 /dev/ttyUSB0
Marvell EBU SoC supports booting an image over UART8, kwboot is a tool that implements this protocol.
The Marvell SoC requires a binary blob on boot for DDR3 training9. This is bundled with the bootloader in a specific format. kwbimage can be used to extract that binary blob from one image and add it to a new bootloader image.
Source and binaries from Globalscale can be found at:
I want to thank the folks at Free Electrons for the work they have done to support the Armada 370 and the Mirabox.
Marvell just made the full functional specification and hardware specification for their Armada 370 SoCs freely available on their Armada 300 product page.
http://www.marvell.com/embedded-processors/armada-300/