summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-16 14:23:03 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-16 14:25:37 -0300
commit9ba3bb89f520d9ccd68b66a5d25d4155927abced (patch)
treec2bfdfe5b97521c9d6a773b4f3499322a2f02ebe
parentb20fbd6077b4fa33db5eef7753114e2d571ba035 (diff)
uboot4grub-am335x_bone-2015.04-2: add uEnv.txt and update 0001-parabola-arm-modifications+grub-support.patch
-rw-r--r--libre-testing/uboot4grub-am335x_bone/0001-parabola-arm-modifications+grub-support.patch63
-rw-r--r--libre-testing/uboot4grub-am335x_bone/PKGBUILD10
-rw-r--r--libre-testing/uboot4grub-am335x_bone/uEnv.txt1
3 files changed, 57 insertions, 17 deletions
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
diff --git a/libre-testing/uboot4grub-am335x_bone/PKGBUILD b/libre-testing/uboot4grub-am335x_bone/PKGBUILD
index 22d7768f0..8a2fc285c 100644
--- a/libre-testing/uboot4grub-am335x_bone/PKGBUILD
+++ b/libre-testing/uboot4grub-am335x_bone/PKGBUILD
@@ -5,7 +5,7 @@ buildarch=4
pkgname=uboot4grub-am335x_bone
pkgver=2015.04
-pkgrel=1
+pkgrel=2
pkgdesc="U-Boot with GRUB support for BeagleBone and BeagleBone Black"
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
@@ -25,9 +25,11 @@ makedepends=('bc')
license=('GPL')
install=${pkgname}.install
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
- '0001-parabola-arm-modifications+grub-support.patch')
+ '0001-parabola-arm-modifications+grub-support.patch'
+ 'uEnv.txt')
md5sums=('570bdc2c47270c2a98ca60ff6c5c74cd'
- 'd8c8e9fea003cd06ef04fe1cd841d686')
+ '18ac73c5db8c38355f4b6ecaacb22163'
+ 'ccb79775b81654e16fca18825c7f2506')
prepare() {
cd u-boot-${pkgver}
@@ -47,5 +49,5 @@ build() {
package() {
cd u-boot-${pkgver}
mkdir -p "${pkgdir}"/boot
- cp MLO u-boot.img "${pkgdir}"/boot
+ cp MLO u-boot.img "${srcdir}"/uEnv.txt "${pkgdir}"/boot
}
diff --git a/libre-testing/uboot4grub-am335x_bone/uEnv.txt b/libre-testing/uboot4grub-am335x_bone/uEnv.txt
new file mode 100644
index 000000000..f432efc6b
--- /dev/null
+++ b/libre-testing/uboot4grub-am335x_bone/uEnv.txt
@@ -0,0 +1 @@
+optargs=coherent_pool=1M