diff --git a/temp/u-boot/APKBUILD b/temp/u-boot/APKBUILD deleted file mode 100644 index 069f7330f..000000000 --- a/temp/u-boot/APKBUILD +++ /dev/null @@ -1,126 +0,0 @@ -# Forked from Alpine to build for pine64 -pkgname=u-boot -pkgver=2019.04 -pkgrel=0 -_atfversion="2.1" -pkgdesc="u-boot bootloader common files" -url="http://www.denx.de/wiki/U-Boot/" -arch="armhf armv7 aarch64" -license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs - ISC LGPL-2.0-only LGPL-2.1-only X11" -makedepends="$depends_dev bc dtc python2-dev swig bison flex" -source="http://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2 - arm-trusted-firmware-${_atfversion}.tar.gz::https://github.com/ARM-software/arm-trusted-firmware/archive/v${_atfversion}.tar.gz - README.txt - update-u-boot - " -builddir="$srcdir"/u-boot-${pkgver//_/-} -atfbuilddir="$srcdir"/arm-trusted-firmware-${_atfversion} -options="!tracedeps" - -case "$CARCH" in -arm*) board_configs=" - beagleboard:am335x_boneblack_vboot - cubieboard:Cubieboard,Cubieboard2 - cuboxi:mx6cuboxi - raspberrypi:rpi_0_w,rpi,rpi_2,rpi_3_32b - wandboard:wandboard - qemu:qemu_arm - ";; -aarch64) board_configs=" - thunderx:thunderx_88xx - raspberrypi:rpi_3 - odroid:odroid-c2 - libretech:libretech-cc - qemu:qemu_arm64 - pine64:pine64-lts - ";; -esac - -_allboards="" -for board_config in $board_configs; do - _allboards="$_allboards $pkgname-${board_config%%:*}" -done -subpackages="$pkgname-all:_all $_allboards" - -build() { - if [ "$CARCH" = "aarch64" ]; then - msg "Building ARM trusted firmware for allwinner" - cd "$atfbuilddir" - LDFLAGS="" make PLAT=sun50i_a64 DEBUG=1 bl31 - export BL31="$atfbuilddir"/build/sun50i_a64/debug/bl31.bin - # Sanity check $BL31 - if [ ! -f "$BL31" ]; then - echo 'The $BL31 variable is invalid. Please adjust.' - return 1 - fi - fi - - 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 - - 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"/build/$board - mkdir -p "$BUILD_DIR" - make O="$BUILD_DIR" ${board}_config || return 1 - make O="$BUILD_DIR" all || return 1 - done - done -} - -package() { - cd "$builddir"/build - 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"/build - pkgdesc="u-boot for $1" - depends="u-boot" - shift - local board - for board; do - msg "Including board $board" - mkdir -p "$subpkgdir"/usr/share/$pkgname/$board - export BUILD_DIR="$builddir"/build/$board - local ok=no - 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 - [ "$ok" = yes ] || return 1 - done -} - -for board_config in $board_configs; do - _board="${board_config%%:*}" - _configs="${board_config#*:}" - eval "${_board}() { _split_boards $_board ${_configs//,/ }; }" -done - -sha512sums="357fe94b5b043885472ea1b7dcbbac601d0c1f7c64f71026b9e1279b53160847c6478d6ec98a2f678e562db21e39037d6e6fbc1e6b19beaac02ca14e93c5de0e u-boot-2019.04.tar.bz2 -9b557ce5f7dc272a0cc0b955ef77fe8f00c8ed01261a2cad29bb2efba3f278e81f1061c809096c97589c7075e5d39be1abd22c8c6a9cf8aaff157f640d36d22c arm-trusted-firmware-2.1.tar.gz -f8c9bb6e84d6f0620c976ac7ad5dd7ec7ff9dfdd4b1d03d2bf6653e7beccf80bdf2debfc92fb1f696dba92fb40287d3c45897e0078951451d0835cb61a5f16d1 README.txt -f3bb656bbd13caf10a8ea619bc08b439e7dc27526c9cbdfa0374f4f8e277632ff4df06b34d441d6723a93d4a54aa03465d4270c44219d6a150d416b9c56edbbe update-u-boot" diff --git a/temp/u-boot/README.txt b/temp/u-boot/README.txt deleted file mode 100644 index c342913a6..000000000 --- a/temp/u-boot/README.txt +++ /dev/null @@ -1,32 +0,0 @@ -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: - dd if=wandboard/SPL of=/dev/mmcblk0 bs=1k seek=1 - dd if=wandboard/u-boot.img of=/dev/mmcblk0 bs=1k seek=69 - sync - - (Note - the SD card node may vary, so adjust this as needed). - -- Insert the SD card into the slot located in the bottom of the board - (same side as the mx6 processor) - -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/ - -Sunxi (Cubie* etc) ------------------- - -- ROM loads boot loader from SD-CARD sectors at fixed address -- Install u-boot with: - sudo dd if=/u-boot-sunxi-with-spl.bin of=/dev/sda bs=1024 seek=8 - diff --git a/temp/u-boot/update-u-boot b/temp/u-boot/update-u-boot deleted file mode 100755 index 349636259..000000000 --- a/temp/u-boot/update-u-boot +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/sh - -verbose= -board= -device= -dryrun= -imagedir= - -get_defaults() { - if [ -z "$board" -a -e /sys/firmware/devicetree/base/compatible ]; then - case "$(cat /sys/firmware/devicetree/base/compatible 2>/dev/null)" in - wand,*) board=wand ;; - pine64,*) board=pine64 ;; - esac - fi - - if [ -z "$device" ]; then - case "$board" in - wand|cubie|cubie2) device=/dev/mmcblk0p0 ;; - mx6cuboxi) device=/dev/mmcblk0 ;; - esac - fi - - if [ -z "$imagedir" ]; then - imagedir="$(realpath $(dirname $0))" - [ -f "$imagedir/README.txt" ] || imagedir="/usr/share/u-boot" - fi -} - -die() { - echo "ERROR: $@" - exit 1 -} - -usage() { - get_defaults - - cat <] [-d|--device ] - -options: - - -b,--board Specify the board type: wand, cubie, cubie2, cuboxi, pine64 - (current default: ${board:-none}) - - -d,--device Specify the device where to install u-boot - (current default: ${device:-none}) - - -i,--imagedir Specify u-boot image directory - (current default: ${imagedir:-none}) - - -n,--dry-run Print commands but don't execute them - -EOF -} - -while [ $# -gt 0 ]; do - opt="$1" - shift - case "$opt" in - -b|--board) - case "$1" in - wand|wandboard) board="wand" ;; - cubie|cubieboard) board="cubie" ;; - cuboxi|mx6cuboxi) board="mx6cuboxi" ;; - pine64) board="pine64" ;; - *) usage; exit 1;; - esac - shift - ;; - -d|--device) - device="$1" - shift - ;; - -i|--imagedir) - imagedir="$1" - shift - ;; - -n|--dry-run) - dryrun="echo" - ;; - --) - break - ;; - -*) - usage - exit 1 - ;; - esac -done - -get_defaults -if [ -z "$board" -o -z "$device" -o -z "$imagedir" -o ! -e "$imagedir" ]; then - usage - exit 1 -fi - -if [ -z "$dryrun" ]; then - echo "Updating $board u-boot in $device in 3 seconds..." - sleep 3 -fi - -( -set -e -case "$board" in -wand) - [ -e "$imagedir/wandboard" ] || die "wandboard images not installed, apk add u-boot-wandboard" - $dryrun dd if=$imagedir/wandboard/SPL of=$device bs=1k seek=1 status=none - $dryrun dd if=$imagedir/wandboard/u-boot.img of=$device bs=1k seek=69 status=none - ;; -cubie|cubie2) - [ -e "$imagedir/Cubieboard${board#cubie}" ] || die "Cubieboard images not installed, apk add u-boot-cubieboard" - $dryrun dd if=$imagedir/Cubieboard${board#cubie}/u-boot-sunxi-with-spl.bin of=$device bs=1024 seek=8 status=none - ;; -mx6cuboxi) - [ -e "$imagedir/mx6cuboxi" ] || die "iMX6 Cubox-i images not installed, apk add u-boot-cuboxi" - $dryrun dd if=$imagedir/mx6cuboxi/SPL of=$device bs=1k seek=1 status=none - $dryrun dd if=$imagedir/mx6cuboxi/u-boot.img of=$device bs=1k seek=69 status=none - ;; -pine64) - [ -e "$imagedir/sopine_baseboard" ] || die "PINE A64 images not installed, apk add u-boot-pine64" - $dryrun dd if=$imagedir/sopine_baseboard/u-boot-sunxi-with-spl.bin of=$device bs=1024 seek=8 status=none - ;; -esac -$dryrun sync -) || die "U-Boot installation in $device failed" - -[ -z "$dryrun" ] && echo "Completed successfully."