mirror of
https://github.com/outbackdingo/openwrt-builder.git
synced 2026-01-28 02:19:50 +00:00
Move some optimalization to target; add requirements for mold
This commit is contained in:
@@ -12,7 +12,8 @@ RUN dnf -y install vim bash-completion bzip2 gcc gcc-c++ git make ncurses-devel
|
||||
python3-sqlparse python3-aiosignal python3-charset-normalizer python3-frozenlist \
|
||||
python3-networkx python3-setuptools luajit2.1-luv libnghttp2-devel \
|
||||
perl-Time-Piece perl-Test-CPAN-Meta-JSON net-snmp-libs \
|
||||
e2fsprogs-libs pam-devel && dnf clean all
|
||||
e2fsprogs-libs pam-devel gcc-g++ cmake glibc-static libstdc++-static util-linux \
|
||||
&& dnf clean all
|
||||
|
||||
# To build BPI-R4-MT76-OPENWRT-V21.02
|
||||
RUN dnf install -y usbutils bison flex openssl-devel \
|
||||
|
||||
@@ -75,7 +75,7 @@ then add the required packages that I use for the router/AP function:
|
||||
|
||||
* Main router:
|
||||
```shell
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/extended >> ~/openwrt-builder/openwrt/.config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/main-router >> ~/openwrt-builder/openwrt/.config
|
||||
```
|
||||
|
||||
* Dumb AP:
|
||||
@@ -95,11 +95,16 @@ Example:
|
||||
```shell
|
||||
# Banana Pi R4 as main router
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/mediatek/mt7988a/bpi-r4 > ~/openwrt-builder/openwrt/.config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/extended >> ~/openwrt-builder/openwrt/.config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/main-router >> ~/openwrt-builder/openwrt/.config
|
||||
# optional configs
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/optimize >> ~/openwrt-builder/openwrt/.config
|
||||
for m in $(grep "=m" ~/openwrt-builder/openwrt/.config | grep -v 'CONFIG_PACKAGE_libustream-mbedtls=m'); do module=$(echo $m| cut -f1 -d'='); sed -i "s/$m/\# $module is not set/g" ~/openwrt-builder/openwrt/.config; done
|
||||
|
||||
# AX3200 as dumb AP
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/mediatek/mt7622/ax3200 > ~/openwrt-builder/openwrt/.config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/dumb_ap >> ~/openwrt-builder/openwrt/.config
|
||||
# optional configs
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/optimize >> ~/openwrt-builder/openwrt/.config
|
||||
|
||||
# etc.
|
||||
```
|
||||
|
||||
@@ -9,6 +9,7 @@ CONFIG_LUA_ECO_OPENSSL=y
|
||||
# CONFIG_LUA_ECO_MBEDTLS is not set
|
||||
# CONFIG_LIBCURL_MBEDTLS is not set
|
||||
CONFIG_LIBCURL_OPENSSL=y
|
||||
CONFIG_OPENSSL_OPTIMIZE_SPEED=y
|
||||
|
||||
# Enable http3 and quic
|
||||
CONFIG_LIBCURL_NGHTTP3=y
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
# based on https://github.com/glassd00r/Openwrt_Builder/blob/main/bpi-r4.config
|
||||
CONFIG_USE_LTO=y
|
||||
CONFIG_TARGET_OPTIMIZATION="-O3 -pipe -mcpu=cortex-a73+crc+crypto+rdma"
|
||||
CONFIG_TARGET_OPTIONS=y
|
||||
CONFIG_KERNEL_CC_STACKPROTECTOR_STRONG=y
|
||||
CONFIG_USE_GCC_GGV=y
|
||||
CONFIG_GCC_USE_GRAPHITE=y
|
||||
CONFIG_USE_PREFETCH=y
|
||||
CONFIG_USE_MOLD=y
|
||||
|
||||
# set GCC14.1
|
||||
CONFIG_BUILD_PATENTED=y
|
||||
CONFIG_DEVEL=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_TOOLCHAINOPTS=y
|
||||
CONFIG_GCC_USE_VERSION_14=y
|
||||
CONFIG_GCC_VERSION_14=y
|
||||
CONFIG_GCC_VERSION="14.1.0"
|
||||
|
||||
CONFIG_ZLIB_OPTIMIZE_SPEED=y
|
||||
CONFIG_ZSTD_OPTIMIZE_O3=y
|
||||
|
||||
# CONFIG_GCC_USE_GRAPHITE=y
|
||||
# CONFIG_USE_GC_SECTIONS=y
|
||||
# CONFIG_USE_LTO=y
|
||||
# CONFIG_USE_MOLD=y
|
||||
|
||||
# CONFIG_KERNEL_CC_STACKPROTECTOR_STRONG is not set
|
||||
# CONFIG_USE_GCC_GGV is not set
|
||||
# CONFIG_USE_PREFETCH is not set
|
||||
|
||||
@@ -13,10 +13,3 @@ CONFIG_USE_LLVM_BUILD=y
|
||||
CONFIG_DEVEL=y
|
||||
CONFIG_JSON_CYCLONEDX_SBOM=y
|
||||
CONFIG_MAKE_TOOLCHAIN=y
|
||||
|
||||
# set GCC14.1
|
||||
CONFIG_GCC_USE_VERSION_14=y
|
||||
CONFIG_GCC_VERSION="14.1.0"
|
||||
CONFIG_GCC_VERSION_14=y
|
||||
CONFIG_TOOLCHAINOPTS=y
|
||||
CONFIG_BUILD_PATENTED=y
|
||||
|
||||
@@ -7,3 +7,6 @@
|
||||
CONFIG_TARGET_mediatek=y
|
||||
CONFIG_TARGET_mediatek_mt7622=y
|
||||
CONFIG_TARGET_mediatek_mt7622_DEVICE_xiaomi_redmi-router-ax6s=y
|
||||
|
||||
CONFIG_TARGET_OPTIONS=y
|
||||
CONFIG_TARGET_OPTIMIZATION="-O3 -pipe -mcpu=cortex-a53+crc+crypto"
|
||||
|
||||
@@ -20,8 +20,5 @@ CONFIG_PACKAGE_mtdev=m
|
||||
CONFIG_PACKAGE_kmod-mtd-rw=y
|
||||
# CONFIG_PACKAGE_kmod-veth is not set
|
||||
|
||||
# temporary workaround for kernel 6.6
|
||||
# CONFIG_PACKAGE_kmod-usb-serial-dmx_usb_module is not set
|
||||
# CONFIG_PACKAGE_kmod-pf-ring is not set
|
||||
# CONFIG_PACKAGE_kmod-ovpn-dco-v2 is not set
|
||||
# CONFIG_PACKAGE_kmod-usb-serial-xr_usb_serial_common is not set
|
||||
CONFIG_TARGET_OPTIONS=y
|
||||
CONFIG_TARGET_OPTIMIZATION="-O3 -pipe -mcpu=cortex-a73+crc+crypto+rdma"
|
||||
|
||||
Reference in New Issue
Block a user