* [U-Boot] [PATCH] socfpga: Enable SDMMC boot for SOCFPGA U-Boot
@ 2014-09-19 10:33 Chin Liang See
2014-09-19 11:06 ` Marek Vasut
0 siblings, 1 reply; 2+ messages in thread
From: Chin Liang See @ 2014-09-19 10:33 UTC (permalink / raw)
To: u-boot
To enable the SDMMC boot as default boot for SOCFPGA
U-Boot dev kit. Enabled the bootz command as
zImage is used instead uImage.
Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Pavel Machek <pavel@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Wolfgang Denk <wd@denx.de>
---
include/configs/socfpga_cyclone5.h | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/include/configs/socfpga_cyclone5.h b/include/configs/socfpga_cyclone5.h
index f9fafac..3d1b78f 100644
--- a/include/configs/socfpga_cyclone5.h
+++ b/include/configs/socfpga_cyclone5.h
@@ -93,6 +93,8 @@
#include <config_cmd_default.h>
/* FAT file system support */
#define CONFIG_CMD_FAT
+/* bootz command support */
+#define CONFIG_CMD_BOOTZ
/*
@@ -117,24 +119,36 @@
#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_CMD_RUN
+#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
#define CONFIG_BOOTCOMMAND "run ramboot"
+#else
+#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"
+#endif
/*
* arguments passed to the bootm command. The value of
* CONFIG_BOOTARGS goes into the environment value "bootargs".
* Do note the value will overide also the chosen node in FDT blob.
*/
-#define CONFIG_BOOTARGS "console=ttyS0,57600,mem=256M at 0x0"
+#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)
#define CONFIG_EXTRA_ENV_SETTINGS \
"verify=n\0" \
"loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
"ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
"bootm ${loadaddr} - ${fdt_addr}\0" \
- "bootimage=uImage\0" \
+ "bootimage=zImage\0" \
"fdt_addr=100\0" \
+ "fdtimage=socfpga.dtb\0" \
"fsloadcmd=ext2load\0" \
- "bootm ${loadaddr} - ${fdt_addr}\0" \
+ "bootm ${loadaddr} - ${fdt_addr}\0" \
+ "mmcroot=/dev/mmcblk0p2\0" \
+ "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
+ " root=${mmcroot} rw rootwait;" \
+ "bootz ${loadaddr} - ${fdt_addr}\0" \
+ "mmcload=mmc rescan;" \
+ "fatload mmc 0:1 ${loadaddr} ${bootimage};" \
+ "fatload mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
"qspiroot=/dev/mtdblock0\0" \
"qspirootfstype=jffs2\0" \
"qspiboot=setenv bootargs " CONFIG_BOOTARGS \
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] socfpga: Enable SDMMC boot for SOCFPGA U-Boot
2014-09-19 10:33 [U-Boot] [PATCH] socfpga: Enable SDMMC boot for SOCFPGA U-Boot Chin Liang See
@ 2014-09-19 11:06 ` Marek Vasut
0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2014-09-19 11:06 UTC (permalink / raw)
To: u-boot
On Friday, September 19, 2014 at 12:33:19 PM, Chin Liang See wrote:
> To enable the SDMMC boot as default boot for SOCFPGA
> U-Boot dev kit. Enabled the bootz command as
> zImage is used instead uImage.
>
> Signed-off-by: Chin Liang See <clsee@altera.com>
> Cc: Dinh Nguyen <dinguyen@altera.com>
> Cc: Pavel Machek <pavel@denx.de>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> Cc: Wolfgang Denk <wd@denx.de>
> ---
> include/configs/socfpga_cyclone5.h | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/include/configs/socfpga_cyclone5.h
> b/include/configs/socfpga_cyclone5.h index f9fafac..3d1b78f 100644
> --- a/include/configs/socfpga_cyclone5.h
> +++ b/include/configs/socfpga_cyclone5.h
> @@ -93,6 +93,8 @@
> #include <config_cmd_default.h>
> /* FAT file system support */
> #define CONFIG_CMD_FAT
> +/* bootz command support */
> +#define CONFIG_CMD_BOOTZ
>
>
> /*
> @@ -117,24 +119,36 @@
> #define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
> #define CONFIG_CMD_RUN
>
> +#ifdef CONFIG_SOCFPGA_VIRTUAL_TARGET
> #define CONFIG_BOOTCOMMAND "run ramboot"
> +#else
> +#define CONFIG_BOOTCOMMAND "run mmcload; run mmcboot"
> +#endif
>
> /*
> * arguments passed to the bootm command. The value of
> * CONFIG_BOOTARGS goes into the environment value "bootargs".
> * Do note the value will overide also the chosen node in FDT blob.
> */
> -#define CONFIG_BOOTARGS "console=ttyS0,57600,mem=256M at 0x0"
> +#define CONFIG_BOOTARGS "console=ttyS0," __stringify(CONFIG_BAUDRATE)
>
> #define CONFIG_EXTRA_ENV_SETTINGS \
> "verify=n\0" \
> "loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
> "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
> "bootm ${loadaddr} - ${fdt_addr}\0" \
> - "bootimage=uImage\0" \
> + "bootimage=zImage\0" \
> "fdt_addr=100\0" \
> + "fdtimage=socfpga.dtb\0" \
> "fsloadcmd=ext2load\0" \
> - "bootm ${loadaddr} - ${fdt_addr}\0" \
> + "bootm ${loadaddr} - ${fdt_addr}\0" \
> + "mmcroot=/dev/mmcblk0p2\0" \
> + "mmcboot=setenv bootargs " CONFIG_BOOTARGS \
> + " root=${mmcroot} rw rootwait;" \
> + "bootz ${loadaddr} - ${fdt_addr}\0" \
> + "mmcload=mmc rescan;" \
> + "fatload mmc 0:1 ${loadaddr} ${bootimage};" \
> + "fatload mmc 0:1 ${fdt_addr} ${fdtimage}\0" \
This doesn't scale, we should start using CONFIG_CMD_FS_GENERIC + the "load"
command. I'll cook a patch for that and submit it alongside V2 of the patches.
> "qspiroot=/dev/mtdblock0\0" \
> "qspirootfstype=jffs2\0" \
> "qspiboot=setenv bootargs " CONFIG_BOOTARGS \
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-19 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-19 10:33 [U-Boot] [PATCH] socfpga: Enable SDMMC boot for SOCFPGA U-Boot Chin Liang See
2014-09-19 11:06 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox