Compare commits

...

8 commits

Author SHA1 Message Date
Daniel Frank
4608dcd94a
Update README.md for v2018.2.3.0 2019-09-13 20:26:13 +02:00
Daniel Frank
f04d5cd2b7
bump version number to v2018.2.3.0 2019-09-13 20:25:33 +02:00
Daniel Frank
8f6cbc248a
build.sh: create images.list with first line indication the release version 2019-08-25 11:12:56 +02:00
Daniel Frank
27ea5d3ebe
build.sh: some cleanup with shellcheck
(cherry picked from commit cfebeb94b5)
2019-08-20 20:25:35 +02:00
Daniel Frank
ced245aea5
build.sh: fix remove known-broken images after the build
(cherry picked from commit 74088a18a9)
2019-08-20 20:25:13 +02:00
Daniel Frank
e963dd306e
build.sh: remove known-broken images after the build
(cherry picked from commit 50b79c0dc4)
2019-08-20 20:24:13 +02:00
Daniel Frank
bf1e565548
update version for gluon release v2018.2.2 2019-08-17 23:24:06 +02:00
Daniel Frank
b52b3f961e
build.sh: include the changes from master 2019-08-17 23:23:14 +02:00
3 changed files with 43 additions and 20 deletions

View file

@ -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

View file

@ -1,3 +1,6 @@
GLUON_RELEASE="v2018.2.1.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=(
'*dir*615*d*'
)

View file

@ -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,44 +64,59 @@ 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"
# shellcheck source=/dev/null
. ./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
# Remove known-broken images
# shellcheck disable=SC2154
for broken_image in "${broken_images[@]}"; do
announce "Removing broken image ${broken_image}..."
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" && ( 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