From b8516073ff86f716ea9d477a4f86a333289ab1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 20 Apr 2015 13:50:32 +0000 Subject: main/u-boot: include only needed binaries u-boot.bin is considered a fallback if nothing else is found. update the packaging also so that u-boot is meta package including all boot loaders --- main/u-boot/APKBUILD | 27 +++++++++++++++++++-------- main/u-boot/README.txt | 21 +++++++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 main/u-boot/README.txt diff --git a/main/u-boot/APKBUILD b/main/u-boot/APKBUILD index 7acad6f110..f7387ed8d0 100644 --- a/main/u-boot/APKBUILD +++ b/main/u-boot/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Leonardo Arena pkgname=u-boot pkgver=2015.04 -pkgrel=0 +pkgrel=1 pkgdesc="Bootloader for ARM" url="http://www.denx.de/wiki/U-Boot/" arch="armhf" @@ -16,8 +16,8 @@ subpackages="" source="ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2 distroconfig-beaglebone.patch distroconfig-wandboard.patch - include-sys-types.patch + README.txt " _srcdir="$srcdir"/u-boot-${pkgver//_/-} @@ -33,6 +33,7 @@ board_configs=" for board_config in $board_configs; do subpackages="$subpackages $pkgname-${board_config%%:*}" done +depends="$subpackages" prepare() { local i @@ -66,25 +67,32 @@ build() { package() { cd "$_builddir" - mkdir -p "$pkgdir"/usr/share/doc/$pkgname - echo "Dummy package" > "$pkgdir"/usr/share/doc/$pkgname/README + mkdir -p "$pkgdir"/usr/share/$pkgname + install "$srcdir"/README.txt "$pkgdir"/usr/share/$pkgname/README.txt } _split_boards() { cd "$_builddir" pkgdesc="u-boot for $1" + depends="" shift local board for board; do msg "Including board $board" mkdir -p "$subpkgdir"/usr/share/$pkgname/$board export BUILD_DIR="$_builddir"/$board - for image in MLO u-boot.imx u-boot.img u-boot.bin; do + local ok=no + for image in MLO u-boot.imx u-boot.img; do 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 done } @@ -97,12 +105,15 @@ done md5sums="570bdc2c47270c2a98ca60ff6c5c74cd u-boot-2015.04.tar.bz2 a5b2aab8f3613e6f4154714b16ea9ad3 distroconfig-beaglebone.patch 880f99276de9722b8d85d03a06784d5b distroconfig-wandboard.patch -2c144ed08a9aab244c0d8ea45e578ce5 include-sys-types.patch" +2c144ed08a9aab244c0d8ea45e578ce5 include-sys-types.patch +8880da2612846147eafb65b271934af9 README.txt" sha256sums="0a1a70df586655f527befa6f12e184e96ed61b126e5a567382321b17200f5d60 u-boot-2015.04.tar.bz2 4a49c939184c25f216b35e800669874a46354f805218a91b1db2bb27aa979310 distroconfig-beaglebone.patch fc4b571e840e171f6fb6f4923697cd0768eca3b52aac912b87dfe22f61b0c753 distroconfig-wandboard.patch -ac7fc4678aa6018ae8730536ab55ed1e1d2bc93f699a25f8bd4504132cb27302 include-sys-types.patch" +ac7fc4678aa6018ae8730536ab55ed1e1d2bc93f699a25f8bd4504132cb27302 include-sys-types.patch +5d6e33e775e63acccde42d784348cd760b75052749cbc2ee1196b6e4ef64f78c README.txt" sha512sums="e50a3d7e44bf588a7cf8e28cdf3342bc38bd1bf55231d579c2501b75386cfff0fbc7a34648d893971e0095510c9d582b7180427832cb78470b4e7af2ce0e3646 u-boot-2015.04.tar.bz2 e840c2928afdab14442fe276a934d5d3ee615fdf32370819a1c988bf2dba99f27ccf479943f664aadaa14fbf48841e4d7d22973bb911db2d77f13aa2b4c40f88 distroconfig-beaglebone.patch ce22043cfe65ba3a09f965dbf69985345fa0d56ef093703a595fde2dc3cb1ddcf1012e2fdcd56eed216de2bd8b3ec3a8de08266d70ad373cf33faa79d94ad93f distroconfig-wandboard.patch -bb237aceacc0470c12778559fb3c7b1b8e9481f5113743ca76937d1d0052f1639c2da1d0b34069f73311aac44f9dcf628241d9322912ea7e8bd2c440a1d121bb include-sys-types.patch" +bb237aceacc0470c12778559fb3c7b1b8e9481f5113743ca76937d1d0052f1639c2da1d0b34069f73311aac44f9dcf628241d9322912ea7e8bd2c440a1d121bb include-sys-types.patch +578c48223d4f355a7e59afd4a1bbc266c06bd422fd264035c1cdedfa812098b61880d6d9d24503e4cb6a9d799a3929d9619dcadeb1f88f1f686ec94ef5b9fe44 README.txt" diff --git a/main/u-boot/README.txt b/main/u-boot/README.txt new file mode 100644 index 0000000000..06d0643bbe --- /dev/null +++ b/main/u-boot/README.txt @@ -0,0 +1,21 @@ +WandBoard +--------- + +- ROM loads boot loader from raw MMC sectors at fixed address +- NOTE: 1st partition needs to start after boot loader + +- Install u-boot with (pick the command for your board type): + dd if=wandboard_solo/u-boot.imx of=/dev/mmcblk0 seek=1 conv=fsync bs=1k + dd if=wandboard_dl/u-boot.imx of=/dev/mmcblk0 seek=1 conv=fsync bs=1k + dd if=wandboard_quad/u-boot.imx of=/dev/mmcblk0 seek=1 conv=fsync bs=1k + + +BeagleBoard +----------- + +- ROM looks for 1st partition with FAT, and loads MLO from it +- NOTE: MLO needs to be the first file created on this partition + +- Install u-boot with: + cp am335x_boneblack/{MLO,u-boot.img} /media/mmcblk0p1/ + -- cgit v1.2.3