[elbe-users] ARM allwinner msdoshd: Specify binary blob

Ralf Schlatterbeck rsc at runtux.com
Wed Jan 31 10:37:16 CET 2018


Thanks to Lukasz for the version, I already tried it (previously in
Debian oldstable the elbe-testing repo was needed, that's why I was
asking).

On Wed, Jan 31, 2018 at 07:49:32AM +0000, Lukasz Walewski wrote:
> You probably need the current version, i.e. 2.2, distributed via apt -
> use the following sources.list entry:
> 
> "deb http://debian.linutronix.de/elbe stretch main"

Answering some of my own questions in the following.

On Mon, Jan 29, 2018 at 09:17:11PM +0100, Ralf Schlatterbeck wrote:
> I'm in the process of building elbe configs for various ARM allwinner
> boards. Several questions:
> - Has this already been done?
>   I currently have Olimex A20-Lime2, Olimex A20-Micro, BananaPi M2+EDU
>   and the Olimex DIY laptop with A64 CPU (although this is lower prio)
> - The bootloader needs to be put into an MSDOS image at position 8k, how
>   do I specify this? According to the schema reference at
>   https://elbe-rfs.org/docs/sphinx/article-elbe-schema-reference.html
>   the binary blob gets a filename (?) and the description tells me
>   "binary blob that is dd’ed to the specified offset". But *how* do I
>   specify this offset?

I've figured out the syntax. The attributes are not documented in the
XML schema reference. But they *are* documented in
/usr/share/xml/elbe-common/dbsfed.xsd
installed via the elbe-common debian package.

Should I open a bug-report or feature-request on this in git? Seems like
the generated user documentation for the schema reference *should*
include the attributes?

So I'm now using the following:
<binary offset="8"
 blocksize="1024">u-boot-sunxi-with-spl-bananapi-m2+edu.bin</binary>

The attributes in the stanza above translate to the respective
parameters of the dd command, 'blocksize' maps to the 'bs' parameter of
dd and 'offset' maps to 'skip'.

But this doesn't work, the file is not found during build:

running cmd +dd if="/var/cache/elbe/ab9b64a8-c871-46ac-9d26-785250a3bfd6/u-boot-sunxi-with-spl-bananapi-m2+edu.bin" of="/var/cache/elbe/ab9b64a8-c871-46ac-9d26-785250a3bfd6/sdcard.img" seek="8" bs="1024" conv=notrunc+
------------------------------------------------------------------------------
dd: failed to open '/var/cache/elbe/ab9b64a8-c871-46ac-9d26-785250a3bfd6/u-boot-sunxi-with-spl-bananapi-m2+edu.bin': No such file or directory

Do I have to copy the file to the image or to the running kvm instance
somehow before being able to reference it in the 'binary' stanza?

> - How do I specify the offset of the first partition in an msdoshd, is
>   this fixed at 1024k (2048 512-byte blocks)?

Still not answered: I asume it uses the standard layout of a system with
an msdos partition. But there *are* other offsets etc. out there and it
would be nice if these could be generated (e.g. if the bootloader
inserted into the root partition becomes larger).

> - Is there a way to put boot config, kernel and dtb into the first
>   partition without inserting them into a .tar into the .xml elbe file,
>   or is this still the preferred method?

I'm again using the .tbz file inserted as a dump into the xml file. I'd
really prefer to have a list of files referenced by the xml and sent
with the xml to the build VM. Looks like this doesn't exist (yet?).

> - I'm building on Debian Stretch for a Debian Stretch target. What
>   version of elbe should I install?

See above, seems 2.2+stretch251 is the current version.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   http://www.runtux.com
Reichergasse 131, A-3411 Weidling       email: office at runtux.com



More information about the elbe-users mailing list