Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Jun 2012 23:54:19 +0000
From:      emc2@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r237023 - soc2012/emc2/experimental
Message-ID:  <20120603235419.1BB10106567B@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120603235419.1BB10106567B>