mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
alarm/uboot-dragonboard to 2017.03-1
This commit is contained in:
parent
e053b6aa8c
commit
bd46cc22f0
5 changed files with 91 additions and 13 deletions
|
@ -0,0 +1,31 @@
|
|||
From 5af344398ccc2c53addf100ddee45a0d115195ea Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Wed, 22 Mar 2017 23:07:06 -0600
|
||||
Subject: [PATCH] arch linux arm modifications
|
||||
|
||||
---
|
||||
arch/arm/dts/dragonboard410c.dts | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
|
||||
index 7746622dda..55deee4887 100644
|
||||
--- a/arch/arm/dts/dragonboard410c.dts
|
||||
+++ b/arch/arm/dts/dragonboard410c.dts
|
||||
@@ -143,6 +143,14 @@
|
||||
gpios = <&pm8916_gpios 1 0>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ wifi {
|
||||
+ compatible = "qcom,wcnss-wlan";
|
||||
+ };
|
||||
+
|
||||
+ bt {
|
||||
+ compatible = "qcom,wcnss-bt";
|
||||
+ };
|
||||
};
|
||||
|
||||
#include "dragonboard410c-uboot.dtsi"
|
||||
--
|
||||
2.12.0
|
||||
|
|
@ -4,21 +4,40 @@
|
|||
buildarch=8
|
||||
|
||||
pkgname=uboot-dragonboard
|
||||
pkgver=2017.01
|
||||
pkgver=2017.03
|
||||
firmver=1.4.0
|
||||
pkgrel=1
|
||||
pkgdesc="U-Boot for Dragonboard 410c"
|
||||
arch=('aarch64')
|
||||
url='http://www.denx.de/wiki/U-Boot/WebHome'
|
||||
license=('GPL')
|
||||
license=('GPL' 'custom')
|
||||
install=$pkgname.install
|
||||
backup=('boot/boot.txt' 'boot/boot.scr')
|
||||
makedepends=('bc' 'dtc' 'git' 'skales')
|
||||
options=('!strip')
|
||||
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver/rc/-rc}.tar.bz2"
|
||||
"https://developer.qualcomm.com/download/db410c/firmware-410c-${firmver}.bin"
|
||||
'https://archlinuxarm.org/builder/src/dragonboard/gpt_both0.bin'
|
||||
'https://archlinuxarm.org/builder/src/dragonboard/emmc_appsboot.mbn'
|
||||
'0001-arch-linux-arm-modifications.patch'
|
||||
'boot.txt'
|
||||
'mkscr')
|
||||
md5sums=('ad2d82d5b4fa548b2b95bbc26c9bad79'
|
||||
'83c37689d37ae2ab7ac5def663d65284'
|
||||
'021623a04afd29ac3f368977140cfbfd')
|
||||
'mkscr'
|
||||
'flashall')
|
||||
md5sums=('52fed6ce16e0c4a50e2cd4defdf9097a'
|
||||
'be80a375473a9308d8b4b47c4d8ff811'
|
||||
'5ffd612a1496e7a497480ff3d3b40776'
|
||||
'9a0a5a3defcc4833cbd00fe24526939e'
|
||||
'2b5efb7db1444d7f10f19819383db6d1'
|
||||
'2bea1d7a70a5f3043b549d860499866c'
|
||||
'021623a04afd29ac3f368977140cfbfd'
|
||||
'49cdd0178190d4506b8e4ba1613afc2d')
|
||||
|
||||
prepare() {
|
||||
sh firmware-410c-${firmver}.bin --auto-accept
|
||||
|
||||
cd u-boot-${pkgver/rc/-rc}
|
||||
git apply ../0001-arch-linux-arm-modifications.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd u-boot-${pkgver/rc/-rc}
|
||||
|
@ -32,9 +51,10 @@ build() {
|
|||
}
|
||||
|
||||
package() {
|
||||
cd u-boot-${pkgver/rc/-rc}
|
||||
install -Dpt "${pkgdir}/boot" linux-board-support-package-v${firmver%.0}/bootloaders-linux/{{hyp,rpm,tz-psci,sbl1}.mbn,NON-HLOS.bin} gpt_both0.bin emmc_appsboot.mbn
|
||||
install -D -m644 linux-board-support-package-v${firmver%.0}/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.firmware"
|
||||
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
cd u-boot-${pkgver/rc/-rc}
|
||||
|
||||
touch rd
|
||||
dtbTool -o dt.img arch/arm/dts
|
||||
|
|
|
@ -4,8 +4,16 @@ 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 earlycon"
|
||||
|
||||
fdt addr 0x81e00000
|
||||
fdt get value mac_wifi /wifi local-mac-address
|
||||
fdt get value mac_bt /bt local-mac-address
|
||||
|
||||
if load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} /boot/Image; then
|
||||
if load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtbs/qcom/${fdtfile}; then
|
||||
fdt addr ${fdt_addr_r};
|
||||
fdt resize;
|
||||
fdt set /soc/wcnss@a21b000/smd-edge/wcnss/wifi local-mac-address ${mac_wifi};
|
||||
fdt set /soc/wcnss@a21b000/smd-edge/wcnss/bt local-mac-address ${mac_bt};
|
||||
if load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
|
||||
booti ${loadaddr} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
|
||||
else
|
||||
|
|
14
alarm/uboot-dragonboard/flashall
Executable file
14
alarm/uboot-dragonboard/flashall
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
fastboot erase boot
|
||||
fastboot erase rootfs
|
||||
fastboot erase devinfo
|
||||
|
||||
fastboot flash partition gpt_both0.bin
|
||||
fastboot flash hyp hyp.mbn
|
||||
fastboot flash modem NON-HLOS.bin
|
||||
fastboot flash rpm rpm.mbn
|
||||
fastboot flash sbl1 sbl1.mbn
|
||||
fastboot flash tz tz-psci.mbn
|
||||
fastboot flash aboot emmc_appsboot.mbn
|
||||
fastboot flash boot u-boot.img
|
|
@ -1,18 +1,23 @@
|
|||
flash_uboot() {
|
||||
if [[ -e /dev/mmcblk0boot1 ]]; then
|
||||
dev="/dev/mmcblk0p8"
|
||||
dev="/dev/mmcblk0"
|
||||
else
|
||||
dev="/dev/mmcblk1p8"
|
||||
dev="/dev/mmcblk1"
|
||||
fi
|
||||
|
||||
echo "A new U-Boot version needs to be flashed onto ${dev}."
|
||||
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}
|
||||
dd if=/boot/NON-HLOS.bin of=${dev}p1
|
||||
dd if=/boot/sbl1.mbn of=${dev}p2
|
||||
dd if=/boot/rpm.mbn of=${dev}p3
|
||||
dd if=/boot/tz-psci.mbn of=${dev}p4
|
||||
dd if=/boot/hyp.mbn of=${dev}p5
|
||||
dd if=/boot/emmc_appsboot.mbn of=${dev}p7
|
||||
dd if=/boot/u-boot.img of=${dev}p8
|
||||
else
|
||||
echo "You can do this later by running:"
|
||||
echo "# dd if=/boot/u-boot.img of=${dev}"
|
||||
echo "You can do this later by reinstalling the package."
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue