Skip to content
generated from P3TERX/Actions-OpenWrt

📦️ An openwrt generator.

License

Notifications You must be signed in to change notification settings

eallion/openwrt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions OpenWrt

Build OpenWrt using GitHub Actions

Build OpenWrt Lean

中文教程 | Read the details in P3TERX's blog (in Chinese)

Source

Download

This repo only keeps the lastest 5 releases。

Check sha256sums

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。

Usage

  • 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。

Tips

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。

Make on local

OS

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

Clone

git clone https://github.com/coolsnowwolf/lede

Custom

# 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

Install feeds

./scripts/feeds update -a
./scripts/feeds install -a

Generate config

make menuconfig

(Option) Download .config

cd ~/lede
rm .config
wget -O .config https://raw.githubusercontent.com/eallion/openwrt/main/.config 

Make

make download -j8
make V=s -j$(nproc)

Remake

cd lede
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make V=s -j$(nproc)

Regenerate config

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。

Acknowledgments

License

MIT © P3TERX