Personal tools

VisionSOM-6ULL Buildroot Developer Guide

From SomLabs Wiki

Revision as of 21:30, 25 October 2018 by Pawelzbysinski (talk | contribs) (Flashing image to SD card)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 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.