Changes between Version 9 and Version 10 of TipAndDoc/Linux/OpenWRT


Ignore:
Timestamp:
Jun 3, 2012 12:23:42 AM (12 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/Linux/OpenWRT

    v9 v10  
    88 * [http://munin-monitoring.org/wiki/OpenWRT-HowTo OpenWRT-HowTo - Munin - Trac] 
    99 * [http://wiki.openwrt.org/doc/howto/secure.access Secure your router's access - OpenWrt Wiki] 
     10 
     11 = cross complie = 
     12 * [http://wiki.openwrt.org/about/toolchain OpenWrt Buildroot – About - OpenWrt Wiki] 
     13 * [http://d.hatena.ne.jp/sdkt4a/20080814/1218655463 OpenWrtのクロスコンパイル環境をDebianに構築してhello,worldするよ! - sdkt4aの日記] 
     14 
     15 * Ubuntu 12.04 LTS x86_64 
     16 
     17 * mitty@precise:~$ sudo aptitude install subversion build-essential libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev xsltproc bison 
     18 
     19 * mitty@precise:~$ mkdir openwrt 
     20 
     21 * mitty@precise:~/openwrt$ svn co svn://svn.openwrt.org/openwrt/trunk/ 
     22{{{ 
     23(snip) 
     24 
     25 U   trunk 
     26Checked out revision 32026. 
     27}}} 
     28 
     29 * mitty@precise:~/openwrt/trunk$ wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/config 
     30 * mitty@precise:~/openwrt$ cp config trunk/.config 
     31 
     32 * mitty@precise:~/openwrt/trunk$ make prereq 
     33{{{ 
     34Collecting package info: done 
     35Collecting target info: done 
     36Checking 'working-make'... ok. 
     37Checking 'case-sensitive-fs'... ok. 
     38Checking 'getopt'... ok. 
     39Checking 'fileutils'... ok. 
     40Checking 'working-gcc'... ok. 
     41Checking 'working-g++'... ok. 
     42Checking 'ncurses'... ok. 
     43Checking 'zlib'... ok. 
     44Checking 'gawk'... ok. 
     45Checking 'flex'... ok. 
     46Checking 'unzip'... ok. 
     47Checking 'bzip2'... ok. 
     48Checking 'patch'... ok. 
     49Checking 'perl'... ok. 
     50Checking 'python'... ok. 
     51Checking 'wget'... ok. 
     52Checking 'git'... ok. 
     53Checking 'gnutar'... ok. 
     54Checking 'svn'... ok. 
     55Checking 'gnu-find'... ok. 
     56Checking 'getopt-extended'... ok. 
     57Checking 'non-root'... ok. 
     58}}} 
     59 
     60 * mitty@precise:~/openwrt/trunk$ make -j 5 V=99 2>&1 | tee build.log | grep -i error 
     61{{{ 
     62(snip) 
     63 
     64make[2]: [package/rootfs-prepare] Error 2 (ignored) 
     65Compression errors: 0 
     66[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     67make[5]: [install] Error 1 (ignored) 
     68[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     69make[5]: [install] Error 1 (ignored) 
     70[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     71make[5]: [install] Error 1 (ignored) 
     72[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     73make[5]: [install] Error 1 (ignored) 
     74[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wpe72.bin.lzma is too big 
     75make[5]: [install] Error 1 (ignored) 
     76Compression errors: 0 
     77[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     78make[5]: [install] Error 1 (ignored) 
     79[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     80make[5]: [install] Error 1 (ignored) 
     81[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     82make[5]: [install] Error 1 (ignored) 
     83[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big 
     84make[5]: [install] Error 1 (ignored) 
     85[mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wpe72.bin.lzma is too big 
     86make[5]: [install] Error 1 (ignored) 
     87make[3]: [/home/mitty/openwrt/trunk/bin/ar71xx/OpenWrt-ImageBuilder-ar71xx_generic-for-Linux-x86_64.tar.bz2] Error 1 (ignored) 
     88make[3]: [/home/mitty/openwrt/trunk/bin/ar71xx/OpenWrt-ImageBuilder-ar71xx_generic-for-Linux-x86_64.tar.bz2] Error 1 (ignored) 
     89}}} 
     90 
     91 * mitty@precise:~/openwrt$ cat > test.c 
     92{{{#!cc 
     93#include <stdio.h> 
     94 
     95int main(void) { 
     96        printf("char        -> %ld\n", sizeof(char)); 
     97        printf("short       -> %ld\n", sizeof(short)); 
     98        printf("int         -> %ld\n", sizeof(int)); 
     99        printf("long        -> %ld\n", sizeof(long)); 
     100        printf("long long   -> %ld\n", sizeof(long long)); 
     101        printf("float       -> %ld\n", sizeof(float)); 
     102        printf("double      -> %ld\n", sizeof(double)); 
     103        printf("long double -> %ld\n", sizeof(long double)); 
     104 
     105        return 0; 
     106} 
     107}}} 
     108 * mitty@precise:~/openwrt$ gcc test.c -o test.x86 
     109 * mitty@precise:~/openwrt$ ./trunk/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/bin/mips-openwrt-linux-gcc test.c -o test 
     110{{{ 
     111mips-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined 
     112mips-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined 
     113mips-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined 
     114}}} 
     115 
     116 * mitty@precise:~/openwrt$ file test test.x86 
     117{{{ 
     118test:     ELF 32-bit MSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, not stripped 
     119test.x86: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x53177842cbc614b1f4c71bae24df294892906443, not stripped 
     120}}} 
     121 
     122 * mitty@precise:~/openwrt$ ./test.x86 
     123{{{ 
     124char        -> 1 
     125short       -> 2 
     126int         -> 4 
     127long        -> 8 
     128long long   -> 8 
     129float       -> 4 
     130double      -> 8 
     131long double -> 16 
     132}}} 
     133 
     134 * mitty@precise:~/openwrt$ ./test 
     135{{{ 
     136bash: ./test: cannot execute binary file 
     137}}} 
     138 
     139 * mitty@starseed:~$ uname -a 
     140{{{ 
     141Linux starseed 3.3.6 #1 Thu May 17 02:19:20 PDT 2012 mips GNU/Linux 
     142}}} 
     143 * mitty@starseed:~$ ./test 
     144{{{ 
     145char        -> 1 
     146short       -> 2 
     147int         -> 4 
     148long        -> 4 
     149long long   -> 8 
     150float       -> 4 
     151double      -> 8 
     152long double -> 8 
     153}}} 
    10154 == subversion == 
    11155 * 2012/05/20現在、リポジトリからsubversionが消えている