[yocto] [meta-raspberrypi][PATCH 1/1] linux-rpi: clean .config in before do_configure step

Piotr Lewicki piotr.lewicki at elfin.de
Mon Jan 2 05:41:18 PST 2017


On 30.12.2016 14:20, Andrei Gherzan wrote:
> On Fri, Dec 30, 2016 at 08:20:00AM +0100, Piotr Lewicki wrote:
>> On 29.12.2016 19:20, Andrei Gherzan wrote:
>>> On Fri, Dec 16, 2016 at 08:58:22AM -0800, Khem Raj wrote:
>>>>> On Dec 15, 2016, at 2:05 AM, Piotr Lewicki <piotr.lewicki at elfin.de> wrote:
>>>>>
>>>>> Signed-off-by: Piotr Lewicki <piotr.lewicki at elfin.de>
>>>>> ---
>>>>> recipes-kernel/linux/linux-rpi.inc | 11 +++++++++--
>>>>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/recipes-kernel/linux/linux-rpi.inc b/recipes-kernel/linux/linux-rpi.inc
>>>>> index 95a9530..c665b9f 100644
>>>>> --- a/recipes-kernel/linux/linux-rpi.inc
>>>>> +++ b/recipes-kernel/linux/linux-rpi.inc
>>>>> @@ -34,11 +34,13 @@ kernel_configure_variable() {
>>>>>       fi
>>>>> }
>>>>>
>>>>> -do_configure_prepend() {
>>>>> +do_rpi_kconfig_clean() {
>>>>>       # Clean .config
>>>>> -    echo "" > ${B}/.config
>>>>> +    echo -n "" > ${B}/.config
>>>>>       CONF_SED_SCRIPT=""
>>>>> +}
>>>>>
>>>>> +do_configure_prepend() {
>>>>>       # oabi / eabi support
>>>>>       kernel_configure_variable AEABI y
>>>>>       if [ "${ARM_KEEP_OABI}" = "1" ] ; then
>>>>> @@ -124,8 +126,11 @@ do_configure_prepend() {
>>>>>       # Keep this the last line
>>>>>       # Remove all modified configs and add the rest to .config
>>>>>       sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
>>>>> +    # Clean variable- useful when calling configure step multiple times
>>>>> +    CONF_SED_SCRIPT=""
>>>>>
>>>>>       yes '' | oe_runmake oldconfig
>>>>> +
>>>>> }
>>>>>
>>>>> # Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled
>>>>> @@ -146,3 +151,5 @@ python () {
>>>>>
>>>>>       configfile.close()
>>>>> }
>>>>> +
>>>>> +addtask rpi_kconfig_clean before do_configure after do_populate_lic
>>>> we should investigate the kernel tooling from OE-Core and use that IMO
>>> I'm all for this. We should get rid of this and unify with oe-core
>>> tooling.
>>>
>>> @Piotr Would you like to work on this and remove completely this while
>>> reworking on the kernel fragments configuration support? I'll take a
>>> look on the old patches too.
>> @Andrei: I'll try to do this.
> That would be very helpful. This one of my top things to change in this
> layer.
I'm wondering if this make sense to rewrite linux-rpi.inc file so that 
it uses config fragments.
If we only apply the old patch from Alex J Lennon ("linux-raspberrypi: 
support configuration fragments / in-tree defconfig") than kernel config 
fragments (using .cfg files with kernel configs) can be used with 
linux-raspberrypi (tested).

All of the kernel configs that are set in "linux-rpi.inc" file (e.g. VC4 
related config flags if one has VC4 support) should be applied even if 
somebody sets some other value in config fragment file.

If we only use Alex's patch then we first apply all of the config 
fragments and then if needed - overwrite them with options necessary by 
the rpi machine.

I'm resending Alex's patch either way for easier applying.
>
> --
> Andrei Gherzan
--
Piotr Lewicki



More information about the yocto mailing list