From f835ea7158025818d69384a7ebd8c3de0f10a9f7 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 21 Jul 2010 07:41:25 -0500 Subject: BeagleBoard: Added userbutton command Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072 Author: Greg Turner Date: Tue May 25 09:19:06 2010 -0500 New u-boot command for status of USER button on BeagleBoard-xM Modified bootcmd to check the staus at boot time and set filename of the boot script. * Moved to a BeagleBoard specific file. * Removed changes to default boot command from adding userbutton command. * Made to handle pre-xM boards. * Flipped polarity of the return value to avoid confusion. Success (0) is when the button is pressed. Failure (1) is when the button is NOT pressed. * Used latest revision getting function. * Used latest macros for board revision. * Added xM-C revision definition (optional, since it was default) * updated default configuration with UserButton functionality * Added a separate bootenv variable to load a user defined .txt file * Added an example, showing how a different environment file can be loaded with the user button pressed Signed-off-by: Jason Kridner Signed-off-by: Koen Kooi Signed-off-by: Joel A Fernandes Cc: Greg Turner Signed-off-by: Sandeep Paulraj --- include/configs/omap3_beagle.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index c67dae2..c879364 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -226,7 +226,8 @@ "omapdss.def_disp=${defaultdisplay} " \ "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \ - "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ + "bootenv=uEnv.txt\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ "env import -t $loadaddr $filesize\0" \ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ @@ -240,8 +241,12 @@ #define CONFIG_BOOTCOMMAND \ "if mmc rescan ${mmcdev}; then " \ + "if userbutton; then " \ + "setenv bootenv user.txt;" \ + "fi;" \ "echo SD/MMC found on device ${mmcdev};" \ "if run loadbootenv; then " \ + "echo Loaded environment from ${bootenv};" \ "run importbootenv;" \ "fi;" \ "if test -n $uenvcmd; then " \ -- cgit v1.1