[OE-core] [PATCH] Revert "kernel: Fix symlinks"

Otavio Salvador otavio.salvador at ossystems.com.br
Wed Aug 30 21:16:07 UTC 2017


David,

On Tue, Aug 22, 2017 at 12:40 PM, David Vincent <freesilicon at gmail.com> wrote:
> On vendredi 18 août 2017 14:44:30 CEST Otavio Salvador wrote:
>> On Wed, Aug 16, 2017 at 3:15 PM, Otavio Salvador
>>
>> <otavio at ossystems.com.br> wrote:
>> > This reverts commit c7bc46b9bc29dd0953ab8d63b50fa105bb66892e.
>> >
>> > The commit has broken the alternatives concept as it is managed by
>> > links controlled by the alternatives system. That said the failing
>> > case identified (which some bootloaders fail to load the file) seems
>> > to be due a misuse of the alternative system.
>> >
>> > Cc: Christopher Larson <chris_larson at mentor.com>
>> > Cc: Ross Burton <ross.burton at intel.com>
>> > Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
>>
>> I ended forgetting to add the commit author on Cc. Adding now :-)
>
> This issue has been discussed here : http://lists.openembedded.org/pipermail/
> openembedded-core/2017-April/135923.html
>
> Reverting this patch to solve the alternative problem cannot be a definitive
> solution as it breaks boot on some boards. IMHO, I'd rather break the
> alternative system than boot (full disclosure : I use opkg's update-
> alternatives).
>
> As already said, absolute paths cannot be used in bootloaders since it may
> point to an invalid location (rootfs may not be mounted). I do not have
> another solution with plain 'ls', but I think we should find a way to better
> handle all cases than going back and forth on this patch.
>
> FYI, this is my use case : I have a bootloader which resides in EEPROM, but
> needs to boot kernels that can be upgraded. Therefore, I rely on a fixed path
> to the last kernel / devicetree on a specific partition outside rootfs.

I understand the problem you are fixing but the solution in use is wrong.

We should stop using the update-alternatives for the kernel and device
tree files and instead just use plain symbolic links. Abusing of
update-alternatives is just wrong.

In fact, the update-alternatives for this specific use case is broken
as the database is elsewhere and so the link cannot be managed
properly.

-- 
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