mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 02:05:21 +00:00
Merge pull request #497 from ross144/main
Simplified buildroot build process
This commit is contained in:
commit
8adbf6712b
@ -1,5 +1,6 @@
|
|||||||
RISCV := /opt/riscv
|
RISCV := /opt/riscv
|
||||||
BUILDROOT := ${RISCV}/buildroot
|
#BUILDROOT := ${RISCV}/buildroot-test
|
||||||
|
BUILDROOT := buildroot
|
||||||
IMAGES := ${BUILDROOT}/output/images
|
IMAGES := ${BUILDROOT}/output/images
|
||||||
WALLY := $(shell dirname $(shell pwd))
|
WALLY := $(shell dirname $(shell pwd))
|
||||||
WALLYLINUX := $(shell pwd)
|
WALLYLINUX := $(shell pwd)
|
||||||
@ -29,13 +30,17 @@ OBJDUMPS := $(foreach name, $(OBJDUMPS), $(DIS)/$(name).objdump)
|
|||||||
|
|
||||||
.PHONY: all generate disassemble install clean cleanDTB cleanDriver test
|
.PHONY: all generate disassemble install clean cleanDTB cleanDriver test
|
||||||
|
|
||||||
all:
|
all: download Image disassemble install
|
||||||
$(MAKE) install
|
|
||||||
|
Image:
|
||||||
make -C $(BUILDROOT) --jobs
|
make -C $(BUILDROOT) --jobs
|
||||||
$(MAKE) generate
|
$(MAKE) generate
|
||||||
# TODO: Need to find a way to set the PATH for child processes.
|
# TODO: Need to find a way to set the PATH for child processes.
|
||||||
# source ../setup.sh; $(MAKE) disassemble
|
# source ../setup.sh; $(MAKE) disassemble
|
||||||
|
|
||||||
|
install:
|
||||||
|
sudo cp -r $(BUILDROOT) $(RISCV)/$(BUILDROOT)
|
||||||
|
|
||||||
# Temp rule for debugging
|
# Temp rule for debugging
|
||||||
test:
|
test:
|
||||||
echo $(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/linux-[0-9]+\.[0-9]+\.[0-9]+$$")
|
echo $(shell find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/linux-[0-9]+\.[0-9]+\.[0-9]+$$")
|
||||||
@ -55,23 +60,12 @@ $(RISCV):
|
|||||||
|
|
||||||
# Disassembly rules ---------------------------------------------------
|
# Disassembly rules ---------------------------------------------------
|
||||||
|
|
||||||
vmlinux:
|
|
||||||
sed 's/BR2_LINUX_KERNEL_IMAGE=y/\# BR2_LINUX_KERNEL_IMAGE is not set/g' ${BR2023}/main.config > ${BR2023}/main-vmlinux.config
|
|
||||||
sed -i 's/\# BR2_LINUX_KERNEL_VMLINUX is not set/BR2_LINUX_KERNEL_VMLINUX=y/g' ${BR2023}/main-vmlinux.config
|
|
||||||
sed -i 's/\# BR2_TARGET_OPENSBI_LINUX_PAYLOAD is not set//g' ${BR2023}/main-vmlinux.config
|
|
||||||
cp $(BR2023)/main-vmlinux.config $(WALLYBOARD)/main.config
|
|
||||||
cp $(BR2023)/main-vmlinux.config $(BUILDROOT)/.config
|
|
||||||
make -C $(BUILDROOT) --jobs
|
|
||||||
|
|
||||||
disassemble:
|
disassemble:
|
||||||
|
find $(BUILDROOT)/output/build/linux-* -maxdepth 1 -name "vmlinux" | xargs cp -t $(BUILDROOT)/output/images/
|
||||||
mkdir -p $(DIS)
|
mkdir -p $(DIS)
|
||||||
make -j $(OBJDUMPS)
|
make -j $(OBJDUMPS)
|
||||||
|
|
||||||
Image:
|
|
||||||
cp $(BR2023)/main.config $(WALLYBOARD)/main.config
|
|
||||||
cp $(BR2023)/main.config $(BUILDROOT)/.config
|
|
||||||
make -C $(BUILDROOT) --jobs
|
|
||||||
|
|
||||||
$(DIS)/%.objdump: $(IMAGES)/%.elf
|
$(DIS)/%.objdump: $(IMAGES)/%.elf
|
||||||
riscv64-unknown-elf-objdump -DS $< >> $@
|
riscv64-unknown-elf-objdump -DS $< >> $@
|
||||||
|
|
||||||
@ -89,7 +83,7 @@ $(IMAGES)/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)
|
download: $(BUILDROOT)/package/fpga-axi-sdc $(WALLYBOARD)
|
||||||
cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config
|
cp $(WALLYBOARD)/main.config $(BUILDROOT)/.config
|
||||||
|
|
||||||
# CONFIG DEPENDENCIES 2023.05.1 ---------------------------------------
|
# CONFIG DEPENDENCIES 2023.05.1 ---------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user