一半君的总结纸

听话只听一半君

Cross compiling AdvancedTomato 3.4 for netgear wndr4500v2

lz没有此路由器,暂时无法测试, 作者官网没有提供此网件wndr4500v2的固件,所以自行编译以备以后使用

git clone https://github.com/Jackysi/advancedtomato.git

# 因为lz之前用过tomato的toolchain
export PATH=/opt/brcm/hndtools-mipsel-linux/bin:/opt/brcm/hndtools-mipsel-uclibc/bin:$PATH

cd ~/advancedtomato/release/src-rt-6.x

# lz 补了一些可能缺少的dependency 
yum install glib-devel glib2-devel gettext-devel

# 如果之前compile过
make distclean
git reset --hard && git clean -fdx
rm -f ~/outputfile.txt

# time 只是为了显示下总时间,v2是让固件看起来比较酷, tee是为了把log同步保存到文件里
time make V1=RT-N5x- V2=-138-wndr4500v2 wndr4500v2z | tee ~/outputfile.txt

曾经看到的错误,再次执行后通过 … orz, 也许和lz的autoconf的版本有关, lz是2.69

configure.ac:544: warning: macro 'AM_GLIB_GNU_GETTEXT' not found in library
configure.ac:559: error: possibly undefined macro: AM_GLIB_GNU_GETTEXT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

编译成功的log

*********************** Convert TRX to CHK (add Netgear Checksum) ************************
mkchkimg: Netgear CHK writer - v0.2
mkchkimg:        Board Id: U12H224T00_NETGEAR
mkchkimg:          Region: North America (NA)
mkchkimg:      Kernel Len: 22102016
mkchkimg: Kernel Checksum: 0x5b355080
mkchkimg:  Image Checksum: 0x5b355080

*********************** Wed Dec 7 07:57:10 PST 2016 ************************
1.28.0000 MIPSR2-138-wndr4500v2 K26AC USB AIO-64K
Creating little endian 3.0 filesystem on /home/oglop/advancedtomato/release/src-rt-6.x/router/mipsel-uclibc/target.image, block size 65536.

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments
Filesystem size 20334.33 Kbytes (19.86 Mbytes)
	29.30% of uncompressed filesystem size (69395.99 Kbytes)
Inode table size 13734 bytes (13.41 Kbytes)
	25.21% of uncompressed inode table size (54472 bytes)
Directory table size 13516 bytes (13.20 Kbytes)
	52.41% of uncompressed directory table size (25791 bytes)
No duplicate files removed
Number of inodes 1597
Number of files 1288
Number of fragments 104
Number of symbolic links  218
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 91
Number of uids 1
	root (0)
Number of gids 0

Creating TRX: image/tomato-K26ACUSB-1.28.RT-N5x-MIPSR2-138-wndr4500v2-AIO-64K.trx

TRX Image:
 Total Size .... : 21893120 (21380.0 KB) (20.9 MB)
   Images ...... : 21891044 (0x014e07e4)
   Padding ..... : 2048
 Avail. for jffs :
   4MB, 128K CFE : 0 EBs + 0
   4MB, 256K CFE : 0 EBs + 0
   8MB, 256K CFE : 0 EBs + 0
            Note : Netgear routers have 6 EBs less available!
 CRC-32 ........ : 2E0A9D59
 128K Blocks ... : 168 (0x000000A8)
  64K Blocks ... : 335 (0x0000014F)
 Offsets:
   0: 0x0000001C  lzma-loader/loader.gz
   1: 0x00000AD8  /home/oglop/advancedtomato/release/src-rt-6.x/linux/linux-2.6/arch/mips/brcm-bo
   2: 0x00104800  router/mipsel-uclibc/target.image

编译产物下载:(dropbox)
tomato-K26ACUSB-1.28.RT-N5x-MIPSR2-3.4-v138-wndr4500v2-AIO-64K.trx

参考:
Netgear WNDR4500 – ddwrt router database
Victek/Tomato-RAF
Tomato, z Build Fails
Required packages to build AdvancedTomato
error: possibly undefined macro: AM_GLIB_GNU_GETTEXT

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: