labs.beatcraft.com [bc10-router]
buildboot is a tool for creating an embedded Linux embedded Linux. It constitutes of Makefile and other patch files. This article employs the buildroot, which specifically customized for beagleboard-xm. This explains how to create the build environment and how to build an embedded Linix with buildroot. For the details of buildroot, please visit URLs listed below.
- Embedded HOWTOs
http://blog.galemin.com- github/MaxGalemin/buildroot
https://github.com/MaxGalemin/buildroot
The Host OS, which is used for creating the build environment, is Ubuntu 10.04 (64bit). Processes of adding extra packages, modifying the configuration, and creating the build environment are explained.
There are three stages in the process of creating the build environment: obtaining buildroot, obtaining toolchain, and placing the files for bc10.
To obtain the git clone of buildroot, follow the direction, which is written the web page below. Its URL is:
http://blog.galemin.com/2012/03/buildroot-2012-02-for-beagleboard-xm-with-li-5m03-mt9p031-camera-support/
To create the build environment, the packages listed below are added to the default packages.
ssh vim git-core build-essential curl ia32-libs diffstat cvs subversion chrpath texi2html texinfo libncurses5-dev bison flex gettext
The default shell of Ubuntu is dash. To execute make with the default setting, it will cause error and, and make process will fail. To prevent this happening, the setting of shell is changed to bash.
$ sudo dpkg-reconfigure dashTo execute the command above, it will ask to install dash at /bin/sh? Please select NO. Then, shell will be changed to bash.
To use git command, obtain buildroot.
$ cd ${HOME} $ mkdir work_router $ cd work_router $ git clone https://github.com/MaxGalemin/buildroot.git
The default Toolchain, which buildroot (this is adjusted to 2011.05 base) uses, is CodeSourcery 2011.03. However, this article uses a toolchian, which is included in ti-sdk-beagleboard-05.05.01.00. This file is distributed by TI. This Toolchain is also used for bc10-router/arago-project.
Download Toolchain from TI's web site. The downloaded file can be placed at whichever directory you like.
If you do not specify any directory, the file will be downloaded at the directory of ${HOME}/ti-sdk-beagleboard-0.5.05.01.00, and toolchain will be extracted at the directory of ${HOME}/ti-sdk-beagleboard-0.5.05.01.00/linux-devkit/.$ wget http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/sdk/BeagleBoardSDK/latest/exports/ti-sdk-beagleboard-05.05.01.00-Linux-x86-Install $ chmod +x ti-sdk-beagleboard-05.05.01.00-Linux-x86-InstallTo install it by console, add --mode console option to the command line. Then, execute it.
$ ./ti-sdk-beagleboard-05.05.01.00-Linux-x86-Install --mode consolePATH of toolchain is added to the list on bashrc.
$ vi ${HOME}/.bashrc PATH=${HOME}/ti-sdk-beagleboard-05.05.01.00/linux-devkit/bin:$PATH $ source ${HOME}/.bashrc
There are config files for bc10. You can download these files to any directories.
However, these files are needed to be stored the specific directories. The directories are shown shown below. Please create bc10 directory under board directory.
kernel-patches are copied from the downloaded buildroot file, buildroot/board/beagleboard/xm/kernel-patches, and the copied file is stored at the directory below /buildroot/board/bc10/.
At the location where busybox-1.19.x.config is stored, a file does have the identical name has already existed. Please change the name of the existing file, and place the downloaded busybox-1.19.x.config.
Diagram & Map, Code and Command>
Completing to placing these configuration files, please check the settings of these files. To execute make bc10_deconfig and make menuconfig commands, check the settings of these files. If the settings are correct, the outputs of commands are the same as the example shown below.
Especially, please check PATH of Toolchain. Its PATH has to be set as it is described above. (If its installed location differs form explained one, please adjust its PATH.) Please make sure that Custom kernel patches and Configuration file path of Kernerl specify the directory of board/bc10/.
Code and Command>
Since IT's Toolchain and the Toolchain of CodeSourcery2011.03 employ the different versions of GCC, each Toolchain requires a specific GCC. If the version of GCC and a Toolchain do not match, it will cause a build error. To prevent this happening, modify and change buildroot. Version of GCC and settings of other tools are consist with the settings used at bc10-router/arago-project.
The default version of libtool is 2.2.10. The version 2.2.6b is used at bc10/arago-project. As changing the version of libtool from 2.2.10 to 2.2.6b, make the version of libtool consist with TI's Toolchain. If version 2.2.10 is used with TI's Toolchain, it causes an error due to version mismatch of libraries.
Code and Command>
Note:
Toolchain of CodeSourcery2011.03 causes only a build error on buildroot. It does not cause any build errors when it builds other tools.
The version of ncurses is changed from 5.7 to 5.9. This change prevents a build error occurring. The build error is due to version mismatch of libraries.
Code and Command>
TI's Toolchain has an issue to udev-181 and causes a build error. Since u-dev for bc10-router/arago-project is 165, it does not suffer this issue. However, the download site of udev for Toolchain archives under 100 and over 170. There is no 165. To avoid an error happening, a pach is applied to udev-181. The name of patch and the location that it is placed are package/udev/udev-181-define-trigger-happy.patch. The contents of the patch are shown below.
Code and Command>
When the preparation is completed, images are build. Please execute the command below for building the images
Code and Command> After the build process is completed, the image files are created at the directory: work_router/buildroot/output/images. The names of the created files are:
Code and Command>
The environment configuration file for uboot has been created, but its contents are needed to be modified. The details are:
Code and Command>
The process of formatting a SD card is shown []. Please follow the direction, and format a SD, which is suitable to bc10. Create FAT32 and Ext3 directories and the names of these directories are /media/FAT and /media/EXT3, respectively.
Then, copy the created files to the targeted directories and extract them.
Code and Command> This is the end of the process of writing images to a SD card.
As the images are written to a SD card, yet some modification is required using this buildroot.
This buildroot uses bash and dropbear as the default shell and ssh, respectively. To access this buildroot via ssh, it denies the login, showing the message. The message is shown below.
Code and Command> This issue is due to that the authentication of dropbear only recognizes sh, not recognizes bash. In drop/svr-auth.c, the part of checking shell is fixed as /bin/sh. It means that it accept only sh. To fix this issue, shell of User root changes form /bin/bash to /bin/sh. Then, reboot it. The details are show below.
Code and Command>
Code and Command>
Under the default setting, the wireless LAN module cannot be recognized. To make this module recognized, after booting, change it as it is shown below.
Code and Command>
- 2013/07/12 This article is initially uploaded