add Dockerfile for reproducable building
This commit is contained in:
parent
a4fed97eba
commit
cee735bf62
35
docker-build/Dockerfile
Normal file
35
docker-build/Dockerfile
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
# we would love to use alpine as the build-image
|
||||||
|
# but unfortunately lede-build still fails with
|
||||||
|
# it when build some host-utils.
|
||||||
|
|
||||||
|
ARG LEDE_REVISION=e9c517772cee8af63b4ef173a28152645a4e1b05
|
||||||
|
ARG FREEWTP_REVISION=a4fed97ebafbfb07ded50e102be4a46fc9ac7cf3
|
||||||
|
|
||||||
|
RUN apt-get -y update && apt-get -y install \
|
||||||
|
build-essential \
|
||||||
|
python unzip gawk wget openssl git-core subversion \
|
||||||
|
libssl-dev ncurses-dev
|
||||||
|
|
||||||
|
RUN mkdir /build
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
RUN cd /build ; \
|
||||||
|
git clone https://git.lede-project.org/source.git lede ; \
|
||||||
|
cd lede ; git checkout -b docker_build $LEDE_REVISION
|
||||||
|
|
||||||
|
RUN cd /build ; \
|
||||||
|
git clone https://github.com/travelping/freewtp ; \
|
||||||
|
cd freewtp ; git checkout -b docker_build $FREEWTP_REVISION
|
||||||
|
|
||||||
|
RUN cp /build/lede/feeds.conf.default /build/lede/feeds.conf ; echo "src-link freewtp /build/freewtp/openwrt" >> /build/lede/feeds.conf
|
||||||
|
RUN cd /build/lede ; ./scripts/feeds update -a && ./scripts/feeds install -a && ./scripts/feeds list -r freewtp
|
||||||
|
|
||||||
|
RUN cp -v /build/freewtp/openwrt/mac80211_patches/922-mac80211_packet_tunnel-linux-4.8.patch /build/lede/package/kernel/mac80211/patches/
|
||||||
|
RUN cd /build/lede ; patch -p1 -i /build/freewtp/openwrt/mac80211_patches/package-config-option.patch
|
||||||
|
|
||||||
|
ADD ./dot-lede-config /build/lede/.config
|
||||||
|
|
||||||
|
RUN cd /build/lede ; make defconfig
|
||||||
|
RUN cd /build/lede ; make -j10 BUILD_LOG=1 FORCE_UNSAFE_CONFIGURE=1 ; rm -rf staging_dir build_dir
|
||||||
|
|
46
docker-build/dot-lede-config
Normal file
46
docker-build/dot-lede-config
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
CONFIG_IB=y
|
||||||
|
CONFIG_SDK=y
|
||||||
|
CONFIG_TARGET_ramips=y
|
||||||
|
CONFIG_TARGET_ramips_mt7621=y
|
||||||
|
CONFIG_TARGET_ramips_mt7621_DEVICE_zbt-wg2626=y
|
||||||
|
CONFIG_PACKAGE_comgt=y
|
||||||
|
CONFIG_PACKAGE_comgt-directip=y
|
||||||
|
CONFIG_PACKAGE_comgt-ncm=y
|
||||||
|
CONFIG_PACKAGE_freewtp=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-acm=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-cdc-eem=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-cdc-mbim=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-cdc-ncm=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-hso=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-huawei-cdc-ncm=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-qmi-wwan=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-net-sierrawireless=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-serial=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-serial-ipw=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-serial-option=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-serial-qualcomm=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-serial-sierrawireless=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-serial-wwan=y
|
||||||
|
CONFIG_PACKAGE_kmod-usb-wdm=y
|
||||||
|
CONFIG_PACKAGE_libustream-cyassl=y
|
||||||
|
CONFIG_PACKAGE_luci-app-freewtp=y
|
||||||
|
CONFIG_PACKAGE_luci-app-firewall=y
|
||||||
|
CONFIG_PACKAGE_luci-mod-admin-full=y
|
||||||
|
CONFIG_PACKAGE_luci-proto-3g=y
|
||||||
|
CONFIG_PACKAGE_luci-proto-ppp=y
|
||||||
|
CONFIG_PACKAGE_luci-theme-bootstrap=y
|
||||||
|
CONFIG_PACKAGE_libiwinfo-lua=y
|
||||||
|
CONFIG_PACKAGE_px5g-standalone=y
|
||||||
|
CONFIG_PACKAGE_smstools3=y
|
||||||
|
CONFIG_PACKAGE_uhttpd=y
|
||||||
|
CONFIG_PACKAGE_uhttpd-mod-lua=y
|
||||||
|
CONFIG_PACKAGE_uhttpd-mod-tls=y
|
||||||
|
CONFIG_PACKAGE_uhttpd-mod-tls_cyassl=y
|
||||||
|
CONFIG_PACKAGE_umbim=y
|
||||||
|
CONFIG_PACKAGE_uqmi=y
|
||||||
|
CONFIG_PACKAGE_usb-modeswitch=y
|
||||||
|
CONFIG_PACKAGE_usbreset=y
|
||||||
|
CONFIG_PACKAGE_usbutils=y
|
||||||
|
CONFIG_PACKAGE_wwan=y
|
10
docker-build/update.sh
Executable file
10
docker-build/update.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
lede=$(git ls-remote https://git.lede-project.org/source.git | grep 'refs/heads/master$' | cut -f1)
|
||||||
|
freewtp=$(git ls-remote https://github.com/travelping/freewtp | grep 'refs/heads/master$' | cut -f1)
|
||||||
|
|
||||||
|
echo "found upstream ref to lede master: $lede"
|
||||||
|
echo "found upstream ref to freewtp master: $freewtp"
|
||||||
|
|
||||||
|
|
||||||
|
sed -i "s/^ARG LEDE_REVISION=.*$/ARG LEDE_REVISION=$lede/" Dockerfile
|
||||||
|
sed -i "s/^ARG FREEWTP_REVISION=.*$/ARG FREEWTP_REVISION=$freewtp/" Dockerfile
|
Loading…
Reference in New Issue
Block a user