From b52b3f961e7793ffcb1ac58f7eb01b78e0c2c148 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Sat, 17 Aug 2019 23:23:14 +0200 Subject: [PATCH 1/8] build.sh: include the changes from master --- build.sh | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index 5008580..13e874b 100755 --- a/build.sh +++ b/build.sh @@ -2,12 +2,13 @@ set -e function announce () { - echo '############################' $* >&2 + echo '############################' "$@" >&2 } function usage () { echo "Usage: $0 -g GLUON_PATH" >&2 echo " -g GLUON_PATH Path to a checkout of the gluon repository." >&2 echo " -t TARGETS Comma separated list of gluon targets to build" >&2 + echo " -a Automatically detect and build all targets." >&2 echo " -o OUT_PATH Path to the firmware output directory. Default: ${gluon_out}" >&2 echo " -s SIGNATURE Sign firmware with signature" >&2 echo " -b BROKEN=1" >&2 @@ -20,6 +21,9 @@ gluon_out="${HOME}/firmware" while [ $# -gt 0 ]; do case "$1" in + -a) + auto_targets=1 + ;; -g) gluon_path="$2" shift @@ -60,41 +64,48 @@ if [ -z "$gluon_path" ]; then exit 1 fi -gluon_path=$(realpath $gluon_path) -gluon_out=$(realpath $gluon_out) -site_path=$(realpath $(dirname $BASH_SOURCE)) +gluon_path=$(realpath "$gluon_path") +gluon_out=$(realpath "$gluon_out") +site_path=$(realpath "$(dirname "$BASH_SOURCE")") -announce GLUON: $gluon_path >&2 -announce FFHH SITE PATH: $site_path >&2 +announce GLUON: "$gluon_path" >&2 +announce FFHH SITE PATH: "$site_path" >&2 -pushd $site_path +pushd "$site_path" . ./build.conf [ "${GLUON_BRANCH}" = "experimental" ] && GLUON_RELEASE="${GLUON_RELEASE}~exp$(date +%Y%m%d)" export GLUON_RELEASE export GLUON_BRANCH -# if a list of build targets has been supplied, only build those -targets="$(echo "${build_targets:-$targets}" | sed -e 's_,_ _g')" -announce The following targets will be generated: $targets >&2 +export GLUON_SITEDIR="${site_path}" +export GLUON_OUTPUTDIR="${gluon_out}/${GLUON_RELEASE}/${GLUON_BRANCH}" popd pushd "${gluon_path}" announce Starting make update... -export GLUON_SITEDIR="${site_path}" -export GLUON_OUTPUTDIR="${gluon_out}/${GLUON_RELEASE}/${GLUON_BRANCH}" rm -rf "${GLUON_OUTPUTDIR}" mkdir -p "${GLUON_OUTPUTDIR}" make update # Try to install patches. I wasn't able to figure out how patches in gluon/site/patches work. -for p in ${site_path}/patches/*.patch; do - if [ -e "$p" -a ! -f "${gluon_path}/${p##*/}" ]; then - announce Installing patch $p - patch -p1 < $p +for p in "${site_path}"/patches/*.patch; do + if [ -e "$p" ] && [ ! -f "${gluon_path}/${p##*/}" ]; then + announce "Installing patch $p" + patch -p1 < "$p" touch "${gluon_path}/${p##*/}" fi done + +if [ "$auto_targets" = "1" ]; then + # detect available targets + targets="$(make list-targets | sort | xargs)" +else + # if a list of build targets has been supplied, only build those + targets="$(echo "${build_targets:-$targets}" | sed -e 's_,_ _g')" +fi +announce "The following targets will be generated: $targets" >&2 + for t in $targets; do - announce Starting build for $t... >&2 - make -j$(nproc) GLUON_TARGET=$t $verbose + announce "Starting build for $t..." >&2 + make "-j$(nproc)" "GLUON_TARGET=$t" "$verbose" done # Generate the images.list ( cd "${GLUON_OUTPUTDIR}/images" && ( find -type f ! -iname '*.manifest' ! -iname images.list; find -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) From bf1e5655484ace33fcdb2d82f8a4c838d7939658 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Sat, 17 Aug 2019 23:24:06 +0200 Subject: [PATCH 2/8] update version for gluon release v2018.2.2 --- build.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.conf b/build.conf index 5b9c9c4..126f934 100644 --- a/build.conf +++ b/build.conf @@ -1,3 +1,3 @@ -GLUON_RELEASE="v2018.2.1.0" +GLUON_RELEASE="v2018.2.2.0" GLUON_BRANCH="stable" targets="ar71xx-generic ar71xx-nand ar71xx-tiny brcm2708-bcm2708 brcm2708-bcm2709 mpc85xx-generic ramips-mt7620 ramips-mt7621 ramips-mt76x8 ramips-rt305x sunxi-cortexa7 x86-64 x86-generic x86-geode" From e963dd306e98ab85e7281c67787ef5c4f09cb9f2 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Sun, 18 Aug 2019 13:16:31 +0200 Subject: [PATCH 3/8] build.sh: remove known-broken images after the build (cherry picked from commit 50b79c0dc415725195930f8fccf04c971e22e23c) --- build.conf | 3 +++ build.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/build.conf b/build.conf index 126f934..354850b 100644 --- a/build.conf +++ b/build.conf @@ -1,3 +1,6 @@ GLUON_RELEASE="v2018.2.2.0" GLUON_BRANCH="stable" targets="ar71xx-generic ar71xx-nand ar71xx-tiny brcm2708-bcm2708 brcm2708-bcm2709 mpc85xx-generic ramips-mt7620 ramips-mt7621 ramips-mt76x8 ramips-rt305x sunxi-cortexa7 x86-64 x86-generic x86-geode" +broken_images=( + '*dir*615*d*' +) diff --git a/build.sh b/build.sh index 13e874b..5ea5988 100755 --- a/build.sh +++ b/build.sh @@ -107,6 +107,12 @@ for t in $targets; do announce "Starting build for $t..." >&2 make "-j$(nproc)" "GLUON_TARGET=$t" "$verbose" done +# Remove known-broken images +# shellcheck disable=SC2154 +for broken_image in "${broken_images[@]}"; do + announce "Removing broken image ${broken_image}..." + find "${GLUON_OUTPUTDIR}/${GLUON_BRANCH}/images" -iname "${broken_image}" \( -type f -o -type l \) -ls -exec rm -f {} \; +done # Generate the images.list ( cd "${GLUON_OUTPUTDIR}/images" && ( find -type f ! -iname '*.manifest' ! -iname images.list; find -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) announce Building manifest... From ced245aea5ecdb74a696c66ac6c5cb29721afc81 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Sun, 18 Aug 2019 23:55:55 +0200 Subject: [PATCH 4/8] build.sh: fix remove known-broken images after the build (cherry picked from commit 74088a18a9c2cc648bcd341d7768e8f6bc4c7d71) --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 5ea5988..3d3aae8 100755 --- a/build.sh +++ b/build.sh @@ -111,7 +111,7 @@ done # shellcheck disable=SC2154 for broken_image in "${broken_images[@]}"; do announce "Removing broken image ${broken_image}..." - find "${GLUON_OUTPUTDIR}/${GLUON_BRANCH}/images" -iname "${broken_image}" \( -type f -o -type l \) -ls -exec rm -f {} \; + find "${GLUON_OUTPUTDIR}/images" -iname "${broken_image}" \( -type f -o -type l \) -ls -exec rm -f {} \; done # Generate the images.list ( cd "${GLUON_OUTPUTDIR}/images" && ( find -type f ! -iname '*.manifest' ! -iname images.list; find -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) From 27ea5d3ebeb0ce255ed4ee91b5777eb2c79d2623 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Sun, 18 Aug 2019 13:15:52 +0200 Subject: [PATCH 5/8] build.sh: some cleanup with shellcheck (cherry picked from commit cfebeb94b5b044dc1ae38529482cb0833a2e6838) --- build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 3d3aae8..ce00e05 100755 --- a/build.sh +++ b/build.sh @@ -72,6 +72,7 @@ announce GLUON: "$gluon_path" >&2 announce FFHH SITE PATH: "$site_path" >&2 pushd "$site_path" +# shellcheck source=/dev/null . ./build.conf [ "${GLUON_BRANCH}" = "experimental" ] && GLUON_RELEASE="${GLUON_RELEASE}~exp$(date +%Y%m%d)" export GLUON_RELEASE @@ -114,7 +115,8 @@ for broken_image in "${broken_images[@]}"; do find "${GLUON_OUTPUTDIR}/images" -iname "${broken_image}" \( -type f -o -type l \) -ls -exec rm -f {} \; done # Generate the images.list -( cd "${GLUON_OUTPUTDIR}/images" && ( find -type f ! -iname '*.manifest' ! -iname images.list; find -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) +# shellcheck disable=SC2094 +( cd "${GLUON_OUTPUTDIR}/images" && ( find . -type f ! -iname '*.manifest' ! -iname images.list; find . -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) announce Building manifest... make manifest if [ -n "${signature}" ]; then From 8f6cbc248aa13bcdb660ce73134bd7a831fd89d6 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Sun, 25 Aug 2019 11:12:56 +0200 Subject: [PATCH 6/8] build.sh: create images.list with first line indication the release version --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index ce00e05..72fe790 100755 --- a/build.sh +++ b/build.sh @@ -116,7 +116,7 @@ for broken_image in "${broken_images[@]}"; do done # Generate the images.list # shellcheck disable=SC2094 -( cd "${GLUON_OUTPUTDIR}/images" && ( find . -type f ! -iname '*.manifest' ! -iname images.list; find . -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) +( cd "${GLUON_OUTPUTDIR}/images" && ( echo "RELEASE=${GLUON_RELEASE}"; find . -type f ! -iname '*.manifest' ! -iname images.list; find . -type l ! -iname '*.manifest' ) | sed -e 's!^\./\(.*\)$!\1!' -e 's!/! !g' | sort > images.list ) announce Building manifest... make manifest if [ -n "${signature}" ]; then From f04d5cd2b73e1a11617dafe7d765f2910eee32ae Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 13 Sep 2019 20:25:33 +0200 Subject: [PATCH 7/8] bump version number to v2018.2.3.0 --- build.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.conf b/build.conf index 354850b..8d8d870 100644 --- a/build.conf +++ b/build.conf @@ -1,4 +1,4 @@ -GLUON_RELEASE="v2018.2.2.0" +GLUON_RELEASE="v2018.2.3.0" GLUON_BRANCH="stable" targets="ar71xx-generic ar71xx-nand ar71xx-tiny brcm2708-bcm2708 brcm2708-bcm2709 mpc85xx-generic ramips-mt7620 ramips-mt7621 ramips-mt76x8 ramips-rt305x sunxi-cortexa7 x86-64 x86-generic x86-geode" broken_images=( From 4608dcd94ae8b9a383fe250502b0f86055afbc6e Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 13 Sep 2019 20:26:13 +0200 Subject: [PATCH 8/8] Update README.md for v2018.2.3.0 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1f20ab2..ef1a9a2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Please see [the official Gluon repository](https://github.com/freifunk-gluon/glu #### Gluon versions used for specific Hamburg Freifunk Firmware builds +- v2018.2.3.0: site-ffhh: v2018.2.3.0, gluon: v2018.2.3 - v2018.2.1.0: site-ffhh: v2018.2.1.0, gluon: v2018.2.1 - v2018.1.4.2: site-ffhh: v2018.1.4.2, gluon: v2018.1.4 - v2018.1.4.1: site-ffhh: v2018.1.4.1, gluon: v2018.1.4