entware:armv7
差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
entware:armv7 [2019/05/23 11:38] – ↷ 页面entware-ng:armv7被移动至entware:armv7 Hshh | entware:armv7 [2021/08/04 06:36] (当前版本) – 增加手动编译 openssl-1.1.1k 和 tinc-1.1pre18 Hshh | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ===== Entware-ng ARMv7 ===== | + | ===== Entware ARMv7 ===== |
- | 笔记: 创建 [[https:// | + | 笔记: 创建 [[https:// |
==== 系统环境准备 ==== | ==== 系统环境准备 ==== | ||
行 14: | 行 14: | ||
</ | </ | ||
- | ==== 搭建 entware-ng ==== | + | ==== 搭建 entware ==== |
< | < | ||
$ git clone https:// | $ git clone https:// | ||
$ cd Entware | $ cd Entware | ||
$ make package/ | $ make package/ | ||
- | $ cp ./ | + | |
+ | ## 如果你的设备kernel是2.6.x | ||
+ | $ cp ./ | ||
+ | ## 如果你的设备kernel是3.2.x | ||
+ | $ cp ./ | ||
$ make tools/ | $ make tools/ | ||
$ make toolchain/ | $ make toolchain/ | ||
行 34: | 行 39: | ||
=== 设置环境变量 === | === 设置环境变量 === | ||
< | < | ||
- | export STAGING_DIR=/ | + | export STAGING_DIR=/ |
- | export PATH=$PATH:/ | + | export PATH=$PATH:/ |
</ | </ | ||
行 44: | 行 49: | ||
--target=arm-openwrt-linux \ | --target=arm-openwrt-linux \ | ||
--host=arm-openwrt-linux \ | --host=arm-openwrt-linux \ | ||
- | --build=x86_64-linux-gnu \ | + | --build=x86_64-pc-linux-gnu |
+ | --prefix=/ | ||
+ | --without-openssl | ||
CC=arm-openwrt-linux-gnueabi-gcc \ | CC=arm-openwrt-linux-gnueabi-gcc \ | ||
- | CFLAGS='-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -fPIC' \ | + | CPP='arm-openwrt-linux-gnueabi-gcc -E' \ |
- | CPPFLAGS=' | + | CFLAGS='-O2 -pipe -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -fPIC' \ |
- | LDFLAGS=' | + | CPPFLAGS=' |
+ | LDFLAGS=' | ||
</ | </ | ||
行 54: | 行 62: | ||
编译tinc 1.11pre12 | 编译tinc 1.11pre12 | ||
- | 先编译依赖库, | + | 先编译依赖库, |
< | < | ||
make package/ | make package/ | ||
make package/ | make package/ | ||
- | make package/libreadline/compile | + | make package/readline/compile |
make package/ | make package/ | ||
+ | make package/ | ||
</ | </ | ||
行 67: | 行 76: | ||
--target=arm-openwrt-linux \ | --target=arm-openwrt-linux \ | ||
--host=arm-openwrt-linux \ | --host=arm-openwrt-linux \ | ||
- | --build=x86_64-linux-gnu \ | + | --build=x86_64-pc-linux-gnu \ |
--prefix=/ | --prefix=/ | ||
--without-openssl \ | --without-openssl \ | ||
CC=arm-openwrt-linux-gnueabi-gcc \ | CC=arm-openwrt-linux-gnueabi-gcc \ | ||
- | CFLAGS='-O2 -pipe -march=armv7-a -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -fPIC' \ | + | CPP='arm-openwrt-linux-gnueabi-gcc -E' \ |
- | CPPFLAGS=' | + | CFLAGS='-O2 -pipe -mtune=cortex-a9 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -fPIC' \ |
- | LDFLAGS=' | + | CPPFLAGS=' |
+ | LDFLAGS=' | ||
make | make | ||
+ | </ | ||
+ | |||
+ | === 编译 openssl-1.1.1k tinc-1.1pre18 === | ||
+ | 由于 entware 自带的 openssl 没法正常编译 tinc-1.1pre18, | ||
+ | |||
+ | < | ||
+ | ./Configure \ | ||
+ | linux-armv4 shared \ | ||
+ | --prefix=/ | ||
+ | --cross-compile-prefix=" | ||
+ | -I/ | ||
+ | -Wl, | ||
+ | -Wl, | ||
+ | -Wl, | ||
+ | -L/ | ||
+ | -Wl, | ||
+ | </ | ||
+ | < | ||
+ | # make CFLAGS=' | ||
+ | # make install | ||
+ | </ | ||
+ | 以上将把 openssl 安装到 / | ||
+ | |||
+ | 接着编译 tinc-1.1pre18 | ||
+ | < | ||
+ | ./configure \ | ||
+ | --target=arm-openwrt-linux \ | ||
+ | --host=arm-openwrt-linux \ | ||
+ | --build=x86_64-pc-linux-gnu \ | ||
+ | --prefix=/ | ||
+ | --with-openssl=/ | ||
+ | CC=arm-openwrt-linux-gnueabi-gcc \ | ||
+ | CPP=' | ||
+ | CFLAGS=' | ||
+ | CPPFLAGS=' | ||
+ | LDFLAGS=' | ||
</ | </ |
entware/armv7.1558582709.txt.gz · 最后更改: 2019/05/23 11:38 由 Hshh