Saturday, August 30, 2008

Building linux for psp - busybox


Busybox provides many core linux utilities in a single package. Get a busybox 1.7.0 version from http://busybox.net/ .
Untar it and apply the busybox-0.21 patch from here http://jacksonm88.googlepages.com/linuxonpsp.htm
and copy the config file to /path/to/busybox/.config
use this command to customize the tools u need
make CROSS_COMPILE=mipsel-linux- LDFLAGS="-static -Wl,-elf2flt" CFLAGS="-fno-jump-tables" menuconfig

The -static option is because mmu-less systems dont support shared libraries, -Wl,-elf2flt says the compiler to convert the elf executable to flat which is supported by mmu-less systems. I didn't quite understand the use of -fno-jump-tables, but as it is mentioned in jacksons site "-fno-jump-tables is essential too as it tells gcc not to generate relocation entries of GPREL32 frequently used in jump tables".
Do the below command to locally install busybox into /path/to/busybo/_install
make CROSS_COMPILE=mipsel-linux- LDFLAGS="-static -Wl,-elf2flt" CFLAGS="-fno-jump-tables" install

If u want to install in another directory edit the install options for busybox with menuconfig.
next is we compile kernel and specify the busybox install

No comments:

Google