Wednesday, December 10, 2014



export ARCH=arm-linux (arm-cortexa5-linux-uclibcgnueabihf   ct-ng)
export CROSS_COMPILE=arm-linux-gnueabi-

Linux kernel (3.15)
make clean
make mrproper
make vexpress_defconfig
make menuconfig

General setup --->
[ X ] Embedded system
Configure standard kernel feature(expert users) --->
[ * ] Enable ELF core dump (new)

Enable debug mode in uClibc

download: (0.9.28 trendnet lib for 312 model)
make CROSS=arm-linux- menuconfig

General Library Settings  --->
Build pthreads debugging support

this option not found in 0.9.28 version
uClibc development/debugging options  --->
  Strip libraries and executables

Enable Core Dump support in Busybox

  1. Init Utilities  --->
    Support dumping core for child processes (debugging only)
  2. Second, create an empty file in the target’s filesystem’s root directory, called “.init_enable_core“.

build ramfs

_install$ arm-linux-ldd --root bin bin/busybox => /lib/ (0x8badf00d) => /lib/ (0x8badf00d) => /lib/ (0x8badf00d)

mkdir lib
copy busybox depend files to lib folder
find depends file in cross compiler folder
~/x-tools/arm-cortexa5-linux-uclibcgnueabihf$ find . -name

cp -v <cross_compiler_lib>/ _install/lib
cp -v <cross_compiler_lib>/  _install/lib
cp -v <cross_compiler_lib>/ _install/lib

first check
_install$ find . | cpio -o --format=newc > ../../rootfs.img

qemu-system-arm -machine help

qemu-system-arm -M vexpress-a9 -m 128M -kernel zImage -initrd rootfs.img -append "root=/dev/ram rdinit=/bin/sh"

_install$mkdir proc sys dev etc etc/init.d
_install$ vim etc/init.d/rcS
mount -t proc none /proc
mount -t sysfs none /sys
/sbin/mdev -s

_install$ chmod +x etc/init.d/rcS

_install$ find . | cpio -o --format=newc > ../../rootfs.img

qemu-system-arm -M vexpress-a9 -m 128M -kernel zImage -initrd rootfs.img -append "root=/dev/ram rdinit=/sbin/init"
-redir tcp:8888::80

#include <stdlib.h> // C
//#include <cstdlib> // C++
void main(void)

arm-linux-gcc -o cdump cdump.c -static