Personal tools

VisionSOM-6ULL Buildroot Developer Guide: Difference between revisions

From SomLabs Wiki

Jump to: navigation, search
Created page with "{{PageHeader|VisionSOM-6ULL - Buildroot}} __toc__ = Introduction = Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-comp..."
 
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 8: Line 8:
Detailed manual can be found here: https://buildroot.org/docs.html
Detailed manual can be found here: https://buildroot.org/docs.html


It's advantage is relatively short build time (in comparison i.e. to Yocto) - complete Linux image can be build in ca. 15-20 minutes on modern PC.
Its advantage is relatively short build time (in comparison i.e. to Yocto) - complete Linux image can be build in ca. 15-20 minutes on modern PC.
It is also easy to learn and modify.
It is also easy to learn and modify.


As for now, we provide our own buildroot tree source with changes for SomLabs VisionSOM 6ULL board.
As for now, we provide our own buildroot tree source with changes for SoMLabs VisionSOM 6ULL board.


Buildroot is able also to build complete cross compiler (GCC) with necessary libraries, but we are using precompiled toolchain from Linaro.
Buildroot is able also to build complete cross compiler (GCC) with necessary libraries, but we are using precompiled toolchain from Linaro.


= Host PC requirements =
= Host PC requirements =
For building of embedded Linux system with Buildroot we need host PC, running Linux, recommended is 64-bit Ubuntu 16.04 or any derivative (Kubuntu/Mint18.x/etc.)
For building of embedded Linux system with Buildroot we need host PC, running Linux, recommended is 64-bit Ubuntu 16.04 or any derivative (Kubuntu/Mint18.x/etc.).


As first step, some host tools needs to be installed. To do this, start console and run following commands:
As the first step, some host tools need to be installed. To do this, start console and run following commands:
<pre>
<pre>
sudo apt-get install build-essential git subversion g++ g++-multilib libncurses5-dev
sudo apt-get install build-essential git subversion g++ g++-multilib libncurses5-dev
Line 26: Line 26:
To start build, first you need to obtain sources for buildroot.
To start build, first you need to obtain sources for buildroot.
<pre>
<pre>
git clone git@gitlab.com:somlabs/somlabs-buildroot.git -b somlabs-2017.08
git clone -b somlabs-2019.05.x https://github.com/somlabs/somlabs-buildroot
</pre>
</pre>
This command downloads complete source tree of buildroot from gitlab server and checkout branch "somlabs-2017.08"    
This command downloads complete source tree of buildroot from github server.
 
When operation is finished, go to directory "somlabs-buildroot" and start build process with proper configuration file, in the commands below replace DEFCONFIG_NAME with:
* ''somlabs_visionsom_6ull_nand2G_defconfig'' for VisionSOM-6ULx with 2G/256MB NAND and without Murata wireless module
* ''somlabs_visionsom_6ull_nand2G_wlan_bt_defconfig'' for VisionSOM-6ULx with 2G/256MB NAND and with Murata wireless module
* ''somlabs_visionsom_6ull_defconfig'' for other VisionSOM-6ULx versions without Murata wireless module
* ''somlabs_visionsom_6ull_wlan_bt_defconfig'' for other VisionSOM-6ULx versions with Murata wireless module


When operation is finished, go to directory "somlabs-buildroot" and start build process:
<pre>
<pre>
cd somlabs-buildroot
cd somlabs-buildroot
make O=build-visionsom-6ull somlabs_visionsom_6ull_defconfig
make O=build-visionsom-6ull DEFCONFIG_NAME
make O=build-visionsom-6ull all
make O=build-visionsom-6ull all
</pre>
</pre>
Complete build operation takes several minutes, so be patient.
Complete build operation takes several minutes, so be patient.


= Flashing image to SD card =
= Flashing image to SD card =
To prepare bootabler SD card, the SD-Card reader (either build-in or external USB) is needed.
To prepare a bootable SD card, the SD-Card reader (either build-in or external USB) is needed.
Next, it is very important to find device file for SD card reader.
Next, it is very important to find device file for SD card reader.
For most of internal readers, it will be "/dev/mmcblk0"
For most of internal readers, it will be "/dev/mmcblk0".
For external USB readers, please check output of 'dmesg' command, run directly after attaching USB reader.
For external USB readers, please check output of 'dmesg' command, run directly after attaching USB the reader.
Please look for line similar to:
Please look for line similar to:
<pre>
<pre>
Line 48: Line 54:
</pre>
</pre>
Instead of sdc could be i.e. sdb,sdd, etc.
Instead of sdc could be i.e. sdb,sdd, etc.
For 'sdc' example given above, correct device path woul be "/dev/sdc"
For 'sdc' example given above, correct device path would be "/dev/sdc"


To copy image to SD card, use following commands:
To copy image to SD card, use following commands:
Line 59: Line 65:
After issuing commands, wait until it is finished.
After issuing commands, wait until it is finished.


Next, remove card from PC and put it into target board.
Next, remove the card from PC and put it into target board.

Latest revision as of 16:26, 26 March 2020

VisionSOM-6ULL - Buildroot


Introduction

Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. It is build as a set of GNU make scripts and configuration files. Build configuration is controlled by kernel-style Kconfig tool, either in text or GUI mode. More details about buildroot could be found on website: buildroot.org Detailed manual can be found here: https://buildroot.org/docs.html

Its advantage is relatively short build time (in comparison i.e. to Yocto) - complete Linux image can be build in ca. 15-20 minutes on modern PC. It is also easy to learn and modify.

As for now, we provide our own buildroot tree source with changes for SoMLabs VisionSOM 6ULL board.

Buildroot is able also to build complete cross compiler (GCC) with necessary libraries, but we are using precompiled toolchain from Linaro.

Host PC requirements

For building of embedded Linux system with Buildroot we need host PC, running Linux, recommended is 64-bit Ubuntu 16.04 or any derivative (Kubuntu/Mint18.x/etc.).

As the first step, some host tools need to be installed. To do this, start console and run following commands:

sudo apt-get install build-essential git subversion g++ g++-multilib libncurses5-dev

Build process

To start build, first you need to obtain sources for buildroot.

git clone -b somlabs-2019.05.x https://github.com/somlabs/somlabs-buildroot

This command downloads complete source tree of buildroot from github server.

When operation is finished, go to directory "somlabs-buildroot" and start build process with proper configuration file, in the commands below replace DEFCONFIG_NAME with:

  • somlabs_visionsom_6ull_nand2G_defconfig for VisionSOM-6ULx with 2G/256MB NAND and without Murata wireless module
  • somlabs_visionsom_6ull_nand2G_wlan_bt_defconfig for VisionSOM-6ULx with 2G/256MB NAND and with Murata wireless module
  • somlabs_visionsom_6ull_defconfig for other VisionSOM-6ULx versions without Murata wireless module
  • somlabs_visionsom_6ull_wlan_bt_defconfig for other VisionSOM-6ULx versions with Murata wireless module
cd somlabs-buildroot
make O=build-visionsom-6ull DEFCONFIG_NAME
make O=build-visionsom-6ull all

Complete build operation takes several minutes, so be patient.

Flashing image to SD card

To prepare a bootable SD card, the SD-Card reader (either build-in or external USB) is needed. Next, it is very important to find device file for SD card reader. For most of internal readers, it will be "/dev/mmcblk0". For external USB readers, please check output of 'dmesg' command, run directly after attaching USB the reader. Please look for line similar to:

sd 4:0:0:1: [sdc] Attached SCSI removable disk

Instead of sdc could be i.e. sdb,sdd, etc. For 'sdc' example given above, correct device path would be "/dev/sdc"

To copy image to SD card, use following commands:

sudo dd if=build-visionsom-6ull/images/sdcard.img of=DEV_PATH bs=1M
sync

where 'DEV_PATH' is SD card device path described above.

After issuing commands, wait until it is finished.

Next, remove the card from PC and put it into target board.