summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/uboot-trimslice-linux-libre/PKGBUILD45
-rw-r--r--libre/uboot-trimslice-linux-libre/boot.txt21
2 files changed, 66 insertions, 0 deletions
diff --git a/libre/uboot-trimslice-linux-libre/PKGBUILD b/libre/uboot-trimslice-linux-libre/PKGBUILD
new file mode 100644
index 000000000..18ac04ed0
--- /dev/null
+++ b/libre/uboot-trimslice-linux-libre/PKGBUILD
@@ -0,0 +1,45 @@
+# U-Boot: TrimSlice
+# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+buildarch=4
+
+_pkgname=linux-libre
+pkgname=uboot-trimslice-${_pkgname}
+pkgver=2014.10
+pkgrel=1
+pkgdesc="U-Boot for TrimSlice (built for the linux-libre kernel package)"
+arch=('armv7h')
+url="http://git.denx.de/u-boot.git/"
+makedepends=('cbootimage' 'dtc' 'uboot-tools')
+depends=('linux-libre')
+replaces=('uboot-trimslice')
+license=('GPL')
+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'
+ 'SKIP'
+ '9374fbadb4b4c1298ea050ad4ea79f46')
+
+build() {
+ cd u-boot-${pkgver}
+
+ unset LDFLAGS
+
+ make distclean
+ make trimslice_config
+ make
+}
+
+package() {
+ mkdir -p "${pkgdir}/boot/${pkgname}"
+ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "TrimSlice" -d boot.txt "${pkgdir}/boot/${pkgname}"/boot.scr
+ cp boot.txt "${pkgdir}/boot/${pkgname}"
+
+ 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/${pkgname}"
+}
diff --git a/libre/uboot-trimslice-linux-libre/boot.txt b/libre/uboot-trimslice-linux-libre/boot.txt
new file mode 100644
index 000000000..100d4b6de
--- /dev/null
+++ b/libre/uboot-trimslice-linux-libre/boot.txt
@@ -0,0 +1,21 @@
+if test "${devtype}" = "mmc"; then
+ if test ${devnum} -eq 1; then
+ setenv root /dev/mmcblk0p1;
+ else
+ if mmc dev 1; then
+ setenv root /dev/mmcblk1p1;
+ mmc dev 0;
+ else
+ setenv root /dev/mmcblk0p1;
+ 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/vmlinuz-linux-libre
+load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/dtbs/linux-libre/tegra20-trimslice.dtb
+
+bootz ${loadaddr} - ${fdt_addr_r}