diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-01-22 12:54:16 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-01-22 15:04:13 +0000 |
commit | 38758a863fca19a29cf32e9ea55f181b15623d23 (patch) | |
tree | 95ed34901597de84efe33c9836cbb648fd7f0132 /main/u-boot | |
parent | fd81a5935eeb562f93d2e7cd9d66c1f428dff2a5 (diff) | |
download | aports-38758a863fca19a29cf32e9ea55f181b15623d23.tar.bz2 aports-38758a863fca19a29cf32e9ea55f181b15623d23.tar.xz |
main/u-boot: upgrade to 2015.01, and ship alpine boot script
Diffstat (limited to 'main/u-boot')
-rw-r--r-- | main/u-boot/APKBUILD | 100 | ||||
-rw-r--r-- | main/u-boot/alpine-bootscript.h | 6 | ||||
-rw-r--r-- | main/u-boot/config-wandboard.patch | 55 |
3 files changed, 123 insertions, 38 deletions
diff --git a/main/u-boot/APKBUILD b/main/u-boot/APKBUILD index d0e9df4d7f..36c26d5fe2 100644 --- a/main/u-boot/APKBUILD +++ b/main/u-boot/APKBUILD @@ -2,8 +2,8 @@ # Contributor: Timo Teras <timo.teras@iki.fi> # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=u-boot -pkgver=2014.04 -pkgrel=2 +pkgver=2015.01 +pkgrel=0 pkgdesc="Bootloader for ARM" url="http://www.denx.de/wiki/U-Boot/" arch="armhf" @@ -12,36 +12,53 @@ depends="" depends_dev="" makedepends="$depends_dev" install="" -subpackages="am335x_boneblack wandboard_quad" +subpackages="" source="ftp://ftp.denx.de/pub/u-boot/u-boot-$pkgver.tar.bz2 include-sys-types.patch + config-wandboard.patch + alpine-bootscript.h " -_builddir="$srcdir"/u-boot-$pkgver +_srcdir="$srcdir"/u-boot-$pkgver +_builddir="$srcdir"/build -boards_config="$subpackages" +board_configs=" + wandboard:wandboard_solo,wandboard_dl,wandboard_quad + beagleboard:am335x_boneblack" + +for board_config in $board_configs; do + subpackages="$subpackages $pkgname-${board_config%%:*}" +done prepare() { local i - cd "$_builddir" + cd "$_srcdir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done + + cp "$srcdir"/alpine-bootscript.h "$_srcdir"/include/configs/alpine-bootscript.h } build() { - cd "$_builddir" + cd "$_srcdir" 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 + + local board_config board + for board_config in $board_configs; do + local configs="${board_config#*:}" + for board in ${configs//,/ }; do + msg "Building u-boot for $board" + export BUILD_DIR="$_builddir"/$board + mkdir -p "$BUILD_DIR" + make distclean + make O="$BUILD_DIR" ${board}_config || return 1 + make O="$BUILD_DIR" all || return 1 + done done } @@ -51,32 +68,39 @@ package() { echo "Dummy package" > "$pkgdir"/usr/share/doc/$pkgname/README } -_do_subpkg() { - board=$1 +_split_boards() { cd "$_builddir" - mkdir -p "$subpkgdir"/usr/share/$pkgname/$board - export BUILD_DIR="$_builddir"/build/$board - if [ -e "$BUILD_DIR"/MLO ]; then - cp "$BUILD_DIR"/MLO \ - "$subpkgdir"/usr/share/$pkgname/$board || return 1 - fi - cp "$BUILD_DIR"/u-boot.* \ - "$subpkgdir"/usr/share/$pkgname/$board || return 1 -} - -am335x_boneblack() { - pkgdesc="u-boot for BeagleBone Black" - _do_subpkg $subpkgname + pkgdesc="u-boot for $1" + shift + local board + for board; do + msg "Including board $board" + mkdir -p "$subpkgdir"/usr/share/$pkgname/$board + export BUILD_DIR="$_builddir"/$board + if [ -e "$BUILD_DIR"/MLO ]; then + cp "$BUILD_DIR"/MLO \ + "$subpkgdir"/usr/share/$pkgname/$board || return 1 + fi + cp "$BUILD_DIR"/u-boot.* \ + "$subpkgdir"/usr/share/$pkgname/$board || return 1 + done } -wandboard_quad() { - pkgdesc="u-boot for Wandboard Quad" - _do_subpkg $subpkgname -} +for board_config in $board_configs; do + local board="${board_config%%:*}" + local configs="${board_config#*:}" + eval "${board}() { _split_boards $board ${configs//,/ }; }" +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" +md5sums="7f08dc9e98a71652bd6968888ed6ec95 u-boot-2015.01.tar.bz2 +946644b87937315253151db8b1ba98ec include-sys-types.patch +a81d24110cf527f0eaab0de5ef15b7a1 config-wandboard.patch +581d2a5a617e0dce93a295fb4f6d4cf6 alpine-bootscript.h" +sha256sums="383051a656ebe11757b17d38a3326387e4a1b0949ca8a9e8ee506bf71dac9fde u-boot-2015.01.tar.bz2 +675676d857758d2eafab39592ad0f937be4021deb5cc47e44bea174a744871b3 include-sys-types.patch +aa5a047ea3dddf434ffaca13f284f78facf190d582e26513ea02835e3184726b config-wandboard.patch +1c185db1fe3de4e5c224c831141863745a8970a39fc9801f45ec92b2e6950b69 alpine-bootscript.h" +sha512sums="6697c6da5f463bdfa75b8025a2dd302e9cda58ce36bc3252590f11976807aeccc1ca76be93cbc83d3367a7557878516bb57130ffb76197ffd513640c48e18938 u-boot-2015.01.tar.bz2 +3e3a3a1d0f0fb9a41fe0e1427f91d05ec3c70103d5a185ed1d287ea23032ddcd01c0786ddca1d45d05e34df1b4a54a961bd123115798148205a22f6083142a57 include-sys-types.patch +8236cf2bc838d8f5231c825f660486c5be770e76db60127f5b7bc902d77fefbb5026fb5d63269748057a5f034bb738401a31d54a2f12bcbded5c0cb6099619f0 config-wandboard.patch +4ce96a48010b061fa77a15992824e7ac161672cab4d933ba91a995dd784bf1c263b6e907a967b02f54dba263677900d62c5eb9e31784672229f9cdac4cde696a alpine-bootscript.h" diff --git a/main/u-boot/alpine-bootscript.h b/main/u-boot/alpine-bootscript.h new file mode 100644 index 0000000000..c40c9c7539 --- /dev/null +++ b/main/u-boot/alpine-bootscript.h @@ -0,0 +1,6 @@ +#define CONFIG_BOOTCOMMAND \ + "if test -z \"${bootargs}\"; then setenv bootargs console=${console},${baudrate} alpine_dev=mmcblk${devnum}p${devpart}; fi; " \ + "load ${devtype} ${devnum}:${devpart} ${fdt_addr_r} /boot/dtbs/${fdt_file} ; " \ + "load ${devtype} ${devnum}:${devpart} ${kernel_addr_r} /boot/vmlinuz-grsec ; " \ + "load ${devtype} ${devnum}:${devpart} ${initrd_addr_r} /boot/initramfs-grsec ; " \ + "bootz ${kernel_addr_r} ${initrd_addr_r}:${filesize} ${fdt_addr_r}" diff --git a/main/u-boot/config-wandboard.patch b/main/u-boot/config-wandboard.patch new file mode 100644 index 0000000000..30537514ef --- /dev/null +++ b/main/u-boot/config-wandboard.patch @@ -0,0 +1,55 @@ +--- u-boot-2015.01.orig/include/configs/wandboard.h ++++ u-boot-2015.01/include/configs/wandboard.h +@@ -75,7 +75,9 @@ + #define CONFIG_GENERIC_MMC + #define CONFIG_BOUNCE_BUFFER + #define CONFIG_CMD_EXT2 ++#define CONFIG_CMD_EXT4 + #define CONFIG_CMD_FAT ++#define CONFIG_CMD_FS_GENERIC + #define CONFIG_DOS_PARTITION + + /* USB Configs */ +@@ -130,6 +132,8 @@ + #define CONFIG_DEFAULT_FDT_FILE "imx6q-wandboard.dtb" + #endif + ++#if 0 ++ + #define CONFIG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "image=zImage\0" \ +@@ -244,6 +248,25 @@ + "fi; " \ + "else run netboot; fi" + ++#else ++ ++#define CONFIG_EXTRA_ENV_SETTINGS \ ++ "console=ttymxc0\0" \ ++ "devtype=mmc\0" \ ++ "devnum=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ ++ "devpart=1\0" \ ++ "fdt_addr_r=0x18000000\0" \ ++ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ ++ "fdt_high=0xffffffff\0" \ ++ "initrd_addr_r=0x13000000\0" \ ++ "initrd_high=0xffffffff\0" \ ++ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ ++ "" ++ ++#include "alpine-bootscript.h" ++ ++#endif ++ + /* Miscellaneous configurable options */ + #define CONFIG_SYS_LONGHELP + #define CONFIG_SYS_HUSH_PARSER +@@ -283,6 +306,7 @@ + + #define CONFIG_OF_LIBFDT + #define CONFIG_CMD_BOOTZ ++#define CONFIG_SUPPORT_RAW_INITRD + + #ifndef CONFIG_SYS_DCACHE_OFF + #define CONFIG_CMD_CACHE |