buildscript: remove community config

The community file is not used anymore.

Signed-off-by: Tim Niemeyer <tim@tn-x.org>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Tim Niemeyer 2018-03-03 18:29:43 +01:00
parent 53184f63fb
commit c1fc513cef
4 changed files with 4 additions and 60 deletions

View File

@ -197,18 +197,14 @@ prebuild() {
if [ 0 -ne $? ]; then if [ 0 -ne $? ]; then
version=$(git log -1 --pretty=format:%h) version=$(git log -1 --pretty=format:%h)
fi fi
community=$(basename "$(realpath selected_community)" .cfg)
{ {
echo "FIRMWARE_VERSION=\"$version\"" echo "FIRMWARE_VERSION=\"$version\""
echo "FIRMWARE_COMMUNITY=\"$community\""
echo "BUILD_DATE=\"build date: $(date)\"" echo "BUILD_DATE=\"build date: $(date)\""
echo "OPENWRT_CORE_REVISION=\"${OPENWRTREV}\"" echo "OPENWRT_CORE_REVISION=\"${OPENWRTREV}\""
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\"${PACKAGEREV}\"" echo "OPENWRT_FEEDS_PACKAGES_REVISION=\"${PACKAGEREV}\""
} > "$target"/files/etc/firmware_release } > "$target"/files/etc/firmware_release
cp selected_community "$target"/files/etc/community.cfg
opath=$(pwd) opath=$(pwd)
cd "$target" cd "$target"
make defconfig make defconfig
@ -276,14 +272,10 @@ config() {
} }
cp_firmware() { cp_firmware() {
if [ "$community" = "franken" ]; then
local community="fff"
fi
[ -n "$subtarget" ] || subtarget="generic" [ -n "$subtarget" ] || subtarget="generic"
for image in ${images[@]}; do for image in ${images[@]}; do
filename_build=${image//lede/${community}-${version}} filename_build=${image//lede/fff-${version}}
filename_build=${filename_build//generic/g} filename_build=${filename_build//generic/g}
cp "$target/bin/targets/${chipset}/${subtarget}/$image" "./bin/$filename_build" cp "$target/bin/targets/${chipset}/${subtarget}/$image" "./bin/$filename_build"
@ -352,18 +344,6 @@ loadBSP()
. selected_bsp . selected_bsp
} }
loadCommunity()
{
echo "Working with $(/bin/ls -l selected_community | awk '{ print $11 }')"
tpl_translate=$(awk -F= 'BEGIN{printf("sed")} /^.+$/{gsub("/", "\\/", $0); printf(" -es/\\${%s}/%s/g",$1,$2)}' selected_community)
}
setCommunity() {
/bin/rm -rf selected_community
/bin/ln -s "$1" selected_community
loadCommunity
}
setBSP() setBSP()
{ {
/bin/rm -rf selected_bsp /bin/rm -rf selected_bsp
@ -384,19 +364,13 @@ if [ "$(/usr/bin/id -u)" -eq 0 ]; then
exit 1 exit 1
fi fi
if [ "$1" != "selectbsp" -a "$1" != "selectcommunity" ]; then if [ "$1" != "selectbsp" ]; then
if [ ! -h selected_bsp ]; then if [ ! -h selected_bsp ]; then
echo "Please select a Board-Support-Package using:" echo "Please select a Board-Support-Package using:"
echo "$0 selectbsp" echo "$0 selectbsp"
exit exit
fi fi
if [ ! -h selected_community ]; then
echo "Please select a community file using:"
echo "$0 selectcommunity"
exit
fi
loadBSP loadBSP
loadCommunity
echo echo
fi fi
@ -417,22 +391,6 @@ case "$1" in
fi fi
fi fi
;; ;;
"selectcommunity")
if [ "$2" = "help" ] || [ "$2" = "" ]; then
echo "Select a Community-File:"
echo
echo "Usage: $0 $1 <community-file>"
echo "available community-files: "
/bin/ls community/*.cfg
echo
else
if [ ! -f "$2" ]; then
echo "Could not find $2"
else
setCommunity "$2"
fi
fi
;;
"prepare") "prepare")
if [ "$2" = "help" ] || [ "$2" = "x" ]; then if [ "$2" = "help" ] || [ "$2" = "x" ]; then
echo "This option fetches the sources for the images and configurates the build so that it can be compiled" echo "This option fetches the sources for the images and configurates the build so that it can be compiled"
@ -480,7 +438,7 @@ case "$1" in
;; ;;
"buildall") "buildall")
if [ "$2" = "help" ]; then if [ "$2" = "help" ]; then
echo "This option builds the firmware for all routers of a given community." echo "This option builds the firmware for all routers."
echo echo
echo "Usage: $0 $1 [fast]" echo "Usage: $0 $1 [fast]"
echo echo
@ -503,7 +461,6 @@ case "$1" in
echo echo
echo "Usage: $0 command" echo "Usage: $0 command"
echo "command:" echo "command:"
echo " selectcommunity <community-file>"
echo " selectbsp <bsp-file>" echo " selectbsp <bsp-file>"
echo " prepare" echo " prepare"
echo " config openwrt" echo " config openwrt"

View File

@ -1,8 +0,0 @@
BATMAN_CHANNEL=1
BATMAN_CHANNEL_5GHZ=36
ESSID_AP=franken.freifunk.net
ESSID_MESH=batman.franken.freifunk.net
BSSID_MESH=02:CA:FF:EE:BA:BE
VPN_PROJECT=fff
NTPD_IP=fe80::ff:feee:1%br-mesh
UPGRADE_PATH=http://[fe80::ff:feee:1%br-mesh]/dev/firmware/current

View File

@ -155,7 +155,6 @@ crawl() {
SYSTEM_DATA=$SYSTEM_DATA"$fastd_version" SYSTEM_DATA=$SYSTEM_DATA"$fastd_version"
SYSTEM_DATA=$SYSTEM_DATA"<nodewatcher_version>$nodewatcher_version</nodewatcher_version>" SYSTEM_DATA=$SYSTEM_DATA"<nodewatcher_version>$nodewatcher_version</nodewatcher_version>"
SYSTEM_DATA=$SYSTEM_DATA"<firmware_version>$FIRMWARE_VERSION</firmware_version>" SYSTEM_DATA=$SYSTEM_DATA"<firmware_version>$FIRMWARE_VERSION</firmware_version>"
SYSTEM_DATA=$SYSTEM_DATA"<firmware_community>$FIRMWARE_COMMUNITY</firmware_community>"
SYSTEM_DATA=$SYSTEM_DATA"<firmware_revision>$BUILD_DATE</firmware_revision>" SYSTEM_DATA=$SYSTEM_DATA"<firmware_revision>$BUILD_DATE</firmware_revision>"
SYSTEM_DATA=$SYSTEM_DATA"<openwrt_core_revision>$OPENWRT_CORE_REVISION</openwrt_core_revision>" SYSTEM_DATA=$SYSTEM_DATA"<openwrt_core_revision>$OPENWRT_CORE_REVISION</openwrt_core_revision>"
SYSTEM_DATA=$SYSTEM_DATA"<openwrt_feeds_packages_revision>$OPENWRT_FEEDS_PACKAGES_REVISION</openwrt_feeds_packages_revision>" SYSTEM_DATA=$SYSTEM_DATA"<openwrt_feeds_packages_revision>$OPENWRT_FEEDS_PACKAGES_REVISION</openwrt_feeds_packages_revision>"

View File

@ -67,11 +67,7 @@ if [ "$VERSION" -eq "$FIRMWARE_VERSION" ]; then
done done
fi fi
if [ "$FIRMWARE_COMMUNITY" = "franken" ]; then FILE="fff-${VERSION}-${SOC}-g-${BOARD}-squashfs-sysupgrade.bin"
FIRMWARE_COMMUNITY="fff"
fi
FILE="${FIRMWARE_COMMUNITY}-${VERSION}-${SOC}-g-${BOARD}-squashfs-sysupgrade.bin"
echo "Downloading $FILE" echo "Downloading $FILE"
echo "" echo ""
wget "${UPGRADE_PATH}/${FILE}" wget "${UPGRADE_PATH}/${FILE}"