March 2018 marks the addition of both the Single Shot and Double Shot flavors of the Marvell MACCHIATObin® boards into mainline OpenWrt.
As of March 2018, both the Single Shot and Double Shot flavors of the Marvell MACCHIATObin® boards are officially supported in mainline OpenWrt based on vanilla kernel 4.14. The MACCHIATObin mainline OpenWrt patch set is part of an ongoing collaboration between Marvell and Sartura.
Sartura's integration and Open Source services include providing patch sets and support for various Open Source projects. This blog post will describe the porting workflow in adding new subtarget and board support to mainline OpenWrt, specifically for the Marvell MACCHIATObin board, a mini-ITX form-factor ARMv8 64bit platform based on the Marvell® hyperscale SBSA-compliant ARMADA® 8040 system on chip (SoC) that features quad-core high-performance Cortex®-A72 ARM® 64bit CPUs. The board is produced by SolidRun, and different flavors and optional accessories can be ordered from SolidRun's official website.
OpenWrt is an open source firmware designed for embedded devices that is highly extensible and enables both users and customers to install a powerful, highly customizable variant of Linux® on their routers.
By evading the lock-in that comes with single, static firmwares through offering a fully writable file system and package management, OpenWrt has become the go-to embedded distribution for companies aiming at a wider market. A large base of users and companies already using OpenWrt and its developer-friendly ecosystem make OpenWrt a logical OS choice for a board targeting a wide community.
The Marvell mvebu target was added to the OpenWrt project in 2013. Until recently, this target only contained support for 32-bit Cortex-A9 ARMADA SoCs, namely for ARMADA XP, ARMADA 38x and ARMADA 37x SoC families. Recent community activity resulted in extending the mvebu target and enabling subtarget support for Cortex-A53 64-bit platforms such as the Marvell ESPRESSObin® board.
Sartura built on this effort and created a new subtarget for Cortex-A72 based devices, located in the target/linux/mvebu/cortexa72 directory. The target.mk makefile in directory contains the definitions necessary for proper target and board selection in make menuconfig and the OpenWrt build system variables used for cross compiling OpenWrt installable images (kernel and root file system).
The config-default file in this directory contains the default kernel configuration for Marvell ARMADA A7K and A8K support. This default configuration extends to the tree-wide default Linux kernel 4.14 configuration located in target/linux/generic/config-4.14 and mvebu target default configuration in target/linux/mvebu/config-4.14.
With this addition being the first platform leveraging Cortex-A72 targets, additional cross-compiler flags were also set in include/target.mk makefile by providing the -mcpu=cortex-a72 option to the compiler.
Additional work was also done to assure OpenWrt userspace integration. This included adding the default network configuration in target/linux/mvebu/base-files/etc/board.d/02_network and adding U-Boot script variables and instructions in target/linux/mvebu/image/armada-macchiatobin.bootscript.
In compliance with Open Source contribution guidelines, the pull request provides a verbose description of the added board support along with the instructions needed to boot the board. The entire pull request can be viewed here.
This support makes it easier to add additional Marvell ARMADA 7K/8K-based devices into the mainline OpenWrt project.
Read more on our Open Source-related services on our Open Source page or get in touch with us on email@example.com.