Skip to content
Permalink
Browse files

implement u-boot payload

  • Loading branch information
KireinaHoro committed Feb 24, 2020
1 parent 1a0031b commit f9749fee89201d65439f79d50a869bfb17428b2c
Showing with 13 additions and 2 deletions.
  1. +4 −2 Makefile
  2. +9 −0 firmware/payloads/objects.mk
@@ -9,8 +9,7 @@

# Select Make Options:
# o Do not use make's built-in rules
# o Do not print "Entering directory ...";
MAKEFLAGS += -r --no-print-directory
MAKEFLAGS += -r

# Find out source, build, and install directories
src_dir=$(CURDIR)
@@ -266,6 +265,7 @@ targets-y += $(firmware-bins-path-y)
# Default rule "make" should always be first rule
.PHONY: all
.DEFAULT_GOAL :=
all: $(targets-y)
# Preserve all intermediate files
@@ -411,6 +411,8 @@ clean:
$(CMD_PREFIX)find $(build_dir) -type f -name "*.elf" -exec rm -rf {} +
$(if $(V), @echo " RM $(build_dir)/*.bin")
$(CMD_PREFIX)find $(build_dir) -type f -name "*.bin" -exec rm -rf {} +
$(if $(V), @echo " CLEAN $(u-boot_root)")
$(MAKE) -C $(u-boot_root) clean
# Rule for "make distclean"
.PHONY: distclean
@@ -8,6 +8,7 @@
#

firmware-bins-$(FW_PAYLOAD) += payloads/test.bin
firmware-bins-$(FW_PAYLOAD) += payloads/u-boot.bin

test-y += test_head.o
test-y += test_main.o
@@ -17,3 +18,11 @@ test-y += test_main.o

%/test.dep: $(foreach dep,$(test-y:.o=.dep),%/$(dep))
$(call merge_deps,$@,$^)

u-boot_root=$(src_dir)/../u-boot
u-boot_bin=$(platform_build_dir)/firmware/payloads/u-boot.bin

.PHONY: $(u-boot_bin)
$(u-boot_bin):
$(MAKE) -C $(u-boot_root)
cp $(u-boot_root)/u-boot.bin $@

0 comments on commit f9749fe

Please sign in to comment.
You can’t perform that action at this time.