#1 2010-04-11 16:30:14
[Lly] 編譯WL-500gx韌體測試
編譯環境: Mandriva 2009.1
目標機型: 華碩 WL-500gx
參考: CompilingCustomFirmware
1. 依參考, 安裝相關套件.
2. 下載
$ curl -Ov http://wl500g.googlecode.com/files/hndtools-mipsel-uclibc-4.2.4-2.tar.bz2
$ curl -Ov ftp://ftp.isu.edu.tw/pub/Linux/kernel/v2.4/linux-2.4.37.9.tar.bz2
3. 解壓縮
$ su
# mkdir /opt/brcm
# tar -xjvf hndtools-mipsel-uclibc-4.2.4-2.tar.bz2 -C /opt/brcm
# ln -s /opt/brcm/hndtools-mipsel-uclibc-4.2.4 /opt/brcm/hndtools-mipsel-uclibc
# mkdir -p /root/broadcom/src/linux
# tar -xjvf linux-2.4.37.9.tar.bz2 -C /root/broadcom/src/linux
# ln -s /root/broadcom/src/linux/linux-2.4.37.9 /root/broadcom/src/linux/linux
4. 下載新版
# cd /root/broadcom/src
# svn checkout http://wl500g.googlecode.com/svn/trunk/ wl500g-1.9.2.7-d
5. 準備
# export PATH=/opt/brcm/hndtools-mipsel-uclibc/bin:$PATH
# cd wl500g-1.9.2.7-d
# make kernel
# make
...
Sources prepared for compilation
6. 修改
# cd ../gateway/
# nano Makefile
MODEL=WL500gx
7. 編譯
# make
# make install
...
Finished building WL500gx firmware version 1.9.2.7 (1.9.2.7-d-r1432)
8. 結果
# ls -l mipsel-uclibc/
total 7436
drwxr-xr-x 42 root root 4096 2010-04-11 15:02 install/
drwxr-xr-x 3 root root 4096 2010-04-11 15:01 modules/
drwxr-xr-x 13 root root 4096 2010-04-11 15:02 target/
-rwx------ 1 root root 3063854 2010-04-11 15:02 target.cramfs*
-rw-r--r-- 1 root root 725614 2010-04-11 15:01 vmlinuz
-rw-r--r-- 1 root root 3792896 2010-04-11 15:02 WL500gx-1.9.2.7-d-r1432.trx
9. 勇敢的刷下去吧
離線
#7 2010-04-21 01:10:02
Re: [Lly] 編譯WL-500gx韌體測試
編譯環境: Ubuntu Netbook Remix 9.10
目標機型: 華碩 WL-500W
已經進行到 make install 階段了,出現底下訊息..
......
make -C /root/broadcom/src/lzma/CPP/7zip/Compress/LZMA_Lib/ CC=gcc CXX=g++
make[1]: Entering directory `/root/broadcom/src/lzma/CPP/7zip/Compress/LZMA_Lib'
g++ -c -O3 -Wall ZLib.cpp
ZLib.cpp:28:18: error: zlib.h: No such file or directory
ZLib.cpp:53: error: ISO C++ forbids declaration of ‘Bytef’ with no type
ZLib.cpp:53: error: expected ‘,’ or ‘...’ before ‘*’ token
ZLib.cpp:108: error: ISO C++ forbids declaration of ‘Bytef’ with no type
ZLib.cpp:108: error: expected ‘;’ before ‘*’ token
ZLib.cpp: In constructor ‘CInMemoryStream::CInMemoryStream(int)’:
ZLib.cpp:54: error: class ‘CInMemoryStream’ does not have any field named ‘m_data’
ZLib.cpp:54: error: ‘data’ was not declared in this scope
ZLib.cpp:54: error: ‘size’ was not declared in this scope
ZLib.cpp: In member function ‘virtual LONG CInMemoryStream::Read(void*, UInt32, UInt32*)’:
ZLib.cpp:66: error: ‘m_data’ was not declared in this scope
ZLib.cpp: At global scope:
ZLib.cpp:118: error: expected ‘)’ before ‘*’ token
ZLib.cpp:177: error: ISO C++ forbids declaration of ‘Bytef’ with no type
ZLib.cpp:177: error: expected ‘;’ before ‘*’ token
ZLib.cpp: In member function ‘virtual LONG COutMemoryStream::Write(const void*, UInt32, UInt32*)’:
ZLib.cpp:130: error: ‘m_data’ was not declared in this scope
ZLib.cpp: At global scope:
ZLib.cpp:183: error: expected constructor, destructor, or type conversion before ‘int’
make[1]: *** [ZLib.o] Error 1
make[1]: Leaving directory `/root/broadcom/src/lzma/CPP/7zip/Compress/LZMA_Lib'
make: *** [lzma-lib] Error 2
root@eeepc:~/broadcom/src/gateway#
何解?
技術問題請於論壇上集眾人之力公開討論,感恩
離線
#10 2010-04-21 20:46:14
Re: [Lly] 編譯WL-500gx韌體測試
安裝完 zlib1g-dev 後,重新 make install 就成功了
......
Finished building WL500W firmware version 1.9.2.7 (1.9.2.7-d-r1432)
root@eeepc:~/broadcom/src/gateway# ls -l mipsel-uclibc/
總計 7424
drwxr-xr-x 42 root root 4096 2010-04-21 20:41 install
drwxr-xr-x 3 root root 4096 2010-04-21 00:49 modules
drwxr-xr-x 13 root root 4096 2010-04-21 20:41 target
-rwx------ 1 root root 3063954 2010-04-21 20:41 target.cramfs
-rw-r--r-- 1 root root 725625 2010-04-21 20:39 vmlinuz
-rw-r--r-- 1 root root 3792896 2010-04-21 20:41 WL500W-1.9.2.7-d-r1432.trx
技術問題請於論壇上集眾人之力公開討論,感恩
離線