This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_all_targets
executable file
·67 lines (60 loc) · 2.27 KB
/
build_all_targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
FEED="$1"
OUTPUT_DIR="$2"
BUILD_PARALLEL="$3"
# check for dependencies
DEPS="docker-hub docker"
for package in $DEPS; do
which $package > /dev/null
if [ $? != 0 ]; then
echo "Dependencies: $DEPS"
echo "Package $package is not installed."
echo "Exiting..."
exit 1
fi
done
# download freifunk_release file from repo and determine sdk-version for feed
BRANCH=$(echo "$FEED" | cut -d'^' -f 2)
FREIFUNK_RELEASE="https://raw.githubusercontent.com/freifunk-berlin/falter-packages/${BRANCH}/packages/falter-common/files-common/etc/freifunk_release"
TMP=$(curl -s $FREIFUNK_RELEASE)
eval $TMP
declare -A archs
archs["aarch64_cortex-a53"]=mediatek-mt7622
archs+=( ["aarch64_cortex-a72"]=mvebu-cortexa72 )
archs+=( ["aarch64_generic"]=layerscape-armv8_64b )
archs+=( ["arm_arm1176jzf-s_vfp"]=bcm27xx-bcm2708 )
archs+=( ["arm_arm926ej-s"]=mxs-generic )
archs+=( ["arm_cortex-a15_neon-vfpv4"]=ipq806x-generic )
archs+=( ["arm_cortex-a5_neon-vfpv4"]=at91-sama5 )
archs+=( ["arm_cortex-a7"]=sunxi-cortexa7 )
archs+=( ["arm_cortex-a7_neon-vfpv4"]=ipq40xx-generic )
archs+=( ["arm_cortex-a8_vfpv3"]=sunxi-cortexa8 )
archs+=( ["arm_cortex-a9"]=bcm53xx-generic )
archs+=( ["arm_cortex-a9_neon"]=zynq-generic )
archs+=( ["arm_cortex-a9_vfpv3"]=mvebu-cortexa9 )
archs+=( ["arm_fa526"]=gemini-generic )
archs+=( ["arm_mpcore"]=oxnas-ox820 )
# archs+=( ["arm_mpcore_vfp"]=cns3xxx-generic ) # This architecture seems to be abandoned in OpenWrt 21.02
archs+=( ["arm_xscale"]=kirkwood-generic )
archs+=( ["i386_geode"]=x86-geode )
archs+=( ["i386_pentium4"]=x86-generic )
archs+=( ["mips64_octeon"]=octeon-generic )
archs+=( ["mips_24kc"]=ath79-generic )
archs+=( ["mips_mips32"]=bcm63xx-generic )
archs+=( ["mipsel_24kc"]=ramips-mt7620 )
archs+=( ["mipsel_24kc_24kf"]=pistachio-generic )
archs+=( ["mipsel_74kc"]=bcm47xx-mips74k )
archs+=( ["mipsel_mips32"]=bcm47xx-legacy )
archs+=( ["mipsel_mips32r2"]=ramips-rt288x )
archs+=( ["powerpc_464fp"]=apm821xx-nand )
archs+=( ["powerpc_8540"]=mpc85xx-p1010 )
archs+=( ["x86_64"]=x86-64 )
for key in ${!archs[@]}; do
SDK="${archs[${key}]}"
[ "$FREIFUNK_OPENWRT_BASE" != "snapshot" ] && SDK+="-$FREIFUNK_OPENWRT_BASE"
if [ -n "$BUILD_PARALLEL" ]; then
(./build_feed "$SDK" "$FEED" "$OUTPUT_DIR" PARALLEL) &
else
./build_feed "$SDK" "$FEED" "$OUTPUT_DIR"
fi
done