1
0

Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ################################################################################
  2. #
  3. # Copyright (c) 2015 Minoca Corp. All Rights Reserved
  4. #
  5. # Module Name:
  6. #
  7. # BeagleBone UEFI Runtime
  8. #
  9. # Abstract:
  10. #
  11. # This module implements the BeagleBone 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 6-Jan-2015
  18. #
  19. # Environment:
  20. #
  21. # Firmware
  22. #
  23. ################################################################################
  24. BINARY = bbonert.elf
  25. BINARYTYPE = staticapp
  26. BINPLACE = bin
  27. INCLUDES += $(SRCROOT)/os/uefi/include;$(SRCDIR)/..;
  28. BINPLACE = bin
  29. OBJS += reboot.o \
  30. rtc.o \
  31. runtime.o \
  32. VPATH += $(BINROOT):
  33. ENTRY = EfiRuntimeCoreEntry
  34. LDFLAGS += -pie -Wl,--no-wchar-size-warning
  35. LDFLAGS += -nodefaultlibs -nostartfiles -nostdlib
  36. ifeq ($(ARCH), armv7)
  37. LINKER_SCRIPT = $(SRCROOT)/os/uefi/include/link_arm.x
  38. endif
  39. TARGETLIBS = $(OBJROOT)/os/uefi/core/rtlib/rtlib.a \
  40. $(OBJROOT)/os/uefi/archlib/uefiarch.a \
  41. include $(SRCROOT)/os/minoca.mk
  42. CFLAGS += -fshort-wchar
  43. ##
  44. ## On architectures that produce ELF binaries, convert it to a PE image.
  45. ##
  46. postbuild: bbonert
  47. postbuild: bbonert.ffs
  48. bbonert.ffs: bbonert
  49. @genffs -s -i $< -r EFI_SECTION_PE32 \
  50. -i $< -r EFI_SECTION_USER_INTERFACE -t EFI_FV_FILETYPE_DRIVER -o $@
  51. bbonert: $(BINARY)
  52. @echo Converting - $(notdir $<)
  53. @elfconv -o $@ -t efiruntimedriver $<