Open main menu

DAVE Developer's Wiki β

Changes

Build system (BELK/BXELK)

1,609 bytes added, 09:25, 28 October 2015
Pre-built toolchain
One of the most important components of a Linux system is the root file system. A good development root file system provides the developer with all the useful tools that can help him/her on his/her work. Such a root file system can become very big in size, so it's hard to store it in flash memory. User could split the file system in different parts, mounting them from different media (flash, network, USB...). But the most convenient thing is to mount the whole root file system from the network, allowing the host system and the target to share the same files. In this way, the developer can quickly modify the root file system, even “on the fly” (meaning that the file system can be modified while the system is running). The most common way to setup a system like the one described is through NFS (installation and configuration depends on the host Linux distribution).
===Pre-built toolchain===
To start developing software for the BORA /BORAX platform, users need a proper toolchain, which can be pre-built or built-from-scratch. Building a toolchain from scratch is not a trivial task (though using a recent build system is easier than in the past), so the recommended approach consists in using a pre-built toolchain. The toolchain used as a reference for BELK is the toolchain provided with the Xilinx SDK (usually installed into <code>/opt/Xilinx/SDK/<Vivado_version>/gnu/arm/lin/bin</code>).Once the toolchain is installed, create a a bash script (<code>env.sh</code>) containing the following lines: <pre>
export PATH=<path_to_toolchain>:$PATH
export ARCH=arm
export CROSS_COMPILE=<toolchain_prefix>
</pre>
For example, for the Vivado 2014.4 release, the variables are the following:
<pre>
export PATH=/opt/Xilinx/SDK/2014.4/gnu/arm/lin/bin:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
</pre>
Use the following command to set up the environment shell variables required during the building procedure:
<pre>source env.sh</pre>===Pre-built root file system===Linux needs a root file system: a root file system must contain everything needed to support the Linux system (applications, settings, data, ..). The root file system is the file system that is contained on the same partition on which the root directory is located. The Linux kernel, at the end of its startup stage, mounts the root file system on the configured root device and finally launches the <code>/sbin/init</code>, the first user space process and "father" of all the other processes.For more information on the Linux filesystem, please refer to http://www.thegeekstuff.com/2010/09/linux-file-system-structure/. BELK provides a pre-built root file system, that can be used during the evaluation/development phase, since it provides a rich set of packages for working with the BORA platform. Since this pre-built root file system is not generated using the same cross-toolchain used for building the BELK software components, we recommend to choose one of the following options:*if a native compiler is available on the root file system, go for native compilation instead of cross-compilation/when you cross-compile, rely on static linking and avoid dynamic linking against the root file system librariesbuild your application using the same cross-toolchain (when available) used for building the root file systemPlease refer to Sections TBD and TBD for further details.===U-Boot and Linux git repositories===BELK source trees for U-Boot and Linux kernel are provided as git repositories.
4,650
edits