All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub
@ 2017-08-27 11:57 Bin Meng
  2017-08-28  7:05 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2017-08-27 11:57 UTC (permalink / raw)
  To: buildroot

Hi,

I wanted to build a 32-bit rootfs for minnowboard max, so I started by:

$ make minnowboard_max_defconfig
$ make menuconfig
change "Target options" -> "Target Architecture" to i386, save and exit
$ make

It fails in the end.

mkdir -p /buildroot/output/images/
/buildroot/output/host/bin/grub-mkimage -d
/buildroot/output/host/lib/grub/i386-pc -O i386-pc -o
/buildroot/output/images/grub.img -p "(hd0,msdos1)/boot/grub"  boot
linux ext2 fat squash4 part_msdos part_gpt normal efi_gop
/buildroot/output/host/bin/grub-mkimage: error: cannot open
`/buildroot/output/host/lib/grub/i386-pc/efi_gop.mod': No such file or
directory.
package/pkg-generic.mk:308: recipe for target
'/buildroot/output/build/grub2-2.02/.stamp_target_installed' failed
make: *** [/buildroot/output/build/grub2-2.02/.stamp_target_installed] Error 1

Am I missing anything?

Regards,
Bin

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

* [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub
  2017-08-27 11:57 [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub Bin Meng
@ 2017-08-28  7:05 ` Thomas Petazzoni
  2017-08-28  7:47   ` Bin Meng
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-28  7:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 27 Aug 2017 19:57:48 +0800, Bin Meng wrote:

> I wanted to build a 32-bit rootfs for minnowboard max, so I started by:
> 
> $ make minnowboard_max_defconfig
> $ make menuconfig
> change "Target options" -> "Target Architecture" to i386, save and exit
> $ make
> 
> It fails in the end.
> 
> mkdir -p /buildroot/output/images/
> /buildroot/output/host/bin/grub-mkimage -d
> /buildroot/output/host/lib/grub/i386-pc -O i386-pc -o
> /buildroot/output/images/grub.img -p "(hd0,msdos1)/boot/grub"  boot
> linux ext2 fat squash4 part_msdos part_gpt normal efi_gop
> /buildroot/output/host/bin/grub-mkimage: error: cannot open
> `/buildroot/output/host/lib/grub/i386-pc/efi_gop.mod': No such file or
> directory.
> package/pkg-generic.mk:308: recipe for target
> '/buildroot/output/build/grub2-2.02/.stamp_target_installed' failed
> make: *** [/buildroot/output/build/grub2-2.02/.stamp_target_installed] Error 1
> 
> Am I missing anything?

Yes: you're changing a defconfig to a different configuration, so
obviously, you can get build failures.

By switching to i386, grub2 is no longer configured with
BR2_TARGET_GRUB2_X86_64_EFI (as specified in the defconfig), but with
BR2_TARGET_GRUB2_I386_PC. But BR2_TARGET_GRUB2_BUILTIN_MODULES still
contains efi_gop, which isn't built because you're no longer building
an EFI-capable grub2.

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

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

* [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub
  2017-08-28  7:05 ` Thomas Petazzoni
@ 2017-08-28  7:47   ` Bin Meng
  2017-08-28  7:52     ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2017-08-28  7:47 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, Aug 28, 2017 at 3:05 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Sun, 27 Aug 2017 19:57:48 +0800, Bin Meng wrote:
>
>> I wanted to build a 32-bit rootfs for minnowboard max, so I started by:
>>
>> $ make minnowboard_max_defconfig
>> $ make menuconfig
>> change "Target options" -> "Target Architecture" to i386, save and exit
>> $ make
>>
>> It fails in the end.
>>
>> mkdir -p /buildroot/output/images/
>> /buildroot/output/host/bin/grub-mkimage -d
>> /buildroot/output/host/lib/grub/i386-pc -O i386-pc -o
>> /buildroot/output/images/grub.img -p "(hd0,msdos1)/boot/grub"  boot
>> linux ext2 fat squash4 part_msdos part_gpt normal efi_gop
>> /buildroot/output/host/bin/grub-mkimage: error: cannot open
>> `/buildroot/output/host/lib/grub/i386-pc/efi_gop.mod': No such file or
>> directory.
>> package/pkg-generic.mk:308: recipe for target
>> '/buildroot/output/build/grub2-2.02/.stamp_target_installed' failed
>> make: *** [/buildroot/output/build/grub2-2.02/.stamp_target_installed] Error 1
>>
>> Am I missing anything?
>
> Yes: you're changing a defconfig to a different configuration, so
> obviously, you can get build failures.
>
> By switching to i386, grub2 is no longer configured with
> BR2_TARGET_GRUB2_X86_64_EFI (as specified in the defconfig), but with
> BR2_TARGET_GRUB2_I386_PC. But BR2_TARGET_GRUB2_BUILTIN_MODULES still
> contains efi_gop, which isn't built because you're no longer building
> an EFI-capable grub2.
>

Thanks for the hints. Since I changed "Target Architecture" to i386 in
menuconfig, I see the grub2 platform has also changed to "i386-pc"
automatically, but the built modules
(BR2_TARGET_GRUB2_BUILTIN_MODULES) remains unchanged, and that
explains the build error. Is this a limitation of Kconfig that it
cannot switch BR2_TARGET_GRUB2_BUILTIN_MODULES automatically?

I did further testing by switching "Target Architecture" back to
x86-64, and I saw grub2 platform did not change to the EFI stuff and
remained as "i386-pc".

Regards,
Bin

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

* [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub
  2017-08-28  7:47   ` Bin Meng
@ 2017-08-28  7:52     ` Thomas Petazzoni
  2017-08-28  8:26       ` Bin Meng
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-28  7:52 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 28 Aug 2017 15:47:57 +0800, Bin Meng wrote:

> Thanks for the hints. Since I changed "Target Architecture" to i386 in
> menuconfig, I see the grub2 platform has also changed to "i386-pc"
> automatically, but the built modules
> (BR2_TARGET_GRUB2_BUILTIN_MODULES) remains unchanged, and that
> explains the build error. Is this a limitation of Kconfig that it
> cannot switch BR2_TARGET_GRUB2_BUILTIN_MODULES automatically?

Yes.

> I did further testing by switching "Target Architecture" back to
> x86-64, and I saw grub2 platform did not change to the EFI stuff and
> remained as "i386-pc".

Yes, welcome to Kconfig :)

Best regards,

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

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

* [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub
  2017-08-28  7:52     ` Thomas Petazzoni
@ 2017-08-28  8:26       ` Bin Meng
  2017-08-28  9:07         ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2017-08-28  8:26 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, Aug 28, 2017 at 3:52 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 28 Aug 2017 15:47:57 +0800, Bin Meng wrote:
>
>> Thanks for the hints. Since I changed "Target Architecture" to i386 in
>> menuconfig, I see the grub2 platform has also changed to "i386-pc"
>> automatically, but the built modules
>> (BR2_TARGET_GRUB2_BUILTIN_MODULES) remains unchanged, and that
>> explains the build error. Is this a limitation of Kconfig that it
>> cannot switch BR2_TARGET_GRUB2_BUILTIN_MODULES automatically?
>
> Yes.
>
>> I did further testing by switching "Target Architecture" back to
>> x86-64, and I saw grub2 platform did not change to the EFI stuff and
>> remained as "i386-pc".
>
> Yes, welcome to Kconfig :)
>

Thanks. But do you know why does Kconfig changes grub2 platform to
"i386-pc" when I changed "Target Architecture" to i386. It should just
remain unchanged, no?

Regards,
Bin

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

* [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub
  2017-08-28  8:26       ` Bin Meng
@ 2017-08-28  9:07         ` Thomas Petazzoni
  2017-08-28  9:24           ` Bin Meng
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-08-28  9:07 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 28 Aug 2017 16:26:24 +0800, Bin Meng wrote:

> Thanks. But do you know why does Kconfig changes grub2 platform to
> "i386-pc" when I changed "Target Architecture" to i386. It should just
> remain unchanged, no?

Look at the config option dependencies please.

The minnowboard_max_defconfig has:

BR2_TARGET_GRUB2_X86_64_EFI=y

But BR2_TARGET_GRUB2_X86_64_EFI has "depends on BR2_ARCH_IS_64". So
when you switch from x86-64 to i386, this option is no longer
available. Therefore Kconfig reverts back to the first possible choice
between BR2_TARGET_GRUB2_I386_PC and BR2_TARGET_GRUB2_I386_EFI.

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

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

* [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub
  2017-08-28  9:07         ` Thomas Petazzoni
@ 2017-08-28  9:24           ` Bin Meng
  0 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2017-08-28  9:24 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, Aug 28, 2017 at 5:07 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 28 Aug 2017 16:26:24 +0800, Bin Meng wrote:
>
>> Thanks. But do you know why does Kconfig changes grub2 platform to
>> "i386-pc" when I changed "Target Architecture" to i386. It should just
>> remain unchanged, no?
>
> Look at the config option dependencies please.
>
> The minnowboard_max_defconfig has:
>
> BR2_TARGET_GRUB2_X86_64_EFI=y
>
> But BR2_TARGET_GRUB2_X86_64_EFI has "depends on BR2_ARCH_IS_64". So
> when you switch from x86-64 to i386, this option is no longer
> available. Therefore Kconfig reverts back to the first possible choice
> between BR2_TARGET_GRUB2_I386_PC and BR2_TARGET_GRUB2_I386_EFI.

Thank you. That makes perfect sense. I am pretty new to buildroot, but
I should have read the manual and done some investigation myself!

Regards,
Bin

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

end of thread, other threads:[~2017-08-28  9:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-27 11:57 [Buildroot] minnowboard_max_defconfig, changes to build for 32-bit, fails in the end when installing grub Bin Meng
2017-08-28  7:05 ` Thomas Petazzoni
2017-08-28  7:47   ` Bin Meng
2017-08-28  7:52     ` Thomas Petazzoni
2017-08-28  8:26       ` Bin Meng
2017-08-28  9:07         ` Thomas Petazzoni
2017-08-28  9:24           ` Bin Meng

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.