-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (34 loc) · 1.36 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: all bootgen apps dtb clean install
DTC := $(shell command -v dtc 2>/dev/null)
all: bootgen dtb
bootgen: build/BOOT.bin
apps: build/fsbl.elf build/pmufw.elf
dtb: build/system.dtb
clean:
rm -rf build/workspace
rm -rf build/fsbl.elf
rm -rf build/pmufw.elf
rm -rf build/device_tree
rm -rf build/device-tree-xlnx
rm -rf build/system.dtb
rm -rf build/BOOT.bin
install: bootgen dtb
cp -f build/BOOT.bin $(INSTALL_DIR)
cp -f build/system.dtb $(INSTALL_DIR)
build/BOOT.bin: build/fsbl.elf build/pmufw.elf build/u-boot.elf build/bl31.elf
bootgen -image bootgen.bif -arch zynqmp -w on -o $@
build/fsbl.elf build/pmufw.elf build/device_tree/system-top.dts: *.hdf
xsct create_boot_apps.tcl $(VER)
build/system.dtb: build/device_tree/system-top.dts $(wildcard build/device_tree/*.dts build/device_tree/*.dtsi)
ifneq ($(DTC),)
cpp -nostdinc -undef -D__DTS__ -x assembler-with-cpp -I $(<D) -o $<.tmp $<
dtc -I dts -O dtb -o $@ $<.tmp
else
$(error No device tree compiler found on path)
endif
build/u-boot.elf:
$(error Missing u-boot.elf. Build U-Boot separately and place the generated u-boot.elf file into the 'build' directory)
build/bl31.elf:
$(error Missing bl31.elf. Build ATF separately and place the generated bl31.elf file into the 'build' directory)
*.hdf:
$(error Missing a hardware description file. Copy your .hdf file to this directory and run `make` again)