diff --git a/alarm/uboot-pandaboard/0001-arch-linux-arm-modifications.patch b/alarm/uboot-pandaboard/0001-arch-linux-arm-modifications.patch index c427b1f87..f9e9b2b1c 100644 --- a/alarm/uboot-pandaboard/0001-arch-linux-arm-modifications.patch +++ b/alarm/uboot-pandaboard/0001-arch-linux-arm-modifications.patch @@ -1,138 +1,36 @@ -From 5d9ed9693c3696dcd528fafa115d720bcb83b7dd Mon Sep 17 00:00:00 2001 +From 155254c40177888573014c52c256cc530eb210d1 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich -Date: Sat, 22 Nov 2014 22:55:40 -0700 +Date: Wed, 16 Mar 2016 20:06:42 -0600 Subject: [PATCH] arch linux arm modifications -Signed-off-by: Kevin Mihelich --- - include/configs/ti_omap4_common.h | 87 ++++++++++++++++++++++----------------- - 1 file changed, 49 insertions(+), 38 deletions(-) + include/configs/ti_omap4_common.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h -index 08130eb..103cf82 100644 +index 8b6c065..03d9e7a 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h -@@ -46,7 +46,6 @@ - * the timings to use or use pre-determined timings (based on using the - * dynamic method. Default to the static timing infomation. - */ --#define CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS - #ifndef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS - #define CONFIG_SYS_AUTOMATIC_SDRAM_DETECTION - #define CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS -@@ -79,6 +78,9 @@ - #define CONFIG_USB_TTY 1 - #define CONFIG_SYS_CONSOLE_IS_IN_ENV 1 +@@ -12,6 +12,8 @@ + #ifndef __CONFIG_TI_OMAP4_COMMON_H + #define __CONFIG_TI_OMAP4_COMMON_H -+/* Arch Linux ARM extras */ +#define CONFIG_IDENT_STRING " Arch Linux ARM" + /* - * Environment setup + * High Level Configuration Options */ -@@ -89,23 +91,53 @@ - "fdtfile=undefined\0" \ - "bootpart=0:2\0" \ - "bootdir=/boot\0" \ -+ "fdtdir=/boot/dtbs\0" \ - "bootfile=zImage\0" \ -+ "rdfile=initramfs-linux.img\0" \ - "usbtty=cdc_acm\0" \ - "vram=16M\0" \ -- "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \ -- "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ -- "source ${loadaddr}\0" \ -- "loadbootenv=load mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ -- "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \ -- "env import -t ${loadaddr} ${filesize}\0" \ -- "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ -- "loaduimage=load mmc ${mmcdev} ${loadaddr} uImage\0" \ -- "mmcboot=echo Booting from mmc${mmcdev} ...; " \ -- "run args_mmc; " \ -- "bootz ${loadaddr} - ${fdtaddr}\0" \ -- "uimageboot=echo Booting from mmc${mmcdev} ...; " \ -- "run args_mmc; " \ -- "bootm ${loadaddr}\0" \ -+ "optargs=\0" \ -+ "mmcargs=setenv bootargs console=${console} " \ -+ "vram=${vram} " \ -+ "root=${root} " \ -+ "${optargs}\0" \ -+ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ -+ "loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}\0" \ -+ "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \ -+ "mmcboot=usb start;" \ -+ "for devtype in mmc usb; do " \ -+ "setenv devnum 0;" \ -+ "while ${devtype} dev ${devnum}; do " \ -+ "echo ${devtype} found on device ${devnum};" \ -+ "setenv bootpart ${devnum}:1;" \ -+ "part uuid ${devtype} ${bootpart} uuid;" \ -+ "setenv root PARTUUID=${uuid} rw rootwait;" \ -+ "echo Checking for: ${bootdir}/uEnv.txt ...;" \ -+ "if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then " \ -+ "load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt;" \ -+ "env import -t ${loadaddr} ${filesize};" \ -+ "echo Loaded environment from ${bootdir}/uEnv.txt;" \ -+ "echo Checking if uenvcmd is set ...;" \ -+ "if test -n ${uenvcmd}; then " \ -+ "echo Running uenvcmd ...;" \ -+ "run uenvcmd;" \ -+ "fi;" \ -+ "fi;" \ -+ "if run loadimage; then " \ -+ "run mmcargs;" \ -+ "if run loadfdt; then " \ -+ "if run loadrd; then " \ -+ "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr};" \ -+ "else " \ -+ "bootz ${loadaddr} - ${fdtaddr};" \ -+ "fi;" \ -+ "fi;" \ -+ "else " \ -+ "echo No kernel found;" \ -+ "fi;" \ -+ "setexpr devnum ${devnum} + 1;" \ -+ "done;" \ -+ "done;\0" \ - "findfdt="\ - "if test $board_name = sdp4430; then " \ - "setenv fdtfile omap4-sdp.dtb; fi; " \ -@@ -118,32 +150,11 @@ - "if test $board_name = duovero; then " \ - "setenv fdtfile omap4-duovero-parlor.dtb; fi;" \ - "if test $fdtfile = undefined; then " \ -- "echo WARNING: Could not determine device tree to use; fi; \0" \ -- "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ -+ "echo WARNING: Could not determine device tree to use; fi; \0" +@@ -96,9 +98,8 @@ - #define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ -- "mmc dev ${mmcdev}; if mmc rescan; then " \ -- "echo SD/MMC found on device ${mmcdev};" \ -- "if run loadbootscript; then " \ -- "run bootscript; " \ -- "else " \ -- "if run loadbootenv; then " \ -- "run importbootenv; " \ -- "fi;" \ -- "if test -n ${uenvcmd}; then " \ -- "echo Running uenvcmd ...;" \ -- "run uenvcmd;" \ -- "fi;" \ -- "fi;" \ -- "if run loadimage; then " \ -- "run loadfdt;" \ -- "run mmcboot; " \ -- "fi; " \ -- "if run loaduimage; then " \ -- "run uimageboot;" \ -- "fi; " \ -- "fi" -+ "run mmcboot" + #define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ +- func(LEGACY_MMC, legacy_mmc, 0) \ + func(MMC, mmc, 1) \ +- func(LEGACY_MMC, legacy_mmc, 1) \ ++ func(USB, usb, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) - /* - * Defines for SPL -- -2.6.4 +2.7.3 diff --git a/alarm/uboot-pandaboard/PKGBUILD b/alarm/uboot-pandaboard/PKGBUILD index 57788677a..843214c62 100644 --- a/alarm/uboot-pandaboard/PKGBUILD +++ b/alarm/uboot-pandaboard/PKGBUILD @@ -4,21 +4,23 @@ buildarch=4 pkgname=uboot-pandaboard -pkgver=2016.01 +pkgver=2016.03 pkgrel=1 pkgdesc="U-Boot for Pandaboard and Pandaboard ES" arch=('armv7h') url="http://git.denx.de/u-boot.git/" -makedepends=('git' 'bc') +makedepends=('bc' 'dtc' 'git') license=('GPL') install=${pkgname}.install -backup=('boot/uEnv.txt') +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' - 'uEnv.txt') -md5sums=('7d4f65fd43d4d706f5c5650e020d899d' - '12c54a3f6b540658f9854ac38878d34f' - '86004660f2912861a040e335c9c0e85b') + 'boot.txt' + 'mkscr') +md5sums=('973c1d896be751321cc3aafa564f64b2' + '87c8adf701979f8bbb85360856bd9b23' + '4908cf55626f1109276f14111b11117d' + '021623a04afd29ac3f368977140cfbfd') prepare() { cd u-boot-${pkgver} @@ -33,12 +35,15 @@ build() { make distclean make omap4_panda_config - make + make EXTRAVERSION=-${pkgrel} } package() { cd u-boot-${pkgver} mkdir -p "${pkgdir}"/boot - cp MLO u-boot.img "${srcdir}"/uEnv.txt "${pkgdir}"/boot + cp MLO u-boot.img "${pkgdir}"/boot + + tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}"/boot/boot.scr + cp ../{boot.txt,mkscr} "${pkgdir}"/boot } diff --git a/alarm/uboot-pandaboard/boot.txt b/alarm/uboot-pandaboard/boot.txt new file mode 100644 index 000000000..41f821d02 --- /dev/null +++ b/alarm/uboot-pandaboard/boot.txt @@ -0,0 +1,16 @@ +# 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=ttyO2,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/${fdtfile}; 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 + bootz ${kernel_addr_r} - ${fdt_addr_r}; + fi; + fi; +fi diff --git a/alarm/uboot-pandaboard/mkscr b/alarm/uboot-pandaboard/mkscr new file mode 100755 index 000000000..272b6a7a5 --- /dev/null +++ b/alarm/uboot-pandaboard/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/alarm/uboot-pandaboard/uEnv.txt b/alarm/uboot-pandaboard/uEnv.txt deleted file mode 100644 index 55298e1a9..000000000 --- a/alarm/uboot-pandaboard/uEnv.txt +++ /dev/null @@ -1,2 +0,0 @@ -# Uncomment and add any additional kernel parameters to optargs -#optargs= diff --git a/alarm/uboot-pandaboard/uboot-pandaboard.install b/alarm/uboot-pandaboard/uboot-pandaboard.install index a394ae827..02e802900 100644 --- a/alarm/uboot-pandaboard/uboot-pandaboard.install +++ b/alarm/uboot-pandaboard/uboot-pandaboard.install @@ -18,4 +18,8 @@ post_install() { post_upgrade() { flash_uboot + if (( $(vercmp $2 2016.03-1) < 0 )); then + echo ' >>> Note: uEnv.txt is no longer sourced. Make any customizations within /boot/boot.txt' + echo ' and run ./mkscr within /boot to convert it to the boot.scr file.' + fi }