All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Fwd: Re:  grub2 failure with gcc-4.9
       [not found] <54D39F5A.2010403@ou.edu>
@ 2015-02-05 18:44 ` Steve Kenton
  2015-02-19 15:46   ` Thierry Bultel
  0 siblings, 1 reply; 10+ messages in thread
From: Steve Kenton @ 2015-02-05 18:44 UTC (permalink / raw)
  To: buildroot

Oops, hit reply instead of reply-all

On 02/05/2015 10:16 AM, Thomas Petazzoni wrote:
>  Dear Thierry Bultel,
>
>  On Thu, 05 Feb 2015 17:15:13 +0100, Thierry Bultel wrote:
>
>>  With gcc-4.9 from Ubuntu
>>
>>  (in grub2.mk, I set TARGET_CC="/usr/bin/gcc" \
>>  	TARGET_CFLAGS="-m32" \
>>  )
>>
>>  ... grub hangs.
I'm not sure if it's related but I think we are mixing host and
target grub2. When you run ~output/host/usr/sbin/grub-install
any scripts it runs such as grub-mkimage are run from the
build hosts /usr/... and not buildroot HOSTDIR or TARGETDIR
I have been getting elf header mismatches which I think are
differences between grub 2.00 and grub 2.01-beta

Steve Kenton


>
>  Seems like you're good for a bug report to the upstream project. I
>  checked their Git repo, there is a gcc 4.9 fix but specific for ARM
>  issues. I haven't seen any other commit mentioning "4.9".
>
>  You may want to try with their latest Git version first, though, just
>  in case the problem was fixed but not mentioned explicitly in a commit
>  log.
>
>  Best regards,
>
>  Thomas
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Fwd: Re:  grub2 failure with gcc-4.9
  2015-02-05 18:44 ` [Buildroot] Fwd: Re: grub2 failure with gcc-4.9 Steve Kenton
@ 2015-02-19 15:46   ` Thierry Bultel
  2015-02-19 16:03     ` Steve Kenton
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Bultel @ 2015-02-19 15:46 UTC (permalink / raw)
  To: buildroot

Le 05/02/2015 19:44, Steve Kenton a ?crit :
> Oops, hit reply instead of reply-all
>
> On 02/05/2015 10:16 AM, Thomas Petazzoni wrote:
>>  Dear Thierry Bultel,
>>
>>  On Thu, 05 Feb 2015 17:15:13 +0100, Thierry Bultel wrote:
>>
>>>  With gcc-4.9 from Ubuntu
>>>
>>>  (in grub2.mk, I set TARGET_CC="/usr/bin/gcc" \
>>>      TARGET_CFLAGS="-m32" \
>>>  )
>>>
>>>  ... grub hangs.
> I'm not sure if it's related but I think we are mixing host and
> target grub2. When you run ~output/host/usr/sbin/grub-install
> any scripts it runs such as grub-mkimage are run from the
> build hosts /usr/... and not buildroot HOSTDIR or TARGETDIR
> I have been getting elf header mismatches which I think are
> differences between grub 2.00 and grub 2.01-beta

Thanks Steve,

FYI,
I am not using grub-install, but instead:

sudo ./host/usr/sbin/grub-bios-setup \
-b ./host/usr/lib/grub/i386-pc/boot.img \
-c ./images/grub.img -d . /dev/sde

I have notified the grub mailing list, this seems to be an unknown issue 
and I need to fill a bug report. (and first try with 2.01-beta ...)

Thierry

>
> Steve Kenton
>
>
>>
>>  Seems like you're good for a bug report to the upstream project. I
>>  checked their Git repo, there is a gcc 4.9 fix but specific for ARM
>>  issues. I haven't seen any other commit mentioning "4.9".
>>
>>  You may want to try with their latest Git version first, though, just
>>  in case the problem was fixed but not mentioned explicitly in a commit
>>  log.
>>
>>  Best regards,
>>
>>  Thomas
>>
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Fwd: Re:  grub2 failure with gcc-4.9
  2015-02-19 15:46   ` Thierry Bultel
@ 2015-02-19 16:03     ` Steve Kenton
  2015-02-20 16:34       ` [Buildroot] " tbultel at free.fr
  0 siblings, 1 reply; 10+ messages in thread
From: Steve Kenton @ 2015-02-19 16:03 UTC (permalink / raw)
  To: buildroot

On 02/19/2015 09:46 AM, Thierry Bultel wrote:

>>>>  ... grub hangs.
>> I'm not sure if it's related but I think we are mixing host and
>> target grub2. When you run ~output/host/usr/sbin/grub-install
>> any scripts it runs such as grub-mkimage are run from the
>> build hosts /usr/... and not buildroot HOSTDIR or TARGETDIR
>> I have been getting elf header mismatches which I think are
>> differences between grub 2.00 and grub 2.01-beta
> 
> Thanks Steve,
> 
> FYI,
> I am not using grub-install, but instead:
> 
> sudo ./host/usr/sbin/grub-bios-setup \
> -b ./host/usr/lib/grub/i386-pc/boot.img \
> -c ./images/grub.img -d . /dev/sde
> 
> I have notified the grub mailing list, this seems to be an unknown issue and I need to fill a bug report. (and first try with 2.01-beta ...)
> 
> Thierry
> 
Yep, that's the correct way, I just wanted to mention that grub-install
is an easy trap to fall into if you let your fingers run on auto-pilot.
And it can produce subtle and hard to recognize problems which sounded
familiar :-)

Steve

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] grub2 failure with gcc-4.9
  2015-02-19 16:03     ` Steve Kenton
@ 2015-02-20 16:34       ` tbultel at free.fr
  0 siblings, 0 replies; 10+ messages in thread
From: tbultel at free.fr @ 2015-02-20 16:34 UTC (permalink / raw)
  To: buildroot



----- Mail original -----
> De: "Steve Kenton" <skenton@ou.edu>
> ?: "Thierry Bultel" <tbultel@free.fr>, buildroot at busybox.net, "Thomas Petazzoni"
> <thomas.petazzoni@free-electrons.com>
> Envoy?: Jeudi 19 F?vrier 2015 17:03:24
> Objet: Re: Fwd: Re: [Buildroot] grub2 failure with gcc-4.9
> 
> On 02/19/2015 09:46 AM, Thierry Bultel wrote:
> 
> >>>>  ... grub hangs.
> >> I'm not sure if it's related but I think we are mixing host and
> >> target grub2. When you run ~output/host/usr/sbin/grub-install
> >> any scripts it runs such as grub-mkimage are run from the
> >> build hosts /usr/... and not buildroot HOSTDIR or TARGETDIR
> >> I have been getting elf header mismatches which I think are
> >> differences between grub 2.00 and grub 2.01-beta
> > 
> > Thanks Steve,
> > 
> > FYI,
> > I am not using grub-install, but instead:
> > 
> > sudo ./host/usr/sbin/grub-bios-setup \
> > -b ./host/usr/lib/grub/i386-pc/boot.img \
> > -c ./images/grub.img -d . /dev/sde
> > 
> > I have notified the grub mailing list, this seems to be an unknown
> > issue and I need to fill a bug report. (and first try with
> > 2.01-beta ...)
> > 
> > Thierry
> > 
> Yep, that's the correct way, I just wanted to mention that
> grub-install
> is an easy trap to fall into if you let your fingers run on
> auto-pilot.
> And it can produce subtle and hard to recognize problems which
> sounded
> familiar :-)
> 

FYI, the bug is not reproducible with the master branch of grub.
I will have to submit a patch anyway, because due to the poor usb hid 
implementation, grub thinks my touchscreen and my joystick are keyboards .. and goes in
infinite loop due to unknown keys (I also had it on the 2.0 version). 
But everything else works fine.

Thierry

> Steve
> 
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] grub2 failure with gcc-4.9
  2015-02-05 16:15   ` Thierry Bultel
@ 2015-02-05 16:16     ` Thomas Petazzoni
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2015-02-05 16:16 UTC (permalink / raw)
  To: buildroot

Dear Thierry Bultel,

On Thu, 05 Feb 2015 17:15:13 +0100, Thierry Bultel wrote:

> With gcc-4.9 from Ubuntu
> 
> (in grub2.mk, I set TARGET_CC="/usr/bin/gcc" \
> 	TARGET_CFLAGS="-m32" \
> )
> 
> ... grub hangs.

Seems like you're good for a bug report to the upstream project. I
checked their Git repo, there is a gcc 4.9 fix but specific for ARM
issues. I haven't seen any other commit mentioning "4.9".

You may want to try with their latest Git version first, though, just
in case the problem was fixed but not mentioned explicitly in a commit
log.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] grub2 failure with gcc-4.9
  2015-02-05 13:20 ` Thomas Petazzoni
  2015-02-05 14:16   ` Thierry Bultel
@ 2015-02-05 16:15   ` Thierry Bultel
  2015-02-05 16:16     ` Thomas Petazzoni
  1 sibling, 1 reply; 10+ messages in thread
From: Thierry Bultel @ 2015-02-05 16:15 UTC (permalink / raw)
  To: buildroot

Le 05/02/2015 14:20, Thomas Petazzoni a ?crit :
> Dear Thierry Bultel,
>
> On Thu, 05 Feb 2015 13:54:17 +0100, Thierry Bultel wrote:
>
>> After some (printf) debugging, I found out that when 'loading' the
>> builtin modules at startup, some modules names are corrupted.
>> I am about to get into deeper investigation, but has anyone
>> encountered it ?
>
> Interesting.
>
> First suggestions:
>
>   - try with another gcc 4.9 toolchain (distro toolchain or something)
>
>   - try with different optimization levels (default of Buildroot is -Os,
>     try with -O0 and -O2)
>
> Thomas
>

With gcc-4.9 from Ubuntu

(in grub2.mk, I set TARGET_CC="/usr/bin/gcc" \
	TARGET_CFLAGS="-m32" \
)

... grub hangs.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] grub2 failure with gcc-4.9
  2015-02-05 14:16   ` Thierry Bultel
@ 2015-02-05 14:56     ` Thierry Bultel
  0 siblings, 0 replies; 10+ messages in thread
From: Thierry Bultel @ 2015-02-05 14:56 UTC (permalink / raw)
  To: buildroot

Le 05/02/2015 15:16, Thierry Bultel a ?crit :
> Le 05/02/2015 14:20, Thomas Petazzoni a ?crit :
>> Dear Thierry Bultel,
>>
>> On Thu, 05 Feb 2015 13:54:17 +0100, Thierry Bultel wrote:
>>
>>> After some (printf) debugging, I found out that when 'loading' the
>>> builtin modules at startup, some modules names are corrupted.
>>> I am about to get into deeper investigation, but has anyone
>>> encountered it ?
>>
>> Interesting.
>>
>> First suggestions:
>>
>>   - try with another gcc 4.9 toolchain (distro toolchain or something)
>>
>>   - try with different optimization levels (default of Buildroot is -Os,
>>     try with -O0 and -O2)
>>
>
> It seems that when building the target part, grub is using CXXFLAGS
> (from $(HOST_CONFIGURE_OPTS)) in addition of TARGET_CFLAGS.
> Thus we have both -0s and -O2 in command line.
>
> Unfortunately that is not the cause of the bug, because -02 (twice)
> makes it happen.
>
> Trying another toolchain ...

FYI, loops rebooting with gcc-4.7 from 
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209

>
>> Thomas
>>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] grub2 failure with gcc-4.9
  2015-02-05 13:20 ` Thomas Petazzoni
@ 2015-02-05 14:16   ` Thierry Bultel
  2015-02-05 14:56     ` Thierry Bultel
  2015-02-05 16:15   ` Thierry Bultel
  1 sibling, 1 reply; 10+ messages in thread
From: Thierry Bultel @ 2015-02-05 14:16 UTC (permalink / raw)
  To: buildroot

Le 05/02/2015 14:20, Thomas Petazzoni a ?crit :
> Dear Thierry Bultel,
>
> On Thu, 05 Feb 2015 13:54:17 +0100, Thierry Bultel wrote:
>
>> After some (printf) debugging, I found out that when 'loading' the
>> builtin modules at startup, some modules names are corrupted.
>> I am about to get into deeper investigation, but has anyone
>> encountered it ?
>
> Interesting.
>
> First suggestions:
>
>   - try with another gcc 4.9 toolchain (distro toolchain or something)
>
>   - try with different optimization levels (default of Buildroot is -Os,
>     try with -O0 and -O2)
>

It seems that when building the target part, grub is using CXXFLAGS 
(from $(HOST_CONFIGURE_OPTS)) in addition of TARGET_CFLAGS.
Thus we have both -0s and -O2 in command line.

Unfortunately that is not the cause of the bug, because -02 (twice) 
makes it happen.

Trying another toolchain ...

> Thomas
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] grub2 failure with gcc-4.9
  2015-02-05 12:54 Thierry Bultel
@ 2015-02-05 13:20 ` Thomas Petazzoni
  2015-02-05 14:16   ` Thierry Bultel
  2015-02-05 16:15   ` Thierry Bultel
  0 siblings, 2 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2015-02-05 13:20 UTC (permalink / raw)
  To: buildroot

Dear Thierry Bultel,

On Thu, 05 Feb 2015 13:54:17 +0100, Thierry Bultel wrote:

> After some (printf) debugging, I found out that when 'loading' the 
> builtin modules at startup, some modules names are corrupted.
> I am about to get into deeper investigation, but has anyone
> encountered it ?

Interesting.

First suggestions:

 - try with another gcc 4.9 toolchain (distro toolchain or something)

 - try with different optimization levels (default of Buildroot is -Os,
   try with -O0 and -O2)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] grub2 failure with gcc-4.9
@ 2015-02-05 12:54 Thierry Bultel
  2015-02-05 13:20 ` Thomas Petazzoni
  0 siblings, 1 reply; 10+ messages in thread
From: Thierry Bultel @ 2015-02-05 12:54 UTC (permalink / raw)
  To: buildroot

Hi,

I just figured out that my PC target was failing to boot,
because I upgraded the compiler from (buildroot toolchain) gcc-4.8.x to 
gcc-4.9.x

The configuration is:
BR2_TARGET_GRUB2_I386_PC=y
BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat part_msdos 
part_gpt part_bsd normal biosdisk sleep echo video videoinfo help jpeg 
uhci ehci usb usb_keyboard usbms usbtest gfxterm gfxmenu vbe vga 
video_bochs video_cirrus font search search_fs_file search_label test 
test_blockarg keylayouts at_keyboard cat configfile loadenv eval serial 
regexp"

(I know, that makes a lot but work like a charm with gcc-4.8.2)

The symptom is :
-------------------------------
'' is already set
Aborted. Press any key to exit.
-------------------------------

After some (printf) debugging, I found out that when 'loading' the 
builtin modules at startup, some modules names are corrupted.
I am about to get into deeper investigation, but has anyone
encountered it ?

Best regards
Thierry

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-20 16:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <54D39F5A.2010403@ou.edu>
2015-02-05 18:44 ` [Buildroot] Fwd: Re: grub2 failure with gcc-4.9 Steve Kenton
2015-02-19 15:46   ` Thierry Bultel
2015-02-19 16:03     ` Steve Kenton
2015-02-20 16:34       ` [Buildroot] " tbultel at free.fr
2015-02-05 12:54 Thierry Bultel
2015-02-05 13:20 ` Thomas Petazzoni
2015-02-05 14:16   ` Thierry Bultel
2015-02-05 14:56     ` Thierry Bultel
2015-02-05 16:15   ` Thierry Bultel
2015-02-05 16:16     ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.