[U-Boot] [PATCH] imx: imx8: fix loading container image from eMMC boot partitions

Peng Fan peng.fan at nxp.com
Tue Oct 22 08:13:31 UTC 2019


Hi Anatolij,

> Subject: Re: [PATCH] imx: imx8: fix loading container image from eMMC boot
> partitions
> 
> Hi Peng,
> 
> On Tue, 22 Oct 2019 02:43:31 +0000
> Peng Fan peng.fan at nxp.com wrote:
> ...
> > get_boot_device_offset already switched partition, there is no need to
> > add partition switch logic in get_container_size.
> 
> I'd be very happy if it did, but it didn't, at least not in current mainline tree. I
> can't find eMMC hw partition switching code in u-boot-imx tree either.
> I've checked in current master and in next branches:

My bad. I looked wrong. There is no such code.

But I do not understand well. When burn flash.bin into boot partition,
SPL will be loaded from boot partition, SPL will load container images
from boot partition, but in your case, I think SPL will load container images
from user partition, so you switch back to boot partition.
>From common/spl/spl_mmc.c, there is boot partition switch there,
Why need to add such logic in imx8/image.c?

Thanks,
Peng.
> 
> 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
> com%2Fsbabic%2Fu-boot-imx%2Fblob%2Fmaster%2Farch%2Farm%2Fmach-i
> mx%2Fimx8%2Fimage.c%23L123&data=02%7C01%7Cpeng.fan%40nxp.c
> om%7Cf5d635a085054823ffe008d756c24582%7C686ea1d3bc2b4c6fa92cd9
> 9c5c301635%7C0%7C0%7C637073264694636512&sdata=Td3sdxz67eX
> EFuEMXzM2A3Dtm1OXRsR8m9cKKxo52UE%3D&reserved=0
> 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.
> com%2Fsbabic%2Fu-boot-imx%2Fblob%2Fnext%2Farch%2Farm%2Fmach-im
> x%2Fimx8%2Fimage.c%23L123&data=02%7C01%7Cpeng.fan%40nxp.co
> m%7Cf5d635a085054823ffe008d756c24582%7C686ea1d3bc2b4c6fa92cd99c
> 5c301635%7C0%7C0%7C637073264694636512&sdata=TjcYIyo%2BO6J
> B4IHv5%2F5p89BOWh2EPnSu%2Fe%2BKEGg0brY%3D&reserved=0
> 
> I'll re-spin the patch to add it in spl_mmc_get_uboot_raw_sector(), this seems
> to be a better place for it.
> 
> --
> Anatolij


More information about the U-Boot mailing list