mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added alarm/uboot-usbarmory-mkii
This commit is contained in:
parent
4b19f20b2e
commit
1daeb6b56c
6 changed files with 1355 additions and 0 deletions
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,23 @@
|
|||
From 76f9f8142a854b061c118c295a2b22e5ae4e51d1 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 11 Aug 2019 16:18:19 -0600
|
||||
Subject: [PATCH 2/2] arch linux arm modifications
|
||||
|
||||
---
|
||||
configs/usbarmory-mark-two_defconfig | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/configs/usbarmory-mark-two_defconfig b/configs/usbarmory-mark-two_defconfig
|
||||
index 40981a66da..31f51aca58 100644
|
||||
--- a/configs/usbarmory-mark-two_defconfig
|
||||
+++ b/configs/usbarmory-mark-two_defconfig
|
||||
@@ -62,3 +62,6 @@ CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
# Ethernet gadget
|
||||
CONFIG_USB_ETHER=y
|
||||
CONFIG_USB_ETH_CDC=y
|
||||
+
|
||||
+# Arch Linux ARM
|
||||
+CONFIG_IMAGE_FORMAT_LEGACY=y
|
||||
--
|
||||
2.22.0
|
||||
|
54
alarm/uboot-usbarmory-mkii/PKGBUILD
Normal file
54
alarm/uboot-usbarmory-mkii/PKGBUILD
Normal file
|
@ -0,0 +1,54 @@
|
|||
# U-Boot: USB Armory MkII
|
||||
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
|
||||
buildarch=4
|
||||
|
||||
pkgname=uboot-usbarmory-mkii
|
||||
pkgver=2019.07
|
||||
pkgrel=1
|
||||
pkgdesc="U-Boot for USB Armory MkII"
|
||||
arch=('armv7h')
|
||||
url="http://git.denx.de/u-boot.git/"
|
||||
license=('GPL')
|
||||
makedepends=('git' 'bc')
|
||||
install=${pkgname}.install
|
||||
backup=('boot/boot.txt' 'boot/boot.scr')
|
||||
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
|
||||
'0001-ARM-mx6-add-support-for-USB-armory-Mk-II-board.patch'
|
||||
'0002-arch-linux-arm-modifications.patch'
|
||||
'boot.txt'
|
||||
'mkscr')
|
||||
md5sums=('73434338536c7500b4302bd0a02921ed'
|
||||
'229b644ebc7109c4ee697ea139b22b61'
|
||||
'8332464f088b427c082ac82143a8012f'
|
||||
'9f0f7aa1a7c3ed679ae9d43516155bd8'
|
||||
'021623a04afd29ac3f368977140cfbfd')
|
||||
|
||||
prepare() {
|
||||
cd u-boot-${pkgver}
|
||||
|
||||
patch -p1 -i ../0001-ARM-mx6-add-support-for-USB-armory-Mk-II-board.patch
|
||||
patch -p1 -i ../0002-arch-linux-arm-modifications.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd u-boot-${pkgver}
|
||||
|
||||
unset CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
make distclean
|
||||
make usbarmory-mark-two_defconfig
|
||||
echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
|
||||
make EXTRAVERSION=-${pkgrel}
|
||||
}
|
||||
|
||||
package() {
|
||||
cd u-boot-${pkgver}
|
||||
|
||||
install -d "${pkgdir}"/boot
|
||||
install -Dm644 u-boot-dtb.imx "${pkgdir}"/boot
|
||||
|
||||
install -Dm644 ../boot.txt "${pkgdir}"/boot/boot.txt
|
||||
tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}"/boot/boot.scr
|
||||
install -Dm755 ../mkscr "${pkgdir}"/boot/mkscr
|
||||
}
|
16
alarm/uboot-usbarmory-mkii/boot.txt
Normal file
16
alarm/uboot-usbarmory-mkii/boot.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
# After modifying, run ./mkscr
|
||||
|
||||
if test -n ${distro_bootpart}; then setenv bootpart ${distro_bootpart}; else setenv bootpart 1; fi
|
||||
part uuid ${devtype} ${devnum}:${bootpart} uuid
|
||||
|
||||
setenv bootargs console=ttymxc1,115200 root=PARTUUID=${uuid} rw rootwait
|
||||
|
||||
if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/zImage; then
|
||||
if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}; then
|
||||
if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then
|
||||
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r};
|
||||
else
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r};
|
||||
fi;
|
||||
fi;
|
||||
fi
|
9
alarm/uboot-usbarmory-mkii/mkscr
Executable file
9
alarm/uboot-usbarmory-mkii/mkscr
Executable 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
|
24
alarm/uboot-usbarmory-mkii/uboot-usbarmory-mkii.install
Normal file
24
alarm/uboot-usbarmory-mkii/uboot-usbarmory-mkii.install
Normal file
|
@ -0,0 +1,24 @@
|
|||
flash_uboot() {
|
||||
major=$(mountpoint -d / | cut -f 1 -d ':')
|
||||
minor=$(expr $(mountpoint -d / | cut -f 2 -d ':') - 1)
|
||||
device=$(cat /proc/partitions | awk {'if ($1 == "'${major}'" && $2 == "'${minor}'") print $4 '})
|
||||
device="/dev/${device}"
|
||||
|
||||
echo "A new U-Boot version needs to be flashed onto ${device}."
|
||||
echo "Do this now? [y|N]"
|
||||
read -r shouldwe
|
||||
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
dd if=/boot/u-boot-dtb.imx of=${device} bs=512 seek=2 conv=fsync
|
||||
else
|
||||
echo "You can do this later by running:"
|
||||
echo "# dd if=/boot/u-boot-dtb.imx of=${device} bs=512 seek=2 conv=fsync"
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
flash_uboot
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
flash_uboot
|
||||
}
|
Loading…
Reference in a new issue