forked from freifunk-franken/firmware
use custom names for binary builds. fixes #9
also removed function board_clean from bsp files and board_postbuild from buildscript Signed-off-by: Jan Kraus <mayosemmel@gmail.com> suggested-by: Alexander Wunschik <freifunk@wunschik.net> Co-Authored-by: Alexander Wunschik <freifunk@wunschik.net> Co-Authored-by: Tobias Klaus <tk+ff@meskal.net> Reviewed-by: Tim Niemeyer <tim@tn-x.org> Reviewed-by: Tobias Klaus <tk+ff@meskal.net>
This commit is contained in:
parent
c795ffad5f
commit
ff7e8b7a66
|
@ -1,5 +1,23 @@
|
|||
machine=ar71xx
|
||||
chipset=ar71xx
|
||||
target=$builddir/$machine
|
||||
images=("openwrt-ar71xx-generic-ubnt-nano-m-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-ubnt-loco-m-xw-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr741nd-v2-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr741nd-v4-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr841n-v9-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr841n-v10-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr842n-v2-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wr1043nd-v3-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wa860re-v1-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wa850re-v1-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-gl-ar150-squashfs-sysupgrade.bin"
|
||||
)
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
|
@ -8,34 +26,3 @@ board_prepare() {
|
|||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-ubnt-nano-m-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-ubnt-loco-m-xw-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr740n-v4-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v2-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v4-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841nd-v7-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v9-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr841n-v10-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr842n-v2-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v3-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wa860re-v1-squashfs-*.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wa850re-v1-squashfs-*.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-gl-ar150-squashfs-*.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
||||
|
|
|
@ -1,28 +1,17 @@
|
|||
machine=wdr4300
|
||||
chipset=ar71xx
|
||||
target=$builddir/$machine
|
||||
images=(
|
||||
"openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin"
|
||||
"openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-sysupgrade.bin"
|
||||
)
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -1,6 +1,11 @@
|
|||
machine=wdr4900
|
||||
chipset=mpc85xx
|
||||
target=$builddir/$machine
|
||||
|
||||
images=(
|
||||
"openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-sysupgrade.bin"
|
||||
)
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
@ -8,12 +13,3 @@ board_prepare() {
|
|||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
|
@ -1,21 +1,31 @@
|
|||
#!/bin/sh
|
||||
cd /tmp/
|
||||
|
||||
BOARD=`uci get board.model.name`
|
||||
. /etc/firmware_release
|
||||
|
||||
BOARD=$(uci get board.model.name)
|
||||
case $BOARD in
|
||||
tl-wdr4900-v1 )
|
||||
SOC="mpc85xx" ;;
|
||||
* )
|
||||
SOC="ar71xx" ;;
|
||||
esac
|
||||
|
||||
FILE="openwrt-${SOC}-generic-${BOARD}-squashfs-sysupgrade.bin"
|
||||
|
||||
echo -ne "\nHardware: $BOARD\n"
|
||||
|
||||
wget $(uci get firmware.upgrade.path)/release.nfo
|
||||
if [ ! -f release.nfo ]; then
|
||||
echo -ne "Latest release information not found. Please try to update manually.\n\n"
|
||||
exit 1
|
||||
fi
|
||||
VERSION=$(cat release.nfo|awk -F: '/VERSION:/ { print $2 }')
|
||||
rm -f release.nfo
|
||||
echo -ne "Firmware found on server: $VERSION\n"
|
||||
|
||||
FILE="${FIRMWARE_COMMUNITY}-${VERSION}-${SOC}-generic-${BOARD}-squashfs-sysupgrade.bin"
|
||||
echo -ne "Downloading $FILE\n\n"
|
||||
cd /tmp/
|
||||
wget $(uci get firmware.upgrade.path)/${FILE}
|
||||
wget $(uci get firmware.upgrade.path)/${FILE}.md5
|
||||
|
||||
echo -ne "\ndone. Comparing md5 sums: "
|
||||
md5sum -c ${FILE}.md5
|
||||
ret=$?
|
||||
|
@ -32,4 +42,4 @@ else
|
|||
[Nn]|* ) echo -ne "\nAborting firmware upgrade.\n\n"; rm -f ${FILE}*; exit 0;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
|
16
buildscript
16
buildscript
|
@ -231,7 +231,7 @@ build() {
|
|||
mkdir bin
|
||||
fi
|
||||
|
||||
postbuild
|
||||
cp_firmware
|
||||
}
|
||||
|
||||
config() {
|
||||
|
@ -266,12 +266,20 @@ config() {
|
|||
cd "$opath"
|
||||
}
|
||||
|
||||
postbuild() {
|
||||
board_postbuild
|
||||
cp_firmware() {
|
||||
for image in ${images[@]}; do
|
||||
filename_build=${image//openwrt/${community}-${version}}
|
||||
cp "$target/bin/${chipset}/$image" "./bin/$filename_build"
|
||||
|
||||
image_factory=${image/sysupgrade/factory}
|
||||
if [[ -f "$target/bin/${chipset}/$image_factory" ]]; then
|
||||
filename_build_factory=${filename_build/sysupgrade/factory}
|
||||
cp "$target/bin/${chipset}/$image_factory" "./bin/$filename_build_factory"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
clean() {
|
||||
board_clean
|
||||
/bin/rm -rf bin $builddir src/openwrt
|
||||
|
||||
# remove downloaded package feeds
|
||||
|
|
Loading…
Reference in New Issue