summaryrefslogtreecommitdiff
path: root/libre/uboot4extlinux-am335x
diff options
context:
space:
mode:
Diffstat (limited to 'libre/uboot4extlinux-am335x')
-rw-r--r--libre/uboot4extlinux-am335x/PKGBUILD56
-rw-r--r--libre/uboot4extlinux-am335x/extlinux.conf43
-rw-r--r--libre/uboot4extlinux-am335x/uEnv.txt1
-rw-r--r--libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install37
4 files changed, 137 insertions, 0 deletions
diff --git a/libre/uboot4extlinux-am335x/PKGBUILD b/libre/uboot4extlinux-am335x/PKGBUILD
new file mode 100644
index 000000000..f48ac4cc5
--- /dev/null
+++ b/libre/uboot4extlinux-am335x/PKGBUILD
@@ -0,0 +1,56 @@
+# U-Boot: BeagleBone and BeagleBone Black
+# Maintainer: André Silva <emulatorman@hyperbola.info>
+# Contributor: Jookia <166291@gmail.com>
+# Contributor: Márcio Silva <coadde@hyperbola.info>
+
+pkgbase=uboot4extlinux-am335x
+pkgname=('uboot4extlinux-am335x_bone')
+pkgver=2019.01
+pkgrel=1
+arch=('armv7h')
+url="http://git.denx.de/u-boot.git/"
+license=('GPL')
+makedepends=('bc' 'bison' 'dtc' 'flex' 'python' 'python2' 'swig')
+backup=(boot/extlinux/extlinux.conf)
+source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
+ 'uEnv.txt'
+ 'extlinux.conf')
+sha256sums=('50bd7e5a466ab828914d080d5f6a432345b500e8fba1ad3b7b61e95e60d51c22'
+ '4ef3c3177e4476cdb1790dd021d2383ef9913c029d005ffbeb61b958e753672e'
+ '9696e3836da7cfd1920fd23891111e1ba4f160a6322db6b768b9267c4e628fa9')
+
+boards=('am335x_evm')
+
+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 MLO u-boot.img ../bin_${i}
+ done
+}
+
+package_uboot4extlinux-am335x_bone() {
+ pkgdesc="U-Boot with Extlinux support for various BeagleBones"
+
+ install=${pkgbase}.install
+ provides=('uboot4extlinux-am335x')
+ conflicts=('uboot-am335x_bone' 'uboot4grub-am335x_bone')
+
+ install -d "${pkgdir}"/boot/extlinux
+ install -d "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 \
+ bin_am335x_evm/MLO \
+ bin_am335x_evm/u-boot.img \
+ "${srcdir}"/uEnv.txt \
+ "${pkgdir}"/boot/u-boot/images/
+
+ install -Dm644 extlinux.conf "${pkgdir}"/boot/extlinux
+}
diff --git a/libre/uboot4extlinux-am335x/extlinux.conf b/libre/uboot4extlinux-am335x/extlinux.conf
new file mode 100644
index 000000000..87891721b
--- /dev/null
+++ b/libre/uboot4extlinux-am335x/extlinux.conf
@@ -0,0 +1,43 @@
+menu title Welcome to U-Boot with Extlinux support!
+
+timeout 50
+
+label Parabola GNU/Linux-libre, linux-libre kernel
+ kernel /boot/vmlinuz-linux-libre
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre
+
+label Parabola GNU/Linux-libre, linux-libre-lts kernel
+ kernel /boot/vmlinuz-linux-libre-lts
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre-lts
+
+label Parabola GNU/Linux-libre, linux-libre-lts-knock kernel
+ kernel /boot/vmlinuz-linux-libre-lts-knock
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre-lts-knock
+
+label Parabola GNU/Linux-libre, linux-libre-hardened kernel
+ kernel /boot/vmlinuz-linux-libre-hardened
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre-hardened
+
+label Parabola GNU/Linux-libre, linux-libre-lts-apparmor kernel
+ kernel /boot/vmlinuz-linux-libre-lts-apparmor
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre-lts-apparmor
+
+label Parabola GNU/Linux-libre, linux-libre-pck kernel
+ kernel /boot/vmlinuz-linux-libre-pck
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre-pck
+
+label Parabola GNU/Linux-libre, linux-libre-rt kernel
+ kernel /boot/vmlinuz-linux-libre-rt
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre-rt
+
+label Parabola GNU/Linux-libre, linux-libre-xtreme kernel
+ kernel /boot/vmlinuz-linux-libre-xtreme
+ append root=/dev/mmcblk0p1 rw console=ttyO0,115200
+ fdtdir /boot/dtbs/linux-libre-xtreme
diff --git a/libre/uboot4extlinux-am335x/uEnv.txt b/libre/uboot4extlinux-am335x/uEnv.txt
new file mode 100644
index 000000000..f432efc6b
--- /dev/null
+++ b/libre/uboot4extlinux-am335x/uEnv.txt
@@ -0,0 +1 @@
+optargs=coherent_pool=1M
diff --git a/libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install b/libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install
new file mode 100644
index 000000000..53ab65fba
--- /dev/null
+++ b/libre/uboot4extlinux-am335x/uboot4extlinux-am335x.install
@@ -0,0 +1,37 @@
+flash_instructions() {
+ echo "# dd if=/boot/u-boot/images/MLO of=/dev/mmcblk0 count=1 seek=1 conv=notrunc bs=128k"
+ echo "# dd if=/boot/u-boot/images/u-boot.img of=/dev/mmcblk0 count=2 seek=1 conv=notrunc bs=384k"
+}
+
+extlinux_warning() {
+ echo "==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf"
+}
+
+flash_uboot() {
+ root=$(mount | awk '/ on \/ / { print $1; }')
+ if [[ $root =~ ^/dev/mmcblk.*$ ]]; then
+ root=${root:0:12}
+ echo "A new U-Boot version needs to be flashed onto $root."
+ 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/images/MLO of=$root bs=128k seek=1 count=1 conv=notrunc
+ dd if=/boot/u-boot/images/u-boot.img of=$root bs=384k seek=1 count=2 conv=notrunc
+ else
+ echo "You can do this later by running:"
+ flash_instructions
+ fi
+ else
+ echo "Flash the new U-Boot version onto your boot device. For example:"
+ flash_instructions
+ fi
+ extlinux_warning
+}
+
+post_install() {
+ flash_uboot
+}
+
+post_upgrade() {
+ flash_uboot
+}