[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building only util

From: Darren Hart
Subject: Re: Building only util
Date: Mon, 28 Nov 2011 16:03:02 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

On 11/25/2011 11:01 AM, Jordan Uggla wrote:
> On Wed, Nov 23, 2011 at 12:13 AM, Darren Hart <address@hidden> wrote:
>> Is there a way to build only the util directory?
>> There is a long story behind why I think this might be a good idea. It
>> has to do with packaging and cross compilation environments. I need to
>> build grub-mkimage for my build arch in order to assemble final efi
>> images, like bootia32.efi, but I also want to build everything for the
>> target arch for deployment.
>> "make util/grub-mkimage" made a rather feeble attempt, but failed.
>> Thanks,
>> --
>> Darren Hart
>> Intel Open Source Technology Center
>> Yocto Project - Linux Kernel
>> _______________________________________________
>> Help-grub mailing list
>> address@hidden
> It sounds like you're trying to build the utilities for a different
> architecture (the "host" architecture) than the "target" architecture.
> Grub is designed to handle this without any manual workarounds like
> you seem to be trying to do. You didn't specify your host and target
> architecture but if you wanted to build utilities for a PowerPC host
> to install grub to be booted from an x86 PC, you would build grub by
> running ./configure like this (thanks to phcoder for this example):
> ./configure CC=powerpc-linux-gcc  --host=ppc-linux-gnu --target=i386
> --with-platform=pc TARGET_CC=i386-linux-gcc

Thanks for the pointer. I've updated my build environment to do just
this. The compile log shows it using the host compiler to build the
binaries and the cross-compiler to build the grub modules.
unfortunately, grub-mkimage then segfaults shortly after performing the
the ELF check on kernel.img (from a brief look at an strace).

If I use my host compiler for both the HOST and the TARGET (host is
x86_64 and target is i386), then grub-mkimage works. However, if I use
the cross compiler to build the grub modules, and I use my distribution
installed grub-mkimage (instead of the one I build) things also work.
I'm currently a bit baffled at where the problem might be.

I'm continuing to look into it, but if this rings any bells, please share.


Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]