added alarm/uboot-dragonboard

This commit is contained in:
Kevin Mihelich 2016-10-16 00:16:10 +00:00
parent 65b7157023
commit 284624e1c6
5 changed files with 121 additions and 0 deletions

View file

@ -0,0 +1,25 @@
From 8c190679b688cf186e132a9f26052ac26ab717c3 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Sat, 5 Mar 2016 12:27:57 -0700
Subject: [PATCH] arch linux arm modifications
---
include/configs/dragonboard410c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/dragonboard410c.h b/include/configs/dragonboard410c.h
index 4b00922..15350c1 100644
--- a/include/configs/dragonboard410c.h
+++ b/include/configs/dragonboard410c.h
@@ -12,7 +12,7 @@
#include <linux/sizes.h>
#include <asm/arch/sysmap-apq8016.h>
-#define CONFIG_IDENT_STRING "\nQualcomm-DragonBoard 410C"
+#define CONFIG_IDENT_STRING " Arch Linux ARM"
#define CONFIG_MISC_INIT_R /* To stop autoboot */
--
2.9.0

View file

@ -0,0 +1,53 @@
# U-Boot: Dragonboard 410c
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
buildarch=8
pkgname=uboot-dragonboard
pkgver=2016.09
pkgrel=1
pkgdesc="U-Boot for Dragonboard 410c"
arch=('aarch64')
url='http://www.denx.de/wiki/U-Boot/WebHome'
license=('GPL')
install=$pkgname.install
backup=('boot/boot.txt' 'boot/boot.scr')
makedepends=('bc' 'dtc' 'git' 'skales')
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
'0001-arch-linux-arm-modifications.patch'
'boot.txt'
'mkscr')
md5sums=('2e69dda70eb28f8042d2f9fbeb1feaa1'
'17601b63768a2c98a04fe20fdcb820c6'
'fd933e5a372406ab0a9606e2dd696ab9'
'021623a04afd29ac3f368977140cfbfd')
prepare() {
cd u-boot-${pkgver/rc/-rc}
git apply ../0001-arch-linux-arm-modifications.patch
}
build() {
cd u-boot-${pkgver/rc/-rc}
unset CFLAGS CXXFLAGS CPPFLAGS
make distclean
make dragonboard410c_config
make EXTRAVERSION=-${pkgrel}
}
package() {
cd u-boot-${pkgver/rc/-rc}
mkdir -p "${pkgdir}"/boot
touch rd
dtbTool -o dt.img arch/arm/dts
mkbootimg --kernel=u-boot-dtb.bin --output=u-boot.img --dt=dt.img --pagesize 2048 --base 0x80000000 --ramdisk=rd --cmdline=""
cp u-boot.img ${pkgdir}/boot
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}"/boot/boot.scr
cp ../{boot.txt,mkscr} "${pkgdir}"/boot
}

View file

@ -0,0 +1,15 @@
# After modifying, run ./mkscr
test -n "${distro_bootpart}" || setenv distro_bootpart 1
part uuid ${devtype} ${devnum}:${distro_bootpart} uuid
setenv bootargs "console=tty1 console=ttyMSM0,115200n8 root=PARTUUID=${uuid} rw rootwait"
if load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} /boot/Image; then
if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtbs/qcom/${fdtfile}; then
if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
booti ${loadaddr} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
else
booti ${loadaddr} - ${fdt_addr_r};
fi;
fi;
fi

9
alarm/uboot-dragonboard/mkscr Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
if [[ ! -x /usr/bin/mkimage ]]; then
echo "mkimage not found. Please install uboot-tools:"
echo " pacman -S uboot-tools"
exit 1
fi
mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d boot.txt boot.scr

View file

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