[PATCH 0/2] Command for entering mask rom USB download mode

Michal Suchánek msuchanek at suse.de
Mon Jul 4 11:42:26 CEST 2022


On Sun, Jul 03, 2022 at 11:22:51PM +0100, Andre Przywara wrote:
> On Sun,  3 Jul 2022 21:20:20 +0200
> Michal Suchanek <msuchanek at suse.de> wrote:
> 
> Hi,
> 
> > many ARM SoCs have a mask rom feature that provides interface for
> > downloading firmware over USB.
> > 
> > Downstream rockchip u-boot has 'brom' or 'rbrom' command for this
> > purpose, and downstream sunxi u-boot provides 'efex' command. p-boot has
> > code for entering FEL on A64 SoC.
> 
> Thanks for bringing this up. We have discussed several options before,
> including some true FEL reset commands, which do not depend on the SPL
> doing the branch.
> But I guess we can just start with this one and expand it from there.
>  
> > With this patch I am able to activate the USB downloader on a rk3399 but
> > the rkflashtool fails to communicate with the device. On a H2+ I can get
> > into the FEL mode and get flash parameters. YMMV
> > 
> > I don't have any great idea how to structure this so that the command
> > does not need platform-specific code. Is there an example of a command
> > that has platform-specific implementations?
> 
> I don't think that's a problem: there are already platform specific
> commands, you just put them in a separate file and mark them as
> "depends on ARCH_SUNXI" (or whatever) in cmd/Kconfig and be done. No
> need to boil the ocean here in trying to be generic.
> That's why I wouldn't put them in cmd/boot.c, especially since you
> don't seem to share any code?

The reset implementation also does not share any actual code between
platforms, has different implementation on each platform, and is
cross-platform command that provides the same functionality on each
paltform.

Because the functionality can be provided on multiple platfroms the goal
is to provide cross-platform user interface for it.

Thanks

Michal


More information about the U-Boot mailing list