add alarm/uboot-cubox-i

This commit is contained in:
Dave Higham 2014-03-04 13:31:30 +00:00
parent df95116208
commit f47a1454c9
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# U-Boot: UDOO
# Maintainer: Dave Higham <pepedog@archlinuxarm.org>
buildarch=4
pkgbase=uboot-cubox-i
pkgname=('uboot-cubox-i')
pkgver=2013.04
pkgrel=1
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('git')
option=('!strip')
source=("uboot::git+https://github.com/SolidRun/u-boot-imx6.git")
md5sums=('SKIP')
build() {
cd uboot
unset CFLAGS
unset CXXFLAGS
make mx6_cubox-i_config
make
}
package() {
pkgdesc="U-Boot for all Cubox-i variants"
install=${pkgbase}.install
mkdir -p "${pkgdir}"/boot
cp uboot/u-boot.img "${pkgdir}"/boot
cp uboot/SPL "${pkgdir}"/boot
}

View file

@ -0,0 +1,25 @@
flash_uboot() {
echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
echo "Do you want to do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
dd if=/boot/SPL of=/dev/mmcblk0 bs=512 seek=2
dd if=/boot/u-boot.img of=/dev/mmcblk0 bs=1K seek=42
sync
else
echo "You can do this later by running:"
echo "# dd if=/boot/SPL of=/dev/mmcblk0 bs=512 seek=2"
echo "# dd dd if=/boot/u-boot.img of=/dev/mmcblk0 bs=1K seek=42"
fi
}
## arg 1: the new package version
post_install() {
flash_uboot
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
flash_uboot
}