| 61 | | * Ubuntu 12.04 LTS x86_64 |
| 62 | | |
| 63 | | * mitty@precise:~$ sudo aptitude install subversion build-essential libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev xsltproc bison |
| 64 | | |
| 65 | | * mitty@precise:~$ mkdir openwrt |
| 66 | | |
| 67 | | * mitty@precise:~/openwrt$ svn co svn://svn.openwrt.org/openwrt/trunk/ |
| 68 | | {{{ |
| 69 | | (snip) |
| 70 | | |
| 71 | | U trunk |
| 72 | | Checked out revision 32026. |
| 73 | | }}} |
| 74 | | |
| 75 | | * mitty@precise:~/openwrt/trunk$ wget http://downloads.openwrt.org/snapshots/trunk/ar71xx/config |
| 76 | | * mitty@precise:~/openwrt$ cp config trunk/.config |
| 77 | | |
| 78 | | * mitty@precise:~/openwrt/trunk$ make prereq |
| 79 | | {{{ |
| 80 | | Collecting package info: done |
| 81 | | Collecting target info: done |
| 82 | | Checking 'working-make'... ok. |
| 83 | | Checking 'case-sensitive-fs'... ok. |
| 84 | | Checking 'getopt'... ok. |
| 85 | | Checking 'fileutils'... ok. |
| 86 | | Checking 'working-gcc'... ok. |
| 87 | | Checking 'working-g++'... ok. |
| 88 | | Checking 'ncurses'... ok. |
| 89 | | Checking 'zlib'... ok. |
| 90 | | Checking 'gawk'... ok. |
| 91 | | Checking 'flex'... ok. |
| 92 | | Checking 'unzip'... ok. |
| 93 | | Checking 'bzip2'... ok. |
| 94 | | Checking 'patch'... ok. |
| 95 | | Checking 'perl'... ok. |
| 96 | | Checking 'python'... ok. |
| 97 | | Checking 'wget'... ok. |
| 98 | | Checking 'git'... ok. |
| 99 | | Checking 'gnutar'... ok. |
| 100 | | Checking 'svn'... ok. |
| 101 | | Checking 'gnu-find'... ok. |
| 102 | | Checking 'getopt-extended'... ok. |
| 103 | | Checking 'non-root'... ok. |
| 104 | | }}} |
| 105 | | |
| 106 | | * mitty@precise:~/openwrt/trunk$ make -j 5 V=99 2>&1 | tee build.log | grep -i error |
| 107 | | {{{ |
| 108 | | (snip) |
| 109 | | |
| 110 | | make[2]: [package/rootfs-prepare] Error 2 (ignored) |
| 111 | | Compression errors: 0 |
| 112 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 113 | | make[5]: [install] Error 1 (ignored) |
| 114 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 115 | | make[5]: [install] Error 1 (ignored) |
| 116 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 117 | | make[5]: [install] Error 1 (ignored) |
| 118 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 119 | | make[5]: [install] Error 1 (ignored) |
| 120 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wpe72.bin.lzma is too big |
| 121 | | make[5]: [install] Error 1 (ignored) |
| 122 | | Compression errors: 0 |
| 123 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 124 | | make[5]: [install] Error 1 (ignored) |
| 125 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 126 | | make[5]: [install] Error 1 (ignored) |
| 127 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 128 | | make[5]: [install] Error 1 (ignored) |
| 129 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wp543.bin.lzma is too big |
| 130 | | make[5]: [install] Error 1 (ignored) |
| 131 | | [mkmylofw] Error: file /home/mitty/openwrt/trunk/build_dir/linux-ar71xx_generic/tmp/vmlinux-wpe72.bin.lzma is too big |
| 132 | | make[5]: [install] Error 1 (ignored) |
| 133 | | make[3]: [/home/mitty/openwrt/trunk/bin/ar71xx/OpenWrt-ImageBuilder-ar71xx_generic-for-Linux-x86_64.tar.bz2] Error 1 (ignored) |
| 134 | | make[3]: [/home/mitty/openwrt/trunk/bin/ar71xx/OpenWrt-ImageBuilder-ar71xx_generic-for-Linux-x86_64.tar.bz2] Error 1 (ignored) |
| 135 | | }}} |
| 136 | | |
| 137 | | * mitty@precise:~/openwrt$ cat > test.c |
| 138 | | {{{#!cc |
| 139 | | #include <stdio.h> |
| 140 | | |
| 141 | | int main(void) { |
| 142 | | printf("char -> %ld\n", sizeof(char)); |
| 143 | | printf("short -> %ld\n", sizeof(short)); |
| 144 | | printf("int -> %ld\n", sizeof(int)); |
| 145 | | printf("long -> %ld\n", sizeof(long)); |
| 146 | | printf("long long -> %ld\n", sizeof(long long)); |
| 147 | | printf("float -> %ld\n", sizeof(float)); |
| 148 | | printf("double -> %ld\n", sizeof(double)); |
| 149 | | printf("long double -> %ld\n", sizeof(long double)); |
| 150 | | |
| 151 | | return 0; |
| 152 | | } |
| 153 | | }}} |
| 154 | | * mitty@precise:~/openwrt$ gcc test.c -o test.x86 |
| 155 | | * 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 |
| 156 | | {{{ |
| 157 | | mips-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined |
| 158 | | mips-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined |
| 159 | | mips-openwrt-linux-gcc: warning: environment variable 'STAGING_DIR' not defined |
| 160 | | }}} |
| 161 | | |
| 162 | | * mitty@precise:~/openwrt$ file test test.x86 |
| 163 | | {{{ |
| 164 | | test: 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 |
| 165 | | test.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 |
| 166 | | }}} |
| 167 | | |
| 168 | | * mitty@precise:~/openwrt$ ./test.x86 |
| 169 | | {{{ |
| 170 | | char -> 1 |
| 171 | | short -> 2 |
| 172 | | int -> 4 |
| 173 | | long -> 8 |
| 174 | | long long -> 8 |
| 175 | | float -> 4 |
| 176 | | double -> 8 |
| 177 | | long double -> 16 |
| 178 | | }}} |
| 179 | | |
| 180 | | * mitty@precise:~/openwrt$ ./test |
| 181 | | {{{ |
| 182 | | bash: ./test: cannot execute binary file |
| 183 | | }}} |
| 184 | | |
| 185 | | * mitty@starseed:~$ uname -a |
| 186 | | {{{ |
| 187 | | Linux starseed 3.3.6 #1 Thu May 17 02:19:20 PDT 2012 mips GNU/Linux |
| 188 | | }}} |
| 189 | | * mitty@starseed:~$ ./test |
| 190 | | {{{ |
| 191 | | char -> 1 |
| 192 | | short -> 2 |
| 193 | | int -> 4 |
| 194 | | long -> 4 |
| 195 | | long long -> 8 |
| 196 | | float -> 4 |
| 197 | | double -> 8 |
| 198 | | long double -> 8 |
| 199 | | }}} |