一半君的总结纸

听话只听一半君

build freshTomato ARM 中文版 on travis ci

据说shibby结婚了,所以他很久没更新了,而唯一还活跃的tomato版本是 linksysinfo论坛的 Tomato-ARM by @kille72,作者最近把项目更名为 FreshTomato-ARM

lz最近从新蛋入手了asus官翻版ac1900p,特此来研究一下能否把之前的汉化工作搬到他上面,首先当然是要测试一下能否在travis上编译freshTomato,所以lz就直接用了之前tomato的编译脚本

在travis上编译
  • 首先lz把原作者的repo fork了一下,然后新建一个travis branch,以备修改
    git clone git@bitbucket.org:oglop/tomato-arm-kille72.git
    cd tomato-arm-kille72
    git checkout -b travis v2018.2
    
    
    git push -u origin travis
    
  • 错误解决
    /home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/toolchains/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/../libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
    

    lz按作者说明,装了那一堆依赖后,此错误消失

    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install libelf1:i386 libelf-dev:i386
    
    upnpevents.c:23:23: error: uuid/uuid.h: No such file or directory
    

    lz照搬了之前advancedTomato的编译脚本, 删除travis上的uuid-dev, 然后自己安装了交叉编译版的uuid后此错误消失ac68z target编译的错误

    /home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/mysql/missing: line 54: aclocal-1.10: command not found
    WARNING: `aclocal-1.10' is missing on your system. You should only need it if
    you modified `acinclude.m4' or `configure.in'. You might want
    to install the `Automake' and `Perl' packages. Grab them from
    any GNU archive site.
    /home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/mysql/missing: line 54: automake-1.10: command not found
    WARNING: `automake-1.10' is missing on your system. You should only need it if
    you modified `Makefile.am', `acinclude.m4' or `configure.in'.
    You might want to install the `Automake' and `Perl' packages.
    Grab them from any GNU archive site.
    ....
    arm-brcm-linux-uclibcgnueabi-nm: getutmpx.o: no symbols
    configure: error: in `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/mysql':
    configure: error: cannot run test program while cross compiling
    See `config.log' for more details
    

    lz于是给装了automake 1.10,然后错误变成了

    read.c:225:29: warning: assignment makes pointer from integer without a cast
    ../libtool: line 1301: func_opt_split: command not found
    libtool: Version mismatch error. This is libtool 2.2.6, but the
    libtool: definition of this LT_INIT comes from libtool 2.4.6.
    libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6
    libtool: and run autoconf again.
    make[6]: *** [conf_to_src] Error 63
    make[5]: *** [all-recursive] Error 1
    make[4]: *** [mysql] Error 2
    make[3]: *** [all] Error 2
    make[2]: *** [bin] Error 2
    make[1]: *** [z] Error 2
    make: *** [ac68z] Error 2
    

    装好 libtool 2.2.6a之后上述错误消失

    xmlIO.c: In function ‘xmlXzfileClose’:
    xmlIO.c:1450:52: error: ‘LZMA_OK’ undeclared (first use in this function)
    xmlIO.c:1450:52: note: each undeclared identifier is reported only once for each function it appears in
    make[7]: *** [xmlIO.lo] Error 1
    make[7]: *** Waiting for unfinished jobs....
    make[6]: *** [all-recursive] Error 1
    make[5]: *** [all] Error 2
    make[4]: *** [libxml2] Error 2
    make[3]: *** [all] Error 2
    make[2]: *** [bin] Error 2
    make[1]: *** [z] Error 2
    make: *** [ac68z] Error 2
    

    log中某处说可能少automake 1.12,所以装了,此外,因为之前tor里已经特意把lzma支持去掉了,所以lz这里也把libxml2的lzma关了

  • configure.in:9: the top level
    automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
    configure: WARNING: using cross tools not prefixed with host triplet
    install: cannot stat ‘libevent/.libs/libevent-2.0.so.5.1.9’: No such file or directory
    make[4]: *** [libevent-install] Error 1
    

    不知道为何生成的so文件是5.1.10, 所以lz去 src-rt-6.x.4708/router/Makefile里改了下

测试在Fedora 27上的travis docker镜像里编译

上面的travis 测试有些时间长的job超时了,因为超过了免费的时间限制,所以lz准备在笔记本上测试一下


# 先装一些需要的package
sudo apt-get update
sudo apt-get install libgmp-dev nettle-dev libstdc++6 lib32stdc++6 net-tools perl lib32z1-dev libelf1:i386 libltdl-dev 

#
cd ~
git clone --depth 1 https://github.com/oglopss/freshTomato-ARM-ci.git
cd freshTomato-ARM-ci
. ./.travis.sh
pre_build_prep  # 安装一些package,并clone tomato-arm repo 和汉化repo

cd ~/freshTomato-ARM-ci
./manual-build.sh ac68z # build ac68z target

make distclean ; rm ~/ac68z.txt; time make V1=crap V2=damn ac68z 2>&1 | tee ~/ac68z.txt

错误记录

  • 这个是lz在fedora 27上直接测试编译,提示下列错误,看起来是因为perl版本过高所导致,lz直接放弃了,准备在travis的ubuntu镜像里编译
    make[5]: Leaving directory '/run/media/oglop/BACKUP/github/tomato-arm-kille72/release/src-rt-6.x.4708/router/rc'
    ( cd iptables-1.4.x ; ./autogen.sh )
    libtoolize: putting auxiliary files in '.'.
    libtoolize: copying file './ltmain.sh'
    libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
    libtoolize: copying file 'm4/libtool.m4'
    libtoolize: copying file 'm4/ltoptions.m4'
    libtoolize: copying file 'm4/ltsugar.m4'
    libtoolize: copying file 'm4/ltversion.m4'
    libtoolize: copying file 'm4/lt~obsolete.m4'
    Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/local/bin/automake line 3935.
    autoreconf: automake failed with exit status: 255
    make[4]: *** [Makefile:998: iptables-1.4.x/configure] Error 1
    make[4]: Leaving directory '/run/media/oglop/BACKUP/github/tomato-arm-kille72/release/src-rt-6.x.4708/router'
    make[3]: *** [Makefile:128: all] Error 2
    make[3]: Leaving directory '/run/media/oglop/BACKUP/github/tomato-arm-kille72/release/src-rt-6.x.4708'
    make[2]: *** [Makefile:981: bin] Error 2
    make[2]: Leaving directory '/run/media/oglop/BACKUP/github/tomato-arm-kille72/release/src-rt-6.x.4708'
    make[1]: *** [Makefile:993: z] Error 2
    make[1]: Leaving directory '/run/media/oglop/BACKUP/github/tomato-arm-kille72/release/src-rt-6.x.4708'
    make: *** [Makefile:999: ac68z] Error 2
    
  • lz测试的时候又出现找不到uuid.h的提示,后来发现lz自己安装的libuuid没有成功,configure的时候就失败了
    travis@e799fa418df8:~/libuuid-1.0.3$ CC=arm-brcm-linux-uclibcgnueabi-gcc CXX=arm-brcm-linux-uclibcgnueabi-g++ AR=arm-brcm-linux-uclibcgnueabi-ar RANLIB=arm-brcm-linux-uclibcgnueabi-ranlib ./configure --host=arm-brcm-linux-uclibcgnueabi --prefix=$HOME/uuid-install
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for arm-brcm-linux-uclibcgnueabi-strip... arm-brcm-linux-uclibcgnueabi-strip
    checking for a thread-safe mkdir -p... /bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... arm-brcm-linux-uclibcgnueabi
    checking how to print strings... printf
    checking for style of include used by make... GNU
    checking for arm-brcm-linux-uclibcgnueabi-gcc... arm-brcm-linux-uclibcgnueabi-gcc
    checking whether the C compiler works... no
    configure: error: in `/home/travis/libuuid-1.0.3':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    

    可是config.log里也没看出什么明显错误, 完全版见

    target_alias=''
    
    
    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##
    
    /* confdefs.h */
    #define PACKAGE_NAME "libuuid"
    #define PACKAGE_TARNAME "libuuid"
    #define PACKAGE_VERSION "1.0.3"
    #define PACKAGE_STRING "libuuid 1.0.3"
    #define PACKAGE_BUGREPORT "sloowfranklin@gmail.com"
    #define PACKAGE_URL ""
    #define PACKAGE "libuuid"
    #define VERSION "1.0.3"
    
    configure: exit 77
    

    不过似乎lz安装任何package都不行了

    travis@e799fa418df8:~/libuuid-1.0.3$ sudo apt-get install build-essential net-tools
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    net-tools is already the newest version.
    build-essential is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 258 not upgraded.
    2 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Setting up libutempter0 (1.1.5-4) ...
    Creating utempter group...
    groupadd: failure while writing changes to /etc/group
    addgroup: `/usr/sbin/groupadd -g 116 utempter' returned error code 10. Exiting.
    dpkg: error processing libutempter0 (--configure):
     subprocess installed post-installation script returned error exit status 1
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    直接运行也不行

    travis@e799fa418df8:~/libuuid-1.0.3$ sudo /usr/sbin/groupadd -g 116 utempter
    groupadd: failure while writing changes to /etc/group
    

    后来发现是需要暂时关闭宿主机的SElinux

    sudo setenforce 0
    

    找不到uuid/uuid.h,而且也没法cross compile uuid,似乎陷入了死循环, 后来搜到原因是

    travis@e799fa418df8:~/libuuid-1.0.3$ ldd /opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1
            linux-gate.so.1 =>  (0xf7f89000)
            libmpc.so.2 => not found
            libmpfr.so.4 => not found
            libgmp.so.10 => not found
            libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7f6d000)
            libelf.so.1 => /usr/lib/i386-linux-gnu/libelf.so.1 (0xf7f56000)
            libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7daa000)
            /lib/ld-linux.so.2 (0xf7f8b000)
    
    travis@e799fa418df8:~/libuuid-1.0.3$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib:/usr/local/lib:/usr/lib
    
    travis@e799fa418df8:~/libuuid-1.0.3$ ldd /opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1
            linux-gate.so.1 =>  (0xf7f6d000)
            libmpc.so.2 => /opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib/libmpc.so.2 (0xf7f54000)
            libmpfr.so.4 => /opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib/libmpfr.so.4 (0xf7f04000)
            libgmp.so.10 => /opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/lib/libgmp.so.10 (0xf7ea7000)
            libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7e92000)
            libelf.so.1 => /usr/lib/i386-linux-gnu/libelf.so.1 (0xf7e7b000)
            libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7ccf000)
            libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7ca3000)
            /lib/ld-linux.so.2 (0xf7f6f000)
    
    
  • find patches/nano -maxdepth 1 -type f -name '*.patch' | sort -t '\0' -n | while read FILE; do ( if ! patch -p0 -Rf --dry-run --silent < $FILE 2>/dev/null; then patch -p0 < $FILE; fi ) done
    find: `patches/nano': No such file or directory
    cd nano && CC=arm-brcm-linux-uclibcgnueabi-gcc STRIP=arm-brcm-linux-uclibcgnueabi-strip \
                    autoreconf && \
                    CFLAGS="-Os -Wall -DLINUX26 -DCONFIG_BCMWL5 -DCONFIG_BCMWL6 -DCONFIG_BCMWL6A -DPART_JFFS2_GAP=0UL -pipe -fno-strict-aliasing -DBCMWPA2 -DBCMARM -marm  -DTCONFIG_NVRAM_64K -DLINUX_KERNEL_VERSION=132644 -I/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
                    CPPFLAGS="-Os -Wall -DLINUX26 -DCONFIG_BCMWL5 -DCONFIG_BCMWL6 -DCONFIG_BCMWL6A -DPART_JFFS2_GAP=0UL -pipe -fno-strict-aliasing -DBCMWPA2 -DBCMARM -marm  -DTCONFIG_NVRAM_64K -DLINUX_KERNEL_VERSION=132644 -I/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/libncurses/staged/usr/include -ffunction-sections -fdata-sections" \
                    LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections -L/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/libncurses/staged/usr/lib -fPIC" \
                    NCURSES_LIBS="-lncurses" \
                    ac_cv_lib_ncursesw_get_wch=no \
                    ./configure --host=arm-linux --build=x86_64-linux-gnu --prefix=/usr --disable-nls --enable-tiny --without-libiconv-prefix --disable-utf8
    configure.ac:22: error: require Automake 1.14, but have 1.13.4
    autoreconf: automake failed with exit status: 1
    

    这个很明显,按他说的装automake 1.14就好了,lz在本地travis测试安装时出现

    ~/automake-1.14.1
    [oglop@t450s]$ make
      GEN      bin/automake
      GEN      bin/aclocal
      GEN      t/ax/shell-no-trail-bslash
      GEN      t/ax/cc-no-c-o
      GEN      runtest
      GEN      doc/aclocal.1
      GEN      doc/automake.1
      GEN      lib/Automake/Config.pm
      GEN      doc/aclocal-1.14.1
      GEN      doc/automake-1.14.1
    help2man: can't get `--help' info from automake-1.14
    Try `--no-discard-stderr' if option outputs to stderr
    make: *** [Makefile:3707: doc/automake-1.14.1] Error 255
    
  •    mysql/stamp-h1
    find patches/mysql -maxdepth 1 -type f -name '*.patch' | sort -t '\0' -n | while read FILE; do ( if ! patch -p0 -Rf --dry-run --silent < $FILE 2>/dev/null; then patch -p0 < $FILE; fi ) done
    1 out of 1 hunk FAILED -- saving rejects to file mysql/sql/sql_lex.cc.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/sql/sql_lex.h.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/sql/sql_parse.cc.rej
    230 out of 237 hunks FAILED -- saving rejects to file mysql/sql/sql_yacc.yy.rej
    patching file mysql/sql/sql_lex.cc
    patching file mysql/sql/sql_lex.h
    patching file mysql/sql/sql_parse.cc
    patching file mysql/sql/sql_yacc.yy
    1 out of 1 hunk FAILED -- saving rejects to file mysql/extra/Makefile.am.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/extra/Makefile.in.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/include/my_global.h.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/scripts/Makefile.am.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/scripts/Makefile.in.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/sql/Makefile.am.rej
    1 out of 1 hunk FAILED -- saving rejects to file mysql/sql/Makefile.in.rej
    patching file mysql/extra/Makefile.am
    patching file mysql/extra/Makefile.in
    Hunk #1 succeeded at 936 (offset -2 lines).
    patching file mysql/include/my_global.h
    patching file mysql/scripts/Makefile.am
    patching file mysql/scripts/Makefile.in
    Hunk #1 succeeded at 802 (offset -2 lines).
    patching file mysql/sql/Makefile.am
    patching file mysql/sql/Makefile.in
    Hunk #1 succeeded at 1308 (offset -2 lines).
    5 out of 5 hunks FAILED -- saving rejects to file mysql/configure.rej
    patching file mysql/configure
    Hunk #1 FAILED at 26300.
    Hunk #2 FAILED at 26393.
    Hunk #3 FAILED at 48118.
    Hunk #4 FAILED at 48224.
    Hunk #5 FAILED at 48437.
    5 out of 5 hunks FAILED -- saving rejects to file mysql/configure.rej
    make[4]: *** [mysql/stamp-h1] Error 1
    make[4]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router'
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'
    make[2]: *** [bin] Error 2
    make[2]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'
    make[1]: *** [z] Error 2
    make[1]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'
    make: *** [ac68z] Error 2
    

    这看起来好像是因为lz自行把mysql的改过,但是作者似乎想通过直接patch生成的configure文件来解决,所以lz去把 router/patches/mysql/202-fix-cross-compiling2.patch删了就解决了

  • make[7]: Entering directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/nano/doc'
    rm -rf nano.htp
    if /bin/bash /home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/nano/missing makeinfo --html --no-split -c HEADERS=0  -I . \
             -o nano.htp nano.texi; \
            then \
              rm -rf nano.html && mv nano.htp nano.html; \
            else \
              rm -rf nano.htp; exit 1; \
            fi
    makeinfo: invalid option -- 'c'
    Try `makeinfo --help' for more information.
    make[7]: *** [nano.html] Error 1
    make[7]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/nano/doc'
    make[6]: *** [all-recursive] Error 1
    

    这看起来似乎是因为makeinfo版本过低

    travis@e799fa418df8:~/tomato-arm-kille72/release/src-rt-6.x.4708$ makeinfo --version
    makeinfo (GNU texinfo) 4.13
    

    如果在travis上出现此错误,需要

    before_install:
    - sudo add-apt-repository -y ppa:marutter/texlive.backport
    - sudo add-apt-repository -y ppa:dns/gnu
    - sudo apt-get update -qq
    - sudo apt-get install -y texinfo automake1.14
    
  • make[5]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/router/libevent'
    cd sqlite && \
            autoreconf -fsi && \
            CC=arm-brcm-linux-uclibcgnueabi-gcc CFLAGS="-Os -DLINUX26 -DCONFIG_BCMWL5 -DCONFIG_BCMWL6 -DCONFIG_BCMWL6A -DPART_JFFS2_GAP=0UL -pipe -fno-strict-aliasing -DBCMWPA2 -DBCMARM -marm  -DTCONFIG_NVRAM_64K -DLINUX_KERNEL_VERSION=132644 -ffunction-sections -fdata-sections" \
                    LDFLAGS="-ffunction-sections -fdata-sections -Wl,--gc-sections" \
                    ./configure --host=arm-linux --build=x86_64-linux-gnu --prefix=/usr --enable-shared --enable-static \
                    --disable-readline --disable-dynamic-extensions --enable-threadsafe
    Can't locate Autom4te/ChannelDefs.pm in @INC (@INC contains: /projects/hnd/tools/linux/hndtools-arm-linux-2.6.36-uclibc-4.5.3/share/autoconf /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/autoreconf line 40.
    BEGIN failed--compilation aborted at /opt/brcm/hndtools-arm-linux-2.6.36-uclibc-4.5.3/bin/autoreconf line 40.
    make[4]: *** [sqlite/stamp-h1] Error 2
    

    上面这个不知道为何, git clean -xfd 或者 make distclean之后就没了

最后

make -C ctools
make[4]: Entering directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/ctools'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/ctools'
ctools/objcopy -O binary -R .note -R .note.gnu.build-id -R .comment -S /home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/linux/linux-2.6/vmlinux ctools/piggy
ctools/lzma_4k e ctools/piggy  ctools/vmlinuz-lzma
ctools/mksquashfs router/arm-uclibc/target ctools/target.squashfs -noappend -all-root
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on ctools/target.squashfs, block size 131072.
[=============================================================|] 1819/1819 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
        compressed data, compressed metadata, compressed fragments, compressed xattrs
        duplicates are removed
Filesystem size 22217.31 Kbytes (21.70 Mbytes)
        30.53% of uncompressed filesystem size (72774.53 Kbytes)
Inode table size 12406 bytes (12.12 Kbytes)
        21.83% of uncompressed inode table size (56843 bytes)
Directory table size 13968 bytes (13.64 Kbytes)
        43.31% of uncompressed directory table size (32252 bytes)
Number of duplicate files found 63
Number of inodes 1682
Number of files 1356
Number of fragments 87
Number of symbolic links  236
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 90
Number of ids (unique uids + gids) 1
Number of uids 1
        root (0)
Number of gids 1
        root (0)
ctools/trx -o image/linux-lzma.trx ctools/vmlinuz-lzma ctools/target.squashfs
warning: increasing offset 1734357 to 1734360
ctools/trx_asus -i image/linux-lzma.trx -r RT-AC56U,3.0.0.4,image/freshtomato-RT-AC56U-ARM-2018.2.000111-"AIO-64K".trx

Creating ASUS RT-AC56U firmware to image/freshtomato-RT-AC56U-ARM-2018.2.000111-AIO-64K.trx

TRX Image:
 Total Size .... : 24489984 (23916.0 KB) (23.4 MB)
 CRC-32 ........ : B972CC54

ctools/trx_asus -i image/linux-lzma.trx -r RT-AC68U,3.0.0.4,image/freshtomato-RT-AC68U-ARM-2018.2.000111-"AIO-64K".trx

Creating ASUS RT-AC68U firmware to image/freshtomato-RT-AC68U-ARM-2018.2.000111-AIO-64K.trx

TRX Image:
 Total Size .... : 24489984 (23916.0 KB) (23.4 MB)
 CRC-32 ........ : D786A160

ctools/trx_asus -i image/linux-lzma.trx -r RT-N18U,3.0.0.4,image/freshtomato-RT-N18U-ARM-2018.2.000111-"AIO-64K".trx

Creating ASUS RT-N18U firmware to image/freshtomato-RT-N18U-ARM-2018.2.000111-AIO-64K.trx

TRX Image:
 Total Size .... : 24489984 (23916.0 KB) (23.4 MB)
 CRC-32 ........ : 8EC1B2F9

-----------------
2018.2.000 111 K26ARM USB AIO-64K  ready
-----------------
make[3]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'
make[2]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'
make[1]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'

real    21m35.272s
user    20m56.280s
sys     3m37.533s
汉化www文件夹

因为之前汉化过tomato shibby,大概有不少文件是差不多的,所以lz就新建了freshTomato-gui repo, 把v2018.2作为第一个master branch的commit,然后新建branch v2018.2, 准备把之前的汉化文件merge进来

kdiff3 /home/oglop/github/tomato-gui-en/ /home/oglop/github/tomato-gui/ /run/media/oglop/BACKUP/github/tomato-arm-kille72/release/src-rt-6.x.4708/router/www/ -o ~/github/freshTomato-gui

当然这不可能自动,lz还是手动merge的

如上图所示,有少部分需要手动merge, lz每次开了kdiff3之后就双击想修改的文件,然后按F8全屏显示,如果不记得前一天合并到哪个文件了,lz就

meld ~/github/freshTomato-gui ~/github/freshTomato-gui-en

这样来提醒一下自己

测试编译一下ac68z 中文版

ctools/objcopy -O binary -R .note -R .note.gnu.build-id -R .comment -S /home/travis/tomato-arm-kille72/release/src-rt-6.x.4708/linux/linux-2.6/vmlinux ctools/piggy
ctools/lzma_4k e ctools/piggy  ctools/vmlinuz-lzma
ctools/mksquashfs router/arm-uclibc/target ctools/target.squashfs -noappend -all-root
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on ctools/target.squashfs, block size 131072.
[=============================================================\] 1819/1819 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 131072
        compressed data, compressed metadata, compressed fragments, compressed xattrs
        duplicates are removed
Filesystem size 22222.71 Kbytes (21.70 Mbytes)
        30.54% of uncompressed filesystem size (72776.19 Kbytes)
Inode table size 12454 bytes (12.16 Kbytes)
        21.91% of uncompressed inode table size (56843 bytes)
Directory table size 13968 bytes (13.64 Kbytes)
        43.31% of uncompressed directory table size (32252 bytes)
Number of duplicate files found 63
Number of inodes 1682
Number of files 1356
Number of fragments 87
Number of symbolic links  236
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 90
Number of ids (unique uids + gids) 1
Number of uids 1
        root (0)
Number of gids 1
        root (0)
ctools/trx -o image/linux-lzma.trx ctools/vmlinuz-lzma ctools/target.squashfs
warning: increasing offset 1734354 to 1734356
ctools/trx_asus -i image/linux-lzma.trx -r RT-AC56U,3.0.0.4,image/freshtomato-RT-AC56U-ARM-2018.2.000111-"AIO-64K".trx

Creating ASUS RT-AC56U firmware to image/freshtomato-RT-AC56U-ARM-2018.2.000111-AIO-64K.trx

TRX Image:
 Total Size .... : 24494080 (23920.0 KB) (23.4 MB)
 CRC-32 ........ : 765B5E16

ctools/trx_asus -i image/linux-lzma.trx -r RT-AC68U,3.0.0.4,image/freshtomato-RT-AC68U-ARM-2018.2.000111-"AIO-64K".trx

Creating ASUS RT-AC68U firmware to image/freshtomato-RT-AC68U-ARM-2018.2.000111-AIO-64K.trx

TRX Image:
 Total Size .... : 24494080 (23920.0 KB) (23.4 MB)
 CRC-32 ........ : 18AF3322

ctools/trx_asus -i image/linux-lzma.trx -r RT-N18U,3.0.0.4,image/freshtomato-RT-N18U-ARM-2018.2.000111-"AIO-64K".trx

Creating ASUS RT-N18U firmware to image/freshtomato-RT-N18U-ARM-2018.2.000111-AIO-64K.trx

TRX Image:
 Total Size .... : 24494080 (23920.0 KB) (23.4 MB)
 CRC-32 ........ : 41E820BB

-----------------
2018.2.000 111 K26ARM USB AIO-64K  ready
-----------------
make[3]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'
make[2]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'
make[1]: Leaving directory `/home/travis/tomato-arm-kille72/release/src-rt-6.x.4708'

real    58m27.530s
user    58m50.665s
sys     10m58.889s
刷机测试

刷机之前截图留念,asus固件版本号3.0.0.4.380_4164

此时悲剧发生了,lz发现自己买了个不能刷tomato的路由器, 欲哭无泪,和c1版本的68U一样,支持遥遥无期, lz只能投奔merlin的怀抱了.

参考:
compilation error for mysql
Ubuntu 上交叉编译 Tomato-Shibby-ARM 的一个 Bug 及其解决
“help2man: can’t get `–help’ info from automake-1.16”
makeinfo 4.13 support?
没做好功课的下场
Bootloop for Asus RT-AC68U Hardware Rev C1
RT-AC68U / RT-AC68P / RT-AC1900 / RT-AC1900P

发表评论

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

WordPress.com 徽标

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

Google photo

You are commenting using your Google 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 /  更改 )

Connecting to %s

%d 博主赞过: