[U-Boot] [PATCH v4 2/2] fastboot: handle flash write to GPT partitions
Rob Herring
robherring2 at gmail.com
Mon Jan 26 15:52:25 CET 2015
On Fri, Jan 23, 2015 at 4:40 PM, Steve Rae <srae at broadcom.com> wrote:
>
>
> On 15-01-23 09:38 AM, Rob Herring wrote:
>>
>> On Fri, Dec 12, 2014 at 5:51 PM, Steve Rae <srae at broadcom.com> wrote:
>>>
>>> Implement a feature to allow fastboot to write the downloaded image
>>> to the space reserved for the Protective MBR and the Primary GUID
>>> Partition Table.
>>> Additionally, prepare and write the Backup GUID Partition Table.
>>
>>
>> I've been looking at how to do the same thing here. This is an area
>> that suffers from each vendor doing whatever they want. Using vendor
>> download/flash tools here is painful. They are all different because
>> that is where the value add is. ;) What tool do you use on the host
>> side to create the image? I have seen some vendor code to do it, or
>> you could use parted plus a disk file and extract the partition table
>> from it. I find either method a bit fragile and non-standard IMHO.
>>
> We use an internal tool -- however, I also note that ALL of the source code
> for our tool is "GPL-2.0+" (expect for one file which is Public Domain)
> Is U-Boot (Denx) interested in supporting a "host tool"?
>
>> The 2 options I've come up with are 1) enable USB MS and use whatever
>> host side tool you like or 2) use the existing "gpt write" command in
>> u-boot and tie that into fastboot "oem format" command. The advantage
>> and disadvantage of the latter is that it hides the partitioning
>> details in u-boot from the user, but requires changing the u-boot env
>> to change partition layout. The partitioning requirements are pretty
>> SOC specific it seems.
>>
> We also have code which creates the GPT tables from a "fastboot oem format"
> command, and (if I understand correctly) we have code that implements a
> "gpt" command line, which creates the GPT tables from env variables...
> If there is interest here, I could investigate further.
I have patches I'm working on to do this. I hope to get them sent out soon.
Rob
More information about the U-Boot
mailing list