aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/u-boot/APKBUILD65
-rw-r--r--main/u-boot/include-sys-types.patch31
2 files changed, 96 insertions, 0 deletions
diff --git a/main/u-boot/APKBUILD b/main/u-boot/APKBUILD
new file mode 100644
index 0000000000..9a29ee614b
--- /dev/null
+++ b/main/u-boot/APKBUILD
@@ -0,0 +1,65 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Contributor: Timo Teras <timo.teras@iki.fi>
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=u-boot
+pkgver=2014.04
+pkgrel=0
+pkgdesc="Bootloader for ARM"
+url="http://www.denx.de/wiki/U-Boot/"
+arch="armhf"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="ftp://ftp.denx.de/pub/u-boot/u-boot-$pkgver.tar.bz2
+ include-sys-types.patch
+ "
+
+_builddir="$srcdir"/u-boot-$pkgver
+
+boards_config="am335x_boneblack wandboard_quad"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ touch include/config.h
+ LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > include/timestamp_autogenerated.h
+ LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> include/timestamp_autogenerated.h
+ for board in $boards_config; do
+ export BUILD_DIR="$_builddir"/build/$board
+ mkdir -p "$BUILD_DIR"
+ make distclean
+ make O="$BUILD_DIR" ${board}_config
+ make O="$BUILD_DIR" all
+ done
+}
+
+package() {
+ cd "$_builddir"
+ for board in $boards_config; do
+ mkdir -p "$pkgdir"/$board
+ export BUILD_DIR="$_builddir"/build/$board
+ if [ -e "$BUILD_DIR"/MLO ]; then
+ cp "$BUILD_DIR"/MLO "$pkgdir"/$board || return 1
+ fi
+ cp "$BUILD_DIR"/u-boot.* "$pkgdir"/$board || return 1
+ done
+}
+
+md5sums="6d2116d1385a66e9a59742caa9d62a54 u-boot-2014.04.tar.bz2
+946644b87937315253151db8b1ba98ec include-sys-types.patch"
+sha256sums="7b6444bd23eb61068c43bd1d44ec7e7bfdbce5cadeca20c833eee186b4d3fd31 u-boot-2014.04.tar.bz2
+675676d857758d2eafab39592ad0f937be4021deb5cc47e44bea174a744871b3 include-sys-types.patch"
+sha512sums="9bfd00f057238bf7caa81013375f0825ea480f0c8656917609ce728cf1758d1f82a3ff7e8acd957dc8cc5ed5c473a8c239f2121c0edceae78fdc504d2b4db92e u-boot-2014.04.tar.bz2
+3e3a3a1d0f0fb9a41fe0e1427f91d05ec3c70103d5a185ed1d287ea23032ddcd01c0786ddca1d45d05e34df1b4a54a961bd123115798148205a22f6083142a57 include-sys-types.patch"
diff --git a/main/u-boot/include-sys-types.patch b/main/u-boot/include-sys-types.patch
new file mode 100644
index 0000000000..3869e9f081
--- /dev/null
+++ b/main/u-boot/include-sys-types.patch
@@ -0,0 +1,31 @@
+--- u-boot-2014.04.orig/include/image.h
++++ u-boot-2014.04/include/image.h
+@@ -24,6 +24,8 @@
+
+ #ifdef USE_HOSTCC
+
++#include <sys/types.h>
++
+ /* new uImage format support enabled on host */
+ #define CONFIG_FIT 1
+ #define CONFIG_OF_LIBFDT 1
+--- u-boot-2014.04.orig/tools/mkimage.h
++++ u-boot-2014.04/tools/mkimage.h
+@@ -16,6 +16,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
+ #include <time.h>
+ #include <unistd.h>
+ #include <sha1.h>
+--- u-boot-2014.04.orig/tools/proftool.c
++++ u-boot-2014.04/tools/proftool.c
+@@ -16,6 +16,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/param.h>
++#include <sys/types.h>
+
+ #include <compiler.h>
+ #include <trace.h>