[okl4-developer] HowTo build OKLinux for versatile
Alexander Valitov
valitov79 at mail.ru
Thu Jan 22 22:33:59 EST 2009
Hello All,
I'd like to share with you how I get manage to build OKLinux for versatile
platform and run on QEMU.
Hope it will be useful for anyone.
Notes:
- This instruction shows how to build from source. Alternatively it is
possible to use SDK and
http://wiki.ok-labs.com/downloads/release-3.0/tut-sdk-linux.pdf this
instruction . In this case NICTA toolchain is not needed (kernel is already
built for you).
- I built crosstools from source, but it is not required. You can used
http://wiki.ok-labs.com/downloads/release-3.0/arm-linux-gnueabi-4.2.4.tar.gz
prebuilt version .
- This how-to could be adopted for other platforms by changing steps 5,6 and
slightly 1 and 4.
1. Get required modules
1.1 Download required modules and patches from
http://wiki.ok-labs.com/downloads/release-3.0/
into some dir (will be mentioned further as /Path/To/Work/Dir/):
module list:
crosstool-0.43.tar.gz
okl4_3.0.tar.gz
oklinux_2.6.24.9-patch.4.tar.gz
qemu-okl.0.9.1.tar.gz
patch:
crosstool-eabi-0.43.patch
1.2 Download NICTA toolchain for pistachio kernel:
http://www.ertos.nicta.com.au/downloads/tools/arm-linux-3.4.4.tar.gz
arm-linux-3.4.4.tar.gz
1.3 Untar all downloaded modules:
using command:
tar -xzf MODULE_NAME
2. Build cross tools for ARM with EABI
2.1 Create symlink to ar with a name i686-host_pc-linux-gnu-ar (shall be
accessible in PATH, root might be required)
2.2 Apply patch to crosstools sources
patch -d /Path/To/Work/Dir/crosstool-0.43 <
/Path/To/Work/Dir/crosstool-eabi-0.43.patch
2.3 Make new dir glib-2.7 in /Path/To/Work/Dir/crosstool-0.43/patches
and copy file /Path/To/Work/Dir/crosstool-0.43/glibc-2.7-nolibeh.patch
into it
2.4 Execute /Path/To/Work/Dir/crosstool-0.43/demo-arm-softfloat.sh
2.5 Symlink /Path/To/Work/Dir/result_top/gcc-4.2.4-glibc-2.7 dir to
/opt/okl/Linux-i386/arm dir (root is required)
3. Add to PATH compiler for kernel
PATH=$PATH:/Path/To/Work/Dir/opt/nicta/tools/gcc-3.4.4-glibc-2.3.5/arm-linux/bin
4. Compile kernel and OK Linux.
4.1 Go to dir /Path/To/Work/Dir/okl4_3.0
cd /Path/To/Work/Dir/okl4_3.0
4.2 Compile
tools/build.py machine=versatile project=linux wombat=true
TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain
PYFREEZE=False kdb_serial=True KDB_BREAKIN=False
5. Compile QEMU for ARM
5.1 Go to QEMU dir
cd /Path/To/Work/Dir/qemu-okl.0.9.1
5.2 Configure and compile qemu
./configure --target-list=arm-softmmu --disable-sdl --static
--disable-gfx-check
make
6. Execute with QEMU for ARM
6.1 Go to dir /Path/To/Work/Dir/okl4_3.0
cd /Path/To/Work/Dir/okl4_3.0
6.2 Run QEMU
qemu-system-arm -M versatileab -start-addr 0x04100000 -nographic
-kernel build/image.elf
Best Regards,
Alexander Valitov
--
View this message in context: http://n2.nabble.com/HowTo-build-OKLinux-for-versatile-tp2197248p2197248.html
Sent from the OKL4 Community Forum mailing list archive at Nabble.com.
More information about the Developer
mailing list