Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ################################################################################
  2. #
  3. # Copyright (c) 2014 Minoca Corp. All Rights Reserved
  4. #
  5. # Module Name:
  6. #
  7. # BeagleBone Stage 1 Loader
  8. #
  9. # Abstract:
  10. #
  11. # This module implements Texas Instruments AM335x first stage loader.
  12. #
  13. # Author:
  14. #
  15. # Evan Green 17-Dec-2014
  16. #
  17. # Environment:
  18. #
  19. # Firmware
  20. #
  21. ################################################################################
  22. BINARY := bbonemlo.elf
  23. BINARYTYPE = staticapp
  24. BINPLACE = bin
  25. VPATH += $(BINROOT):
  26. INCLUDES += $(SRCROOT)/os/uefi/include;
  27. INCLUDES += $(SRCDIR)/../../panda/init;
  28. LDFLAGS += -nodefaultlibs -nostartfiles -nostdlib
  29. OBJS += boot.o \
  30. clock.o \
  31. crc32.o \
  32. fatboot.o \
  33. mux.o \
  34. power.o \
  35. serial.o \
  36. rommem.o \
  37. ARMV7_OBJS = armv7/start.o \
  38. TEXT_ADDRESS = 0x402F0408
  39. LINKER_SCRIPT = $(SRCROOT)/os/uefi/plat/panda/init/link.x
  40. EXTRA_SRC_DIRS = armv7
  41. DIRS = bbonefwb \
  42. include $(SRCROOT)/os/minoca.mk
  43. VPATH += $(SRCDIR)/../../panda/init:
  44. postbuild: bbonemlo bbonemlo.bin
  45. bbonemlo: bbonemlo.bin
  46. @echo Generating - $@
  47. @bbonefwb/bbonefwb 0x402F0408 $^ $@
  48. @cp -p $@ $(BINROOT)/
  49. bbonemlo.bin: $(BINARY)
  50. @echo Flattening - $(notdir $<)
  51. @$(OBJCOPY) -O binary $^ $@