[U-Boot] [PATCH v3 11/14] board: add SDHCI support for PIC32MZDASK board.

Tom Rini trini at konsulko.com
Wed Jan 13 15:56:21 CET 2016


On Tue, Jan 12, 2016 at 03:48:26PM +0530, Purna Chandra Mandal wrote:

> Enable MMC, SDHCI, FAT FS, EXT4 FS support for PIC32MZ[DA] StarterKit.
> Also add custom scripts, rules to boot Linux from microSD card.
> 
> Signed-off-by: Purna Chandra Mandal <purna.mandal at microchip.com>
[snip]
> +#define CONFIG_EXTRA_ENV_SETTINGS				\
> +	"loadaddr="__stringify(CONFIG_SYS_LOAD_ADDR)"\0"	\
> +	"uenvfile=uEnv.txt\0"					\
> +	"uenvaddr="__stringify(CONFIG_SYS_ENV_ADDR)"\0"		\
> +	"scriptfile=boot.scr\0"					\
> +	"ubootfile=u-boot.bin\0"				\
> +	"importbootenv= "					\
> +		"env import -t -r ${uenvaddr} ${filesize};\0"	\
> +								\
> +	"mmcloadenv=fatload mmc 0 ${uenvaddr} ${uenvfile}\0"	\
> +	"mmcloadscr=fatload mmc 0 ${uenvaddr} ${scriptfile}\0"	\
> +	"mmcloadub=fatload mmc 0 ${loadaddr} ${ubootfile}\0"	\
> +								\
> +	"loadbootenv=run mmcloadenv\0"				\
> +	"loadbootscr=run mmcloadscr\0"				\
> +	"bootcmd_root= "					\
> +		"if run loadbootenv; then "			\
> +			"echo Loaded environment ${uenvfile}; "	\
> +			"run importbootenv; "			\
> +		"fi; "						\
> +		"if test -n \"${bootcmd_uenv}\" ; then "	\
> +			"echo Running bootcmd_uenv ...; "	\
> +			"run bootcmd_uenv; "			\
> +		"fi; "						\
> +		"if run loadbootscr; then "			\
> +			"echo Jumping to ${scriptfile}; "	\
> +			"source ${uenvaddr}; "			\
> +		"fi; "						\
> +		"echo Custom environment or script not found. "	\
> +			"Aborting auto booting...; \0"		\
> +	""
> +
> +#define CONFIG_BOOTCOMMAND		"run bootcmd_root"

I would like to see the env above done as a separate commit and then
using config_distro_default / bootcmd :)

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160113/861e8166/attachment.sig>


More information about the U-Boot mailing list