summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-11-01 13:38:02 +0100
committerKarel Kočí <karel.koci@nic.cz>2018-11-01 13:38:02 +0100
commit7d4e8c9ec82f6eaa5d20bb46be4a9de4063af974 (patch)
treeade42624636f731e0533479bec5823d9d235d950
parent923bd3ae695367a6b19fdad78864d9e4b3c07b83 (diff)
downloadlaminar-cnf-7d4e8c9ec82f6eaa5d20bb46be4a9de4063af974.tar.gz
laminar-cnf-7d4e8c9ec82f6eaa5d20bb46be4a9de4063af974.tar.bz2
laminar-cnf-7d4e8c9ec82f6eaa5d20bb46be4a9de4063af974.zip
turrix4x: use turris-build.conf and improve some script parts
-rwxr-xr-xtemplates/turris4x.run21
1 files changed, 13 insertions, 8 deletions
diff --git a/templates/turris4x.run b/templates/turris4x.run
index b14821e..2842d08 100755
--- a/templates/turris4x.run
+++ b/templates/turris4x.run
@@ -22,30 +22,35 @@ else
echo_stage "Prepare SDK"
mkdir openwrt
+ (
cd openwrt
- GIT_MIRROR="$TWORKSPACE/openwrt-git-mirror" \
- CCACHE_HOST_DIR="$TWORKSPACE/ccache-host" \
- CCACHE_TARGET_DIR="$WORKSPACE/ccache-target" \
- ../turris-build/compile_fw -a "$njobs" -t $BOARD -p $BRANCH repo_prepare
+ cat > .turris-build.conf <<EOF
+GIT_MIRROR="$TWORKSPACE/openwrt-git-mirror"
+DL_MIRROR="$TWORKSPACE/openwrt-dl-mirror"
+CCACHE_HOST_DIR="$TWORKSPACE/ccache-host"
+CCACHE_TARGET_DIR="$WORKSPACE/ccache-target"
+EOF
+ ../turris-build/compile_fw -t "$BOARD" -p "$BRANCH" repo_prepare
$make toolchain/compile target/compile package/usign/host/compile
- cd ..
+ )
tar -czf openwrt.tar.gz openwrt
mv openwrt.tar.gz "$WORKSPACE/openwrt.tar.gz"
mv git-hash "$WORKSPACE/openwrt-git-hash"
fi
cd openwrt
-echo_stage "Add our repository as feed"
+echo_stage "Get personal repository feed"
echo "src-git personal git@cynerd.cz:openwrt-personal-pkgs" >> feeds.conf
./scripts/feeds update personal
-./scripts/feeds uninstall $(./scripts/feeds list -r personal | awk '{print $1}')
+./scripts/feeds list -r personal | awk '{print $1}' | xargs ./scripts/feeds uninstall # Remove any package provided by personal feed
./scripts/feeds install -p personal -d y -f -a
# TODO drop this and replace it with autopkg deployment using compile_fw
cp ./feeds/personal/autopkg-*.mk include/
echo_stage "Compile packages from personal feed"
-$make $(ls package/feeds/personal | sed -n 's/^\([^ ]*\).*$/package\/\1\/compile/p' | tr '\n' ' ')
+find package/feeds/personal -maxdepth 1 -type d -printf 'package/%P/compile\\0' | \
+ xargs --null $make
echo_stage "Generate index and sign"
$make package/index BUILD_KEY=~/openwrt-repo.key