Skip to content

Instantly share code, notes, and snippets.

@RobertCNelson
Created May 4, 2013 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertCNelson/5517500 to your computer and use it in GitHub Desktop.
Save RobertCNelson/5517500 to your computer and use it in GitHub Desktop.
From dab9bd5501ce644e33f72648e584f362fedf59dd Mon Sep 17 00:00:00 2001
From: Robert Nelson <robertcnelson@gmail.com>
Date: Sat, 4 May 2013 08:19:14 -0500
Subject: [PATCH 14/14] beaglebone: rework CONFIG_BOOTCOMMAND to only boot
from valid uEnv.txt via uenvcmd, using UUID for eMMC
pretty much required..
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
include/configs/am335x_evm.h | 39 ++++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 04eaa8b..e37c983 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -154,31 +154,36 @@
"gpio set 53; " \
"i2c mw 0x24 1 0x3e; " \
"run findfdt; " \
- "mmc dev 0; if mmc rescan ; then " \
- "echo micro SD card found;" \
- "setenv mmcdev 0;"\
- "else " \
- "echo No micro SD card found, setting mmcdev to 1;" \
- "setenv mmcdev 1;"\
- "fi;" \
"setenv bootpart ${mmcdev}:2;" \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
+ "mmc dev 0; if mmc rescan ; then " \
"gpio set 54; " \
- "echo SD/MMC found on device ${mmcdev};" \
+ "setenv mmcdev 0; " \
+ "echo SD/MMC found on device ${mmcdev}; " \
"if run loadbootenv; then " \
"echo Loaded environment from ${bootenv};" \
- "run importbootenv;" \
- "fi;" \
+ "run importbootenv; " \
+ "fi; " \
+ "gpio set 55; " \
"if test -n $uenvcmd; then " \
- "echo Running uenvcmd ...;" \
+ "gpio set 56; " \
+ "echo Running uenvcmd ...; " \
"run uenvcmd;" \
- "fi;" \
+ "fi; " \
+ "fi;" \
+ "mmc dev 1; if mmc rescan ; then " \
+ "gpio set 54; " \
+ "setenv mmcdev 1; " \
+ "echo SD/MMC found on device ${mmcdev}; " \
+ "if run loadbootenv; then " \
+ "echo Loaded environment from ${bootenv};" \
+ "run importbootenv; " \
+ "fi; " \
"gpio set 55; " \
- "if run loaduimage; then " \
+ "if test -n $uenvcmd; then " \
"gpio set 56; " \
- "run loadfdt;" \
- "run mmcboot;" \
- "fi;" \
+ "echo Running uenvcmd ...; " \
+ "run uenvcmd;" \
+ "fi; " \
"fi;" \
/* Clock Defines */
--
1.7.10.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment