OKL4 linux kernel的编译方法

一、下载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可以正常运行。

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值