aboutsummaryrefslogtreecommitdiffstats
path: root/main/u-boot/APKBUILD
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-07-29 14:47:56 +0300
committerTimo Teräs <timo.teras@iki.fi>2016-07-29 12:04:17 +0000
commit29342e7fec72ee44bc0f12c0fad15f2daf3e91fb (patch)
treef5c1aac27621fc0a06ea822ff86ea74f2bf97109 /main/u-boot/APKBUILD
parenta600a036424adc98d633178efe8289adb411df24 (diff)
downloadaports-29342e7fec72ee44bc0f12c0fad15f2daf3e91fb.tar.bz2
aports-29342e7fec72ee44bc0f12c0fad15f2daf3e91fb.tar.xz
main/u-boot: add update-u-boot script for upgrading bootloader
Diffstat (limited to 'main/u-boot/APKBUILD')
-rw-r--r--main/u-boot/APKBUILD45
1 files changed, 29 insertions, 16 deletions
diff --git a/main/u-boot/APKBUILD b/main/u-boot/APKBUILD
index e8eb64560a..a14c76fd39 100644
--- a/main/u-boot/APKBUILD
+++ b/main/u-boot/APKBUILD
@@ -3,8 +3,8 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=u-boot
pkgver=2016.07
-pkgrel=1
-pkgdesc="Bootloader for ARM"
+pkgrel=2
+pkgdesc="u-boot bootloader common files"
url="http://www.denx.de/wiki/U-Boot/"
arch="armhf"
license="GPL2"
@@ -12,9 +12,9 @@ depends=""
depends_dev=""
makedepends="$depends_dev bc dtc"
install=""
-subpackages=""
source="ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2
README.txt
+ update-u-boot
"
_srcdir="$srcdir"/u-boot-${pkgver//_/-}
@@ -27,10 +27,11 @@ board_configs="
wandboard:wandboard
"
+local allboards=""
for board_config in $board_configs; do
- subpackages="$subpackages $pkgname-${board_config%%:*}"
+ allboards="$allboards $pkgname-${board_config%%:*}"
done
-depends="$subpackages"
+subpackages="$pkgname-all $allboards"
build() {
cd "$_srcdir"
@@ -53,14 +54,22 @@ build() {
package() {
cd "$builddir"
- mkdir -p "$pkgdir"/usr/share/$pkgname
- install "$srcdir"/README.txt "$pkgdir"/usr/share/$pkgname/README.txt
+ mkdir -p "$pkgdir"/usr/share/$pkgname "$pkgdir"/usr/sbin
+ install "$srcdir"/README.txt "$pkgdir"/usr/share/$pkgname/README.txt || return 1
+ install "$srcdir"/update-u-boot "$pkgdir"/usr/sbin || return 1
+}
+
+all() {
+ pkgdesc="u-boot for all boards (meta package)"
+ depends="$allboards"
+
+ mkdir -p "$subpkgdir"/
}
_split_boards() {
cd "$builddir"
pkgdesc="u-boot for $1"
- depends=""
+ depends="u-boot"
shift
local board
for board; do
@@ -68,17 +77,18 @@ _split_boards() {
mkdir -p "$subpkgdir"/usr/share/$pkgname/$board
export BUILD_DIR="$builddir"/$board
local ok=no
- for image in MLO SPL u-boot.img u-boot-sunxi-with-spl.bin; do
+ for image in u-boot-sunxi-with-spl.bin -- MLO SPL u-boot.img -- u-boot.bin; do
+ if [ "$image" = "--" ]; then
+ [ "$ok" = yes ] && break
+ continue
+ fi
if [ -e "$BUILD_DIR"/$image ]; then
cp "$BUILD_DIR"/$image "$subpkgdir"/usr/share/$pkgname/$board \
|| return 1
ok=yes
fi
done
- if [ "$ok" = "no" ]; then
- cp "$BUILD_DIR"/u-boot.bin "$subpkgdir"/usr/share/$pkgname/$board \
- || return 1
- fi
+ [ "$ok" = yes ] || return 1
done
}
@@ -89,8 +99,11 @@ for board_config in $board_configs; do
done
md5sums="425a3fa610a7d972e5092a0e92276c70 u-boot-2016.07.tar.bz2
-13684d0a2495da42144e1805fc5492d1 README.txt"
+13684d0a2495da42144e1805fc5492d1 README.txt
+c863032a8a2cd94b3ab9b837a640edfc update-u-boot"
sha256sums="974fb7225c0af6a721307631f66b81e20dbda82a4d7cc32aba2a625727231253 u-boot-2016.07.tar.bz2
-80538ab8339bf84b8e3cfe8eb1cab9cb5d25bbecc6ba45824fb83e868df9160e README.txt"
+80538ab8339bf84b8e3cfe8eb1cab9cb5d25bbecc6ba45824fb83e868df9160e README.txt
+af8cef011c90dd44385a6105aee16f900fbf37c021841c927483e9d402aaab5c update-u-boot"
sha512sums="fa76dbd7e654ff9e4b3166162be6c0a77ecf2eb2a952b4865df3c818ebcdca7e2bb75e5ba19bf0346000c3d185888552193bb74510b115426cfe444b78efd3ef u-boot-2016.07.tar.bz2
-f8c9bb6e84d6f0620c976ac7ad5dd7ec7ff9dfdd4b1d03d2bf6653e7beccf80bdf2debfc92fb1f696dba92fb40287d3c45897e0078951451d0835cb61a5f16d1 README.txt"
+f8c9bb6e84d6f0620c976ac7ad5dd7ec7ff9dfdd4b1d03d2bf6653e7beccf80bdf2debfc92fb1f696dba92fb40287d3c45897e0078951451d0835cb61a5f16d1 README.txt
+d57796ce018afa15e12521a90761ab1ae6411acf1fc0c1ce95f0d48630e0949568d8a7e577ba52d91c56918a9d414951c608aa49389ac7f8b50cb8aba5da9697 update-u-boot"