From 9ba3bb89f520d9ccd68b66a5d25d4155927abced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Fri, 16 Oct 2015 14:23:03 -0300 Subject: uboot4grub-am335x_bone-2015.04-2: add uEnv.txt and update 0001-parabola-arm-modifications+grub-support.patch --- ...1-parabola-arm-modifications+grub-support.patch | 63 +++++++++++++++++----- 1 file changed, 50 insertions(+), 13 deletions(-) (limited to 'libre-testing/uboot4grub-am335x_bone/0001-parabola-arm-modifications+grub-support.patch') diff --git a/libre-testing/uboot4grub-am335x_bone/0001-parabola-arm-modifications+grub-support.patch b/libre-testing/uboot4grub-am335x_bone/0001-parabola-arm-modifications+grub-support.patch index 351d31be8..335672fc0 100644 --- a/libre-testing/uboot4grub-am335x_bone/0001-parabola-arm-modifications+grub-support.patch +++ b/libre-testing/uboot4grub-am335x_bone/0001-parabola-arm-modifications+grub-support.patch @@ -12,7 +12,7 @@ diff -Nur u-boot-2015.04.orig/configs/am335x_evm_defconfig u-boot-2015.04/config CONFIG_TARGET_AM335X_EVM=y diff -Nur u-boot-2015.04.orig/include/configs/am335x_evm.h u-boot-2015.04/include/configs/am335x_evm.h --- u-boot-2015.04.orig/include/configs/am335x_evm.h 2015-04-13 11:53:03.000000000 -0300 -+++ u-boot-2015.04/include/configs/am335x_evm.h 2015-10-07 02:51:55.094878459 -0300 ++++ u-boot-2015.04/include/configs/am335x_evm.h 2015-10-16 14:16:56.088111386 -0300 @@ -17,6 +17,7 @@ #define __CONFIG_AM335X_EVM_H @@ -35,7 +35,7 @@ diff -Nur u-boot-2015.04.orig/include/configs/am335x_evm.h u-boot-2015.04/includ #ifdef CONFIG_NAND #define NANDARGS \ -@@ -70,127 +78,21 @@ +@@ -70,127 +78,64 @@ #ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ @@ -45,12 +45,12 @@ diff -Nur u-boot-2015.04.orig/include/configs/am335x_evm.h u-boot-2015.04/includ "bootdir=/boot\0" \ - "bootfile=zImage\0" \ - "fdtfile=undefined\0" \ -- "console=ttyO0,115200n8\0" \ + "grubfile=grub/arm-uboot/core.img\0" \ + "console=ttyO0,115200n8\0" \ "partitions=" \ "uuid_disk=${uuid_gpt_disk};" \ "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \ -- "optargs=\0" \ + "optargs=\0" \ - "mmcdev=0\0" \ - "mmcroot=/dev/mmcblk0p2 ro\0" \ - "mmcrootfstype=ext4 rootwait\0" \ @@ -60,8 +60,11 @@ diff -Nur u-boot-2015.04.orig/include/configs/am335x_evm.h u-boot-2015.04/includ - "::off\0" \ - "ramroot=/dev/ram0 rw\0" \ - "ramrootfstype=ext2\0" \ -- "mmcargs=setenv bootargs console=${console} " \ -- "${optargs} " \ ++ "cape_disable=\0" \ ++ "cape_enable=\0" \ ++ "cmdline=\0" \ + "mmcargs=setenv bootargs console=${console} " \ + "${optargs} " \ - "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ - "spiroot=/dev/mtdblock4 rw\0" \ @@ -115,7 +118,40 @@ diff -Nur u-boot-2015.04.orig/include/configs/am335x_evm.h u-boot-2015.04/includ - "if run loadbootenv; then " \ - "echo Loaded environment from ${bootenv};" \ - "run importbootenv;" \ -- "fi;" \ ++ "${cape_disable} " \ ++ "${cape_enable} " \ ++ "root=${root} " \ ++ "${cmdline}\0" \ ++ "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${grubfile}\0" \ ++ "mmcboot=usb start;" \ ++ "for devtype in mmc usb; do " \ ++ "for devnum in 0 1; do " \ ++ "if ${devtype} dev ${devnum}; then " \ ++ "echo ${devtype} found on device ${devnum};" \ ++ "setenv bootpart ${devnum}:1;" \ ++ "part uuid ${devtype} ${bootpart} uuid;" \ ++ "setenv root PARTUUID=${uuid} rw rootwait fixrtc;" \ ++ "echo Checking for: ${bootdir}/uEnv.txt ...;" \ ++ "gpio set 54;" \ ++ "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;" \ ++ "gpio set 55;" \ ++ "if run loadimage; then " \ ++ "run mmcargs;" \ ++ "else " \ ++ "echo No GRUB found;" \ ++ "fi;" \ ++ "gpio clear 54; gpio clear 55;" \ ++ "setexpr devnum ${devnum} + 1;" \ + "fi;" \ - "if test -n $uenvcmd; then " \ - "echo Running uenvcmd ...;" \ - "run uenvcmd;" \ @@ -151,9 +187,8 @@ diff -Nur u-boot-2015.04.orig/include/configs/am335x_evm.h u-boot-2015.04/includ - "setenv fdtfile am335x-evmsk.dtb; fi; " \ - "if test $fdtfile = undefined; then " \ - "echo WARNING: Could not determine device tree to use; fi; \0" \ -+ "grubboot=for devtype in mmc usb; do " \ -+ "load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${grubfile}" \ -+ "done;\0" \ ++ "done;" \ ++ "done;\0" \ NANDARGS \ DFUARGS #endif @@ -163,13 +198,15 @@ diff -Nur u-boot-2015.04.orig/include/configs/am335x_evm.h u-boot-2015.04/includ - "run mmcboot;" \ - "setenv mmcdev 1; " \ - "setenv bootpart 1:2; " \ -- "run mmcboot;" \ ++ "gpio set 53;" \ + "run mmcboot;" \ - "run nandboot;" -+ "run grubboot;" ++ "gpio clear 54; gpio clear 55;" \ ++ "gpio set 56" /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ -@@ -329,9 +231,8 @@ +@@ -329,9 +274,8 @@ #endif #ifdef CONFIG_MUSB_GADGET -- cgit v1.2.2