mirror of
https://github.com/openhwgroup/cvw.git
synced 2025-04-22 21:08:08 -04:00
Fix to linux makefile to support disassembly and creating vmlinux automatically.
This commit is contained in:
parent
d57ec045de
commit
6461f0fa63
1 changed files with 15 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
RISCV := /opt/riscv
|
||||
BUILDROOT := ${RISCV}/buildroot
|
||||
RISCV := /home/rose/repos/
|
||||
BUILDROOT := ${RISCV}/buildroot-test
|
||||
IMAGES := ${BUILDROOT}/output/images
|
||||
WALLY := $(shell dirname $(shell pwd))
|
||||
WALLYLINUX := $(shell pwd)
|
||||
|
@ -55,10 +55,23 @@ $(RISCV):
|
|||
|
||||
# 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:
|
||||
mkdir -p $(DIS)
|
||||
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
|
||||
riscv64-unknown-elf-objdump -DS $< >> $@
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue