├── .github └── workflows │ ├── BUILD_CI_raspi.yml.bak │ └── BUILD_CI_x86.yml.bak ├── .gitignore ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── action.yml ├── build.sh ├── compile_openwrt.sh ├── configs ├── README.md ├── arm64-openwrt.sh ├── arm64-with-docker.sh ├── bcm2711-raspi4-openwrt.sh ├── bcm2711-raspi4-with-docker.sh ├── custom.seed ├── release_note.txt ├── release_note_docker.txt ├── x86-openwrt.sh └── x86-with-docker.sh ├── fetch_openwrt.sh ├── pack_firmware.sh ├── prepare_env.sh └── update_config.sh /.github/workflows/BUILD_CI_raspi.yml.bak: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Build OpenWrt Firmware - Raspi 4 | 5 | # Controls when the workflow will run 6 | on: 7 | repository_dispatch: 8 | # Allows you to run this workflow manually from the Actions tab 9 | workflow_dispatch: 10 | inputs: 11 | config: 12 | description: 'Input config script file name without ".sh". "all" to build all the configs.' 13 | required: true 14 | default: 'configs/bcm2711-raspi4-openwrt.sh' 15 | txt: 16 | description: Release note txt file name. 17 | required: true 18 | default: release_note.txt 19 | schedule: 20 | - cron: '0 21 * * 5' 21 | 22 | env: 23 | TZ: 'Asia/Shanghai' 24 | 25 | jobs: 26 | build: 27 | runs-on: ubuntu-20.04 28 | env: 29 | CONFIG: ${{ github.event.client_payload.config || github.event.inputs.config }} 30 | TXT: ${{ github.event.client_payload.txt || github.event.inputs.txt }} 31 | 32 | steps: 33 | - name: Set ENV 34 | if: github.event.schedule=='0 21 * * 5' 35 | run: | 36 | echo "CONFIG='configs/bcm2711-raspi4-openwrt.sh'" >> $GITHUB_ENV 37 | echo "TXT=release_note.txt" >> $GITHUB_ENV 38 | 39 | - name: Checkout 40 | uses: actions/checkout@main 41 | 42 | - name: Maximize Build Space 43 | run: | 44 | docker rmi `docker images -q` 45 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /usr/lib/jvm /opt/ghc 46 | sudo -E apt-get -qq autoremove --purge 47 | sudo -E apt-get -qq clean 48 | echo "Free space:" 49 | df -h 50 | 51 | - name: Run Build Script 52 | uses: ./ 53 | with: 54 | config: ${{ env.CONFIG }} 55 | 56 | - name: After Script 57 | run: | 58 | echo "PACKAGED_OUTPUTDATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV 59 | 60 | - name: Upload OpenWrt Firmware to Releases 61 | uses: softprops/action-gh-release@v1 62 | env: 63 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 64 | with: 65 | tag_name: firmware-openwrt-arm_${{ env.PACKAGED_OUTPUTDATE }} 66 | files: | 67 | ${{ github.workspace }}/bin/*.img.gz 68 | body_path: ${{ github.workspace }}/configs/${{ env.TXT }} 69 | fail_on_unmatched_files: true 70 | -------------------------------------------------------------------------------- /.github/workflows/BUILD_CI_x86.yml.bak: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: Build OpenWrt Firmware - X86 4 | 5 | # Controls when the workflow will run 6 | on: 7 | repository_dispatch: 8 | # Allows you to run this workflow manually from the Actions tab 9 | workflow_dispatch: 10 | inputs: 11 | config: 12 | description: 'Input config script file name without ".sh". "all" to build all the configs.' 13 | required: true 14 | default: configs/x86-*.sh 15 | txt: 16 | description: Release note txt file name. 17 | required: true 18 | default: release_note_docker.txt 19 | schedule: 20 | - cron: '0 21 * * 5' 21 | 22 | env: 23 | TZ: 'Asia/Shanghai' 24 | 25 | jobs: 26 | build: 27 | runs-on: ubuntu-20.04 28 | env: 29 | CONFIG: ${{ github.event.client_payload.config || github.event.inputs.config }} 30 | TXT: ${{ github.event.client_payload.txt || github.event.inputs.txt }} 31 | 32 | steps: 33 | - name: Set ENV 34 | if: github.event.schedule=='0 21 * * 5' 35 | run: | 36 | echo "CONFIG=configs/x86-*.sh" >> $GITHUB_ENV 37 | echo "TXT=release_note_docker.txt" >> $GITHUB_ENV 38 | 39 | - name: Checkout 40 | uses: actions/checkout@main 41 | 42 | - name: Maximize Build Space 43 | run: | 44 | docker rmi `docker images -q` 45 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /usr/lib/jvm /opt/ghc 46 | sudo -E apt-get -qq autoremove --purge 47 | sudo -E apt-get -qq clean 48 | echo "Free space:" 49 | df -h 50 | 51 | - name: Run Build Script 52 | uses: ./ 53 | with: 54 | config: ${{ env.CONFIG }} 55 | 56 | - name: After Script 57 | run: | 58 | echo "PACKAGED_OUTPUTDATE=$(date +"%Y.%m.%d.%H%M")" >> $GITHUB_ENV 59 | 60 | - name: Upload OpenWrt Firmware to Releases 61 | uses: softprops/action-gh-release@v1 62 | env: 63 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 64 | with: 65 | tag_name: firmware-openwrt-x86_${{ env.PACKAGED_OUTPUTDATE }} 66 | files: | 67 | ${{ github.workspace }}/bin/*.img.gz 68 | body_path: ${{ github.workspace }}/configs/${{ env.TXT }} 69 | fail_on_unmatched_files: true 70 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | openwrt/ 2 | openwrt_packit/ 3 | bin/ 4 | openwrt_flippy.sh 5 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.watcherExclude": { 3 | "**/build_dir/**": true, 4 | "**/feeds/**": true, 5 | "**/include/**": true, 6 | "**/staging_dir/**": true, 7 | "**/target/**": true, 8 | "**/toolchain/**": true, 9 | "**/tools/**": true, 10 | "**/.ccache/**": true, 11 | "**/tmp/**": true 12 | } 13 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Shun Li 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Build Openwrt firmware with ease 2 | Scripts for building openwrt router box firmware. 3 | 4 | [![Build OpenWrt Firmware - Raspi](https://github.com/riverscn/build-openwrt-firmware/actions/workflows/BUILD_CI_raspi.yml/badge.svg)](https://github.com/riverscn/build-openwrt-firmware/actions/workflows/BUILD_CI_raspi.yml) 5 | [![Build OpenWrt Firmware - X86](https://github.com/riverscn/build-openwrt-firmware/actions/workflows/BUILD_CI_x86.yml/badge.svg)](https://github.com/riverscn/build-openwrt-firmware/actions/workflows/BUILD_CI_x86.yml) 6 | 7 | [下载最新固件](https://github.com/riverscn/build-openwrt-firmware/releases) 8 | 9 | [使用方法及相关测试](https://blog.lishun.me/openwrt-mega-post) 10 | 11 | # Default hardware targets 12 | 13 | * X86 14 | * Raspberry Pi 4 Series 15 | 16 | You can [add your own target config](configs). 17 | 18 | # Features 19 | 20 | * Use [Immortalwrt](https://github.com/immortalwrt/immortalwrt) source, which makes things easier. 21 | * Use Openwrt 21.02 branch. 22 | * Enable IPv6 compatibility by default. 23 | * Enable Flow Offloading and Full Cone NAT by default. 24 | * Enable WiFi by default. You can turn it off to achieve lower temperature. 25 | * Enable USB Ethernet and Storage support. 26 | * You can [fork this repo](https://github.com/riverscn/build-openwrt-firmware/generate) and make your own [package config](configs). It's very easy. 27 | 28 | # Pre-installed packages 29 | 30 | ## Common 31 | 32 | * luci-app-passwall 33 | * luci-app-udpxy 34 | * luci-app-upnp 35 | * luci-theme-argon 36 | * luci-app-zerotier 37 | * luci-app-diskman 38 | * luci-app-udp2raw 39 | 40 | ## Only for "with-docker" image 41 | 42 | * luci-app-dockerman 43 | * docker-compose 44 | 45 | Docker makes network complex, only for advanced users! 46 | 47 | ## Only for main router (x86) 48 | 49 | * luci-app-acme 50 | * luci-app-iptvhelper 51 | * luci-app-mwan3 52 | * luci-app-omcproxy 53 | * luci-app-sqm 54 | 55 | # Build your own firmwares 56 | 57 | ## Build online 58 | 59 | [fork this repo](https://github.com/riverscn/build-openwrt-firmware/generate) and create Github Actions workflow! 60 | 61 | ## Build locally 62 | 63 | Alternatively, you can build openwrt on your own computer. 64 | 65 | Ubuntu or Debian is supported. 66 | 67 | Run `./build.sh configs/*.sh` to build all targets. 68 | 69 | Run `./build.sh configs/xxxx-openwrt.sh` to build one target. 70 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Build Openwrt Firmware' 2 | description: 'Build openwrt firmware with ease' 3 | inputs: 4 | config: # id of input 5 | description: 'Config file name.' 6 | required: true 7 | default: 'configs/*-openwrt.sh' 8 | runs: 9 | using: "composite" 10 | steps: 11 | - run: bash build.sh ${{ inputs.config }} 12 | shell: bash 13 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## This script is for build openwrt locally on your computer 4 | 5 | CONFIG_SCRIPTS=$@ 6 | 7 | echo Build: ${CONFIG_SCRIPTS} 8 | 9 | PREPARE_SCRIPT="prepare_env.sh" 10 | FETCH_OPENWRT_SCRIPT="fetch_openwrt.sh" 11 | COMPILE_OPENWRT_SCRIPT="compile_openwrt.sh" 12 | 13 | bash ${PREPARE_SCRIPT} 14 | bash ${FETCH_OPENWRT_SCRIPT} 15 | bash ${COMPILE_OPENWRT_SCRIPT} ${CONFIG_SCRIPTS} 16 | 17 | ls bin/ -------------------------------------------------------------------------------- /compile_openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | exit_on_error() { 4 | exit_code=$1 5 | last_command=${@:2} 6 | if [ $exit_code -ne 0 ]; then 7 | >&2 echo "\"${last_command}\" command failed with exit code ${exit_code}." 8 | exit $exit_code 9 | fi 10 | } 11 | 12 | OPENWRT_VER="immortal_SNAPSHOT" 13 | 14 | PACK_FIRMWARE_SCRIPT="pack_firmware.sh" 15 | PACKAGED_OUTPUTPATH="/opt/openwrt_packit/tmp" 16 | 17 | rm -rf bin/ 2> /dev/null 18 | mkdir bin 19 | mkdir bin/tmp 20 | 21 | for FILE in $@ 22 | do 23 | if [ ! -f "$FILE" ]; then 24 | echo "$FILE does not exist." 25 | exit 1 26 | fi 27 | echo "Free space:" 28 | df -h 29 | echo "Compiling: ${FILE}" 30 | CONFIG_NAME= 31 | USE_FLIPPY_KERNEL= 32 | source update_config.sh ${FILE} 33 | echo CONFIG_NAME=${CONFIG_NAME} USE_FLIPPY_KERNEL=${USE_FLIPPY_KERNEL} 34 | cd openwrt 35 | make download -j8 36 | make -j$(nproc) || make -j1 V=s 37 | mv bin/targets/*/*/*.*.gz ../bin/tmp 38 | # if [ "$(df --output=avail -h $(pwd) | sed '1d;s/[^0-9]//g')" -lt "20" ]; then make dirclean; fi 39 | cd .. 40 | rename -f "s/immortalwrt/openwrt/" bin/tmp/*.*.gz 41 | 42 | if [ "$USE_FLIPPY_KERNEL" = "1" ]; then 43 | # Pack Other SBC Boxes' firmware 44 | wget -O openwrt_flippy.sh https://github.com/unifreq/openwrt_packit/raw/master/openwrt_flippy.sh 45 | sudo bash ${PACK_FIRMWARE_SCRIPT} 46 | sudo mv ${PACKAGED_OUTPUTPATH}/*.img.gz bin/tmp/ 47 | rename -f "s/.img.gz/${CONFIG_NAME}.img.gz/" bin/tmp/*.img.gz 48 | else 49 | KERNEL_VERSION_ORIG="$(awk '/kernel/ {print $3}' $(pwd)/openwrt/bin/targets/*/*/*.manifest | awk -F '-' '{print $1}' | awk 'NR==1')" 50 | rename -f "s/.img.gz/-${OPENWRT_VER}_k${KERNEL_VERSION_ORIG}${CONFIG_NAME}.img.gz/" bin/tmp/*.img.gz 51 | fi 52 | mv bin/tmp/*squashfs*.img.gz bin/ 53 | done 54 | rm bin/tmp/ -r 55 | -------------------------------------------------------------------------------- /configs/README.md: -------------------------------------------------------------------------------- 1 | # Config files 2 | 3 | * [custom.seed](custom.seed) is used for common `.config` settings. All targets share these settings. 4 | * `*-openwrt.sh` is used to define each build target. You can create new files to add more targets. 5 | * [../pack_firmware.sh](../pack_firmware.sh) contains ENV variable [PACKAGE_SOC](https://github.com/unifreq/openwrt_packit/blob/master/README.ACTION.md) to determine what targets to build. 6 | -------------------------------------------------------------------------------- /configs/arm64-openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export USE_FLIPPY_KERNEL=1 4 | 5 | cd openwrt 6 | 7 | packages=" \ 8 | brcmfmac-firmware-43430-sdio brcmfmac-firmware-43455-sdio kmod-brcmfmac wpad \ 9 | kmod-fs-ext4 kmod-fs-vfat kmod-fs-exfat dosfstools e2fsprogs ntfs-3g \ 10 | kmod-usb2 kmod-usb3 kmod-usb-storage kmod-usb-storage-extras kmod-usb-storage-uas \ 11 | kmod-usb-net kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 kmod-usb-net-rtl8152 \ 12 | blkid lsblk parted fdisk cfdisk losetup resize2fs tune2fs pv unzip \ 13 | lscpu htop iperf3 curl lm-sensors python3 autocore-arm libopenssl-afalg 14 | " 15 | sed -i '/FEATURES+=/ { s/cpiogz //; s/ext4 //; s/ramdisk //; s/squashfs //; }' \ 16 | target/linux/armvirt/Makefile 17 | for x in $packages; do 18 | sed -i "/DEFAULT_PACKAGES/ s/$/ $x/" target/linux/armvirt/Makefile 19 | done 20 | 21 | cat >.config <<-EOF 22 | ## target 23 | CONFIG_TARGET_armvirt=y 24 | CONFIG_TARGET_armvirt_64=y 25 | CONFIG_TARGET_armvirt_64_Default=y 26 | 27 | ## for flippy kernel 28 | CONFIG_PACKAGE_perl=y 29 | CONFIG_PACKAGE_perl-http-date=y 30 | CONFIG_PACKAGE_perlbase-getopt=y 31 | CONFIG_PACKAGE_perlbase-time=y 32 | CONFIG_PACKAGE_perlbase-unicode=y 33 | CONFIG_PACKAGE_perlbase-utf8=y 34 | CONFIG_PACKAGE_blkid=y 35 | CONFIG_PACKAGE_fdisk=y 36 | CONFIG_PACKAGE_lsblk=y 37 | CONFIG_PACKAGE_parted=y 38 | CONFIG_PACKAGE_attr=y 39 | CONFIG_PACKAGE_btrfs-progs=y 40 | CONFIG_BTRFS_PROGS_ZSTD=y 41 | CONFIG_PACKAGE_chattr=y 42 | CONFIG_PACKAGE_dosfstools=y 43 | CONFIG_PACKAGE_e2fsprogs=y 44 | CONFIG_PACKAGE_f2fs-tools=y 45 | CONFIG_PACKAGE_f2fsck=y 46 | CONFIG_PACKAGE_lsattr=y 47 | CONFIG_PACKAGE_mkf2fs=y 48 | CONFIG_PACKAGE_xfs-fsck=y 49 | CONFIG_PACKAGE_xfs-mkfs=y 50 | CONFIG_PACKAGE_bash=y 51 | CONFIG_PACKAGE_gawk=y 52 | CONFIG_PACKAGE_getopt=y 53 | CONFIG_PACKAGE_losetup=y 54 | CONFIG_PACKAGE_tar=y 55 | CONFIG_PACKAGE_uuidgen=y 56 | CONFIG_PACKAGE_kmod-brcmfmac=y 57 | CONFIG_BRCMFMAC_SDIO=y 58 | CONFIG_PACKAGE_kmod-brcmutil=y 59 | CONFIG_PACKAGE_kmod-cfg80211=y 60 | CONFIG_PACKAGE_kmod-mac80211=y 61 | CONFIG_PACKAGE_hostpad-common=y 62 | CONFIG_PACKAGE_wpa-cli=y 63 | CONFIG_PACKAGE_wpad-basic=y 64 | CONFIG_PACKAGE_iw=y 65 | EOF 66 | 67 | cd .. -------------------------------------------------------------------------------- /configs/arm64-with-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | source ${SCRIPT_DIR}/arm64-openwrt.sh 5 | 6 | export CONFIG_NAME="_docker" 7 | 8 | cd openwrt 9 | 10 | cat >>.config <<-EOF 11 | CONFIG_PACKAGE_docker-compose=y 12 | CONFIG_PACKAGE_luci-app-dockerman=y 13 | EOF 14 | 15 | cd .. 16 | -------------------------------------------------------------------------------- /configs/bcm2711-raspi4-openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd openwrt 4 | 5 | cat >.config <<-EOF 6 | ## target 7 | CONFIG_TARGET_bcm27xx=y 8 | CONFIG_TARGET_bcm27xx_bcm2711=y 9 | CONFIG_TARGET_bcm27xx_bcm2711_DEVICE_rpi-4=y 10 | 11 | ## Raspberry Pi 12 | CONFIG_PACKAGE_bcm27xx-userland=y 13 | 14 | ## USB Ethernet 15 | CONFIG_PACKAGE_kmod-usb-net-aqc111=y 16 | CONFIG_PACKAGE_kmod-usb-net-asix=y 17 | CONFIG_PACKAGE_kmod-usb-net-asix-ax88179=y 18 | CONFIG_PACKAGE_kmod-usb-net-rtl8150=y 19 | CONFIG_PACKAGE_kmod-usb-net-rtl8152=y 20 | 21 | ## PCIE Ethernet 22 | CONFIG_PACKAGE_kmod-r8169=y 23 | 24 | ## USB Storage 25 | CONFIG_PACKAGE_kmod-usb-storage=y 26 | CONFIG_PACKAGE_kmod-usb-storage-extras=y 27 | 28 | ## USB utils 29 | CONFIG_PACKAGE_usbutils=y 30 | CONFIG_PACKAGE_kmod-usb-dwc2=y 31 | CONFIG_PACKAGE_kmod-usb2=y 32 | 33 | ## File System 34 | CONFIG_PACKAGE_fdisk=y 35 | CONFIG_PACKAGE_kmod-fs-exfat=y 36 | CONFIG_PACKAGE_kmod-fs-ext4=y 37 | CONFIG_PACKAGE_kmod-fs-vfat=y 38 | CONFIG_PACKAGE_kmod-fs-ntfs=y 39 | 40 | ## Language 41 | CONFIG_PACKAGE_kmod-nls-cp936=y 42 | 43 | EOF 44 | 45 | cd .. 46 | -------------------------------------------------------------------------------- /configs/bcm2711-raspi4-with-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | source ${SCRIPT_DIR}/bcm2711-raspi4-openwrt.sh 5 | 6 | CONFIG_NAME="_docker" 7 | 8 | cd openwrt 9 | 10 | cat >>.config <<-EOF 11 | CONFIG_PACKAGE_docker-compose=y 12 | CONFIG_PACKAGE_luci-app-dockerman=y 13 | CONFIG_PACKAGE_luci-app-omcproxy=y 14 | CONFIG_PACKAGE_luci-app-samba4=y 15 | EOF 16 | 17 | cd .. 18 | -------------------------------------------------------------------------------- /configs/custom.seed: -------------------------------------------------------------------------------- 1 | ## luci app 2 | ## https://github.com/klever1988/nanopi-openwrt/blob/master/luci_app_manual.md 3 | 4 | CONFIG_TARGET_ROOTFS_PARTSIZE=512 5 | CONFIG_GRUB_TIMEOUT="0" 6 | 7 | CONFIG_PACKAGE_default-settings-chn=y 8 | # CONFIG_PACKAGE_luci-ssl=y 9 | CONFIG_PACKAGE_luci-app-turboacc=y 10 | CONFIG_PACKAGE_luci-app-passwall2=y 11 | CONFIG_PACKAGE_luci-app-openclash=y 12 | CONFIG_PACKAGE_mosdns=y 13 | CONFIG_PACKAGE_luci-app-udpxy=y 14 | CONFIG_PACKAGE_ipv6helper=y 15 | CONFIG_PACKAGE_luci-app-upnp=y 16 | CONFIG_PACKAGE_luci-app-diskman=y 17 | CONFIG_PACKAGE_luci-app-ddns=y 18 | CONFIG_PACKAGE_bind-host=y 19 | CONFIG_PACKAGE_kmod-shortcut-fe=y 20 | 21 | ## scripts 22 | CONFIG_PACKAGE_ddns-scripts-cloudflare=y 23 | 24 | ## VPN 25 | CONFIG_PACKAGE_tailscale=y 26 | 27 | ## remove 28 | # CONFIG_PACKAGE_luci-app-webadmin is not set 29 | # CONFIG_PACKAGE_luci-app-vlmcsd is not set 30 | # CONFIG_PACKAGE_luci-app-ssr-plus is not set 31 | # CONFIG_PACKAGE_luci-theme-argon is not set 32 | # CONFIG_PACKAGE_luci-app-argon-config is not set 33 | # CONFIG_PACKAGE_TURBOACC_INCLUDE_BBR_CCA is not set 34 | 35 | ## others 36 | CONFIG_LUCI_LANG_en=y 37 | CONFIG_LUCI_LANG_zh_Hans=y 38 | -------------------------------------------------------------------------------- /configs/release_note.txt: -------------------------------------------------------------------------------- 1 | Firmware information: 2 | 3 | >Default IP: `192.168.1.1` 4 | >Default username: `root` 5 | >Default password: `password` 6 | >Default AP: `Openwrt` (open) 7 | 8 | X86 and Raspberry Pi are able to use build-in sysupgrade. 9 | -------------------------------------------------------------------------------- /configs/release_note_docker.txt: -------------------------------------------------------------------------------- 1 | Firmware information: 2 | 3 | >Default IP: `192.168.1.1` 4 | >Default username: `root` 5 | >Default password: `password` 6 | >Default AP: `Openwrt` (open) 7 | 8 | `*_docker.img.gz` contains luci-app-dockerman and docker-compose pacakges. 9 | >Docker makes network complex, only for advanced users! 10 | 11 | X86 and Raspberry Pi are able to use build-in sysupgrade. 12 | -------------------------------------------------------------------------------- /configs/x86-openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd openwrt 4 | 5 | cat >.config <<-EOF 6 | ## target 7 | CONFIG_TARGET_x86=y 8 | CONFIG_TARGET_x86_64=y 9 | CONFIG_TARGET_x86_64_DEVICE_generic=y 10 | 11 | ## app 12 | CONFIG_PACKAGE_luci-app-acme=y 13 | CONFIG_PACKAGE_luci-app-omcproxy=y 14 | CONFIG_PACKAGE_luci-app-sqm=y 15 | CONFIG_PACKAGE_acme-dnsapi=y 16 | 17 | ## USB Storage 18 | CONFIG_PACKAGE_kmod-usb-storage=y 19 | CONFIG_PACKAGE_kmod-usb-storage-extras=y 20 | 21 | ## USB utils 22 | CONFIG_PACKAGE_usbutils=y 23 | 24 | ## File System 25 | CONFIG_PACKAGE_fdisk=y 26 | CONFIG_PACKAGE_kmod-fs-exfat=y 27 | CONFIG_PACKAGE_kmod-fs-ext4=y 28 | CONFIG_PACKAGE_kmod-fs-vfat=y 29 | CONFIG_PACKAGE_kmod-fs-ntfs=y 30 | 31 | ## Language 32 | CONFIG_PACKAGE_kmod-nls-cp936=y 33 | 34 | EOF 35 | 36 | cd .. 37 | -------------------------------------------------------------------------------- /configs/x86-with-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" 4 | source ${SCRIPT_DIR}/x86-openwrt.sh 5 | 6 | CONFIG_NAME="_docker" 7 | 8 | cd openwrt 9 | 10 | cat >>.config <<-EOF 11 | CONFIG_PACKAGE_docker-compose=y 12 | CONFIG_PACKAGE_luci-app-dockerman=y 13 | EOF 14 | 15 | cd .. 16 | -------------------------------------------------------------------------------- /fetch_openwrt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | (git clone -b v21.02.3 https://github.com/immortalwrt/immortalwrt openwrt) || (cd openwrt && git stash && git pull) 4 | 5 | cd openwrt 6 | 7 | echo "src-git xiaorouji https://github.com/xiaorouji/openwrt-passwall.git;packages" >> feeds.conf.default 8 | echo "src-git xiaorouji2 https://github.com/xiaorouji/openwrt-passwall2.git;main" >> feeds.conf.default 9 | 10 | ./scripts/feeds update -a 11 | ./scripts/feeds install -a 12 | -------------------------------------------------------------------------------- /pack_firmware.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | OPENWRT_ARMVIRT="$(pwd)/bin/tmp/openwrt-armvirt-64-default-rootfs.tar.gz" 4 | PACKAGE_SOC="s905d" 5 | KERNEL_VERSION_NAME="5.4.142" 6 | OPENWRT_VER="immortal22.03" 7 | WHOAMI="river" 8 | 9 | source openwrt_flippy.sh 10 | -------------------------------------------------------------------------------- /prepare_env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo -E apt-get -qq update 4 | sudo -E apt-get -qq full-upgrade 5 | sudo -E apt-get -qq install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ 6 | bzip2 ccache cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext git git-core gperf haveged \ 7 | help2man intltool lib32gcc1 libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev \ 8 | libmpfr-dev libncurses5-dev libncurses5-dev libreadline-dev libssl-dev libtool libz-dev lrzsz mkisofs msmtp \ 9 | nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip python3-ply python-docutils \ 10 | qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto \ 11 | xxd zlib1g-dev 12 | sudo -E apt-get -qq install btrfs-progs dosfstools uuid-runtime mount util-linux parted rename 13 | sudo -E apt-get -qq install genisoimage 14 | sudo -E apt-get -qq install libncurses5-dev zlib1g-dev gawk 15 | -------------------------------------------------------------------------------- /update_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | COMMON_SEED="configs/custom.seed" 3 | CONFIG_SCRIPT="$1" 4 | CONFIG_FILE="openwrt/.config" 5 | 6 | rm -f $CONFIG_FILE 2> /dev/null 7 | source ${CONFIG_SCRIPT} 8 | cat $COMMON_SEED >> $CONFIG_FILE 9 | 10 | cd openwrt 11 | make defconfig 12 | cat .config 13 | cd .. --------------------------------------------------------------------------------