I recently purchased a Marsboard A10 development board from the Shenzhen based company HAOYU Electronics. The shipment to Bulgaria took less than 2 weeks via Hongkong post. On the Marsboard’s site there are some links to software, which can be used, a wiki page, and a forum about the board, however I had to successfully deal with some troubles when trying to use the solutions provided.
The board is advertised as being open, however not all issues about compilation and installation of software are clearly explained. Some images were not able to boot, the provided versions of the software were too old, e.g. Android version 4.0.4, Ubintu 12.06. The Linaro ubuntu distribution from the downloads page of Marsboard web site was running at very low frequency, with no change under heavy loads, probably due to poor bootloader configuration.
I noticed in this post that a Fedora 19 distribution for Cubieboard and other ARM boards was released. Cubieboard is very similar to Marsboard. I decided to try to adapt it to Marsboard A10.
As described in the README file of the distribution, after the image is copied to an SD card, a script select-board.sh from the boot partition must be run, in order to install the u-boot bootloader and the boot configuration for the particular board:
cd ~/Downloads/Marsboard wget http://scotland.proximity.on.ca/contrib-images/hansg/Fedora-19-a10-armhfp-r1.img.xz wget http://scotland.proximity.on.ca/contrib-images/hansg/README-F19 xzcat Fedora-19-a10-armhfp-r1.img.xz >Fedora-19-a10-armhfp-r1.img
Now make sure the SD card on which you want to install the image has volume least 8 GB, that the SD card is inserted in the reader, and that it is /dev/mmcblk0, now copy the image to the SD card
dd if=Fedora-19-a10-armhfp-r1.img of=/dev/mmcblk0 bs=4096 count=1926144 sync
The sync-ing flushes the cached information cached in memory to the physical medium. You may notice that it takes time, as a big part of the file was cached in the memory. After the sync command finishes, take out and re-insert the SD card. If you do this before the sync command has finished, the information saved on the SD card will become corrupt.
The problem was that the Marsboard board was not present in the list of the boards. I had to compile u-boot for Marsboard A10, accommodate the configurations for Marsboard, create a sub-directory for Marsboard under the boards/sun4i directory, and add the Marsboard profile in the select-board.sh script.
For each board with sun4i architecture there is a directory boards/sun4i/BOARDNICKNAME, where BOARDNICKNAME is the nickname of the board as defined in the select-board.sh script, used for identifying the board. There are u-boot.bin and sunxi-spl.bin files, which are part of u-boot, BOARDNICKNAME.fex file, with configuration parameters for the board, and a script.bin file, which is produced from BOARDNICKNAME.fex file using the fex2bin tool received from
mkdir -p ~/Downloads/Marsboard git clone https://github.com/linux-sunxi/sunxi-tools cd sunxi-tools make clean make ./fex2bin BOARDNICKNAME.fex >script.bin
So I’ll prepare a directory in which I’ll collect the files needed:
Follow the instruction in the How to compile u-boot for Marsboard A10 article. After the compilation, copy the needed files in the prepared directory above:
cp u-boot.bin spl/sunxi-spl.bin ~/Downloads/Marsboard/f19-boards-marsboard
Now we need the marsboard.fex and script.bin files. From the marsboard-android-4.0.4-sdk.7z archive we can find the .fex file, as this post suggests.
cd ~/Downloads/Marsboard wget http://www.haoyuelectronics.com/marsboard/marsboard-android-4.0.4-sdk.7z 7z l marsboard-android-4.0.4-sdk.7z 7z x marsboard-android-4.0.4-sdk.7z find marsboard-android-4.0.4-sdk -name '*.fex'
There are 2 files which can be the corect files:
By comparison of the files with the *.fex files from the uboot partition of the Fedora 19 image, e.g. we can find that sys_config1.fex is the correct *.fex file to copy to the board directory.
cp ./marsboard-android-4.0.4-sdk/tools/pack/chips/sun4i/configs/crane/marsboard/sys_config1.fex ./f19-boards-marsboard/marsboard.fex
Now translate the fex file to script.bin:
./sunxi-tools/fex2bin ./f19-boards-marsboard/marsboard.fex >./f19-boards-marsboard/script.bin
Remember that we left the SD card with the Fedora 19 image re-inserted, and the 1 and 3 partitions, labelled uboot and rootfs are mounted automatically to /run/media/$USERNAME/uboot and /run/media/$USERNAME/rootfs, where $USERNAME is the environment variable, which contains your username. Now copy the f19-boards-marsboard to the sun4i directory:
cp -R ./f19-boards-marsboard /run/media/$USERNAME/uboot/boards/sun4i/marsboard
Now what is left is to add marsboard in the select-board.sh script. This happens with only one line, marked below with ‘+’ to show the difference:
BOARDS+=(wobo-i5 "Wobo i5 TV Box") BOARDS+=(xzpad700 "XZPAD700 7\" tablet") +BOARDS+=(marsboard "Marsboard A10") if [ "$1" = "--help" -o -z "$DIALOG" -a -z "$BOARD" ]; then echo "Usage: \"$0 <board>\""
In the real select-board.sh the + in the start of the line should not exist. Now sync the changes and umount the filesystems from the SD card:
sync umount /run/media/$USERNAME/uboot /run/media/$USERNAME/rootfs
Now you can unplug the SD card from the card reader, plug it in the Marsboard, and enjoy your Fedora 19 installation.
You can find an archive with the files produced here: Fedora 19 on Marsboard A10 bootfiles