Skip to content

Commit

Permalink
Merge pull request #163 from PandABlocks/zip_boot
Browse files Browse the repository at this point in the history
Update FPGA boot files release
  • Loading branch information
tomtrafford authored Oct 24, 2023
2 parents 55ce703 + 043d82e commit d28645e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ jobs:
/bin/bash -c \
"cd PandABlocks-fpga && ln -s CONFIG.example CONFIG && make boot APP_NAME=${{ matrix.app }}"
# Artifacts
- name: Upload boot
uses: actions/upload-artifact@v2
with:
name: zpkgs
path: ./build/boot*.zip

# Make zpkg for FPGA apps
make_zpkg:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,8 @@ else
$(MAKE) -C $(FPGA_BUILD_DIR) -f $< VIVADO_VER=$(VIVADO_VER) \
TOP=$(TOP) TARGET_DIR=$(TARGET_DIR) APP_BUILD_DIR=$(APP_BUILD_DIR) \
TGT_BUILD_DIR=$(TGT_BUILD_DIR) TOP_MODE=$(TOP_MODE) DEP_MODE=$(DEP_MODE) \
VER=$(VER) $@
VER=$(VER) TARGET=$(TARGET) GIT_VERSION=$(GIT_VERSION) \
ZIP_BUILD_DIR=$(BUILD_DIR) $@
endif

.PHONY: $(FPGA_TARGETS)
Expand Down
11 changes: 10 additions & 1 deletion common/fpga.make
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ BOOT_BUILD = $(TGT_BUILD_DIR)/boot_build
U_BOOT_BUILD = $(BOOT_BUILD)/u-boot
U_BOOT_ELF = $(U_BOOT_BUILD)/u-boot.elf

BOOT_ZIP = $(ZIP_BUILD_DIR)/boot@$(TARGET)-$(GIT_VERSION).zip

ATF_NAME = arm-trusted-firmware-$(ATF_TAG)
ATF_SRC = $(SRC_ROOT)/$(ATF_NAME)
ATF_BUILD = $(BOOT_BUILD)/atf
Expand All @@ -96,12 +98,18 @@ carrier_ip: $(APP_IP_DEPS)
ps_core: $(PS_CORE)
devicetree : $(DEVTREE_DTB)
fsbl : $(FSBL)
boot : $(IMAGE_DIR)/boot.bin $(DEVTREE_DTB)
boot : $(BOOT_ZIP) $(IMAGE_DIR)/boot.bin $(DEVTREE_DTB)
u-boot: $(U_BOOT_ELF)
atf: $(ATF_ELF)
dtc: $(DEVTREE_DTC)
.PHONY: fpga-all fpga-bit carrier_ip ps_core boot devicetree fsbl u-boot atf dtc

#####################################################################
# zip boot files

$(BOOT_ZIP): $(IMAGE_DIR)/boot.bin $(DEVTREE_DTB)
zip -j $@ $^

#####################################################################
# Compiler variables needed for u-boot build and other complitation

Expand Down Expand Up @@ -232,6 +240,7 @@ u-boot-src: $(U_BOOT_SRC)
$(DEVTREE_DTB): $(SDK_EXPORT) $(TARGET_DTS) $(DEVTREE_DTC)
cp $(TARGET_DTS) $(DEVTREE_DTS)/
sed -i '/dts-v1/d' $(DEVTREE_DTS)/system-top.dts
sed -i 's\GIT_VERSION\$(GIT_VERSION)\g' $(DEVTREE_DTS)/$(notdir $(TARGET_DTS))
gcc -I dts -E -nostdinc -undef -D__DTS__ -x assembler-with-cpp \
-o $(DEVTREE_DTS)/system-top.dts.tmp $(DEVTREE_DTS)/system-top.dts
@echo "Building DEVICE TREE blob ..."
Expand Down
6 changes: 6 additions & 0 deletions targets/PandABox/target-top.dts
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@
};
};
};

/ {
pandainfo {
version = "GIT_VERSION";
};
};

0 comments on commit d28645e

Please sign in to comment.