mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fixed error with finding vmlinux and busybox directories too early.
This commit is contained in:
parent
4f5f055f25
commit
fd080320cd
@ -15,7 +15,7 @@ WALLYBOARD := $(BUILDROOT)/board/wally
|
|||||||
PACKAGE_SOURCE := ${WALLYLINUX}/buildroot-packages/package-source
|
PACKAGE_SOURCE := ${WALLYLINUX}/buildroot-packages/package-source
|
||||||
FPGA_AXI_SDC := ${WALLYLINUX}/buildroot-packages/fpga-axi-sdc
|
FPGA_AXI_SDC := ${WALLYLINUX}/buildroot-packages/fpga-axi-sdc
|
||||||
DRIVER := ${PACKAGE_SOURCE}/fpga-axi-sdc.c
|
DRIVER := ${PACKAGE_SOURCE}/fpga-axi-sdc.c
|
||||||
PATCHFILE := $(BRPACKAGES)/package.patch
|
PATCHFILE := $(BRPACKAGES)/package-2023.05.1.patch
|
||||||
|
|
||||||
# Device tree files
|
# Device tree files
|
||||||
DTS ?= $(shell find -type f -regex ".*\.dts" | sort)
|
DTS ?= $(shell find -type f -regex ".*\.dts" | sort)
|
||||||
@ -32,8 +32,17 @@ OBJDUMPS := $(foreach name, $(OBJDUMPS), $(DIS)/$(name).objdump)
|
|||||||
# BUSYBOXDIR := $(shell ls $(BUILDROOT)/output/build | grep -e '^linux-[0-9]\+\.[0-9]\+\.[0-9]\+$$' )
|
# BUSYBOXDIR := $(shell ls $(BUILDROOT)/output/build | grep -e '^linux-[0-9]\+\.[0-9]\+\.[0-9]\+$$' )
|
||||||
# BUSYBOXDIR := $(BUILDROOT)/output/build/$(BUSYBOXDIR)
|
# BUSYBOXDIR := $(BUILDROOT)/output/build/$(BUSYBOXDIR)
|
||||||
|
|
||||||
LINUXDIR := $(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/linux-[0-9]+\.[0-9]+\.[0-9]+$$")
|
# Gets Linux and Busybox output folders for objedect dumps
|
||||||
BUSYBOXDIR := $(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/busybox-[0-9]+\.[0-9]+\.[0-9]+$$")
|
# LINUXDIR ?= $(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/linux-[0-9]+\.[0-9]+\.[0-9]+$$")
|
||||||
|
# BUSYBOXDIR ?= $(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/busybox-[0-9]+\.[0-9]+\.[0-9]+$$")
|
||||||
|
|
||||||
|
define linuxDir =
|
||||||
|
$(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/linux-[0-9]+\.[0-9]+\.[0-9]+$$")
|
||||||
|
endef
|
||||||
|
|
||||||
|
define busyboxDir =
|
||||||
|
$(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/busybox-[0-9]+\.[0-9]+\.[0-9]+$$")
|
||||||
|
endef
|
||||||
|
|
||||||
.PHONY: all generate disassemble install clean cleanDTB cleanDriver test
|
.PHONY: all generate disassemble install clean cleanDTB cleanDriver test
|
||||||
|
|
||||||
@ -50,8 +59,8 @@ all:
|
|||||||
|
|
||||||
# Temp rule for debugging
|
# Temp rule for debugging
|
||||||
test:
|
test:
|
||||||
@echo $(LINUXDIR)
|
@echo $(linuxDir)
|
||||||
@echo $(BUSYBOXDIR)
|
@echo $(busyboxDir)
|
||||||
|
|
||||||
generate: $(DTB) $(IMAGES)
|
generate: $(DTB) $(IMAGES)
|
||||||
|
|
||||||
@ -78,16 +87,16 @@ $(DIS)/%.objdump: $(IMAGES)/%.elf
|
|||||||
$(DIS)/%.objdump: $(IMAGES)/%
|
$(DIS)/%.objdump: $(IMAGES)/%
|
||||||
riscv64-unknown-elf-objdump -S $< >> $@
|
riscv64-unknown-elf-objdump -S $< >> $@
|
||||||
|
|
||||||
$(IMAGES)/vmlinux: $(LINUXDIR)/vmlinux
|
$(IMAGES)/vmlinux: $(call linuxDir)/vmlinux
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
$(IMAGES)/busybox: $(BUSYBOXDIR)/busybox
|
$(IMAGES)/busybox: $(call busyboxDir)/busybox
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
# 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) $(DRIVER)
|
install: $(BUILDROOT)/package/fpga-axi-sdc $(WALLYBOARD)
|
||||||
cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config
|
cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config
|
||||||
|
|
||||||
# CONFIG DEPENDENCIES 2021.05 -----------------------------------------
|
# CONFIG DEPENDENCIES 2021.05 -----------------------------------------
|
||||||
@ -122,9 +131,9 @@ $(BUILDROOT):
|
|||||||
cd $@; git checkout 2023.05.x
|
cd $@; git checkout 2023.05.x
|
||||||
#cd $@; git checkout 2021.05
|
#cd $@; git checkout 2021.05
|
||||||
|
|
||||||
$(DRIVER):
|
#$(DRIVER):
|
||||||
@ if [ -d "$(WALLY)/addins/vivado-risc-v" ] ; then git submodule update --init $(WALLY)/addins/vivado-risc-v; fi
|
# @ if [ -d "$(WALLY)/addins/vivado-risc-v" ] ; then git submodule update --init $(WALLY)/addins/vivado-risc-v; fi
|
||||||
cp ../addins/vivado-risc-v/patches/fpga-axi-sdc.c $@
|
# cp ../addins/vivado-risc-v/patches/fpga-axi-sdc.c $@
|
||||||
# For 2021.05
|
# For 2021.05
|
||||||
#sed -i "s|card_hw_reset|hw_reset|1" $@
|
#sed -i "s|card_hw_reset|hw_reset|1" $@
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user