remove volumes, optimize build.sh
This commit is contained in:
@@ -1,19 +1,31 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "src-git ha_cluster https://github.com/pgaufillet/openwrt-ha-feed.git" >> feeds.conf.default
|
grep -qxF 'src-git ha_cluster https://github.com/pgaufillet/openwrt-ha-feed.git' feeds.conf.default || echo 'src-git ha_cluster https://github.com/pgaufillet/openwrt-ha-feed.git' >> feeds.conf.default
|
||||||
|
|
||||||
|
rm -f ./sed* .config.tmp .config.old
|
||||||
|
|
||||||
# Update and install default package feeds
|
# Update and install default package feeds
|
||||||
./scripts/feeds update -a && \
|
./scripts/feeds update -a && \
|
||||||
./scripts/feeds install -a
|
./scripts/feeds install -a
|
||||||
|
|
||||||
echo "CONFIG_TARGET_x86=y" > .config && \
|
|
||||||
echo "CONFIG_TARGET_x86_64=y" >> .config && \
|
# Set target architecture
|
||||||
echo "CONFIG_PACKAGE_dnsmasq-ha=y" >> .config && \
|
echo "CONFIG_TARGET_x86=y" > .config
|
||||||
echo "CONFIG_PACKAGE_lease-sync=y" >> .config && \
|
echo "CONFIG_TARGET_x86_64=y" >> .config
|
||||||
echo "CONFIG_PACKAGE_owsync=y" >> .config && \
|
|
||||||
echo "CONFIG_PACKAGE_ha-cluster=y" >> .config && \
|
|
||||||
echo "CONFIG_PACKAGE_luci-app-ha-cluster=y" >> .config && \
|
|
||||||
sed -i 's/CONFIG_PACKAGE_dnsmasq=y/# CONFIG_PACKAGE_dnsmasq is not set/' .config && \
|
|
||||||
make defconfig
|
make defconfig
|
||||||
|
|
||||||
|
# Enable HA packages
|
||||||
|
echo "CONFIG_PACKAGE_dnsmasq-ha=y" >> .config
|
||||||
|
echo "CONFIG_PACKAGE_lease-sync=y" >> .config
|
||||||
|
echo "CONFIG_PACKAGE_owsync=y" >> .config
|
||||||
|
echo "CONFIG_PACKAGE_ha-cluster=y" >> .config
|
||||||
|
echo "CONFIG_PACKAGE_luci-app-ha-cluster=y" >> .config
|
||||||
|
|
||||||
|
# Disable standard dnsmasq AFTER defconfig runs
|
||||||
|
sed -i 's/CONFIG_PACKAGE_dnsmasq=y/# CONFIG_PACKAGE_dnsmasq is not set/' .config
|
||||||
|
|
||||||
|
# Finalize config changes
|
||||||
|
make defconfig
|
||||||
|
|
||||||
|
# Download and compile
|
||||||
make -j$(nproc) download
|
make -j$(nproc) download
|
||||||
make -j$(nproc) V=s
|
make -j$(nproc) V=s
|
||||||
|
|||||||
+6
-6
@@ -10,20 +10,20 @@ services:
|
|||||||
user: "1000:1000"
|
user: "1000:1000"
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
command: bash /home/builduser/build.sh
|
command: bash /home/builduser/openwrt/build.sh
|
||||||
volumes:
|
volumes:
|
||||||
# Firmware outputs mapped directly to host filesystem
|
# Firmware outputs mapped directly to host filesystem
|
||||||
- ./bin:/home/builduser/openwrt/bin
|
- ./bin:/home/builduser/openwrt/bin
|
||||||
# Source tarballs cached on host to avoid re-downloading across builds
|
# Source tarballs cached on host to avoid re-downloading across builds
|
||||||
- ./dl:/home/builduser/openwrt/dl
|
- ./dl:/home/builduser/openwrt/dl
|
||||||
# Persistent build configuration file (.config)
|
# Persistent build configuration file (.config)
|
||||||
- ./.config:/home/builduser/openwrt/.config
|
# - ./.config:/home/builduser/openwrt/.config
|
||||||
# build script
|
# build script
|
||||||
- ./build.sh:/home/builduser/build.sh
|
- ./build.sh:/home/builduser/openwrt/build.sh
|
||||||
# Named volumes for heavy build artifacts (maximizes I/O performance)
|
# Named volumes for heavy build artifacts (maximizes I/O performance)
|
||||||
- openwrt-build-dir:/home/builduser/openwrt/build_dir
|
# - openwrt-build-dir:/home/builduser/openwrt/build_dir
|
||||||
- openwrt-staging-dir:/home/builduser/openwrt/staging_dir
|
# - openwrt-staging-dir:/home/builduser/openwrt/staging_dir
|
||||||
- openwrt-ccache:/home/builduser/.ccache
|
# - openwrt-ccache:/home/builduser/.ccache
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
openwrt-build-dir:
|
openwrt-build-dir:
|
||||||
|
|||||||
Reference in New Issue
Block a user