[U-Boot] [PATCH v1 02/14] tpc70: config: Update TPC70 config to support eMMC's boot0 SPL update

Lukasz Majewski lukma at denx.de
Wed Jan 2 09:47:49 UTC 2019


Hi Marek,

> On 1/2/19 12:37 AM, Lukasz Majewski wrote:
> > The TPC70 can boot from eMMC's boot0. This patch allows it to update
> > this HW partition's SPL.
> > 
> > Signed-off-by: Lukasz Majewski <lukma at denx.de>
> > ---
> > 
> >  include/configs/kp_imx6q_tpc.h | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/include/configs/kp_imx6q_tpc.h
> > b/include/configs/kp_imx6q_tpc.h index ee9c56bc21..f26b18442b 100644
> > --- a/include/configs/kp_imx6q_tpc.h
> > +++ b/include/configs/kp_imx6q_tpc.h
> > @@ -49,6 +49,7 @@
> >  #define CONFIG_SYS_FSL_ESDHC_ADDR	0
> >  #define CONFIG_SYS_FSL_USDHC_NUM	2
> >  #define CONFIG_SYS_MMC_ENV_DEV		1 /* 0 = SDHC2, 1 =
> > SDHC4 (eMMC) */ +#define CONFIG_SUPPORT_EMMC_BOOT
> >  
> >  /* UART */
> >  #define CONFIG_MXC_UART
> > @@ -109,6 +110,10 @@
> >  	       "setexpr blkc ${blkc} + 1;" \
> >  	       "mmc write ${loadaddr} 0x2 ${blkc};" \
> >  	    "fi;\0" \
> > +	"upd_SPL_mmc=mmc dev 1; mmc partconf 1 0 1 1; run
> > upd_SPL_sd\0" \  
> 
> If mmc dev 1 fails, this will randomly rewrite or even damage some
> SD/MMC card that was selected before
>. Use && ...

Ok - good point.

> 
> > +	"upd_uboot_mmc=mmc dev 1; mmc partconf 1 0 1 1; run
> > upd_uboot_sd\0" \  
> 
> Deduplicate these repeated commands.

Could you be more specific here? 

Without mmc dev 1 and partconf I cannot access boot0 eMMC area. 
This particular board has the SD as mmc0 (rescue/devel) and eMMC as
mmc1 (and eMMC is a production boot medium).

> 
> > +	"up_mmc=run upd_SPL_mmc; run upd_uboot_mmc\0" \
> > +	"up_sd=run upd_SPL_sd; run upd_uboot_sd\0" \
> >  	"upd_wic=" \
> >  	    "if tftp ${loadaddr} ${wic_file}; then " \
> >  	       "setexpr blkc ${filesize} / 0x200;" \
> >   
> 
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190102/24532dd1/attachment.sig>


More information about the U-Boot mailing list