[OE-core] [RFC] u-boot-fw-utils: Allow target-specific fw_env.config

Otavio Salvador otavio.salvador at ossystems.com.br
Tue Jun 20 22:08:03 UTC 2017


On Tue, Jun 20, 2017 at 6:16 PM, Marek Vasut <marex at denx.de> wrote:
> On 06/20/2017 10:57 PM, Otavio Salvador wrote:
>> On Tue, Jun 20, 2017 at 5:53 PM, Brad Mouring <brad.mouring at ni.com> wrote:
>>> On Tue, Jun 20, 2017 at 10:43:51PM +0200, Marek Vasut wrote:
>>>> On 06/20/2017 10:40 PM, Brad Mouring wrote:
>>>>> As implemented currently, the fw-utils recipe does not allow for
>>>>> ...
>>>>> +# by the U-Boot environment utilities "fw_printenv" and "fw_setenv".
>>>>> +# By default, use the default included in the U-Boot source
>>>>> +UBOOT_FW_ENV_CONFIG ??= "${S}/tools/env/fw_env.config"
>>>>> +
>>>>>  inherit uboot-config
>>>>>
>>>>>  do_compile () {
>>>>> @@ -19,7 +24,7 @@ do_install () {
>>>>>     install -d ${D}${sysconfdir}
>>>>>     install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
>>>>>     install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
>>>>> -   install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
>>>>> +   install -m 0644 ${UBOOT_FW_ENV_CONFIG} ${D}${sysconfdir}/fw_env.config
>>>>
>>>> Do we really need yet another variable ? Wouldn't it make more sense to
>>>> add do_install_append_yourmachine() {} in your meta-whatever to
>>>> u-boot-fw-utils_%.bbappend and install whatever additional files you need ?
>>>
>>> This is (kinda) what we were doing, there was some discussion as to
>>> whether or not this made sense upstream. I was unsure of the
>>> acceptability of a do_install_append.*() clobbering a file of the
>>> original do_install().
>>>
>>> Thanks for the input.
>>
>> Or split up the configuration to u-boot-fw-utils-config package and
>> make u-boot-fw-utils generic? So we can have the configuration in a
>> specific package.
>
> Keep in mind that u-boot-fw-utils is actually built for particular
> machine (it contains ie. the default env for that machine) so bundling
> the config file with it is IMO OK. No need to introduce additional
> packages for every simple file.

I will propose one patch. See what you think ...

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the Openembedded-core mailing list