Sunday, January 15, 2012

Create Minimal Linux 3.2

Create minimal Linux 3.2 with Buildroot 2011.11 for Beagleboard rev C2
1. Get Linux kernel 3.2 from www.kernel.org
2. Get Buildroot 2011.11 from www.buildroot.net
Unpack both package.

Build Buildroot:

$ make menuconfig

1. Target architechture arm, Variant cortex A-8
2. Toolchain Type external arm-none-linux-gnueabi gcc version 4.5.2 (Sourcery G++ Lite 2011.03-41)
3. System Configuration -> /dev management use devtmpfs ( Kernel should also enable DEV_TMPFS=y and DEV_TMPFS_MOUNT=y). This is a must otherwise you may got boot error "can't open /dev/ttyO2: No such file or directory"
4. Change serial port from ttyS2 to ttyO2 (this is for Omap processor)
5. Then select package.

After finish in configuration run:
$ make

Toolchain will be downloaded to output/host/usr/bin You must add this in your PATH before compiling the kernel
$ export PATH=${BUILDROOT}/output/host/usr/bin:$PATH

BUILDROOT: This is your buildroot installation folder.

Build kernel:

$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi omap2plus_defconfig
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi menuconfig
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi -j2 uImage
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi modules
$make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi modules_install INSTALL_MOD_PATH=/home/user/kernel_dev/buildroot-2011.11/output/target

after that copy your rootfs to your sd card.
$cd /home/user/kernel_dev/buildroot-2011.11/output/target
$rsync -avr * /media/rootfs

Note:
You must change your buildroot folder and your rootfs partition in your sd card.


Note: When configuring kernel don't forget to change ttyS2 to ttyO2.
after running make menuconfig. edit .config and modify DEV_TMPFS and DEV_TMPFS_MOUNT. You have to enable it.

No comments:

Post a Comment