46e4570415
1 OBS-URL: https://build.opensuse.org/request/show/342326 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=58
112 lines
3.0 KiB
Bash
112 lines
3.0 KiB
Bash
#!/bin/bash -e
|
|
|
|
BOARDNAME="$1"
|
|
BOARDCONFIG="$2"
|
|
ARCH_RESTRICTIONS="$3"
|
|
|
|
armv6_boards="rpi"
|
|
|
|
# TI
|
|
armv7_boards="omap3_beagle omap4_panda am335x_evm pcm051_rev3 beagle_x15"
|
|
# Exynos
|
|
armv7_boards="$armv7_boards arndale snow spring odroid odroid-xu3"
|
|
# Calxeda
|
|
armv7_boards="$armv7_boards highbank"
|
|
# Freescale
|
|
armv7_boards="$armv7_boards mx53loco mx6cuboxi mx6qsabrelite"
|
|
# Allwinner
|
|
armv7_boards="$armv7_boards Bananapi Cubieboard Cubieboard2 Cubietruck Mele_A1000 Merrii_A80_Optimus"
|
|
armv7_boards="$armv7_boards A10-OLinuXino-Lime A13-OLinuXino A13-OLinuXinoM"
|
|
armv7_boards="$armv7_boards A20-OLinuXino-Lime A20-OLinuXino-Lime2 A20-OLinuXino_MICRO"
|
|
# Broadcom
|
|
armv7_boards="$armv7_boards rpi_2"
|
|
# Nvidia
|
|
armv7_boards="$armv7_boards colibri_t20 paz00 jetson-tk1"
|
|
# Rockchip
|
|
armv7_boards="$armv7_boards firefly-rk3288"
|
|
|
|
aarch64_boards=""
|
|
|
|
ppc_boards=""
|
|
|
|
if [ ! "$1" -o ! "$2" -o ! "$3" ]; then
|
|
# armv6 boards
|
|
for BOARDCONFIG in $armv6_boards; do
|
|
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
|
|
BOARDCONFIG=${BOARDCONFIG}_defconfig
|
|
ARCH_RESTRICTIONS="armv6l armv6hl"
|
|
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
|
|
done
|
|
# armv7 boards
|
|
for BOARDCONFIG in $armv7_boards; do
|
|
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
|
|
BOARDCONFIG=${BOARDCONFIG}_defconfig
|
|
ARCH_RESTRICTIONS="armv7l armv7hl"
|
|
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
|
|
done
|
|
# aarch64 boards
|
|
for BOARDCONFIG in $aarch64_boards; do
|
|
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
|
|
BOARDCONFIG=${BOARDCONFIG}_defconfig
|
|
ARCH_RESTRICTIONS="aarch64"
|
|
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
|
|
done
|
|
# ppc boards
|
|
for BOARDCONFIG in $ppc_boards; do
|
|
BOARDNAME="$(echo $BOARDCONFIG | tr -d '_' | tr '[:upper:]' '[:lower:]')"
|
|
BOARDCONFIG=${BOARDCONFIG}_defconfig
|
|
ARCH_RESTRICTIONS="ppc"
|
|
bash $0 $BOARDNAME $BOARDCONFIG "$ARCH_RESTRICTIONS"
|
|
done
|
|
exit 0
|
|
fi
|
|
|
|
OMAP_SPL=0
|
|
ORIGEN_SPL=0
|
|
SUNXI_SPL=0
|
|
ARNDALE_SPL=0
|
|
CUBOXI_SPL=0
|
|
case "$(echo $BOARDCONFIG | sed -e 's/_defconfig//')" in
|
|
mx53loco|mx6qsabrelite|efika*)
|
|
BINEND=imx
|
|
;;
|
|
omap*|am335x*|pcm051*) BINEND=img
|
|
OMAP_SPL=1 ;;
|
|
arndale) BINEND=bin
|
|
ARNDALE_SPL=1 ;;
|
|
Bananapi*|Cubieboard*|Cubietruck*|*-OLinuXino*)
|
|
BINEND=img
|
|
SUNXI_SPL=1
|
|
;;
|
|
Mele_A1000)
|
|
BINEND=img
|
|
SUNXI_SPL=1
|
|
;;
|
|
Hyundai_A7HD)
|
|
BINEND=img
|
|
SUNXI_SPL=1
|
|
;;
|
|
snow|spring)
|
|
BINEND=img
|
|
;;
|
|
mx6cuboxi)
|
|
BINEND=img
|
|
CUBOXI_SPL=1
|
|
;;
|
|
|
|
*) BINEND=bin ;;
|
|
esac
|
|
|
|
sed "s/BOARDCONFIG/$BOARDCONFIG/g
|
|
s/BOARDNAME/$BOARDNAME/g
|
|
s/ARCH_RESTRICTIONS/$ARCH_RESTRICTIONS/g
|
|
s/BINEND/$BINEND/g
|
|
s/ORIGEN_SPL/$ORIGEN_SPL/g
|
|
s/ARNDALE_SPL/$ARNDALE_SPL/g
|
|
s/SUNXI_SPL/$SUNXI_SPL/g
|
|
s/TEGRA_SPL/$TEGRA_SPL/g
|
|
s/CUBOXI_SPL/$CUBOXI_SPL/g
|
|
s/OMAP_SPL/$OMAP_SPL/g" < u-boot.spec.in > u-boot-$BOARDNAME.spec
|
|
|
|
cp u-boot.changes u-boot-$BOARDNAME.changes
|