Mac OS X Internals: The Book Forum Index Mac OS X Internals: The Book
Forums
 
SearchSearch   MemberlistMemberlist  RegisterRegister 
 ProfileProfile   Log inLog in 
Mission Statement | Rules | Terms of Forum Use       osxbook.com | Blog


EFI chapter doesn't work

 
Post new topic   Reply to topic    Mac OS X Internals: The Book Forum Index -> The Book
View previous topic :: View next topic  
Author Message
shayaan



Joined: 29 Jul 2006
Posts: 4

PostPosted: Sat Jul 29, 2006 10:50 am    Post subject: EFI chapter doesn't work Reply with quote

Hello Amit

I am following the directions in your book.

Code:

$ make
...
$ sudo make install
...


I get the following and I am not sure if it's an error

Code:

make install
mkdir -p /usr/local/lib
install -m 644 libefi.a /usr/local/lib/
mkdir -p /usr/local/lib
install -m 644 crt0-efi-ia32.o libgnuefi.a /usr/local/lib
install -m 644 elf_ia32_efi.lds /usr/local/lib
mkdir -p /usr/local/include/efi
mkdir -p /usr/local/include/efi/protocol
mkdir -p /usr/local/include/efi/ia32
install -m 644 *.h /usr/local/include/efi
install -m 644 protocol/*.h /usr/local/include/efi/protocol
install -m 644 ia32/*.h /usr/local/include/efi/ia32
make[1]: Nothing to be done for `install'.


Please help..

I am not sure what you mean by

Quote:
Thereafter, we can compile and install gnu-efi. By default, the headers and object files are installed under /usr/local/.


is compiling the same as "make and make install"

Thanks

PS: I am buying a copy of your book on Monday (when the store opens)
Back to top
View user's profile Send private message
shayaan



Joined: 29 Jul 2006
Posts: 4

PostPosted: Sat Aug 05, 2006 11:58 am    Post subject: Reply with quote

so no one knows why it doesnt work?
Back to top
View user's profile Send private message
amit
Amit Singh
Amit Singh


Joined: 06 Feb 2006
Posts: 76

PostPosted: Sat Aug 05, 2006 1:04 pm    Post subject: Reply with quote

shayaan wrote:
so no one knows why it doesnt work?

What symptom are you seeing that suggests it doesn't work? If "make install" copied headers and object file to the /usr/local hierarchy, that's all it's supposed to do.
Back to top
View user's profile Send private message
danchr



Joined: 07 Feb 2006
Posts: 2
Location: Århus, Denmark

PostPosted: Wed Aug 09, 2006 11:58 pm    Post subject: Reply with quote

Apple just released an EFI DDK that's available on [url]connect.apple.com[/url]. Maybe that'll work better Very Happy
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
amit
Amit Singh
Amit Singh


Joined: 06 Feb 2006
Posts: 76

PostPosted: Sat Aug 12, 2006 11:26 am    Post subject: Reply with quote

danchr wrote:
Apple just released an EFI DDK that's available on [url]connect.apple.com[/url]. Maybe that'll work better Very Happy

Apple's EFI DDK is *not* a toolchain, nor even a set of EFI libraries.
Back to top
View user's profile Send private message
noxorc



Joined: 18 Nov 2006
Posts: 3

PostPosted: Sat Nov 18, 2006 4:15 pm    Post subject: Re: EFI chapter doesn't work Reply with quote

shayaan wrote:
Hello Amit

I am following the directions in your book.

Code:

$ make
...
$ sudo make install
...


I get the following and I am not sure if it's an error

Code:

make install
mkdir -p /usr/local/lib
install -m 644 libefi.a /usr/local/lib/
mkdir -p /usr/local/lib
install -m 644 crt0-efi-ia32.o libgnuefi.a /usr/local/lib
install -m 644 elf_ia32_efi.lds /usr/local/lib
mkdir -p /usr/local/include/efi
mkdir -p /usr/local/include/efi/protocol
mkdir -p /usr/local/include/efi/ia32
install -m 644 *.h /usr/local/include/efi
install -m 644 protocol/*.h /usr/local/include/efi/protocol
install -m 644 ia32/*.h /usr/local/include/efi/ia32
make[1]: Nothing to be done for `install'.


Please help..

I am not sure what you mean by

Quote:
Thereafter, we can compile and install gnu-efi. By default, the headers and object files are installed under /usr/local/.


is compiling the same as "make and make install"

Thanks

PS: I am buying a copy of your book on Monday (when the store opens)



Post your "Makefile" and "Make.defaults" and "Make.rules" file.

Did you modify any of those files?

Are you compiling IA-32 or IA-64?

-nox
________
Make a vaporizer


Last edited by noxorc on Sat Feb 19, 2011 8:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
kaff



Joined: 21 Nov 2006
Posts: 2

PostPosted: Tue Nov 21, 2006 7:47 pm    Post subject: Reply with quote

I followed the setup instructions exactly but I can't get gnu-efi built. Here's the output:

Code:

gcc  -DCONFIG_ia32  -c -o crt0-efi-ia32.o crt0-efi-ia32.S
crt0-efi-ia32.S:38:non-relocatable subtraction expression, "_DYNAMIC" minus "L01"
crt0-efi-ia32.S:38:symbol: "_DYNAMIC" can't be undefined in a subtraction expression
crt0-efi-ia32.S:37:non-relocatable subtraction expression, "ImageBase" minus "L01"
crt0-efi-ia32.S:37:symbol: "ImageBase" can't be undefined in a subtraction expression
make[1]: *** [crt0-efi-ia32.o] Error 1
make: *** [gnuefi] Error 2


My asm knowledge isn't good enough to figure out what's going wrong there, but maybe something's wrong with the toolchain?

Also, if I try to build in apps I get:

Code:

gcc -I. -I/Users/stopgo/code/gnu-efi-3.0c/apps/../inc -I/Users/stopgo/code/gnu-efi-3.0c/apps/../inc/ia32 -I/Users/stopgo/code/gnu-efi-3.0c/apps/../inc/protocol  -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -DCONFIG_ia32 -D__KERNEL__ -I/usr/src/sys/build/include -c t.c -o t.o
t.c:1: warning: -fpic is not supported; -fPIC assumed
ld -nostdlib -T ../gnuefi/elf_ia32_efi.lds -shared -Bsymbolic -L../lib -L../gnuefi ../gnuefi/crt0-efi-ia32.o t.o -o t.so -lefi -lgnuefi /usr/lib/gcc/i686-apple-darwin8/4.0.1/libgcc.a
ld: unknown flag: -nostdlib
make: *** [t.so] Error 1


Maybe that will shed extra light on the matter. Any help is greatly appreciated!
Back to top
View user's profile Send private message
kaff



Joined: 21 Nov 2006
Posts: 2

PostPosted: Tue Nov 21, 2006 7:51 pm    Post subject: Reply with quote

Argh, figured out the problem as soon as I posted. In my Make.defaults, I mistakenly set up the prefix for ia64 instead of ia32. Whoops!
Back to top
View user's profile Send private message
noxorc



Joined: 18 Nov 2006
Posts: 3

PostPosted: Tue Nov 28, 2006 7:10 am    Post subject: Reply with quote

I got some 'ia-32' hardware. So the gnu-efi 1.10 should be out soon.

-nox
________
Juggalo


Last edited by noxorc on Sat Feb 19, 2011 8:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
noxorc



Joined: 18 Nov 2006
Posts: 3

PostPosted: Wed Jan 17, 2007 2:11 pm    Post subject: gnu-efi-3.1 supports EFI 1.10 Reply with quote

http://sourceforge.net/projects/gnu-efi/
________
Website Host
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mac OS X Internals: The Book Forum Index -> The Book All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB (FAQ)
All contents of this site, unless otherwise noted, are ©1994-2008 Amit Singh. All Rights Reserved. Terms of Use