* [U-Boot] [PATCH] omap3_beagle: use config_distro_bootcmd
@ 2016-10-25 16:50 Guillaume GARDET
2016-10-27 22:49 ` Tom Rini
2016-11-22 2:45 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Guillaume GARDET @ 2016-10-25 16:50 UTC (permalink / raw)
To: u-boot
Add support for distro_bootcmd on MMC and fall back to prior
behavior if distro_bootcmd fails.
Tested on Beagleboad xM to boot GRUB2 (and then Linux kernel) in EFI mode
from MMC.
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@konsulko.com>
---
include/configs/omap3_beagle.h | 76 ++++++++++++++++++++++++------------------
1 file changed, 43 insertions(+), 33 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 8a69a5f..9850aa6 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -104,11 +104,52 @@
#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND */
/* devices */
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0)
+
+#define CONFIG_BOOTCOMMAND \
+ "run findfdt; " \
+ "run distro_bootcmd; " \
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
+ "if run userbutton; then " \
+ "setenv bootenv uEnv.txt;" \
+ "else " \
+ "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 " \
+ "echo Running uenvcmd ...;" \
+ "run uenvcmd;" \
+ "fi;" \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loadimage; then " \
+ "run mmcboot;" \
+ "fi;" \
+ "fi; " \
+ "fi;" \
+ "run nandboot;" \
+ "setenv bootfile zImage;" \
+ "if run loadimage; then " \
+ "run loadfdt;" \
+ "run mmcbootz; " \
+ "fi; " \
+
+#include <config_distro_bootcmd.h>
+
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x80200000\0" \
+ "kernel_addr_r=0x80200000\0" \
"rdaddr=0x81000000\0" \
+ "initrd_addr_r=0x81000000\0" \
"fdt_high=0xffffffff\0" \
"fdtaddr=0x80f80000\0" \
+ "fdt_addr_r=0x80f80000\0" \
"usbtty=cdc_acm\0" \
"bootfile=uImage\0" \
"ramdisk=ramdisk.gz\0" \
@@ -203,39 +244,8 @@
"userbutton=if gpio input 173; then run userbutton_xm; " \
"else run userbutton_nonxm; fi;\0" \
"userbutton_xm=gpio input 4;\0" \
- "userbutton_nonxm=gpio input 7;\0"
-/* "run userbutton" will return 1 (false) if pressed and 0 (true) if not */
-#define CONFIG_BOOTCOMMAND \
- "run findfdt; " \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run userbutton; then " \
- "setenv bootenv uEnv.txt;" \
- "else " \
- "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 " \
- "echo Running uenvcmd ...;" \
- "run uenvcmd;" \
- "fi;" \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadimage; then " \
- "run mmcboot;" \
- "fi;" \
- "fi; " \
- "fi;" \
- "run nandboot;" \
- "setenv bootfile zImage;" \
- "if run loadimage; then " \
- "run loadfdt;" \
- "run mmcbootz; " \
- "fi; " \
+ "userbutton_nonxm=gpio input 7;\0" \
+ BOOTENV
/*
* OMAP3 has 12 GP timers, they can be driven by the system clock
--
1.8.4.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] omap3_beagle: use config_distro_bootcmd
2016-10-25 16:50 [U-Boot] [PATCH] omap3_beagle: use config_distro_bootcmd Guillaume GARDET
@ 2016-10-27 22:49 ` Tom Rini
2016-11-22 2:45 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-10-27 22:49 UTC (permalink / raw)
To: u-boot
On Tue, Oct 25, 2016 at 06:50:32PM +0200, Guillaume GARDET wrote:
> Add support for distro_bootcmd on MMC and fall back to prior
> behavior if distro_bootcmd fails.
>
> Tested on Beagleboad xM to boot GRUB2 (and then Linux kernel) in EFI mode
> from MMC.
>
> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
> Cc: Tom Rini <trini@konsulko.com>
>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161027/d04cb4d2/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] omap3_beagle: use config_distro_bootcmd
2016-10-25 16:50 [U-Boot] [PATCH] omap3_beagle: use config_distro_bootcmd Guillaume GARDET
2016-10-27 22:49 ` Tom Rini
@ 2016-11-22 2:45 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2016-11-22 2:45 UTC (permalink / raw)
To: u-boot
On Tue, Oct 25, 2016 at 06:50:32PM +0200, Guillaume GARDET wrote:
> Add support for distro_bootcmd on MMC and fall back to prior
> behavior if distro_bootcmd fails.
>
> Tested on Beagleboad xM to boot GRUB2 (and then Linux kernel) in EFI mode
> from MMC.
>
> Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161121/10613ba9/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-22 2:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-25 16:50 [U-Boot] [PATCH] omap3_beagle: use config_distro_bootcmd Guillaume GARDET
2016-10-27 22:49 ` Tom Rini
2016-11-22 2:45 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox