mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
alarm/uboot-trimslice to 2016.11-1
This commit is contained in:
parent
8c7e971688
commit
77709d1c6d
5 changed files with 94 additions and 27 deletions
|
@ -0,0 +1,21 @@
|
|||
From ceca3809b8504b83ad1ab2c8b5e4331a31f5fa64 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Fri, 2 Dec 2016 21:00:55 -0700
|
||||
Subject: [PATCH] arch linux arm modifications
|
||||
|
||||
---
|
||||
configs/trimslice_defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configs/trimslice_defconfig b/configs/trimslice_defconfig
|
||||
index cc209a9..1e44527 100644
|
||||
--- a/configs/trimslice_defconfig
|
||||
+++ b/configs/trimslice_defconfig
|
||||
@@ -44,3 +44,4 @@ CONFIG_TEGRA20_SFLASH=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_DM_USB=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
+CONFIG_IDENT_STRING=" Arch Linux ARM"
|
||||
--
|
||||
2.10.2
|
||||
|
|
@ -4,19 +4,31 @@
|
|||
buildarch=4
|
||||
|
||||
pkgname=uboot-trimslice
|
||||
pkgver=2014.10
|
||||
pkgver=2016.11
|
||||
pkgrel=1
|
||||
pkgdesc="U-Boot for TrimSlice"
|
||||
arch=('armv7h')
|
||||
url="http://git.denx.de/u-boot.git/"
|
||||
makedepends=('cbootimage' 'git' 'dtc' 'uboot-tools')
|
||||
url='http://www.denx.de/wiki/U-Boot/WebHome'
|
||||
license=('GPL')
|
||||
install=$pkgname.install
|
||||
backup=('boot/boot.txt' 'boot/boot.scr')
|
||||
depends=('mtd-utils')
|
||||
makedepends=('bc' 'dtc' 'git' 'cbootimage')
|
||||
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
|
||||
"git+https://github.com/NVIDIA/cbootimage-configs.git"
|
||||
"boot.txt")
|
||||
md5sums=('3ddcaee2f05b7c464778112ec83664b5'
|
||||
'git+https://github.com/NVIDIA/cbootimage-configs.git'
|
||||
'0001-arch-linux-arm-modifications.patch'
|
||||
'boot.txt'
|
||||
'mkscr')
|
||||
md5sums=('ca1f6e019d08aff8d0ca1beb2e66737d'
|
||||
'SKIP'
|
||||
'e0fb7b530845c0a6bcf9a7147eed1123')
|
||||
'6f1b2989f6c246bc48e7120657d1a2dd'
|
||||
'6a8ce2258f0c23d6e8fe7418e3fd1c24'
|
||||
'021623a04afd29ac3f368977140cfbfd')
|
||||
|
||||
prepare() {
|
||||
cd u-boot-${pkgver}
|
||||
git apply ../0001-arch-linux-arm-modifications.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd u-boot-${pkgver}
|
||||
|
@ -30,12 +42,14 @@ build() {
|
|||
|
||||
package() {
|
||||
mkdir -p "${pkgdir}"/boot
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "TrimSlice" -d boot.txt "${pkgdir}"/boot/boot.scr
|
||||
cp boot.txt "${pkgdir}"/boot
|
||||
|
||||
install -Dm644 boot.txt "${pkgdir}"/boot/boot.txt
|
||||
u-boot-${pkgver}/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
|
||||
|
||||
cd cbootimage-configs/tegra20/compulab/trimslice
|
||||
ln -s ${srcdir}/u-boot-${pkgver}/u-boot-dtb-tegra.bin u-boot.bin
|
||||
./build.sh
|
||||
|
||||
cp trimslice-mmc.img trimslice-spi.img "${pkgdir}"/boot
|
||||
install -m644 trimslice-mmc.img trimslice-spi.img "${pkgdir}"/boot
|
||||
}
|
||||
|
|
|
@ -1,21 +1,16 @@
|
|||
if test "${devtype}" = "mmc"; then
|
||||
if test ${devnum} -eq 1; then
|
||||
setenv root /dev/mmcblk0p1;
|
||||
# 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=ttyS0,115200n8 console=tty1 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/${soc}-${board_name}.dtb; 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
|
||||
if mmc dev 1; then
|
||||
setenv root /dev/mmcblk1p1;
|
||||
mmc dev 0;
|
||||
else
|
||||
setenv root /dev/mmcblk0p1;
|
||||
bootz ${kernel_addr_r} - ${fdt_addr_r};
|
||||
fi;
|
||||
fi;
|
||||
else
|
||||
setenv root /dev/sda1;
|
||||
fi
|
||||
|
||||
setenv bootargs "root=${root} rw rootwait console=tty1 console=ttyS0,115200n8 mem=384M@0M mem=512M@512M nvmem=128M@384M vmalloc=248M video=tegrafb"
|
||||
|
||||
load ${devtype} ${devnum}:${bootpart} ${loadaddr} /boot/zImage
|
||||
load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/tegra20-trimslice.dtb
|
||||
|
||||
bootz ${loadaddr} - ${fdt_addr_r}
|
||||
|
|
9
alarm/uboot-trimslice/mkscr
Executable file
9
alarm/uboot-trimslice/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
|
28
alarm/uboot-trimslice/uboot-trimslice.install
Normal file
28
alarm/uboot-trimslice/uboot-trimslice.install
Normal file
|
@ -0,0 +1,28 @@
|
|||
flash_uboot() {
|
||||
echo "A new U-Boot version needs to be flashed onto /dev/mtd0."
|
||||
echo "Do this now? [y|N]"
|
||||
read -r shouldwe
|
||||
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
||||
if [[ -e /dev/mtd0 ]]; then
|
||||
echo "Erasing flash.."
|
||||
flash_erase -q /dev/mtd0 0 256
|
||||
echo "Writing flash.."
|
||||
nandwrite -q /dev/mtd0 /boot/trimslice-spi.img
|
||||
else
|
||||
echo "SPI flash not found at /dev/mtd0, not flashing"
|
||||
fi
|
||||
else
|
||||
echo "You can do this later by reinstalling this package"
|
||||
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
|
||||
}
|
Loading…
Reference in a new issue