Skip to content

Commit

Permalink
[MACH] ZYNQ - Always generate a BOOT.BIN file. Make output pretty.
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswalmsley committed Sep 28, 2015
1 parent 75aa29c commit 8e74061
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion arch/arm/mach/zynq/objects.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ OBJECTS += $(MACH_ZYNQ_OBJECTS)
#
# ZYNQ Platform Specific targets
#
.PHONY:BOOT.BIN.info
BOOT.BIN.info:
@echo "ZYNQ FSBL Boot Image generator"
@echo "Generates a BOOT.BIN image with the BitThunder vmthunder.img file as the [BOOTLOADER] target."
@echo "This allows the Zynq BOOT ROM to load BitThunder (Usually BootThunder) as the main bootloader."

BOOT.BIN: $(PROJECT_DIR)/vmthunder.elf
.PHONY:BOOT.BIN
BOOT.BIN: $(PROJECT_DIR)/BOOT.BIN
$(PROJECT_DIR)/BOOT.BIN: $(PROJECT_DIR)/vmthunder.elf
$(Q)$(PRETTY) BOOTGEN Zynq $(subst $(PROJECT_DIR)/,"",$@)
$(Q)cp $(PROJECT_DIR)/vmthunder.elf $(BASE)/arch/arm/mach/zynq/tools/
$(Q)echo "the_ROM_image:" > $(BASE)/arch/arm/mach/zynq/tools/temp.bif
$(Q)echo "{" >> $(BASE)/arch/arm/mach/zynq/tools/temp.bif
Expand All @@ -51,3 +55,9 @@ BOOT.BIN: $(PROJECT_DIR)/vmthunder.elf
$(Q)cp $(PROJECT_DIR)/BOOT.BIN.init $(BASE)/arch/arm/mach/zynq/tools/
$(Q)cd $(BASE)/arch/arm/mach/zynq/tools/ && TOOLCHAIN=$(BT_CONFIG_TOOLCHAIN) python ./bootgen.py temp.bif
$(Q)cp $(BASE)/arch/arm/mach/zynq/tools/BOOT.BIN $(PROJECT_DIR)/

clean: zynq_clean
zynq_clean: | dbuild_splash
$(Q)rm $(PRM_FLAGS) $(PROJECT_DIR)/BOOT.BIN $(PRM_PIPE)

all: $(PROJECT_DIR)/BOOT.BIN
2 changes: 1 addition & 1 deletion arch/arm/mach/zynq/tools/bootgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

for item in item_list:
bootgen.process_item(item)
print item.binfile.strip()
#print item.binfile.strip()

if bootloader == None:
print("Error: no image was marked as the bootloader.");
Expand Down

0 comments on commit 8e74061

Please sign in to comment.