diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | 0001-arch-linux-arm-modifications.patch | 61 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | boot.txt | 8 | ||||
-rw-r--r-- | mkscr | 9 | ||||
-rw-r--r-- | uboot-imx53qsb.install | 22 |
6 files changed, 173 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2bba0684466b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = uboot-imx53qsb + pkgdesc = U-Boot for i.MX53 Quick Start Board + pkgver = 2016.11 + pkgrel = 1 + url = http://git.denx.de/u-boot.git/ + install = uboot-imx53qsb.install + arch = armv7h + license = GPL + makedepends = git + makedepends = bc + backup = boot/boot.txt + backup = boot/boot.scr + source = ftp://ftp.denx.de/pub/u-boot/u-boot-2016.11.tar.bz2 + source = 0001-arch-linux-arm-modifications.patch + source = boot.txt + source = mkscr + md5sums = ca1f6e019d08aff8d0ca1beb2e66737d + md5sums = 2ffa41640a6d26136e8aed88fa4fe832 + md5sums = 23a08cb6a356d5dc7ddaf124ebb5a5d7 + md5sums = 021623a04afd29ac3f368977140cfbfd + +pkgname = uboot-imx53qsb + diff --git a/0001-arch-linux-arm-modifications.patch b/0001-arch-linux-arm-modifications.patch new file mode 100644 index 000000000000..f00b1a26b3d1 --- /dev/null +++ b/0001-arch-linux-arm-modifications.patch @@ -0,0 +1,61 @@ +diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h +index 6cc5d9c..9d8b60a 100644 +--- a/include/configs/mx53loco.h ++++ b/include/configs/mx53loco.h +@@ -16,6 +16,8 @@ + + #include <asm/arch/imx-regs.h> + ++#include <config_distro_defaults.h> ++ + #define CONFIG_CMDLINE_TAG + #define CONFIG_SETUP_MEMORY_TAGS + #define CONFIG_INITRD_TAG +@@ -98,14 +100,15 @@ + "ip_dyn=yes\0" \ + "mmcdev=0\0" \ + "mmcpart=1\0" \ +- "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \ ++ "bootdir=\0" \ ++ "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \ + "mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \ + "loadbootscript=" \ +- "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ ++ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}${script};\0" \ + "bootscript=echo Running bootscript from mmc ...; " \ + "source\0" \ +- "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ +- "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ ++ "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootdir}${image}\0" \ ++ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${bootdir}dtbs/${fdt_file}\0" \ + "mmcboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ +@@ -154,7 +157,16 @@ + "else " \ + "if run loadimage; then " \ + "run mmcboot; " \ +- "else run netboot; " \ ++ "else " \ ++ "setenv bootdir /boot/; " \ ++ "if run loadbootscript; then " \ ++ "run bootscript; " \ ++ "else " \ ++ "if run loadimage; then " \ ++ "run mmcboot; " \ ++ "else run netboot; " \ ++ "fi; " \ ++ "fi; " \ + "fi; " \ + "fi; " \ + "else run netboot; fi" +@@ -201,6 +213,9 @@ + #define CONFIG_ENV_IS_IN_MMC + #define CONFIG_SYS_MMC_ENV_DEV 0 + ++#define CONFIG_CMD_PART ++#define CONFIG_PARTITION_UUIDS ++ + #define CONFIG_CMD_SATA + #ifdef CONFIG_CMD_SATA + #define CONFIG_DWC_AHSATA diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8ad2821c6595 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# U-Boot: Inverse Path i.MX53 Quick Start Board +# Maintainer: Claudio Chimera <claudio.chimera@gmail.com> + +buildarch=4 + +pkgname=uboot-imx53qsb +pkgver=2016.11 +pkgrel=1 +pkgdesc="U-Boot for i.MX53 Quick Start Board" +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-arch-linux-arm-modifications.patch' + 'boot.txt' + 'mkscr') +md5sums=('ca1f6e019d08aff8d0ca1beb2e66737d' + '2ffa41640a6d26136e8aed88fa4fe832' + '23a08cb6a356d5dc7ddaf124ebb5a5d7' + '021623a04afd29ac3f368977140cfbfd') + +prepare() { + cd u-boot-${pkgver} + + git apply ../0001-arch-linux-arm-modifications.patch +} + +build() { + cd u-boot-${pkgver} + + unset CFLAGS CXXFLAGS LDFLAGS + + make distclean + make mx53loco_defconfig + make +} + +package() { + cd u-boot-${pkgver} + + install -d "${pkgdir}"/boot + install -Dm644 u-boot.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 +} diff --git a/boot.txt b/boot.txt new file mode 100644 index 000000000000..e4838bce0aa9 --- /dev/null +++ b/boot.txt @@ -0,0 +1,8 @@ +# After modifying, run ./mkscr + +setenv mmcargs "setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot} video=mxcdi1fb:RGB24,VGA-SXGA vga di1_primary" + +if run loadimage; then + run mmcboot; +else run netboot; +fi diff --git a/mkscr b/mkscr new file mode 100644 index 000000000000..272b6a7a500f --- /dev/null +++ b/mkscr @@ -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 diff --git a/uboot-imx53qsb.install b/uboot-imx53qsb.install new file mode 100644 index 000000000000..98229b1df7cb --- /dev/null +++ b/uboot-imx53qsb.install @@ -0,0 +1,22 @@ +flash_uboot() { + echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0." + echo "Do this now? [y|N]" + read -r shouldwe + if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then + dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync + else + echo "You can do this later by running:" + echo "# dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync" + 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 +} |