[yocto] binutils 2.29.1 ARM Thumb kernel problem

Khem Raj raj.khem at gmail.com
Thu Apr 5 12:17:54 PDT 2018


On Thu, Apr 5, 2018 at 12:16 PM Khem Raj <raj.khem at gmail.com> wrote:

> On Thu, Apr 5, 2018 at 11:53 AM Chris Elledge <celledge at digitallumens.com>
> wrote:
>
>> Unfortunately, removing the "+1" doesn't work. That results in a kernel
>> which claims to start, but doesn't progress.
>>
>> Changing it to an "|1" also doesn't work due to this error:
>> arch/arm/kernel/entry-common.S:117: Error: invalid operands (.text and
>> *ABS* sections) for `|'
>>
>> Doing this to the badr macro:
>>  #ifdef CONFIG_THUMB2_KERNEL
>>   adr\c \rd, \sym
>>   orr\c \rd, \rd, #1
>>
>
Sent too soon I mean remove ORR completely

>  #else
>>
>> Is giving me a "Bad Linux ARM zImage magic!" error on boot
>>
>> So, I don't think it's an easy change to the kernel.
>>
>
> What hppens if you don’t do any change
>
>>
>> -Chris
>>
>> On Wed, Apr 4, 2018 at 4:04 PM, Andre McCurdy <armccurdy at gmail.com>
>> wrote:
>>
>>> On Wed, Apr 4, 2018 at 9:14 AM, Andre McCurdy <armccurdy at gmail.com>
>>> wrote:
>>> > On Wed, Apr 4, 2018 at 8:06 AM, Chris Elledge
>>> > <celledge at digitallumens.com> wrote:
>>> >> Thanks for the feedback. I rolled back binutils to 2.28.0 by copying
>>> the
>>> >> yocto-2.3.3 binutils recipe directory into my custom layer. That has
>>> >> resolved the issue.
>>> >>
>>> >> I can confirm that binutils 2.29.0 also has the problem. I went from
>>> >> yocto-2.3 to 2.4.2 so I hadn't tried binutils 2.29.0 previously.
>>> There are
>>> >> also reports that openssl and libavcodec are broken when targeting an
>>> ARM
>>> >> Thumb2 platform with binutils 2.29.*
>>> >
>>> > Yes, that makes sense. The binutils change is in both 2.29.0 and
>>> > 2.29.1 (and also in 2.30.0).
>>> >
>>> > The next useful experiment would be to stay with binutils 2.29.1 and
>>> > apply a patch to revert the one particular commit which caused the
>>> > change in behaviour:
>>> >
>>> >
>>> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=e645cf40b111daef4518a58547de577eb9379ccb
>>>
>>> The experiment of patching the kernel would also be useful, since I
>>> would guess that the final solution from upstream will involve a
>>> change to the kernel rather than reverting the change to binutils.
>>>
>>> Changing "+ 1" to "| 1" in the badr macro would be a universal
>>> solution for all versions of binutils, but for a quick test with
>>> binutils 2.29.1 you could simply remove the "+ 1" from the
>>> CONFIG_THUMB2_KERNEL case (ie make the ARM and Thumb2 versions of the
>>> macro identical).
>>>
>>>
>>> https://github.com/torvalds/linux/blob/master/arch/arm/include/asm/assembler.h#L197
>>>
>>
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180405/b022d81e/attachment.html>


More information about the yocto mailing list