This is an old revision of the document!
Buildroot and liteSOM - quick start
Download Buildroot sources
Depends on your needs you can:
- download stable release from https://buildroot.org/downloads/,
- clone latest from
git.buildroot.net/buildroot
repository.
We recommends to use always the latest stable release.
Below we will use stable release 2016.11.2.
wget https://buildroot.org/downloads/buildroot-2016.11.2.tar.gz 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 around 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.
dd …
command.of=…
points to your SD card. In case of mistake (when of=…
points to your system disk) you can damage data on your system disk.See how to find SD card device?
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.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT 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 is
sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=4M
Run liteSOM
describe how to configure dipswitch and show log from litesom.