引:小白Linux水平,具有探索精神,慢慢折腾的过程,希望最终可以成功。

2013.7.27-之前做的都算是今天的了

搭建编译环境之后不管drcom,先选好芯片、板子和型号之后编译一遍。

过程中各种下载,各种连不上下载的文件断掉,然后手动下了扔到dl文件夹。再继续。

编译了很长很长时间,完全不知道什么时候才能完事,发现出现了bin文件夹,先停下来试试编译drcom。

把在package下面新建文件夹drcom,把drcom-1.4.8.3.tar.gz扔进去,顺便扔一份到dl里面,然后复制crashwall的makefile进去。

make menuconfig进去,在Network/Cernet下面选上drcom,保存。

make package/drcom/compile V=s来一发~

报错如下:

 PHP | 
 
 复制代码 |
?

01
zsy314@zsy314-virtual-machine:~/trunk$ make package/drcom/compile V=s
02
make[1]: Entering directory `/home/zsy314/trunk'
03
make[2]: Entering directory `/home/zsy314/trunk/package/libs/toolchain'
04
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
05
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
06
WARNING: skipping libssp -- package not selected
07
WARNING: skipping libstdcpp -- package not selected
08
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
09
WARNING: skipping libthread-db -- package not selected
10
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "librt" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
11
WARNING: skipping libgfortran -- package not selected
12
WARNING: skipping ldd -- package not selected
13
WARNING: skipping ldconfig -- package not selected
14
make[2]: Leaving directory `/home/zsy314/trunk/package/libs/toolchain'
15
make[2]: Entering directory `/home/zsy314/trunk/package/drcom'
16
CFLAGS="-Os -pipe -fno-caller-saves -mno-branch-likely -march=24kec -mdsp -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -fno-caller-saves -mno-branch-likely -march=24kec -mdsp -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/usr/lib -L/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/lib -L/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib -L/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/lib " make -j1 -C /home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/. AR=mipsel-openwrt-linux-uclibc-ar AS="mipsel-openwrt-linux-uclibc-gcc -c -Os -pipe -fno-caller-saves -mno-branch-likely -march=24kec -mdsp -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float " LD=mipsel-openwrt-linux-uclibc-ld NM=mipsel-openwrt-linux-uclibc-nm CC="mipsel-openwrt-linux-uclibc-gcc" GCC="mipsel-openwrt-linux-uclibc-gcc" CXX="mipsel-openwrt-linux-uclibc-g++" RANLIB=mipsel-openwrt-linux-uclibc-ranlib STRIP=mipsel-openwrt-linux-uclibc-strip OBJCOPY=mipsel-openwrt-linux-uclibc-objcopy OBJDUMP=mipsel-openwrt-linux-uclibc-objdump SIZE=mipsel-openwrt-linux-uclibc-size CROSS="mipsel-openwrt-linux-uclibc-" ARCH="mipsel" ;
17
make[3]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3'
18
make[4]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomc'
19
make[4]: Nothing to be done for `all'.
20
make[4]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomc'
21
make[4]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomd'
22
make[4]: Nothing to be done for `all'.
23
make[4]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomd'
24
make[4]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod'
25
make -C /home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2 M=/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod modules
26
make[5]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2'
27
Makefile:579: /home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2/arch/mipsel/Makefile: No such file or directory
28
make[5]: *** No rule to make target `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2/arch/mipsel/Makefile'.  Stop.
29
make[5]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2'
30
make[4]: *** [default] Error 2
31
make[4]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod'
32
make[3]: *** [all] Error 1
33
make[3]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3'
34
make[2]: *** [/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/.built] Error 2
35
make[2]: Leaving directory `/home/zsy314/trunk/package/drcom'
36
make[1]: *** [package/drcom/compile] Error 2
37
make[1]: Leaving directory `/home/zsy314/trunk'
38
make: *** [package/drcom/compile] 错误 2
39
zsy314@zsy314-virtual-machine:~/trunk$ 
40

 说/home/zsy314/trunk/build_dir/target−mipsel_dsp_uClibc−0.9.33.2/linux−ramips_rt305x/linux−3.10.2/arch/mipsel/Makefile不存在,看了下果然没有,然后手动复制crashwall的makefile进去。

再来一发make package/drcom/compile V=s。

继续报错如下:

 PHP | 
 
 复制代码 |
?

01
zsy314@zsy314-virtual-machine:~/trunk$ make package/drcom/compile V=s
02
make[1]: Entering directory `/home/zsy314/trunk'
03
make[2]: Entering directory `/home/zsy314/trunk/package/libs/toolchain'
04
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
05
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
06
WARNING: skipping libssp -- package not selected
07
WARNING: skipping libstdcpp -- package not selected
08
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libpthread" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
09
WARNING: skipping libthread-db -- package not selected
10
if [ -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "librt" >> /home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/pkginfo/toolchain.default.install
11
WARNING: skipping libgfortran -- package not selected
12
WARNING: skipping ldd -- package not selected
13
WARNING: skipping ldconfig -- package not selected
14
make[2]: Leaving directory `/home/zsy314/trunk/package/libs/toolchain'
15
make[2]: Entering directory `/home/zsy314/trunk/package/drcom'
16
CFLAGS="-Os -pipe -fno-caller-saves -mno-branch-likely -march=24kec -mdsp -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/include " CXXFLAGS="-Os -pipe -fno-caller-saves -mno-branch-likely -march=24kec -mdsp -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float  -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/usr/include -I/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/include " LDFLAGS="-L/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/usr/lib -L/home/zsy314/trunk/staging_dir/target-mipsel_dsp_uClibc-0.9.33.2/lib -L/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib -L/home/zsy314/trunk/staging_dir/toolchain-mipsel_dsp_gcc-4.6-linaro_uClibc-0.9.33.2/lib " make -j1 -C /home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/. AR=mipsel-openwrt-linux-uclibc-ar AS="mipsel-openwrt-linux-uclibc-gcc -c -Os -pipe -fno-caller-saves -mno-branch-likely -march=24kec -mdsp -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float " LD=mipsel-openwrt-linux-uclibc-ld NM=mipsel-openwrt-linux-uclibc-nm CC="mipsel-openwrt-linux-uclibc-gcc" GCC="mipsel-openwrt-linux-uclibc-gcc" CXX="mipsel-openwrt-linux-uclibc-g++" RANLIB=mipsel-openwrt-linux-uclibc-ranlib STRIP=mipsel-openwrt-linux-uclibc-strip OBJCOPY=mipsel-openwrt-linux-uclibc-objcopy OBJDUMP=mipsel-openwrt-linux-uclibc-objdump SIZE=mipsel-openwrt-linux-uclibc-size CROSS="mipsel-openwrt-linux-uclibc-" ARCH="mipsel" ;
17
make[3]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3'
18
make[4]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomc'
19
make[4]: Nothing to be done for `all'.
20
make[4]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomc'
21
make[4]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomd'
22
make[4]: Nothing to be done for `all'.
23
make[4]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/drcomd'
24
make[4]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod'
25
make -C /home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2 M=/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod modules
26
make[5]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2'
27
Makefile:1271: warning: overriding commands for target `clean'
28
/home/zsy314/trunk/include/package.mk:285: warning: ignoring old commands for target `clean'
29
make[6]: Entering directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2'
30
  CC [M]  /home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod/drcom.o
31
In file included from include/linux/types.h:5:0,
32
                 from include/linux/list.h:4,
33
                 from include/linux/module.h:9,
34
                 from /home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod/drcom.c:16:
35
include/uapi/linux/types.h:4:23: fatal error: asm/types.h: No such file or directory
36
compilation terminated.
37
make[6]: *** [/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod/drcom.o] Error 1
38
make[6]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2'
39
make[5]: *** [_module_/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod] Error 2
40
make[5]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/linux-3.10.2'
41
make[4]: *** [default] Error 2
42
make[4]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/kmod'
43
make[3]: *** [all] Error 1
44
make[3]: Leaving directory `/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3'
45
make[2]: *** [/home/zsy314/trunk/build_dir/target-mipsel_dsp_uClibc-0.9.33.2/linux-ramips_rt305x/drcom-1.4.8.3/.built] Error 2
46
make[2]: Leaving directory `/home/zsy314/trunk/package/drcom'
47
make[1]: *** [package/drcom/compile] Error 2
48
make[1]: Leaving directory `/home/zsy314/trunk'
49
make: *** [package/drcom/compile] 错误 2
50

发现错误是include/uapi/linux/types.h包含的asm/types.h文件不存在,看了下果然不存在。

注释掉之后发现还有更多的不存在提示。所以先停下,估计哪出问题了。先停下来,继续把OpenWrt编译完再说。

历时很久~终于全部编译完了,bin文件夹内有了bin文件~

重新尝试上面的步骤~还是一样的错误提示,看来那个makefile用不了?

尝试使用dreambox的trunk版进行编译,结果中间因为没有mach-hg255d.c文件失败,这算是dreambox的bug吧~明明makefile里面都有,外面却没有对应的文件。

2013.7.28-今天尝试backfire

 openwrt.com.cn上面的backfire没有hg255d的profile~所以试着找找别的~

发现在googlecode上面有dreambox项目的前期数据,后来才迁移到openwrt.com.cn上面的。无所谓了,反正只是为了编译ipk~只要支持hg255d,什么版本都行。

1
svn co http://openwrt-dreambox.googlecode.com/svn/backfire/ openwrt-backfire

然后make menuconfig选好型号那三项,直接开始make V=s。

过程中出现错误如下:

01
./stdio.h:456:1: error: 'gets' undeclared here (not in a function)
02
make[7]: *** [clean-temp.o] Error 1
03
make[7]: Leaving directory `/home/zsy314/openwrt-backfire/build_dir/host/m4-1.4.15/lib'
04
make[6]: *** [all] Error 2
05
make[6]: Leaving directory `/home/zsy314/openwrt-backfire/build_dir/host/m4-1.4.15/lib'
06
make[5]: *** [all-recursive] Error 1
07
make[5]: Leaving directory `/home/zsy314/openwrt-backfire/build_dir/host/m4-1.4.15'
08
make[4]: *** [all] Error 2
09
make[4]: Leaving directory `/home/zsy314/openwrt-backfire/build_dir/host/m4-1.4.15'
10
make[3]: *** [/home/zsy314/openwrt-backfire/build_dir/host/m4-1.4.15/.built] Error 2
11
make[3]: Leaving directory `/home/zsy314/openwrt-backfire/tools/m4'
12
make[2]: *** [tools/m4/compile] Error 2
13
make[2]: Leaving directory `/home/zsy314/openwrt-backfire'
14
make[1]: *** [/home/zsy314/openwrt-backfire/staging_dir/target-mips_uClibc-0.9.30.1/stamp/.tools_install_nnynn] Error 2
15
make[1]: Leaving directory `/home/zsy314/openwrt-backfire'
16
make: *** [world] Error 2

解决方法是打开

1
/home/jopark/Documents/openwrt-dreambox/build_dir/host/m4-1.4.15/lib/stdio.in.h

然后删掉这一行:

1
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

同理之后还有:

1
/home/zsy314/openwrt-backfire/build_dir/host/bison-2.4.3/lib/stdio.in.h

但是之后出现:

1
elf.cpp:68:5: error: '::close' has not been declared

就不知道怎么办了,Stop。

现在复制backfire的mach-hg255d.c到dreambox的trunk去试试,应该是通用的吧~

测试后貌似不行~Stop

2013.7.29-新的思路

之前的结果是在Trunk上面可以完整的编译出HG255d的固件,但是国内的dreambox不行~

所以试了下dd-wrt~直接刷华为那个版本就是通用的,但是刷完之后完全不明白怎么设置,所以又刷回来了~

决定换个新的思路:

现在drcom编译不过去的原因是因为程序编译到一半出错,那么既然如此,我想完全可以自己重新写一遍程序~

咱有一些C语言基础,而且有人家的源码,没道理看不懂,看懂的话就应该能够写出来的。

所以为了写这个,需要先编译下SDK,来一发make menuconfig,把里面的SDK选上,再编译一遍。

网上查下如何做Helloworld,然后就开始读源码吧!

计划周末开工

2013.7.31-又一个新思路

突然发现我这的drcom有登陆页面,打开网页登陆就可以~关掉浏览器也不影响。而且发现网页上的时间是2003,估计版本很老,防范意识还不强。

想起前段时间看到有个Chrome插件可以直接拨号,故找来试验了下,发现真的可以用,好神奇。

看了下源码,发现用的是Post方式,直接Post给服务器就登陆了,这也太方便了吧。

我想这样的一个简单功能路由器完全可以胜任,所以查查相关资料,看看有没有OpenWrt上的浏览器或者可以发包的东西~

大概找到了一个东西,叫做Wget,看了下,我新刷的潘多拉魔盒竟然带了,那还真是方便啊~

然后用Chrome登陆并抓了个包,Post的信息和那个插件的一样,哎~还真是没什么改进~如下所示:

1
登陆:
2
http://xx.xx.xx.xx/
3
DDDDD=username&upass=password&0MKKey=%B5%C7%C2%BC+Login
4
抓包如下:
5
DDDDD:username
6
upass:password
7
0MKKey:%B5%C7%C2%BC+Login
8
注销直接http://xx.xx.xx.xx/F.htm

现在就想办法用Wget搞定好了~

了解到Wget的使用方式如下:

1
POST数据:wget --post-data="inputid=content" http://foo.com/cgi
2
头部:wget --header="xxxxx"
3
那么我们就需要这样的命令:
4
wget --post-data="DDDDD=username&upass=password&0MKKey=%B5%C7%C2%BC+Login" --header="Content-type: application/x-www-form-urlencoded" http://xx.xx.xx.xx/

成功~就是不知道登陆状态能够维持多长时间~但是我想如果持续有数据传输就应该能保持吧~

路由器只要有电每隔一会就应该会传输一下数据的~

现在是11点多,连接的,试验下日常使用多久之后会断开。明早睡醒看看。

2013.8.6-prefect!

All is well~不用说别的了~