Open main menu

DAVE Developer's Wiki β

Changes

Creating a RFS with Buildroot

3,343 bytes added, 11:18, 14 January 2014
m
Adding platform specific components not provided with Buildroot
{{InfoBoxTop}}
{{Applies To Linux}}
{{AppliesToNaonAppliesToNaonFamily}}{{Applies To Diva}}
{{InfoBoxBottom}}
[[File: Buildroot-arch.jpg|600px]]
== Configure the build options ==
 
From the ''Build options'' menù you can define some custom directories for compilation output and file download. It is also recommended to enable the compiler cache and optionally set a custom directory.
 
[[File: Buildroot-options.jpg|600px]]
== Setting up the external toolchain ==
* Toolchain -> Toolchain origin-> Select "Pre-installed toolchain"
* Toolchain -> Toolchain path (eg. /home/shared/devel/dave/naon-DAA/sw/linux/sdk/arm-2009q1)
* Toolchain -> Toolchain prefix (eg. $(ARCH)-none-linux-gnueabi)* Toolchain -)> External toolchain C library -> Select glibc/eglibc* Toolchain -> Activate RPC support* Toolchain -> Activate C++ support
[[File: Buildroot-toolchain.jpg|600px]]
 
== System configuration ==
The list of available packages can be accessed entering the '''Package selection for the target''' option
It's important that busybox provides the '''depmod''' command, which is not enabled by default. To enable it, you need to modify the buildroot/package/busybox/busybox-1.20.x.config file adding
 
<pre>
CONFIG_DEPMOD=y
CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
</pre>
= Building the root file system =
</pre>
to start the build process(the "O=" parameter is optional), which will perform the following tasks:
* download source files (as required);
For more information, please refer to [http://buildroot.uclibc.org/downloads/manual/manual.html#_using_buildroot Using Buildroot Section] on the User Manual.
 
= Adding platform specific components not provided with Buildroot =
 
The targets usually provides specific features that relies on software components which can't be provided by the standard Buildroot project. Adding these components to the Buildroot root file system usually requires further operations, which depends on the particular target. The following sections provide instructions on how to perform these operations on '''DAVE Embedded Systems''' SOMs.
 
== Adding Naon/Maya specific components==
 
The following procedure allows adding the NELK components to the Buildroot root file system:
 
* modify the ''EZSDK_INSTALL_DIR''/Rules.make file, making the '''EXEC_DIR''' variable point to the Buildroot root file system directory
* enter the ''EZSDK_INSTALL_DIR'' and launch the <code>make all</code> command to build the components
* from the ''EZSDK_INSTALL_DIR'', launch the <code>make install</code> command
 
Unfortunately, the last command doesn't install all the components, so further operations are required. Assuming that:
 
* ''EXEC_DIR'' (Rules.make) points to the directory containg the buildroot RFS;
* $(EXEC_DIR).ori is the name of the original root file system provided with the NELK distribution;
* the busybox built with Buildroot and installed on the root file system supports the '''depmod''' command
 
you can easily add the following two targets to the ''EZSDK_INSTALL_DIR''/Makefile:
 
<pre>
load-firmware-buildroot-rfs_install:
cp $(EXEC_DIR).ori/etc/init.d/load-hd-firmware.sh $(EXEC_DIR)/usr/share/ti/ti-media-controller-utils/buildroot_rfs_firmware.sh
ln -s /usr/share/ti/ti-media-controller-utils/buildroot_rfs_firmware.sh $(EXEC_DIR)/etc/init.d/S70firm
cp $(EXEC_DIR).ori/usr/share/ti/ti-media-controller-utils/mm_dm81xxbm.bin $(EXEC_DIR)/usr/share/ti/ti-media-controller-utils
 
load-firmware-buildroot-rfs_clean:
rm -rf $(EXEC_DIR)/usr/share/ti/ti-media-controller-utils/buildroot_rfs_firmware.sh
rm -rf $(EXEC_DIR)/etc/init.d/S70firm
rm -rf $(EXEC_DIR)/usr/share/ti/ti-media-controller-utils/mm_dm81xxbm.bin
</pre>
 
The first target completes the installation. The following is a brief description of the commands:
 
* The first command copies the original load-hd-firmware.sh script renaming it "buildroot_rfs_firmware.sh".
* The second command creates a symbolic link to the "buildroot_rfs_firmware.sh" file, so that init can launch that script at startup
* The third command copies the mm_dm81xxbm.bin (external memory mapping) binary file, required by the "buildroot_rfs_firmware.sh" file
 
The second target restores the previous situation.