- Convert enable_wcn36xx_mac80211.patch to apply_patches.sh (sed + heredoc) for cross-version compatibility (old patch moved to TBR/) - GHA workflows auto-resolve latest OpenWrt 25.12.x tag via git ls-remote - Unify build.yml and build-all.yml into single workflow with dynamic matrix - Local dev (Dockerfile/docker-compose) defaults to main (snapshot) - Remove target-specific APK feed on first boot (msm89xx not on downloads.openwrt.org) - Make LuCI odhcpd fix conditional - Update README with new build instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
45 lines
1.3 KiB
Docker
45 lines
1.3 KiB
Docker
FROM ubuntu:22.04 AS base
|
|
|
|
LABEL maintainer="OpenWrt Builder"
|
|
|
|
# Install required dependencies
|
|
COPY devenv/dependencies.sh /install_dependencies
|
|
RUN chmod +x /install_dependencies && \
|
|
/install_dependencies && \
|
|
rm -rf /install_dependencies
|
|
|
|
# Create a non-root user with sudo access (no password required)
|
|
RUN useradd -m -u 1000 -G sudo builder && \
|
|
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
USER builder
|
|
WORKDIR /home/builder
|
|
|
|
FROM base AS openwrt
|
|
|
|
ARG OPENWRT_VERSION=main
|
|
|
|
# Clone OpenWrt repository
|
|
RUN git clone https://git.openwrt.org/openwrt/openwrt.git openwrt && \
|
|
git -C openwrt checkout ${OPENWRT_VERSION}
|
|
|
|
# Apply mac80211 patches (wcn36xx/ath10k-sdio support)
|
|
COPY --chmod=755 apply_patches.sh .
|
|
RUN ./apply_patches.sh openwrt
|
|
|
|
# Update and install feeds
|
|
RUN cd openwrt && \
|
|
./scripts/feeds update -a && \
|
|
./scripts/feeds install -a && \
|
|
rm -rf tmp
|
|
|
|
# Fix LuCI getFeatures crash when odhcpd is present (conditional - may be fixed in release)
|
|
RUN LUCI_FILE="openwrt/feeds/luci/modules/luci-base/root/usr/share/rpcd/ucode/luci" && \
|
|
if [ -f "$LUCI_FILE" ] && grep -q 'result\.odhcpd = false;' "$LUCI_FILE"; then \
|
|
sed -i 's/result\.odhcpd = false;/result.odhcpd = {};/' "$LUCI_FILE"; \
|
|
fi
|
|
|
|
WORKDIR /home/builder/openwrt
|
|
|
|
CMD ["/bin/bash"]
|