Buildroot | LiteSOM

Since November 2016 liteSOM is fully supported by Buildroot.

Buildroot is a tool that simplifies and automates the process of building a complete Linux system for an embedded system, using cross-compilation.

In order to achieve this, Buildroot is able to generate a cross-compilation toolchain, a root filesystem, a Linux kernel image and a bootloader for your target. Buildroot can be used for any combination of these options, independently (you can for example use an existing cross-compilation toolchain, and build only your root filesystem with Buildroot).

Buildroot is useful mainly for people working with embedded systems. Embedded systems often use processors that are not the regular x86 processors everyone is used to having in his PC. They can be PowerPC processors, MIPS processors, ARM processors, etc.

Buildroot supports numerous processors and their variants; it also comes with default configurations for several boards available off-the-shelf. Besides this, a number of third-party projects are based on, or develop their BSP or SDK on top of Buildroot.

from Buildroot user manual

Download Buildroot sources

Depends on your needs you can:

We recommends to use always the latest stable release.
Below we will use stable release 2016.11.2.

tar xf buildroot-2016.11.2.tar.gz
cd buildroot-2016.11.2

Configure buildroot

Apply configuration from grinn_liteboard_defconfig file.

make grinn_liteboard_defconfig

Build firmware

make all

During the first build Buildroot will download and compile cross-compiler for liteSOM. This operation will take several minutes (around 30 minutes @ 8 x Intel® Core™ i7-2760QM CPU).

But after first build cross-compiler will be reused and build time will be reduced to the minimal value (in most cases it will take less than 1 minute).

Install firmware on SD card

sudo dd if=output/images/sdcard.img of=/dev/<SD card> bs=4M

Where <SD card> points to your SD card device.

Show how to find SD card

Method 1

Insert SD cart to PC and check last lines from dmesg command output. Name assigned to the detected SD card will be presented as in the following example.

[ 6163.014768] mmc0: new high speed SDHC card at address 1234
[ 6163.024433] mmcblk0: mmc0:1234 SA16G 14.6 GiB 
[ 6163.025749]  mmcblk0: p1
[ 6163.375207] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)

Method 2

lsblk command will list all detected block devices where your SD card will be displayed.

sda                         8:0    0 238.5G  0 disk 
├─sda1                      8:1    0    28G  0 part /
├─sda2                      8:2    0     1K  0 part 
├─sda5                      8:5    0   9.3G  0 part 
└─sda6                      8:6    0 201.2G  0 part /home
sr0                        11:0    1  1024M  0 rom  
mmcblk0                   179:0    0  14.7G  0 disk 
└─mmcblk0p1               179:1    0  14.7G  0 part /media/foo/804b0b54-f37e-49cb-9299-87759d7b68d4

Device name

In both examples SD card was detected as mmcblk0 so valid dd … command syntax is

sudo dd if=output/images/sdcard.img of=/dev/mmcblk
  • litesom/buildroot.txt
  • Last modified: 2021/05/11 13:07
  • by kateryna.kozakova