summaryrefslogtreecommitdiff
path: root/libre/uboot4extlinux-imx/PKGBUILD
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-01-09 15:37:28 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-02-08 07:10:24 +0100
commitfc18dd0bbb82847bbe07215951b998480c11dc42 (patch)
tree3d8c170edf2ef68fdf7a77d70908e491d5ced1e4 /libre/uboot4extlinux-imx/PKGBUILD
parent1aeaba24439c3059aa57ce80d4ed9e7cd22355c9 (diff)
downloadabslibre-fc18dd0bbb82847bbe07215951b998480c11dc42.tar.gz
abslibre-fc18dd0bbb82847bbe07215951b998480c11dc42.tar.bz2
abslibre-fc18dd0bbb82847bbe07215951b998480c11dc42.zip
libre: u-boot: Add uboot4extlinux-imx
The instructions to flash are based on information from uboot's doc/imx/mkimage/imximage.txt document. As for the USB Armory which uses an I.MX 53, the it also uses the same offset as documented in an u-boot installation guide: https://github.com/inversepath/usbarmory/wiki/Secure-boot-(Mk-I)#user-content-prepare-and-flash-the-signed-u-boot Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/uboot4extlinux-imx/PKGBUILD')
-rw-r--r--libre/uboot4extlinux-imx/PKGBUILD147
1 files changed, 147 insertions, 0 deletions
diff --git a/libre/uboot4extlinux-imx/PKGBUILD b/libre/uboot4extlinux-imx/PKGBUILD
new file mode 100644
index 000000000..b6b7652a7
--- /dev/null
+++ b/libre/uboot4extlinux-imx/PKGBUILD
@@ -0,0 +1,147 @@
+# U-Boot: I.MX
+# Contributor: Isaac David <isacdaavid@at@isacdaavid@dot@info>
+# Contributor: André Silva <emulatorman@hyperbola.info>
+# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
+# Maintainer: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+
+pkgbase=uboot4extlinux-imx
+pkgname=('uboot4extlinux-mx6cuboxi'
+ 'uboot4extlinux-nitrogen6q'
+ 'uboot4extlinux-tbs2910'
+ 'uboot4extlinux-udoo'
+ 'uboot4extlinux-usbarmory'
+ 'uboot4extlinux-wandboard')
+pkgver=2020.01
+pkgrel=1
+arch=('armv7h')
+url="http://git.denx.de/u-boot.git/"
+license=('GPL')
+makedepends=('bc' 'dtc' 'python' 'python2' 'swig')
+backup=(boot/extlinux/extlinux.conf)
+source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
+ 'extlinux.conf'
+ 'tbs2910.h'
+ 'tbs2910_defconfig')
+sha256sums=('aa453c603208b1b27bd03525775a7f79b443adec577fdc6e8f06974025a135f1'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
+
+# TODO
+# boards=('mx6cuboxi'
+# 'nitrogen6q'
+# 'tbs2910'
+# 'udoo'
+# 'usbarmory'
+# 'wandboard')
+boards=('tbs2910')
+
+prepare() {
+ cd u-boot-${pkgver}
+
+ # TODO: send patches upstream
+ # tbs2910.h: needed for generic distro booting
+ # tbs2910_defconfig: needed for generic distro booting
+ # and to fit within the size constraints
+ cp -f ../tbs2910.h include/configs/tbs2910.h
+ cp -f ../tbs2910_defconfig configs/tbs2910_defconfig
+
+ for i in ${boards[@]}; do
+ echo 'CONFIG_DISTRO_DEFAULTS=y' >> configs/${i}_defconfig
+ echo 'CONFIG_SD_BOOT=y' >> configs/${i}_defconfig
+ echo 'CONFIG_SATA_BOOT=y' >> configs/${i}_defconfig
+ done
+}
+
+
+build() {
+ cd u-boot-${pkgver}
+
+ unset CFLAGS CXXFLAGS LDFLAGS
+
+ for i in ${boards[@]}; do
+ mkdir -p ../bin_${i}
+ make distclean
+ make ${i}_defconfig
+ echo 'CONFIG_IDENT_STRING=" Parabola GNU/Linux-libre"' >> .config
+ make EXTRAVERSION=-${pkgrel}
+ mv -f u-boot.imx ../bin_${i}
+ done
+}
+
+package_uboot4extlinux-nitrogen6q() {
+ pkgdesc="U-Boot with Extlinux support for the Boundary Devices i.MX6 Quad Nitrogen6"
+ install=${pkgbase}.install
+ provides=('uboot4extlinux-imx')
+ conflicts=('uboot-nitrogen6q')
+
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_nitrogen6q/u-boot.imx "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+}
+
+package_uboot4extlinux-mx6cuboxi() {
+ pkgdesc="U-Boot with Extlinux support for the SolidRun Cubox-i"
+ install=${pkgbase}.install
+ provides=('uboot4extlinux-imx')
+ conflicts=('uboot-mx6_cubox-i')
+
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_mx6cuboxi/u-boot.imx "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+}
+
+package_uboot4extlinux-tbs2910() {
+ pkgdesc="U-Boot with Extlinux support for the TBS2910 Matrix ARM mini PC"
+ install=${pkgbase}.install
+ provides=('uboot4extlinux-imx')
+
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 bin_tbs2910/u-boot.imx "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+}
+
+package_uboot4extlinux-udoo() {
+ pkgdesc="U-Boot with Extlinux support for the Udoo Board"
+ install=${pkgbase}.install
+ provides=('uboot4extlinux-imx')
+ conflicts=('uboot-udoo')
+
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 udoo/u-boot.imx "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+}
+
+package_uboot4extlinux-usbarmory() {
+ pkgdesc="U-Boot with Extlinux support for the Inverse Path USB armory"
+ install=${pkgbase}.install
+ provides=('uboot4extlinux-imx')
+ conflicts=('uboot-usbarmory')
+
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 usbarmory/u-boot.imx "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+}
+
+package_uboot4extlinux-wandboard() {
+ pkgdesc="U-Boot with Extlinux support for the Wandboard"
+ install=${pkgbase}.install
+ provides=('uboot4extlinux-imx')
+ conflicts=('uboot-wandboard')
+
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+ install -Dm644 wandboard/u-boot.imx "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+}