Buildroot SDK/Getting started
This document describes in a few steps how to get started with chiliboard. The description is based on the latest Buildroot SDK.
Using Buildroot SDK is not recommended for new projects. It should be used only as reference point for future work. The best way is to create own image based on latest sources. For details please see Buildroot SDK/Building customized image.
Download and unpack Buildroot SDK
Download the latest Buildroot SDK tarball from ftp server:
to the local directory, and unpack it:
$ tar -xjf chili-buildroot-sdk-2015.02-1.0.tar.bz2
Prepare SD card
The bootable SD card for chiliboard contains two partitions: boot (fatfs) and rootfs (extfs).
SD card partitioning
- Insert the SD card into PC.
- Run command
- to determine which device is assigned to the SD card.
- Be careful, because the use of a wrong device can erase data from other media.
Two primary partitions should be created on SD card:
- FAT32 partition labeled "boot" with Boot flag enabled (33MB size)
- EXT3 partition labeled "rootfs" (full size, but 300MB is enough)
To partition your SD card, please use your favorite utility, or use nice graphical tool:
$ sudo apt-get install gparted $ sudo gparted
To copy filesystem to the SD card, follow the bellow steps:
- Mount SD card partitions. By default Ubuntu 12.04 mount partitions in /media, while Ubuntu 14.04 in /media/user.
- Change the current directory:
$ cd buildroot_sdk_path/images
- Determine which version of chiliboard you have and copy the apropriate bootloader images to the boot partition. Details about the images for different hardware configurations are in SDK Content.
In the example bellow are copied files for chiliboard with 256 MB NAND (FLASH) and 128 MB RAM:
$ cp -t /media/boot u-boot-nand256-ram128/MLO u-boot-nand256-ram128/u-boot.img uEnv.txt
- Next, unpack apropriate filesystem tarball to /rootfs partiton:
$ sudo tar -xz -C /media/rootfs -f rootfs_qt5.tar.gz
- Finally, copy kernel image and device-tree file to boot directory on the rootfs partition. Choose the appropriate dtb file:
and copy it with the name of am335x-chiliboard.dtb to the target:
$ cp zImage /media/rootfs/boot $ cp am335x-chiliboard-nand256-ram128.dtb /media/rootfs/boot/am335x-chiliboard.dtb
Connect chiliboard to PC
To boot chiliboard from the SD card set the boot-switches BOOT[4:0] to 00011. To be able to use the debug console, connect chiliboard to PC via USB cable or serial port (depending on the chiliboard version). When you use a serial port, use an additional power supply.
Install and open serial port terminal
To communicate with chiliboard first install the serial port termianl on your PC, for example Minicom. Under Ubuntu install with:
$ sudo apt-get install minicom
Next, run and configure Minicom:
$ sudo minicom -s
Depending on the chiliboard version and the serial interface set the appropriate serial port (usually /dev/ttyUSB0 or /dev/ttyS0). Other parameters: bit rate - 115200, data bits - 8, no parity, one stop bit, without flow control. Save the configuration and then run Minicom with command:
$ sudo minicom
Insert the SD card and boot system
Insert the newly programmed SD card into chiliboard and the system will automatically boot. When chiliboard is powered off, push the power button. In the terminal is visible current log of the system boot. After loading, log in as root. By default, no password
Remember to properly close system. The rapid removal of power can corrupt the file system. Before turning off power close properly system using command:
or press power button.