From mboxrd@z Thu Jan 1 00:00:00 1970 From: Purna Chandra Mandal Date: Thu, 14 Jan 2016 14:01:57 +0530 Subject: [U-Boot] [PATCH v3 11/14] board: add SDHCI support for PIC32MZDASK board. In-Reply-To: <20160113145621.GK3359@bill-the-cat> References: <1452593909-16184-1-git-send-email-purna.mandal@microchip.com> <1452593909-16184-12-git-send-email-purna.mandal@microchip.com> <20160113145621.GK3359@bill-the-cat> Message-ID: <56975CFD.4080509@microchip.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > [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.