[PATCH] socfpga: Allow setting partition xloader boots from for mmc

Trent Piepho tpiepho at kymetacorp.com
Fri Dec 11 11:22:29 PST 2015


On Fri, 2015-12-11 at 10:41 +0100, Sascha Hauer wrote:
> On Thu, Dec 10, 2015 at 09:51:39PM +0000, Trent Piepho wrote:
> > The xloader boots the 2nd stage barebox from socfpga_barebox_part when
> > using NOR.  But when using MMC it boots from a hardcoded "disk0.1".
> > Add the mmc device name to the partition description and use it for
> > mmc booting.
> 
> What is the device string in your case? Is the device another one or is
> the partition another one? I'm asking because I rather have the code
> pushed into the "do the right thing" direction than in the "configure it
> correctly" direction.

On my device there are multiple partitions and I select which one to use
based on data from an eeprom.  It's disk0.boot0, disk0.boot1, etc.

The socfpga code was copied from omap. On omap the partition description
has both nand and nor.  socfpga doesn't have nand, but it does have mmc,
so it makes sense it should have both nor and mmc.

There is a board, phytec-som-am335x, that changes the default OMAP part
to something else.  See commit ed1618261b10888dba13bf97d3d316351b65eab5.

I want to do the same thing on by board, except:
SocFPGA should have mmc+nor instead of phytec's nand+nor.  Which is this
patch.
I want to select a different partition based on an eeprom, which is in
board specific code.  And doesn't have to modify the arch code.

Since SocFPGA has just one mmc controller, there is only disk0.  So one
could hard-code "disk0." and append the partition to it.  But it
increases code complexity and size in the preloader to do that.  I don't
see what the point would be.  "disk0.1" actually exists as a device
while "1" doesn't, so it seems more natural to use the former.


More information about the barebox mailing list