organize linux-testgen folder, add readme to describe Buildroot process, add Buildroot config source files

This commit is contained in:
bbracker 2021-07-08 19:18:11 -04:00
parent 4f1a85ca7c
commit 44a48cf28d
19 changed files with 8529 additions and 2 deletions

1
.gitignore vendored
View File

@ -28,5 +28,6 @@ wally-pipelined/linux-testgen/nohup*
wally-pipelined/linux-testgen/x*
!wally-pipelined/linux-testgen/linux-testvectors/tvCopier.py
!wally-pipelined/linux-testgen/linux-testvectors/tvLinker.sh
wally-pipelined/linux-testgen/buildroot/
wally-pipelined/regression/slack-notifier/slack-webhook-url.txt

View File

@ -0,0 +1,35 @@
If you do not need to update the Linux image, then go to ./linux-testvectors and
use tvCopier.py or tvLinker.sh to copy/link premade RAMs and testvectors from Tera.
The RAMs are needed for Wally to run the Linux code, and the testvectors are needed
to verify Wally is executing the code correctly.
If you instead wish to regenerate the RAMs and testvectors from a new Linux image,
you'll need to build the new Linux image, simulate it, and parse its output,
as described below.
* To build a new Linux image, Git clone the Buildroot repository to ./buildroot.
For reference, most recent commit made to the Buildroot repo was
as of last generating the image found on Tera:
commit 4047e10ed6e20492bae572d4929eaa5d67eed746
Author: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Date: Wed Jun 30 06:27:10 2021 +0200
Then link ./buildroot-config-src/main.config to ./buildroot/.config.
That config file will in turn point to the other config files in ./buildroot-config-src.
If you wish to modify the configs, then
1. Copy ./buildroot-config-src/linux.config to ./buildroot/output/build/linux-5.10.7/.config
2. Copy ./buildroot-config-src/busybox.config to ./buildroot/output/build/busybox-1.33.1/.config
3. Run "make menuconfig" "make linux-menuconfig" "make busybox-menuconfig" as needed.
4. Copy ./buildroot/output/build/linux-5.10.7/.config back to ./buildroot-config-src/linux.config
5. Copy ./buildroot/output/build/busybox-1.33.1/.config back to ./buildroot-config-src/busybox.config
(*** There may be a better way to do this, but do know that setting up main.config
to point to those two locations within the Buildroot repo results in interesting
".config is the same as .config" errors.)
Then finally you can run make. Note that it may be necessary to rerun make twice,
once when main.config asks for an "Image" output, and once when main.config
"vmlinux" output.
* To generate new RAMs and testvectors from a Linux image,
link ./buildroot-image-output to either your new image in ./buildroot/output/image
or the existing image at /courses/e190ax/buildroot/output/image on Tera.
Then run ./testvector-generation/logBuildrootMem.sh to generate RAMs.
Then run ./testvector-generation/logAllBuildroot.sh to generate testvectors.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
set pagination off
target extended-remote :1234
maint print symbols symbols.txt
b *0x000000008020103c
c
del 1
stepi 100
stepi 100000
set confirm off
kill
q

View File

@ -24,7 +24,7 @@
# Uncomment this version in case you just want to have qemu_in_gdb_format.txt around
# It is often helpful for general debugging
(qemu-system-riscv64 -M virt -nographic -bios /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/fw_jump.elf -kernel /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/Image -append "root=/dev/vda ro" -initrd /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/rootfs.cpio -d nochain,cpu,in_asm -serial /dev/null -singlestep -s -S 2>&1 >/dev/null | ./parse_qemu.py >/courses/e190ax/buildroot_boot/qemu_in_gdb_format.txt) & riscv64-unknown-elf-gdb -x gdbinit_qemulog
#(qemu-system-riscv64 -M virt -nographic -bios /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/fw_jump.elf -kernel /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/Image -append "root=/dev/vda ro" -initrd /courses/e190ax/qemu_sim/rv64_initrd/buildroot_experimental/output/images/rootfs.cpio -d nochain,cpu,in_asm -serial /dev/null -singlestep -s -S 2>&1 >/dev/null | ./parse_qemu.py >/courses/e190ax/buildroot_boot/qemu_in_gdb_format.txt) & riscv64-unknown-elf-gdb -x gdbinit_qemulog
# Split qemu_in_gdb_format.txt into chunks of 100,000 instructions for easier inspection
#cd /courses/e190ax/buildroot_boot
#split -d -l 5600000 qemu_in_gdb_format.txt --verbose