[elbe-devel] [PATCH] elbepack: hdimg: copy partition binary blobs from target

John Ogness john.ogness at linutronix.de
Sat Jan 11 09:29:53 CET 2025


On 2025-01-10, Thomas Weißschuh <thomas.weissschuh at linutronix.de> wrote:
>>          if part.text('binary')[0] == '/':
>> -            tmp = target + '/' + 'chroot' + part.text('binary')
>> +            tmp = target + '/' + 'target' + part.text('binary')
>
> There is yet another copy of this in build_image_mtd().

Oh man. It seems I am the one who introduced this deviation:

commit 8ed5a9061225 ("hdimg/mtd: fix handling of ubi static volumes")

With the justification:

    "use buildenv as root for copying ubi static volumes specified with
     an absolute path (this allows the files to be removed in
     finetuning)"

> This now breaks if the file is only really available in the
> buildenvironment, however unlikely.

Perhaps all 3 sites should adopt a generic implementation that first
checks target/ and then falls back to chroot/.

> I really dislike the usage of "/" to distinguish the source.

Agreed. I strongly question the users that are not specifying an
absolute path.

> It's not even documented for this specific element as its schema is
> rfs:type and not rfs:binaryblob.
> What do you think about having an XML attribute the specifies the
> source properly?

Sure. It should be rfs:binaryblob. The documentation of rfs:binaryblob
should also be updated to make it clear that it is not just about dd(1).

I can submit a new patch implementing these changes if you like.

John


More information about the elbe-devel mailing list