mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 10:15:19 +00:00
Fixed bugs. Added an 'all' target that performs the whole process of building the images needed for booting linux, including device tree files.
This commit is contained in:
parent
1582376d71
commit
40096ac662
@ -23,17 +23,25 @@ DTB := $(foreach name, $(DTB), $(IMAGES)/$(shell basename $(name)))
|
|||||||
|
|
||||||
# Disassembly stuff
|
# Disassembly stuff
|
||||||
BINARIES := fw_jump.elf vmlinux busybox
|
BINARIES := fw_jump.elf vmlinux busybox
|
||||||
BINARIES := $(foreach name, $(BINARIES), $(IMAGES)/$(name))
|
OBJDUMPS := $(foreach name, $(BINARIES), $(basename $(name) .elf))
|
||||||
#BINARIES := $(foreach name, $(BINARIES), $(shell find -type f -regex ".*$(name)"))
|
OBJDUMPS := $(foreach name, $(OBJDUMPS), $(DIS)/$(name).objdump)
|
||||||
OBJDUMPS := fw_jump.objdump vmlinux.objdump busybox.objdump
|
|
||||||
OBJDUMPS := $(foreach name, $(OBJDUMPS), $(DIS)/$(name))
|
|
||||||
|
|
||||||
.PHONY: generate disassemble install clean cleanDTB cleanDriver
|
.PHONY: all generate disassemble install clean cleanDTB cleanDriver test
|
||||||
|
|
||||||
# Generate all device trees -------------------------------------------
|
# Generate all device trees -------------------------------------------
|
||||||
# TODO: Add configuration for only generating device tree for specified
|
# TODO: Add configuration for only generating device tree for specified
|
||||||
# supported FPGA.
|
# supported FPGA.
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(MAKE) install
|
||||||
|
make -C $(BUILDROOT) --jobs
|
||||||
|
$(MAKE) generate
|
||||||
|
# TODO: Need to find a way to set the PATH for child processes.
|
||||||
|
# source ../setup.sh; $(MAKE) disassemble
|
||||||
|
|
||||||
|
test:
|
||||||
|
@echo $(OBJDUMPS)
|
||||||
|
|
||||||
generate: $(DTB) $(IMAGES)
|
generate: $(DTB) $(IMAGES)
|
||||||
|
|
||||||
$(IMAGES)/%.dtb: ./devicetree/%.dts
|
$(IMAGES)/%.dtb: ./devicetree/%.dts
|
||||||
@ -43,6 +51,10 @@ $(IMAGES):
|
|||||||
@ echo "No output/images directory in buildroot."
|
@ echo "No output/images directory in buildroot."
|
||||||
@ echo "Run make --jobs in buildroot directory before generating device tree binaries."; exit 1
|
@ echo "Run make --jobs in buildroot directory before generating device tree binaries."; exit 1
|
||||||
|
|
||||||
|
$(RISCV):
|
||||||
|
@ echo "ERROR: No $(RISCV) directory. Make sure you have installed the Wally Toolchain."
|
||||||
|
@ echo "this can be done with <WALLY>/bin/wally-tool-chain-install.sh"
|
||||||
|
|
||||||
# Disassembly rules ---------------------------------------------------
|
# Disassembly rules ---------------------------------------------------
|
||||||
|
|
||||||
disassemble:
|
disassemble:
|
||||||
@ -64,18 +76,20 @@ $(IMAGES)/busybox: $(BUILDROOT)/output/build/busybox-1.33.0/busybox
|
|||||||
# Generating new Buildroot directories --------------------------------
|
# Generating new Buildroot directories --------------------------------
|
||||||
|
|
||||||
# This directive should be run as: make install BUILDROOT=path/to/buildroot
|
# This directive should be run as: make install BUILDROOT=path/to/buildroot
|
||||||
install: $(BUILDROOT)/package/fpga-axi-sdc $(WALLYBOARD)/main.config $(WALLYBOARD)/linux.config $(DRIVER)
|
install: $(BUILDROOT)/package/fpga-axi-sdc $(WALLYBOARD) $(DRIVER)
|
||||||
cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config
|
cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config
|
||||||
|
|
||||||
# CONFIG DEPENDENCIES 2021.05 -----------------------------------------
|
# CONFIG DEPENDENCIES 2021.05 -----------------------------------------
|
||||||
$(WALLYBOARD)/main.config: $(WALLYBOARD) $(BRPACKAGES)/wally.config
|
# $(WALLYBOARD)/main.config: $(WALLYBOARD) $(BRPACKAGES)/wally.config
|
||||||
cp $(BRPACKAGES)/wally.config $@
|
# cp $(BRPACKAGES)/wally.config $@
|
||||||
|
|
||||||
$(WALLYBOARD)/linux.config: $(WALLYBOARD) $(BRPACKAGES)/linux.config
|
# $(WALLYBOARD)/linux.config: $(BRPACKAGES)/linux.config $(WALLYBOARD)
|
||||||
cp $(BRPACKAGES)/linux.config $@
|
# cp $(BRPACKAGES)/linux.config $@
|
||||||
|
|
||||||
$(WALLYBOARD): $(BUILDROOT)
|
$(WALLYBOARD): $(BUILDROOT)
|
||||||
cp -r $(WALLYBOARDSRC) $(BUILDROOT)/board
|
cp -r $(WALLYBOARDSRC) $(BUILDROOT)/board
|
||||||
|
cp $(BRPACKAGES)/wally.config $(WALLYBOARD)/main.config
|
||||||
|
cp $(BRPACKAGES)/linux.config $(WALLYBOARD)/linux.config
|
||||||
|
|
||||||
# Buildroot Package ---------------------------------------------------
|
# Buildroot Package ---------------------------------------------------
|
||||||
$(BUILDROOT)/package/fpga-axi-sdc: $(BUILDROOT) $(PATCHFILE) $(BRPACKAGES)/fpga-axi-sdc
|
$(BUILDROOT)/package/fpga-axi-sdc: $(BUILDROOT) $(PATCHFILE) $(BRPACKAGES)/fpga-axi-sdc
|
||||||
|
Loading…
Reference in New Issue
Block a user