[elbe-devel] Binary blob source path

torben.hohn at linutronix.de torben.hohn at linutronix.de
Fri Jan 24 21:33:37 CET 2020


On Sun, Jan 12, 2020 at 12:55:49PM +0100, Carsten Behling wrote:
> Hi,
> 
> since this commit
> 
> https://github.com/Linutronix/elbe/commit/6467421d1e5e2d73a1941f74fa5495d526c1ad74
> 
> we are able to dd bootloaders into SD card images.
> 
> It is not clear to me how to state the src path exactly.
> 
> Let's say we want to write i.MX6 Wandboards SPL included in package
> u-boot-imx with 1MB offset.
> 
> <images>
>      <msdoshd>
>         ...
>         <binary offset="1">/usr/lib/u-boot/wandboard/SPL</binary>

offset=1 is wrong. that means 1 byte.
either specify blocksize= or just specify the right value in bytes.


>         ...
>     </msdoshd>
> </images>
> ...
> <pkg-list>
>      ...
>      <pkg>u-boot-imx</pkg>
>      ...
> </pkg-list>
> 
> alone won't do the trick since.
> 
> I suppose stating a target rootfs source path is wrong.

--------------------------------------------------------------------------
       # use file from target/ dir if binary path starts with /
        if binary.et.text[0] == '/':
            bf = os.path.join(target, 'target', binary.et.text[1:])
            print(bf)
        else:
            # use file from /var/cache/elbe/<uuid> project dir
            bf = os.path.join(target, binary.et.text)

        do('dd if="%s" of="%s" seek="%s" bs="%s" conv=notrunc' %
           (bf, imagename, offset, bs))
--------------------------------------------------------------------------

> 
> But how should it be ?
> 
> Best regards
> Carsten

> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel




More information about the elbe-devel mailing list