Build OpenWrt using GitHub Actions
ä¸ć–‡ć•™ç¨‹ | Read the details in P3TERX's blog (in Chinese)
- https://github.com/coolsnowwolf/lede
- https://github.com/openwrt/openwrt
- https://github.com/fw876/helloworld
- https://github.com/Lienol/openwrt-package
- https://github.com/immortalwrt/immortalwrt
This repo only keeps the lastest 5 releases。
Download the sha256sums file。
Make sure the sha256sums file and img file in a same folder。
sha256sum -c sha256sums --ignore-missing
or
echo "bf69a9ae42825a76c449699f393b8aa35216f3ffef428ae851d76ce4386bd3c3 *openwrt-x86-64-generic-squashfs-combined.img.gz" | shasum -a 256 --check
Make sure its OK
before upload it。
- Fork this Repo or Click the Use this template button to create a new repository。
- Generate
.config
files using LEDE source code。(You can change it through environment variables in the workflow file。) - Push
.config
file to the GitHub repository,and the build starts automatically.Progress can be viewed on the Actions page。 - When the build is complete,click the
Artifacts
button in the upper right corner of the Actions page to download the binaries。
It may take a long time to create a .config
file and build the OpenWrt firmware。Thus,before create repository to build your own firmware,you may check out if others have already built it which meet your needs by simply search Actions-Openwrt
in GitHub。
Add some meta info of your built firmware (such as firmware architecture and installed packages) to your repository introduction,this will save others' time。
I make Openwrt on Ubuntu / Debian / WSL ...
sudo apt update -y
sudo apt full-upgrade -y
sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
vim wget xmlto xxd zlib1g-dev
git clone https://github.com/coolsnowwolf/lede
# Modify default IP
sed -i 's/^#\(.*helloworld\)/\1/' feeds.conf.default
sed -i 's/192.168.1.1/192.168.0.1/g' package/base-files/files/bin/config_generate
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
cd ~/lede
rm .config
wget -O .config https://raw.githubusercontent.com/eallion/openwrt/main/.config
make download -j8
make V=s -j$(nproc)
cd lede
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make V=s -j$(nproc)
rm -rf ./tmp && rm -rf .config
make menuconfig
make download -j8
make V=s -j$(nproc)
// or:
Push .config
to eallion/openwrt make Openwrt on GitHub Actions
rm ~/openwrt/.config
cp ~/lede/.config ~/openwrt/
cd ~/openwrt
git add .
git commit -m "chore: update config"
git push
Then you can download firmware at Releases later。
- Microsoft
- Microsoft Azure
- GitHub
- GitHub Actions
- tmate
- mxschmitt/action-tmate
- csexton/debugger-action
- Cisco
- OpenWrt
- Lean's OpenWrt
- Cowtransfer
- WeTransfer
- Mikubill/transfer
MIT © P3TERX