[U-Boot] [PATCH v3 11/14] board: add SDHCI support for PIC32MZDASK board.
Purna Chandra Mandal
purna.mandal at microchip.com
Thu Jan 14 09:31:57 CET 2016
On 01/13/2016 08:26 PM, Tom Rini wrote:
> 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 :)
agreed. Will add in separate commit and using config_distro_default(/bootcmd).h.
More information about the U-Boot
mailing list