[U-Boot] Sharing a hardware lab

Simon Glass sjg at chromium.org
Sat Mar 21 20:07:53 CET 2020


Hi Harald,

On Mon, 24 Feb 2020 at 06:27, Harald Seiler <hws at denx.de> wrote:
>
> Hello Simon,
>
> On Sun, 2020-02-23 at 19:34 -0700, Simon Glass wrote:
> > Hi Heiko,
> >
> > Thanks for the hints! I pushed your things here:
> >
> > https://github.com/sglass68/tbot/tree/simon
> >
> > Then I try:
> > tbot -l kea.py -b pcduino3.py uboot_build
> >
> > and get an error:
> >
> > tbot starting ...
> > type <class 'module'>
> > ├─Calling uboot_build ...
> > │   └─Fail. (0.000s)
> > ├─Exception:
> > │   Traceback (most recent call last):
> > │     File "/home/sglass/.local/lib/python3.6/site-packages/tbot-0.8.0-py3.6.egg/tbot/main.py",
> > line 318, in main
> > │       func(**params)
> > │     File "/home/sglass/.local/lib/python3.6/site-packages/tbot-0.8.0-py3.6.egg/tbot/decorators.py",
> > line 103, in wrapped
> > │       result = tc(*args, **kwargs)
> > │     File "/home/sglass/.local/lib/python3.6/site-packages/tbot-0.8.0-py3.6.egg/tbot/tc/uboot/build.py",
> > line 271, in _build
> > │       builder = UBootBuilder._get_selected_builder()
> > │     File "/home/sglass/.local/lib/python3.6/site-packages/tbot-0.8.0-py3.6.egg/tbot/tc/uboot/build.py",
> > line 160, in _get_selected_builder
> > │       builder = getattr(tbot.selectable.UBootMachine, "build")
> > │   AttributeError: type object 'UBootMachine' has no attribute 'build'
> >
> > I'm a bit lost in all the classes and functions. A working example or
> > a patch would be great!
> >
> > I've pushed all my scripts here:
> >
> > https://github.com/sglass68/ubtest
> >
> > The top commit is your patches.
>
> I think you mixed a few things up while adding Heiko's stuff.  Instead
> of your last commit, attempt the attached patch.  It is untested of
> course but should point you in the right direction; here is a short
> summary of what it adds:
>
>     1. Your `kea` lab needs to be marked as a build-host.  This means it
>        needs the `toolchains` property which returns what toolchains are
>        available.  I added a dummy armv7-a toolchain which might need
>        a bit more adjustment to work for you.
>
>     2. I created a UBootBuilder for pcduino3.  This builder just
>        specifies what defconfig to build and what toolchain to use (need
>        to be defined in the selected lab).
>
>        Heiko's builder config is a bit more elaborate and also does some
>        patching after applying the defconfig.  This is of course also
>        possible if you want to.
>
>     3. I added a U-Boot config for your board which is needed because
>        its `build` property specifies which U-Boot builder to use.  This
>        will make the `uboot_build` testcase work properly.  Later you
>        might want to adjust this U-Boot config to actually work so you
>        can make use of it for flashing the new U-Boot binary.
>
> Some more links to documentation:
>
>     - Build-host config: https://tbot.tools/modules/machine_linux.html#builder
>     - UBootBuilder class: https://tbot.tools/modules/tc.html#tbot.tc.uboot.UBootBuilder
>
> Hope this helps!

Yes it helps a lot, thank you. I now have it building U-Boot:

   tbot -l kea.py -b pcduino3.py -p clean=False uboot_build interactive_uboot

I sent a tiny patch to tbot to fix an error I had, and I made a few
minor changes to what you sent.

https://github.com/sglass68/ubtest/commit/7da7a3794d505e970e0e21a9b6ed3a7e5f2f2190

So my next question is how to load U-Boot onto the board. I can see
methods for poweron/poweroff but not for actually writing to the
board. Is there a built-in structure for this? I cannot find it.

I am hoping that the Pcduino3 class can define a method like
'load_uboot()' to write U-Boot to the board?

Regards,
Simon

[..]


More information about the U-Boot mailing list