Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ################################################################################
  2. #
  3. # Copyright (c) 2012 Minoca Corp. All Rights Reserved
  4. #
  5. # Module Name:
  6. #
  7. # PandaBoard Stage 1 Loader
  8. #
  9. # Abstract:
  10. #
  11. # This module implements OMAP4 first stage loader.
  12. #
  13. # Author:
  14. #
  15. # Evan Green 1-Apr-2014
  16. #
  17. # Environment:
  18. #
  19. # Firmware
  20. #
  21. ################################################################################
  22. BINARY := omap4mlo.elf
  23. BINARYTYPE = staticapp
  24. BINPLACE = bin
  25. VPATH += $(BINROOT):
  26. INCLUDES += $(SRCROOT)/os/uefi/include;
  27. LDFLAGS += -nodefaultlibs -nostartfiles -nostdlib
  28. ##
  29. ## The first stage loader has to be built in ARM mode since the ROM code
  30. ## seems to reset if interrupts are enabled and the processor is in Thumb mode.
  31. ##
  32. EXTRA_CFLAGS += -marm
  33. OBJS += boot.o \
  34. clock.o \
  35. crc32.o \
  36. fatboot.o \
  37. gpio.o \
  38. id.o \
  39. mux.o \
  40. serial.o \
  41. rommem.o \
  42. romusb.o \
  43. ARMV7_OBJS = armv7/start.o \
  44. TEXT_ADDRESS = 0x40308000
  45. LINKER_SCRIPT = $(SRCROOT)/os/uefi/plat/panda/init/link.x
  46. EXTRA_SRC_DIRS = armv7
  47. DIRS = fwbuild \
  48. include $(SRCROOT)/os/minoca.mk
  49. postbuild: omap4mlo
  50. omap4mlo: omap4mlo.bin
  51. @echo Generating - $@
  52. @fwbuild/pandafwb 0x40300000 $^ $@
  53. @cp -p $@ $(BINROOT)/
  54. omap4mlo.bin: $(BINARY)
  55. @echo Flattening - $(notdir $<)
  56. @$(OBJCOPY) -O binary $^ $@
  57. @cp -p $@ $(BINROOT)/