On Thu, Apr 26, 2018 at 03:33:06PM +0100, Neil Williams wrote:
On 26 April 2018 at 15:22, Corentin Labbe clabbe@baylibre.com wrote:
Hello
I want to introduce a devicedict parameter for differentiate mainline/vendor uboot.
Be clear on the terminology here - you're talking about a device dictionary parameter but you're making a change to the device-type.
I want to change device-type file by adding an "if" which test a parameter that will be set per device (so in device dictionary).
For example, amlogic boards could work with both, but thet have some differences like uboot prompt.
So for example I have modified lava_scheduler_app/tests/ device-types/meson-gxl-s905x-khadas-vim.jinja2 like this: +{% if use_vendor_uboot %} {% set bootloader_prompt = bootloader_prompt|default('kvim#') %} +{% endif %}
It would seem unusual to have different U-Boot builds determined by the device-type. More likely, at any one time, you have some devices of this type which are mainline and some devices which are vendor.
Therefore, the point to change this is in the device dictionary of each device.
for devices with vendor U-Boot configured: {% set bootloader_prompt = 'kvim#' %}
You should then use device tags to distinguish the devices so that test writers can know which one is in use.
The problem is that this "set bootloader_prompt = 'kvim#'" is set in the upstream device-type. And this sort of problem is spread for other boards. So instead of moving vendor uboot specific hack on each device, I think it is proper to have all stuff in device type file.
Does my intention is more clear now ?
Note that my way is to assume that mainline uboot is the default.
But since non-amlogic boards (imx6q-sabrelite for example) will need the same way for differentiate, having an agreement on the name could be usefull.
Does use_vendor_uboot is good for you ?
No. It sounds like this is the wrong place to do this.