mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fix to linux makefile to support disassembly and creating vmlinux automatically.
This commit is contained in:
parent
d57ec045de
commit
6461f0fa63
@ -1,5 +1,5 @@
|
|||||||
RISCV := /opt/riscv
|
RISCV := /home/rose/repos/
|
||||||
BUILDROOT := ${RISCV}/buildroot
|
BUILDROOT := ${RISCV}/buildroot-test
|
||||||
IMAGES := ${BUILDROOT}/output/images
|
IMAGES := ${BUILDROOT}/output/images
|
||||||
WALLY := $(shell dirname $(shell pwd))
|
WALLY := $(shell dirname $(shell pwd))
|
||||||
WALLYLINUX := $(shell pwd)
|
WALLYLINUX := $(shell pwd)
|
||||||
@ -55,10 +55,23 @@ $(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:
|
||||||
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 $< >> $@
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user