#!/bin/bash # Go to the correct directory cd ~/ax3600 touch .config # Clean up make clean # Update code in main repo git checkout ipq807x-5.15 git fetch origin git reset --hard origin/ipq807x-5.15 git clean -f -d git status # Create new feeds file with my package feeds cp feeds.conf.default feeds.conf printf "\nsrc-git stoickish https://github.com/stoickish/openwrt-jitterentropy.git\n" >> feeds.conf # Update feeds ./scripts/feeds clean ./scripts/feeds update -a ./scripts/feeds install -a # Creates a new .config file # Target / build settings printf "CONFIG_TARGET_ipq807x=y\n" > .config printf "CONFIG_TARGET_ipq807x_generic=y\n" >> .config printf "CONFIG_TARGET_ipq807x_generic_DEVICE_xiaomi_ax3600=y\n" >> .config printf "CONFIG_DEVEL=y\n" >> .config printf "CONFIG_TOOLCHAINOPTS=y\n" >> .config printf "CONFIG_EXTRA_OPTIMIZATION=\"-fno-caller-saves -fno-plt -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta\"\n" >> .config printf "CONFIG_GCC_USE_GRAPHITE=y\n" >> .config printf "CONFIG_TARGET_OPTIMIZATION=\"-Ofast -pipe -mcpu=cortex-a53+crypto\"\n" >> .config printf "CONFIG_TARGET_OPTIONS=y\n" >> .config # Disable FW4 as it breaks banip, bcp38 printf "CONFIG_PACKAGE_firewall=y\n" >> .config printf "# CONFIG_PACKAGE_firewall4 is not set\n" >> .config printf "CONFIG_PACKAGE_ip6tables-legacy=y\n" >> .config # Needed by banIP for IPv6 Networks (FW3) # Target-specific settings printf "CONFIG_PACKAGE_kmod-qca-nss-dp=y\n" >> .config printf "CONFIG_PACKAGE_nss-firmware-ipq8074=y\n" >> .config # RAM optimizations printf "CONFIG_KERNEL_SWAP=y\n" >> .config printf "# CONFIG_PACKAGE_kmod-ath10k-ct is not set\n" >> .config printf "CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers=y\n" >> .config printf "CONFIG_PACKAGE_zram-swap=y\n" >> .config # Personal package settings printf "CONFIG_HTOP_LMSENSORS=y\n" >> .config printf "CONFIG_PACKAGE_curl=y\n" >> .config printf "CONFIG_PACKAGE_htop=y\n" >> .config printf "CONFIG_PACKAGE_irqbalance=y\n" >> .config printf "CONFIG_PACKAGE_jitterentropy=y\n" >> .config printf "CONFIG_PACKAGE_lm-sensors=y\n" >> .config printf "CONFIG_PACKAGE_luci-app-banip=y\n" >> .config printf "CONFIG_PACKAGE_luci-app-bcp38=y\n" >> .config printf "CONFIG_PACKAGE_luci-app-https-dns-proxy=y\n" >> .config printf "CONFIG_PACKAGE_luci-app-sqm=y\n" >> .config printf "CONFIG_PACKAGE_luci-ssl=y\n" >> .config printf "CONFIG_PACKAGE_luci-theme-openwrt-2020=y\n" >> .config printf "CONFIG_PACKAGE_nano=y\n" >> .config printf "# CONFIG_PACKAGE_urngd is not set\n" >> .config make defconfig # Download new source packages make download # Copy over the EIP firmware # cp ~/ax3600-buildscripts/nss-eip-firmware/*.bin ./feeds/nss_packages/firmware/nss-eip-firmware/src/ # Build make -j$(nproc) if [ $? -ne 0 ]; then make -j1 V=s fi