Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ################################################################################
  2. #
  3. # Copyright (c) 2014 Minoca Corp. All Rights Reserved
  4. #
  5. # Module Name:
  6. #
  7. # PandaBoard UEFI Runtime
  8. #
  9. # Abstract:
  10. #
  11. # This module implements the PandaBoard runtime firmware, which continues
  12. # to be loaded and provide services to the OS kernel even after the boot
  13. # environment has been destroyed. It is never unloaded.
  14. #
  15. # Author:
  16. #
  17. # Evan Green 19-Mar-2014
  18. #
  19. # Environment:
  20. #
  21. # Firmware
  22. #
  23. ################################################################################
  24. BINARY = pandart.elf
  25. BINARYTYPE = staticapp
  26. BINPLACE = bin
  27. INCLUDES += $(SRCROOT)/os/uefi/include;$(SRCDIR)/..;
  28. BINPLACE = bin
  29. OBJS += i2c.o \
  30. pmic.o \
  31. rtc.o \
  32. reboot.o \
  33. runtime.o \
  34. VPATH += $(BINROOT):
  35. ENTRY = EfiRuntimeCoreEntry
  36. LDFLAGS += -pie -Wl,--no-wchar-size-warning
  37. LDFLAGS += -nodefaultlibs -nostartfiles -nostdlib
  38. ifeq ($(ARCH), armv7)
  39. LINKER_SCRIPT = $(SRCROOT)/os/uefi/include/link_arm.x
  40. endif
  41. TARGETLIBS = $(OBJROOT)/os/uefi/core/rtlib/rtlib.a \
  42. $(OBJROOT)/os/uefi/archlib/uefiarch.a \
  43. include $(SRCROOT)/os/minoca.mk
  44. CFLAGS += -fshort-wchar
  45. ##
  46. ## On architectures that produce ELF binaries, convert it to a PE image.
  47. ##
  48. postbuild: pandart.ffs
  49. pandart.ffs: pandart
  50. @genffs -s -i $< -r EFI_SECTION_PE32 \
  51. -i $< -r EFI_SECTION_USER_INTERFACE -t EFI_FV_FILETYPE_DRIVER -o $@
  52. pandart: $(BINARY)
  53. @echo Converting - $(notdir $<)
  54. @elfconv -o $@ -t efiruntimedriver $<