Actions-OpenWrt
A template for building OpenWrt with GitHub Actions | 使用 GitHub Actions 在线云编译 OpenWrt 固件
Top Related Projects
Lean's LEDE source
An opensource OpenWrt variant for mainland China users.
Openwrt for Nanopi R1S R2S R4S R5S 香橙派 R1 Plus 固件编译 纯净版与大杂烩
Quick Overview
The P3TERX/Actions-OpenWrt repository is a GitHub Actions workflow for building OpenWrt firmware images. It provides a convenient way to automate the build process of OpenWrt, a popular open-source operating system for embedded devices, using the power of GitHub Actions.
Pros
- Automated Build Process: The repository simplifies the build process of OpenWrt, allowing users to easily create custom firmware images without the need for a local development environment.
- Customizable Configuration: Users can customize the build configuration, including package selection, target device, and various other settings, to suit their specific needs.
- Continuous Integration: The GitHub Actions workflow enables continuous integration, allowing users to automatically build and test their firmware changes with each commit.
- Cross-platform Compatibility: The workflow can be used on various platforms, including Windows, macOS, and Linux, making it accessible to a wide range of users.
Cons
- Dependency on GitHub Actions: The project is heavily dependent on GitHub Actions, which may not be suitable for users who prefer to build their firmware locally or on other platforms.
- Limited Flexibility: While the repository provides a good starting point, users may need to modify the workflow to accommodate more complex build requirements or specific device configurations.
- Potential for Outdated Dependencies: The project relies on external dependencies, which may become outdated over time, potentially causing issues with the build process.
- Learning Curve: Users who are new to OpenWrt or GitHub Actions may need to invest time in understanding the project's structure and configuration options.
Getting Started
To get started with the P3TERX/Actions-OpenWrt repository, follow these steps:
- Fork the repository to your GitHub account.
- Customize the build configuration by editing the
config
file in the.github/workflows
directory. - Enable GitHub Actions for your forked repository by going to the "Actions" tab and clicking "Enable GitHub Actions".
- Trigger the build workflow by pushing a commit to your forked repository.
- Monitor the build progress and check the artifacts section for the generated firmware image.
Competitor Comparisons
Lean's LEDE source
Pros of lede
- More comprehensive OpenWrt distribution with a wider range of pre-configured packages
- Active community development and frequent updates
- Better support for various hardware platforms and devices
Cons of lede
- Larger codebase, which may lead to longer build times
- Potentially more complex configuration for beginners
- May include unnecessary packages for some users' needs
Code Comparison
Actions-OpenWrt (workflow file):
- name: Build OpenWrt
id: build
run: |
cd openwrt
make defconfig
make download -j8
find dl -size -1024c -exec ls -l {} \;
make -j$(nproc) || make -j1 V=s
lede (build script):
#!/bin/bash
cd lede
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make -j$(($(nproc) + 1)) V=s
The main difference is that Actions-OpenWrt focuses on GitHub Actions for building, while lede provides a more traditional build process. Actions-OpenWrt offers easier customization through workflow files, whereas lede provides a more comprehensive OpenWrt distribution with additional features and packages.
An opensource OpenWrt variant for mainland China users.
Pros of immortalwrt
- More comprehensive and feature-rich OpenWrt distribution
- Regularly updated with the latest patches and improvements
- Includes additional packages and optimizations for various devices
Cons of immortalwrt
- Larger codebase, potentially more complex to navigate and modify
- May require more resources to build and run
- Less focused on GitHub Actions integration compared to Actions-OpenWrt
Code Comparison
Actions-OpenWrt:
- name: Compile the firmware
id: compile
run: |
cd openwrt
echo -e "$(nproc) thread compile"
make -j$(nproc) || make -j1 || make -j1 V=s
immortalwrt:
#!/bin/bash
set -eu
[ -f feeds.conf.default ] && {
mv feeds.conf.default feeds.conf.default.bak
wget -O feeds.conf.default https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/feeds.conf.default
}
The Actions-OpenWrt repository focuses on providing a GitHub Actions workflow for building OpenWrt firmware, while immortalwrt is a full OpenWrt distribution with its own set of modifications and improvements. Actions-OpenWrt is more suitable for users who want to quickly set up automated builds, while immortalwrt offers a more comprehensive and customized OpenWrt experience.
Openwrt for Nanopi R1S R2S R4S R5S 香橙派 R1 Plus 固件编译 纯净版与大杂烩
Pros of nanopi-openwrt
- Specifically optimized for NanoPi devices, potentially offering better performance and compatibility
- Includes pre-configured builds for various NanoPi models
- May have more targeted features and optimizations for ARM-based devices
Cons of nanopi-openwrt
- Limited to NanoPi devices, less versatile than Actions-OpenWrt
- Potentially smaller community and less frequent updates
- May lack some of the extensive customization options available in Actions-OpenWrt
Code Comparison
Actions-OpenWrt:
- name: Load custom configuration
run: |
[ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config
chmod +x $DIY_P1_SH
cd openwrt
$GITHUB_WORKSPACE/$DIY_P1_SH
nanopi-openwrt:
make image PROFILE="friendlyarm_nanopi-r2s" PACKAGES="luci"
The Actions-OpenWrt repository provides a more flexible GitHub Actions workflow for building OpenWrt, allowing for custom configurations and scripts. In contrast, the nanopi-openwrt repository focuses on simplified build commands specifically for NanoPi devices.
While Actions-OpenWrt offers greater versatility and customization options for various devices, nanopi-openwrt provides a more streamlined approach for NanoPi users. The choice between the two depends on the specific hardware requirements and the level of customization needed.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
English | 䏿
Actions-OpenWrt
A template for building OpenWrt with GitHub Actions
Usage
- Click the Use this template button to create a new repository.
- Generate
.config
files using Lean's OpenWrt source code. ( You can change it through environment variables in the workflow file. ) - Push
.config
file to the GitHub repository. - Select
Build OpenWrt
on the Actions page. - Click the
Run workflow
button. - 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 searchActions-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.
Credits
- Microsoft Azure
- GitHub Actions
- OpenWrt
- coolsnowwolf/lede
- Mikubill/transfer
- softprops/action-gh-release
- Mattraks/delete-workflow-runs
- dev-drprasad/delete-older-releases
- peter-evans/repository-dispatch
License
Top Related Projects
Lean's LEDE source
An opensource OpenWrt variant for mainland China users.
Openwrt for Nanopi R1S R2S R4S R5S 香橙派 R1 Plus 固件编译 纯净版与大杂烩
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot