socsvn commit: r237023 - soc2012/emc2/experimental
emc2 at FreeBSD.org
emc2 at FreeBSD.org
Sun Jun 3 23:54:21 UTC 2012
Author: emc2
Date: Sun Jun 3 23:54:18 2012
New Revision: 237023
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237023
Log:
Results of some exploration. The end result of this is a better
understanding of how to build EFI applications using the build tools.
I've also done a fair amount of exploring the EFI API, though that can't be
reflected in actual code changes.
Modified:
soc2012/emc2/experimental/Makefile
soc2012/emc2/experimental/helloworld.c
Modified: soc2012/emc2/experimental/Makefile
==============================================================================
--- soc2012/emc2/experimental/Makefile Sun Jun 3 22:40:32 2012 (r237022)
+++ soc2012/emc2/experimental/Makefile Sun Jun 3 23:54:18 2012 (r237023)
@@ -6,13 +6,19 @@
all: helloworld.efi
+clean:
+ rm -f helloworld.o helloworld helloworld.efi start.o
+
+start.o: start.S
+ ${CC} -c ${CFLAGS} start.S
+
helloworld.o: helloworld.c
${CC} -c ${CFLAGS} helloworld.c
-helloworld: helloworld.o
- ${LD} -T ${LDSCRIPT} -shared -symbolic -o helloworld helloworld.o
+helloworld: helloworld.o start.o
+ ${CC} -nostdlib -o helloworld -Wl,-T ${LDSCRIPT} -shared -symbolic helloworld.o start.o
helloworld.efi: helloworld
${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \
-j .rel.dyn -j .reloc -j .sdata -j .text -j set_Xcommand_set \
- --target=${EFIFORMAT} ${.ALLSRC} helloworld.efi
\ No newline at end of file
+ --target=${EFIFORMAT} ${.ALLSRC} helloworld.efi
Modified: soc2012/emc2/experimental/helloworld.c
==============================================================================
--- soc2012/emc2/experimental/helloworld.c Sun Jun 3 22:40:32 2012 (r237022)
+++ soc2012/emc2/experimental/helloworld.c Sun Jun 3 23:54:18 2012 (r237023)
@@ -1,6 +1,6 @@
#include <efi.h>
-unsigned short str[] =
+static unsigned short str[] =
{ 'H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd', '\n', '\r', 0 };
EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE* systab)
More information about the svn-soc-all
mailing list