How To Build Busybox FS with Buildroot

Notes: 1. The console here is for MSM targets. You can choose the console tty* according to your target. 2. The partition to which FS is flashed depends on the target. The target used for testing this WiKi are IFC6410 and DB8074 from intrynsic

Download Linaro Tool Chain from

* I Downloaded this one --> gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.bz2

Setup the PATH to point to cross compiler tool chain

$ mkdir -r /home/gpramod/projects/tools/
$ cp ~/Downloads/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.bz2 /home/gpramod/projects/tools/
$ cd /home/gpramod/projects/tools/
$ tar -xvjf gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.bz2
$ export PATH=$PATH:/home/gpramod/projects/tools/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin

$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-

Clone the buildroot and configure to build only FS

$ mkdir -r /home/gpramod/projects/fs
$ git clone git://git.buildroot.net/buildroot
$ cd buildroot

Make sure these are the configurations in buildroot

$ make menuconfig

│ Target options  --->
  │ │   Target Architecture (ARM (little endian))  --->                                              
  │ │   Target Architecture Variant (cortex-A15)  --->
  │ │   Target ABI (EABIhf)  --->                     
  │ │   Floating point strategy (VFPv4-D16)  --->     
  │ │   ARM instruction set (ARM)  ---> 

│ Filesystem images  --->
  │ │   [*] cpio the root filesystem (for use as an initial RAM filesystem)
  │ │   
  │ │   [*] ext2/3/4 root filesystem
              ext2/3/4 variant (ext4)  ---> 

Compile The Buildroot

$ make

$ cd output/images/

* Mount the Fils system on Host
$ mkdir fs_ext4
$ sudo mount -t ext4 -o loop rootfs.ext4 fs_ext4/
$ cd fs_ext4/

* Create some nodes in FS to fix boot time issue and for console 
$ sudo mknod dev/ttyMSM0 c 246 0
$ sudo mknod dev/ttyS0 c 204 40
$ sudo mknod dev/null c 1 3

* Changes in FS to get console Working (Might not be needed on latest buildroot)
* if you see 'console' in place of 'ttyS0' you can ignore this change

$ sudo vim etc/inittab
# Change below line
"ttyS0::respawn:/sbin/getty -L  ttyS0 115200 vt100 # GENERIC_SERIAL"
to 
"ttyMSM0::respawn:/sbin/getty -L console 115200 vt100 # GENERIC_SERIAL"

$ sudo vim etc/securetty

* Add two more entries at the end of the file
ttyMSM0
console

* sync the changes done to mounted fs
$ sudo fastboot flash system rootfs.ext4

HowTo/BuildingBusyboxFileSystemWithBuildroot (last modified 2016-09-01 05:57:26)