1、编译环境
sudo apt-get install subversion git flex g++ gawk zlib1g-dev libncurses5-dev
2、编译出错
a. ./stdio.h:456:1: error: 'gets' undeclared here (not in a function)
进入相应的目录执行
sed -i -e '/gets is a security/d' ./stdio.in.h
http://www.openwrt.org.cn/bbs/forum.php?mod=viewthread&tid=13909
b.elf.cpp:68:5: error: '::close' has not been declared
修改 ./build_dir/host/mklibs/src/mklibs-readelf/elf.cpp
下面添加一行"#include <unistd.h>"成: 解决问题。https://dev.openwrt.org.cn/ticket/45
c.Applying /home/zzf/openwrt-dreambox/target/linux/generic/patches-2.6.32/971-ocf_20080917.patch using plaintext:
patching file drivers/char/random.c
Hunk #1 succeeded at 139 with fuzz 2 (offset 10 lines).
Hunk #2 succeeded at 155 with fuzz 2 (offset 12 lines).
Hunk #3 FAILED at 724.
1 out of 3 hunks FAILED -- saving rejects to file drivers/char/random.c.rej
删除971-ocf_20080917.patch 下的random部分。