[Top][All Lists]

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

Re: [PATCH] efiemu

From: Bean
Subject: Re: [PATCH] efiemu
Date: Sun, 3 May 2009 14:36:39 +0800


There are a few problems with the build script, I'm fixing it now.

First, the build rules for efiemu32.o:

efiemu32.o: efiemu/runtime/efiemu.c
        $(CC) -c -m32 -DELF32 -o $@ -Wall -Werror
efiemu/runtime/efiemu.c -nostdlib -O2 -Iefiemu/runtime -Iinclude

This would break building from a directory other than the root source
path. For example, I usually put the binaries in directory pc:

mkdir pc
cd pc

This would avoid populating the root source directory with hundreds of
build files, it also make it possible to build multiple targets with
the same source tree. For example, pc for i386-pc, efi32 for i386-efi,
efi64 for x86_64-efi. When I want a clean build, I just remove the
directory and recreate it again.

To support building from other directories, the rules should be:

efiemu32.o: efiemu/runtime/efiemu.c
        $(CC) -c -m32 -DELF32 -o $@ -Wall -Werror $< -nostdlib -O2
-I$(srcdir)/efiemu/runtime -I$(srcdir)/include -Iinclude

make would take care of translating $< to the real path, for example
../efiemu/runtime/efiemu.c, and $(srcdir) is the root source

Also, for 64-bit efiemu, I think it'd be safer to add the
-mno-red-zone option, otherwise it might access the stack using
negative offset from %rsp.

BTW, not all system can build efiemu runtime properly. For example,
cygwin/mingw can't build it at all, even in linux, if gcc-multilib is
not installed, it would fail to build the 32-bit or 64-bit component.
So I add an option --enable-efiemu in configure. The efiemu runtime is
only built when this option is enabled.

On Sun, May 3, 2009 at 7:20 AM, Vladimir 'phcoder' Serbinenko
<address@hidden> wrote:
> commited
> On Mon, Apr 27, 2009 at 9:40 PM, Vladimir 'phcoder' Serbinenko
> <address@hidden> wrote:
>> Install scripts fixed. Additionally now skipped commands (efiemu_loadcore,
>> efiemu_pnvram) are executed automatically
>> On Wed, Apr 15, 2009 at 12:10 AM, phcoder <address@hidden> wrote:
>>> Hello here is rediff & update of my efiemu patch. Now it's patched on top
>>> of following patch chain:
>>> bootmove->preboot->mmap->acpi
>>> Now to use it do ([32|64] means 32 for 32-bit version, 64 for 64-bit
>>> version):
>>> efiemu_loadcore /grub/loadcore[32|64].o
>>> efiemu_pnvram [pnvram file if any]
>>> efiemu_prepare
>>> <commands to load OS using efiemu>
>>> --
>>> Regards
>>> Vladimir 'phcoder' Serbinenko
>> --
>> Regards
>> Vladimir 'phcoder' Serbinenko
> --
> Regards
> Vladimir 'phcoder' Serbinenko
> _______________________________________________
> Grub-devel mailing list
> address@hidden


reply via email to

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