Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ################################################################################
  2. #
  3. # Copyright (c) 2012 Minoca Corp. All Rights Reserved
  4. #
  5. # Module Name:
  6. #
  7. # BIOS UEFI Firmware
  8. #
  9. # Abstract:
  10. #
  11. # This module implements a UEFI-compatible firmware layer on top of a
  12. # legacy PC/AT BIOS.
  13. #
  14. # Author:
  15. #
  16. # Evan Green 26-Feb-2014
  17. #
  18. # Environment:
  19. #
  20. # Firmware
  21. #
  22. ################################################################################
  23. include $(SRCDIR)/../common
  24. BINARY := biosfw.elf
  25. BINARYTYPE = staticapp
  26. BINPLACE = bin
  27. VPATH += $(BINROOT):
  28. LDFLAGS += -nodefaultlibs -nostartfiles -nostdlib
  29. OBJS += acpi.o \
  30. bioscall.o \
  31. biosfwv.o \
  32. disk.o \
  33. debug.o \
  34. fwvol.o \
  35. intr.o \
  36. main.o \
  37. memmap.o \
  38. timer.o \
  39. video.o \
  40. X86_OBJS = x86/entry.o \
  41. x86/realmexe.o \
  42. TEXT_ADDRESS = 0x100000
  43. TARGETLIBS += $(OBJROOT)/os/uefi/dev/ns16550/ns16550.a \
  44. EXTRA_SRC_DIRS = x86
  45. DIRS = runtime
  46. include $(SRCROOT)/os/minoca.mk
  47. postbuild: biosfw.bin
  48. biosfw.bin: $(BINARY)
  49. @echo Flattening - $(notdir $<)
  50. @$(OBJCOPY) -O binary $< $@
  51. @cp -p $@ $(BINROOT)/
  52. ##
  53. ## Define the target that creates the firmware volume object file.
  54. ##
  55. FWVOL_IMAGES = $(RTBASE) runtime/biosrt.ffs
  56. biosfwv.o: biosfwv
  57. @echo Objectifying - $(notdir $<)
  58. @$(OBJCOPY) -B $(BFD_ARCH) -I binary -O $(OBJ_FORMAT) $< $@
  59. biosfwv: $(FWVOL_IMAGES)
  60. @echo Generating - $@
  61. @genfv -o $@ $^
  62. $(RAMDISK_O): $(RAMDISK)
  63. @echo Objectifying - $(notdir $<)
  64. @cp $^ ramdisk
  65. @$(OBJCOPY) -I binary -O $(OBJ_FORMAT) -B $(BFD_ARCH) ramdisk $@
  66. runtime/biosrt.ffs: runtime