Commit aff8132e authored by Paul Spooren's avatar Paul Spooren
Browse files

openwrt: add snapshot build script



The script downloads all buildinfo and checksums from the OpenWrt
download server and tries to rebuild them. Once done the upstream
checksums are used to verify the newly created files.

Signed-off-by: Paul Spooren's avatarPaul Spooren <mail@aparcar.org>
parent 5cdad8fd
#!/bin/sh
TARGET="${TARGET:-ath79}"
SUBTARGET="${SUBTARGET:-generic}"
BASE_DIR="$(pwd)"
# TODO verify stuff
TMP_DIR="$(mktemp -d)"
git clone https://github.com/openwrt/openwrt.git "$TMP_DIR"
pushd "$TMP_DIR"
wget "https://downloads.openwrt.org/snapshots/targets/$TARGET/$SUBTARGET/sha256sums"
wget "https://downloads.openwrt.org/snapshots/targets/$TARGET/$SUBTARGET/sha256sums.sig"
wget "https://downloads.openwrt.org/snapshots/targets/$TARGET/$SUBTARGET/config.buildinfo" -O .config
wget "https://downloads.openwrt.org/snapshots/targets/$TARGET/$SUBTARGET/feeds.buildinfo" -O feeds.conf
wget "https://downloads.openwrt.org/snapshots/targets/$TARGET/$SUBTARGET/version.buildinfo"
VERSION_COMMIT="$(cat version.buildinfo | cut -d '-' -f 2)"
git checkout -f "$VERSION_COMMIT"
#./scripts/feeds update -a
make defconfig
make -j "$(nproc)"
cp "sha256sums" "./bin/targets/$TARGET/$SUBTARGET/sha256sums"
popd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment