From b5f79c44f957aa74c62dadc3ce054a1be2fa1f2d Mon Sep 17 00:00:00 2001 From: David Harris Date: Tue, 21 Nov 2023 13:43:51 -0800 Subject: [PATCH 01/11] Reset STIMECMP to 0 to agree with ImperasDV --- src/privileged/csrs.sv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/privileged/csrs.sv b/src/privileged/csrs.sv index 3d914aef3..da8ab48bf 100644 --- a/src/privileged/csrs.sv +++ b/src/privileged/csrs.sv @@ -111,10 +111,10 @@ module csrs import cvw::*; #(parameter cvw_t P) ( flopenr #(32) SCOUNTERENreg(clk, reset, WriteSCOUNTERENM, CSRWriteValM[31:0], SCOUNTEREN_REGW); if (P.SSTC_SUPPORTED) begin : sstc if (P.XLEN == 64) begin : sstc64 - flopenl #(P.XLEN) STIMECMPreg(clk, reset, WriteSTIMECMPM, CSRWriteValM, 64'hFFFFFFFFFFFFFFFF, STIMECMP_REGW); + flopenr #(P.XLEN) STIMECMPreg(clk, reset, WriteSTIMECMPM, CSRWriteValM, STIMECMP_REGW); end else begin : sstc32 - flopenl #(P.XLEN) STIMECMPreg(clk, reset, WriteSTIMECMPM, CSRWriteValM, 32'hFFFFFFFF, STIMECMP_REGW[31:0]); - flopenl #(P.XLEN) STIMECMPHreg(clk, reset, WriteSTIMECMPHM, CSRWriteValM, 32'hFFFFFFFF, STIMECMP_REGW[63:32]); + flopenr #(P.XLEN) STIMECMPreg(clk, reset, WriteSTIMECMPM, CSRWriteValM, STIMECMP_REGW[31:0]); + flopenr #(P.XLEN) STIMECMPHreg(clk, reset, WriteSTIMECMPHM, CSRWriteValM, STIMECMP_REGW[63:32]); end end else assign STIMECMP_REGW = 0; From 93a0db1fca15d35581ec5b18cd5e2d72ac9e9a41 Mon Sep 17 00:00:00 2001 From: David Harris Date: Tue, 21 Nov 2023 15:02:09 -0800 Subject: [PATCH 02/11] swapped branch predictor simulator --- .gitmodules | 3 --- addins/branch-predictor-simulator | 1 - 2 files changed, 4 deletions(-) delete mode 160000 addins/branch-predictor-simulator diff --git a/.gitmodules b/.gitmodules index 054afa6fb..c07a19fe0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,9 +14,6 @@ [submodule "addins/coremark"] path = addins/coremark url = https://github.com/eembc/coremark -[submodule "addins/branch-predictor-simulator"] - path = addins/branch-predictor-simulator - url = https://github.com/synxlin/branch-predictor-simulator.git [submodule "addins/FreeRTOS-Kernel"] path = addins/FreeRTOS-Kernel url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git diff --git a/addins/branch-predictor-simulator b/addins/branch-predictor-simulator deleted file mode 160000 index af0c6f8cb..000000000 --- a/addins/branch-predictor-simulator +++ /dev/null @@ -1 +0,0 @@ -Subproject commit af0c6f8cb62f48ee43e74c21e799102e03951ce2 From 6461f0fa63e4c77ff4d76f1f2cb778cb1302daab Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Tue, 21 Nov 2023 17:59:22 -0600 Subject: [PATCH 03/11] Fix to linux makefile to support disassembly and creating vmlinux automatically. --- linux/Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/linux/Makefile b/linux/Makefile index 373142615..c3d8b5cb0 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -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 $< >> $@ From a7f35179816cbe63eb912f2943515ac497b34e2d Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Tue, 21 Nov 2023 18:24:45 -0600 Subject: [PATCH 04/11] Removed testing hack. --- linux/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/Makefile b/linux/Makefile index c3d8b5cb0..bcf967bb8 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -1,5 +1,5 @@ -RISCV := /home/rose/repos/ -BUILDROOT := ${RISCV}/buildroot-test +RISCV := /opt/riscv +BUILDROOT := ${RISCV}/buildroot IMAGES := ${BUILDROOT}/output/images WALLY := $(shell dirname $(shell pwd)) WALLYLINUX := $(shell pwd) From d8186b9f584f4429133b251a7579a47bbb47ba12 Mon Sep 17 00:00:00 2001 From: David Harris Date: Tue, 21 Nov 2023 16:42:41 -0800 Subject: [PATCH 05/11] Swap in branch predictor simulator handling compressed instruction offsets --- .gitmodules | 3 +++ addins/branch-predictor-simulator | 1 + 2 files changed, 4 insertions(+) create mode 160000 addins/branch-predictor-simulator diff --git a/.gitmodules b/.gitmodules index c07a19fe0..266587377 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,3 +26,6 @@ [submodule "addins/riscv-arch-test"] path = addins/riscv-arch-test url = https://github.com/riscv-non-isa/riscv-arch-test +[submodule "addins/branch-predictor-simulator"] + path = addins/branch-predictor-simulator + url = https://github.com/ross144/branch-predictor-simulator diff --git a/addins/branch-predictor-simulator b/addins/branch-predictor-simulator new file mode 160000 index 000000000..3e424e902 --- /dev/null +++ b/addins/branch-predictor-simulator @@ -0,0 +1 @@ +Subproject commit 3e424e902f2088d0c9f482f3900ab780affb6350 From 69126298a4ba6d8c81cf4866b34d195e62f63e67 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Tue, 21 Nov 2023 20:21:26 -0600 Subject: [PATCH 06/11] Ok this is much better. Thanks Jacob for the tip about vmlinux always being generated. --- linux/Makefile | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/linux/Makefile b/linux/Makefile index bcf967bb8..9a6977faa 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -1,5 +1,6 @@ RISCV := /opt/riscv -BUILDROOT := ${RISCV}/buildroot +#BUILDROOT := ${RISCV}/buildroot-test +BUILDROOT := buildroot IMAGES := ${BUILDROOT}/output/images WALLY := $(shell dirname $(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 -all: - $(MAKE) install +all: download Image disassemble install + +Image: make -C $(BUILDROOT) --jobs $(MAKE) generate # TODO: Need to find a way to set the PATH for child processes. # source ../setup.sh; $(MAKE) disassemble +install: + sudo cp -r $(BUILDROOT) $(RISCV)/$(BUILDROOT) + # Temp rule for debugging test: 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 --------------------------------------------------- -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: + cp $(BUILDROOT)/output/build/linux*/vmlinux $(BUILDROOT)/output/images/vmlinux 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 $< >> $@ @@ -89,7 +83,7 @@ $(IMAGES)/busybox: # Generating new Buildroot directories -------------------------------- # 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 # CONFIG DEPENDENCIES 2023.05.1 --------------------------------------- From 25af7d3c78820653777d675e684eca6b3abfb898 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Tue, 21 Nov 2023 20:47:57 -0600 Subject: [PATCH 07/11] Ok the disassemble recipe should work now. --- linux/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/Makefile b/linux/Makefile index 9a6977faa..954d162bc 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -62,7 +62,7 @@ $(RISCV): disassemble: - cp $(BUILDROOT)/output/build/linux*/vmlinux $(BUILDROOT)/output/images/vmlinux + find $(BUILDROOT)/output/build/linux-* -maxdepth 1 -name "vmlinux" | xargs cp -t $(BUILDROOT)/output/images/ mkdir -p $(DIS) make -j $(OBJDUMPS) From 187df044bd7e36d5e9499e9db4e4d234a9e598c5 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Tue, 21 Nov 2023 21:20:11 -0600 Subject: [PATCH 08/11] Fixed issue with makefile and device trees. --- linux/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/Makefile b/linux/Makefile index 954d162bc..60303aaca 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -19,7 +19,7 @@ DRIVER := ${PACKAGE_SOURCE}/fpga-axi-sdc.c PATCHFILE := $(BRPACKAGES)/package-2023.05.1.patch # Device tree files -DTS ?= $(shell find -type f -regex ".*\.dts" | sort) +DTS ?= $(shell find devicetree -type f -regex ".*\.dts" | sort) DTB := $(DTS:%.dts=%.dtb) DTB := $(foreach name, $(DTB), $(IMAGES)/$(shell basename $(name))) From 822197857ad8ee4fe20c2cf36674a133edffdfc3 Mon Sep 17 00:00:00 2001 From: David Harris Date: Tue, 21 Nov 2023 19:36:24 -0800 Subject: [PATCH 09/11] Updated buildroot scripts --- bin/wally-tool-chain-install.sh | 2 +- linux/Makefile | 2 +- linux/buildroot-scripts/Makefile | 45 ----------- .../start-buildroot-session.sh | 80 ------------------- 4 files changed, 2 insertions(+), 127 deletions(-) delete mode 100644 linux/buildroot-scripts/Makefile delete mode 100755 linux/buildroot-scripts/start-buildroot-session.sh diff --git a/bin/wally-tool-chain-install.sh b/bin/wally-tool-chain-install.sh index 26dd54c8d..373e354e9 100755 --- a/bin/wally-tool-chain-install.sh +++ b/bin/wally-tool-chain-install.sh @@ -47,7 +47,7 @@ sudo apt update -y sudo apt upgrade -y sudo apt install -y git gawk make texinfo bison flex build-essential python3 libz-dev libexpat-dev autoconf device-tree-compiler ninja-build libpixman-1-dev ncurses-base ncurses-bin libncurses5-dev dialog curl wget ftp libgmp-dev libglib2.0-dev python3-pip pkg-config opam z3 zlib1g-dev automake autotools-dev libmpc-dev libmpfr-dev gperf libtool patchutils bc # Other python libraries used through the book. -sudo pip3 install matplotlib scipy scikit-learn adjustText lief +sudo pip3 install sphinx sphinx_rtd_theme matplotlib scipy scikit-learn adjustText lief # needed for Ubuntu 22.04, gcc cross compiler expects python not python2 or python3. if ! command -v python &> /dev/null diff --git a/linux/Makefile b/linux/Makefile index 60303aaca..8d9be577b 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -39,7 +39,7 @@ Image: # source ../setup.sh; $(MAKE) disassemble install: - sudo cp -r $(BUILDROOT) $(RISCV)/$(BUILDROOT) + sudo mv -r $(BUILDROOT) $(RISCV)/$(BUILDROOT) # Temp rule for debugging test: diff --git a/linux/buildroot-scripts/Makefile b/linux/buildroot-scripts/Makefile deleted file mode 100644 index 6cb7f8f37..000000000 --- a/linux/buildroot-scripts/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -BUILDROOT := ${RISCV}/buildroot2023 -IMAGES := ${BUILDROOT}/output/images -DIS := ${IMAGES}/disassembly - -all: - make disassemble - make generate - -generate: - # generating device tree binary - dtc -I dts -O dtb ../devicetree/wally-virt.dts > ${IMAGES}/wally-virt.dtb - dtc -I dts -O dtb ../devicetree/wally-vcu108.dts > ${IMAGES}/wally-vcu108.dtb - -disassemble: - mkdir -p ${DIS} - # disassemblies - make -j ${DIS}/fw_jump.objdump ${DIS}/vmlinux.objdump ${DIS}/busybox.objdump ${DIS}/vmlinux.objdump.addr - # filesystem - make ${DIS}/rootfs/bin/busybox - # mkdir -p ${DIS}/rootfs - # -cd ${DIS}/rootfs; cpio -id --nonmatching 'dev/console' < ../../rootfs.cpio - -${DIS}/fw_jump.objdump: ${IMAGES}/fw_jump.elf - riscv64-unknown-elf-objdump -S ${IMAGES}/fw_jump.elf >> ${DIS}/fw_jump.objdump - -${IMAGES}/vmlinux: ${BUILDROOT}/output/build/linux-5.10.7/vmlinux - cp ${BUILDROOT}/output/build/linux-5.10.7/vmlinux ${IMAGES}/vmlinux - -${DIS}/vmlinux.objdump: ${IMAGES}/vmlinux - riscv64-unknown-elf-objdump -S ${IMAGES}/vmlinux >> ${DIS}/vmlinux.objdump - -${DIS}/vmlinux.objdump.addr: ${DIS}/vmlinux.objdump - -cd ${DIS}; extractFunctionRadix.sh vmlinux.objdump - -${DIS}/busybox.objdump: ${DIS}/rootfs/bin/busybox - riscv64-unknown-elf-objdump -S ${DIS}/rootfs/bin/busybox >> ${DIS}/busybox.objdump - -${DIS}/rootfs/bin/busybox: - mkdir -p ${DIS}/rootfs - -cd ${DIS}/rootfs; cpio -id --nonmatching 'dev/console' < ../../rootfs.cpio - - -clean: - rm -f ${IMAGES}/wally-virt.dtb - rm -rf ${DIS} diff --git a/linux/buildroot-scripts/start-buildroot-session.sh b/linux/buildroot-scripts/start-buildroot-session.sh deleted file mode 100755 index f93815b6c..000000000 --- a/linux/buildroot-scripts/start-buildroot-session.sh +++ /dev/null @@ -1,80 +0,0 @@ -script_dir=$(readlink -f ./) -personal_config=$(readlink -f ../buildroot-config-src) -shared_config=$RISCV/buildroot-config-src - -if [ -d "$shared_config" ]; then - echo "Hold the horses, friend!" >&2 - echo "There is already a buildroot-config-src folder in \$RISCV" >&2 - if [ ! -f "$shared_config/.owner" ]; then - echo "Oy vey -- it was improperly created too!" >&2 - echo "I see no .owner file in it!" >&2 - echo "Maybe just delete it." >&2 - exit 1 - fi - owner=$(cat $shared_config/.owner) - echo "It was created by $owner." >&2 - echo "Please contact them before overwriting their source files." >&2 - exit 1 -fi -echo "Starting new buildroot session" -# Copy configs to shared location -echo "Elevate permissions to copy ../buildroot-config-src to \$RISCV" -sudo cp -r "$personal_config" "$shared_config" -sudo chown -R cad $shared_config -# Document who created these configs -whoami>.owner -sudo mv .owner $shared_config -# Copy over main.config -echo "Copying main.config to buildroot/.config." -sudo cp $shared_config/main.config $RISCV/buildroot/.config -sudo chown cad $RISCV/buildroot/.config - -echo "==============================================" -echo "I'm about to sign you in as cad." -echo "" -echo "You can go straight to the \$RISCV/buildroot" -echo "and run \`make\` if you want." -echo "" -echo "You can also run:" -echo " * \`make menuconfig\`" -echo " * \`make linux-menuconfig\`" -echo " * \`make busybox-menuconfig\`" -echo "but if you do, you have to make extra certain" -echo "that you LOAD and SAVE configs from/to " -echo "\$RISCV/buildroot-config-src." -echo "" -echo "Run \`exit\` to sign out when you are done." -echo "And then any configs that were modified in" -echo "\$RISCV/buildroot-config-src will be copied" -echo "back to ../buildroot-config-src." -echo "==============================================" -read -p "Press any key to sign in as cad" -n1 -s -echo "" -cd $RISCV -sudo su cad -cd $script_dir - -echo "" -echo "Ending buildroot session" -if [ ! -d "$shared_config" ]; then - echo "Warning: $shared_config has already been deleted." - exit 0 -fi -if [ ! -f "$shared_config/.owner" ]; then - echo "Oy vey -- no .owner file found.">&2 - echo "Not sure whether to delete $shared_config.">&2 - exit 1 -fi -owner=$(cat "$shared_config"/.owner) -if [ $owner != $(whoami) ]; then - echo "Whoah there! It seems $owner created $shared_config.">&2 - echo "Ask them before deleting their work.">&2 - exit 1 -fi -echo "Copying modified configs from \$RISCV/buildroot-config-src back to ../buildroot-config-src." -for file in $personal_config/*; do - file=$(basename $file) - cp $shared_config/$file $personal_config/$file -done -echo "Elevate permissions to remove personal configs from shared location." -sudo rm -r $shared_config From 8b48a921318a9367278777d4918784dbd9440e45 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Tue, 21 Nov 2023 22:00:53 -0600 Subject: [PATCH 10/11] Fixed linux makefile to build label and addr files from object dumps. --- linux/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux/Makefile b/linux/Makefile index 8d9be577b..520c7cd44 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -39,7 +39,7 @@ Image: # source ../setup.sh; $(MAKE) disassemble install: - sudo mv -r $(BUILDROOT) $(RISCV)/$(BUILDROOT) + sudo mv $(BUILDROOT) $(RISCV)/$(BUILDROOT) # Temp rule for debugging test: @@ -65,12 +65,15 @@ disassemble: find $(BUILDROOT)/output/build/linux-* -maxdepth 1 -name "vmlinux" | xargs cp -t $(BUILDROOT)/output/images/ mkdir -p $(DIS) make -j $(OBJDUMPS) + make -j $(OBJDUMPS).addr $(DIS)/%.objdump: $(IMAGES)/%.elf riscv64-unknown-elf-objdump -DS $< >> $@ + extractFunctionRadix.sh $@ $(DIS)/%.objdump: $(IMAGES)/% riscv64-unknown-elf-objdump -S $< >> $@ + extractFunctionRadix.sh $@ $(IMAGES)/vmlinux: linuxDir=$$(find $(BUILDROOT)/output/build -maxdepth 2 -type d -regex ".*/linux-[0-9]+\.[0-9]+\.[0-9]+$$") ;\ From 332c95aa9f4b498d331afbb535109f118fc214a6 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Tue, 21 Nov 2023 22:14:56 -0600 Subject: [PATCH 11/11] Updated locations of device trees in qemu scripts. --- linux/testvector-generation/EmulateLinux.sh | 4 +--- linux/testvector-generation/genInitMem.sh | 2 +- linux/testvector-generation/genRecording.sh | 2 +- linux/testvector-generation/genTrace.sh | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/linux/testvector-generation/EmulateLinux.sh b/linux/testvector-generation/EmulateLinux.sh index 59b365675..e2b50af4d 100755 --- a/linux/testvector-generation/EmulateLinux.sh +++ b/linux/testvector-generation/EmulateLinux.sh @@ -11,7 +11,7 @@ help() { # defaults imageDir=$RISCV/buildroot/output/images -DEVICE_TREE=../devicetree/wally-virt.dtb +DEVICE_TREE=${imageDir}/wally-virt.dtb # Process options and arguments. The following code grabs the single # sdcard device argument no matter where it is in the positional @@ -36,8 +36,6 @@ done # File location variables imageDir=$BUILDROOT/output/images -#imageDir=$RISCV/buildroot/output/images -imageDir=~/repos/buildroot-sept2023/output/images tvDir=$RISCV/linux-testvectors tcpPort=1239 diff --git a/linux/testvector-generation/genInitMem.sh b/linux/testvector-generation/genInitMem.sh index 46ce174ec..d34b758f8 100755 --- a/linux/testvector-generation/genInitMem.sh +++ b/linux/testvector-generation/genInitMem.sh @@ -8,7 +8,7 @@ rawBootmemFile="$tvDir/bootmemGDB.bin" bootmemFile="$tvDir/bootmem.bin" rawUntrimmedBootmemFile="$tvDir/untrimmedBootmemFileGDB.bin" untrimmedBootmemFile="$tvDir/untrimmedBootmemFile.bin" -DEVICE_TREE=../devicetree/wally-virt.dtb +DEVICE_TREE=${imageDir}/wally-virt.dtb read -p "Warning: running this script will overwrite the contents of: * $rawRamFile diff --git a/linux/testvector-generation/genRecording.sh b/linux/testvector-generation/genRecording.sh index c55c270a5..2696253c5 100755 --- a/linux/testvector-generation/genRecording.sh +++ b/linux/testvector-generation/genRecording.sh @@ -2,7 +2,7 @@ imageDir=$RISCV/buildroot/output/images tvDir=$RISCV/linux-testvectors recordFile="$tvDir/all.qemu" -DEVICE_TREE=../devicetree/wally-virt.dtb +DEVICE_TREE=${imageDir}/wally-virt.dtb read -p "Warning: running this script will overwrite $recordFile Would you like to proceed? (y/n) " -n 1 -r diff --git a/linux/testvector-generation/genTrace.sh b/linux/testvector-generation/genTrace.sh index 3f63d4df8..5d04592ce 100755 --- a/linux/testvector-generation/genTrace.sh +++ b/linux/testvector-generation/genTrace.sh @@ -6,7 +6,7 @@ recordFile="$tvDir/all.qemu" traceFile="$tvDir/all.txt" trapsFile="$tvDir/traps.txt" interruptsFile="$tvDir/interrupts.txt" -DEVICE_TREE=../devicetree/wally-virt.dtb +DEVICE_TREE=${imageDir}/wally-virt.dtb read -p "Warning: running this script will overwrite the contents of: * $traceFile