OKL4 linux kernel的编译方法

来源:互联网 发布:放羊用的鞭子淘宝买吗 编辑:程序博客网 时间:2024/04/28 22:47

一、下载OKL4 linux kernel:oklinux_2.6.24.9-patch.4.tar.gz 地址:http://wiki.ok-labs.com/Microkernel
二、将oklinux_2.6.24.9-patch.4.tar.gz 拷贝到okl4_3.0/下;
 #tar zxvf oklinux_2.6.24.9-patch.4.tar.gz
 # ln -s oklinux_2.6.24.9-patch.4 linux
 # 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
 编译执行的时候,出现以下错误:
/home/fanyl/okl4_3.0/build/linux/native/tools/genext2fs/genext2fs -b 5600 -d build/linux/install -f /home/fanyl/okl4_3.0/linux/rootfs-2.6.24-v2/dev.txt build/linux/ext2ramdisk
*** glibc detected *** /home/fanyl/okl4_3.0/build/linux/native/tools/genext2fs/genext2fs: munmap_chunk(): invalid pointer: 0x0804dd91 ***
======= Backtrace: =========
/lib/libc.so.6[0x1ca7f1]
/home/fanyl/okl4_3.0/build/linux/native/tools/genext2fs/genext2fs[0x804b048]
/home/fanyl/okl4_3.0/build/linux/native/tools/genext2fs/genext2fs[0x804d4dc]
/lib/libc.so.6(__libc_start_main+0xe6)[0x172bb6]
/home/fanyl/okl4_3.0/build/linux/native/tools/genext2fs/genext2fs[0x8048c31]
======= Memory map: ========
0013a000-00158000 r-xp 00000000 fd:00 87963      /lib/ld-2.11.1.so
00158000-00159000 r--p 0001d000 fd:00 87963      /lib/ld-2.11.1.so
00159000-0015a000 rw-p 0001e000 fd:00 87963      /lib/ld-2.11.1.so
0015c000-002cb000 r-xp 00000000 fd:00 87964      /lib/libc-2.11.1.so
002cb000-002cd000 r--p 0016e000 fd:00 87964      /lib/libc-2.11.1.so
002cd000-002ce000 rw-p 00170000 fd:00 87964      /lib/libc-2.11.1.so
002ce000-002d1000 rw-p 00000000 00:00 0
003d2000-003d3000 r-xp 00000000 00:00 0          [vdso]
00d11000-00d2e000 r-xp 00000000 fd:00 87992      /lib/libgcc_s-4.4.3-20100127.so.1
00d2e000-00d2f000 rw-p 0001c000 fd:00 87992      /lib/libgcc_s-4.4.3-20100127.so.1
08048000-0804f000 r-xp 00000000 fd:00 709494     /home/fanyl/okl4_3.0/build/linux/native/tools/genext2fs/genext2fs
0804f000-08050000 rw-p 00006000 fd:00 709494     /home/fanyl/okl4_3.0/build/linux/native/tools/genext2fs/genext2fs
092df000-09332000 rw-p 00000000 00:00 0          [heap]
b7347000-b78c2000 rw-p 00000000 00:00 0
b78d9000-b78da000 rw-p 00000000 00:00 0
bfc90000-bfca5000 rw-p 00000000 00:00 0          [stack]
scons: *** [build/linux/ext2ramdisk] Error -6
scons: building terminated because of errors.

分析错误原因,发现为genext2fs使用的ld、libc库版本不对,应该使用2.7版本,因此更换库版本为2.7之后,重新编译,可以正常编译;
三、运行
 # qemu-system-arm -M versatileab -start-addr 0x04100000 -nographic -kernel build/image.elf
系统可以正常启动到Shell下,至此OKL4 linux可以正常运行。

 

原创粉丝点击