Building the Root file system for Mars 200 using Buildroot

From Ambedded
Jump to: navigation, search

Here list the instructions for building the Root file system for Mars 200 using Buildroot.
Build system could be a Debian o Ubuntu PC, compatibility libraries for X86_32 may be needed if using a 64 bit distro.


First change to / directory, and create a folder for cross-compiler tools

cd /
mkdir /kerneltools
cd /kerneltools


Download the gcc cross-compiler from Linaro

wget http://releases.linaro.org/14.02/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2014.02_linux.tar.xz
tar xf gcc-linaro-arm-linux-gnueabihf-4.8-2014.02_linux.tar.xz


and install the C Library

apt-get install lib32stdc++6


Now that we have a compiler able to create arm binaries, we can proceed to download the Buildroot source package to our working directory.

wget https://git.buildroot.net/buildroot/snapshot/buildroot-2016.02.tar.gz
tar -xvzf buildroot-2016.02.tar.gz


Then, download mars200 Buildroot customization file, for customizing the generated target file system.

wget ftp://your_account:your_password@ambedded.com/mars200/src/buildroot-custom-mars200-v1.0.tgz
tar -xvzf buildroot-custom-mars200-v1.0.tgz

In our working directory, we should have two sub directories,

./buildroot-2016.02
./buildroot-custom

The mars200 Buildroot customization file is based on the directory structure described in "Chapter 9. Project-specific customization" of the Buildroot user manual. (https://buildroot.org/downloads/manual/manual.html#customize)

Two default configuration file (put in ./buildroot-custom/configs) are provided for reference.
"mars200_min_defconfig" is used to generate a smallest root file system that can work on mars 200.
"mars200_defconfig" is used to generate a root file system as the pre-built binary.



The Root File system can be built and customized, just follow the steps below.

cd ./buildroot-2016.02
make  BR2_EXTERNAL=../buildroot-custom  mars200_defconfig
make  menuconfig
make


Here we will find the compiled root file system

./buildroot-2016.02/output/image/rootfs.tar.gz


We can upload it to Mars200 micro server following Install U-Boot, Linux Kernel and Root File System for Mars 200 page.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools