Added help option to the flash-sd script.

This commit is contained in:
Jacob Pease 2023-08-22 13:37:33 -05:00
parent 046bcd9eed
commit 2bf6207919
8 changed files with 71 additions and 57 deletions

File diff suppressed because one or more lines are too long

View file

@ -6,20 +6,20 @@ dst := IP
#export board := vcu118
# vcu108
#export XILINX_PART := xcvu095-ffva2104-2-e
#export XILINX_BOARD := xilinx.com:vcu108:part0:1.2
#export board := vcu108
export XILINX_PART := xcvu095-ffva2104-2-e
export XILINX_BOARD := xilinx.com:vcu108:part0:1.2
export board := vcu108
# Arty A7
export XILINX_PART := xc7a100tcsg324-1
export XILINX_BOARD := digilentinc.com:arty-a7-100:part0:1.1
export board := ArtyA7
# export XILINX_PART := xc7a100tcsg324-1
# export XILINX_BOARD := digilentinc.com:arty-a7-100:part0:1.1
# export board := ArtyA7
# for Arty A7 and S7 boards
all: FPGA_Arty
# all: FPGA_Arty
# VCU 108 and VCU 118 boards
#all: FPGA_VCU
all: FPGA_VCU
FPGA_Arty: PreProcessFiles IP_Arty
vivado -mode tcl -source wally.tcl 2>&1 | tee wally.log

View file

@ -96,7 +96,7 @@ if {$board=="ArtyA7"} {
source ../constraints/small-debug.xdc
} else {
#source ../constraints/vcu-small-debug.xdc
# source ../constraints/vcu-small-debug.xdc
source ../constraints/debug4.xdc
}

View file

@ -95,41 +95,41 @@ module fpgaTop
// wire SDCCmdOE;
// wire SDCCmdOut;
wire [3:0] m_axi_awid;
wire [7:0] m_axi_awlen;
wire [2:0] m_axi_awsize;
wire [1:0] m_axi_awburst;
wire [3:0] m_axi_awcache;
wire [31:0] m_axi_awaddr;
wire [2:0] m_axi_awprot;
wire m_axi_awvalid;
wire m_axi_awready;
wire m_axi_awlock;
wire [63:0] m_axi_wdata;
wire [7:0] m_axi_wstrb;
wire m_axi_wlast;
wire m_axi_wvalid;
wire m_axi_wready;
wire [3:0] m_axi_bid;
wire [1:0] m_axi_bresp;
wire m_axi_bvalid;
wire m_axi_bready;
wire [3:0] m_axi_arid;
wire [7:0] m_axi_arlen;
wire [2:0] m_axi_arsize;
wire [1:0] m_axi_arburst;
wire [2:0] m_axi_arprot;
wire [3:0] m_axi_arcache;
wire m_axi_arvalid;
wire [31:0] m_axi_araddr;
wire m_axi_arlock;
wire m_axi_arready;
wire [3:0] m_axi_rid;
wire [63:0] m_axi_rdata;
wire [1:0] m_axi_rresp;
wire m_axi_rvalid;
wire m_axi_rlast;
wire m_axi_rready;
(* mark_debug = "true" *)wire [3:0] m_axi_awid;
(* mark_debug = "true" *)wire [7:0] m_axi_awlen;
(* mark_debug = "true" *)wire [2:0] m_axi_awsize;
(* mark_debug = "true" *)wire [1:0] m_axi_awburst;
(* mark_debug = "true" *)wire [3:0] m_axi_awcache;
(* mark_debug = "true" *)wire [31:0] m_axi_awaddr;
(* mark_debug = "true" *)wire [2:0] m_axi_awprot;
(* mark_debug = "true" *)wire m_axi_awvalid;
(* mark_debug = "true" *)wire m_axi_awready;
(* mark_debug = "true" *)wire m_axi_awlock;
(* mark_debug = "true" *)wire [63:0] m_axi_wdata;
(* mark_debug = "true" *)wire [7:0] m_axi_wstrb;
(* mark_debug = "true" *)wire m_axi_wlast;
(* mark_debug = "true" *)wire m_axi_wvalid;
(* mark_debug = "true" *)wire m_axi_wready;
(* mark_debug = "true" *)wire [3:0] m_axi_bid;
(* mark_debug = "true" *)wire [1:0] m_axi_bresp;
(* mark_debug = "true" *)wire m_axi_bvalid;
(* mark_debug = "true" *)wire m_axi_bready;
(* mark_debug = "true" *)wire [3:0] m_axi_arid;
(* mark_debug = "true" *)wire [7:0] m_axi_arlen;
(* mark_debug = "true" *)wire [2:0] m_axi_arsize;
(* mark_debug = "true" *)wire [1:0] m_axi_arburst;
(* mark_debug = "true" *)wire [2:0] m_axi_arprot;
(* mark_debug = "true" *)wire [3:0] m_axi_arcache;
(* mark_debug = "true" *)wire m_axi_arvalid;
(* mark_debug = "true" *)wire [31:0] m_axi_araddr;
(* mark_debug = "true" *)wire m_axi_arlock;
(* mark_debug = "true" *)wire m_axi_arready;
(* mark_debug = "true" *)wire [3:0] m_axi_rid;
(* mark_debug = "true" *)wire [63:0] m_axi_rdata;
(* mark_debug = "true" *)wire [1:0] m_axi_rresp;
(* mark_debug = "true" *)wire m_axi_rvalid;
(* mark_debug = "true" *)wire m_axi_rlast;
(* mark_debug = "true" *)wire m_axi_rready;
// Extra Bus signals
wire [3:0] BUS_axi_arregion;

View file

@ -1,4 +1,4 @@
BUILDROOT := ${RISCV}/buildroot
BUILDROOT := ${RISCV}/buildroot2023
IMAGES := ${BUILDROOT}/output/images
DIS := ${IMAGES}/disassembly

View file

@ -24,7 +24,14 @@ DEVICE_TREE=$IMAGES/wally-vcu108.dtb
MNT_DIR=wallyimg
# Usage function
usage() { echo "Usage: $0 [-z] [-b <path/to/buildroot>] <device>" 1>&2; exit 1; }
usage() { echo "Usage: $0 [-zh] [-b <path/to/buildroot>] <device>" 1>&2; exit 1; }
help() {
echo "Usage: $0 [OPTIONS] <device>"
echo " -z wipes card with zeros"
echo " -b <path/to/buildroot> get images from given buildroot"
exit 0;
}
# Process options and arguments. The following code grabs the single
# sdcard device argument no matter where it is in the positional
@ -33,7 +40,7 @@ ARGS=()
while [ $OPTIND -le "$#" ] ; do
if getopts "hzb:" arg ; then
case "${arg}" in
h) usage
h) help
;;
z) WIPECARD=y
;;

View file

@ -68,12 +68,19 @@ if [ ! -e $1 ] ; then
# --new=3:$FS_START:-0 --change-name=3:'filesystem' \
# $1
# echo -e "$NAME: Creating GUID Partition Table"
# sudo sgdisk -g --clear --set-alignment=1 \
# --new=1:34:+$DST_SIZE: --change-name=1:'fdt' \
# --new=2:$FW_JUMP_START:+$FW_JUMP_SIZE --change-name=2:'opensbi' --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
# --new=3:$KERNEL_START:+$KERNEL_SIZE --change-name=3:'kernel' \
# --new=4:$FS_START:-0 --change-name=4:'filesystem' \
# $1
echo -e "$NAME: Creating GUID Partition Table"
sudo sgdisk -g --clear --set-alignment=1 \
--new=1:34:+$DST_SIZE: --change-name=1:'fdt' \
--new=2:$FW_JUMP_START:+$FW_JUMP_SIZE --change-name=2:'opensbi' --typecode=1:2E54B353-1271-4842-806F-E436D6AF6985 \
--new=3:$KERNEL_START:+$KERNEL_SIZE --change-name=3:'kernel' \
--new=4:$FS_START:-0 --change-name=4:'filesystem' \
$1
LOOPDEVICE=$(sudo losetup -f)
@ -94,14 +101,14 @@ if [ ! -e $1 ] ; then
echo -e "$NAME: Copying Kernel"
sudo dd if=$LINUX_KERNEL of="$LOOPDEVICE"p3 $DD_FLAGS
sudo mkfs.ext4 "$LOOPDEVICE"p4
sudo mkdir /mnt/$MNT_DIR
# sudo mkfs.ext4 "$LOOPDEVICE"p4
# sudo mkdir /mnt/$MNT_DIR
sudo mount -v "$LOOPDEVICE"p4 /mnt/$MNT_DIR
# sudo mount -v "$LOOPDEVICE"p4 /mnt/$MNT_DIR
sudo umount -v /mnt/$MNT_DIR
# sudo umount -v /mnt/$MNT_DIR
sudo rmdir /mnt/$MNT_DIR
# sudo rmdir /mnt/$MNT_DIR
sudo losetup -d $LOOPDEVICE
fi

View file

@ -1,6 +1,6 @@
#!/bin/bash
tcpPort=1235
imageDir=/home/ross/repos/buildroot/output/images
imageDir=/home/jpease/repos/buildroot3/output/images
tvDir=linux-testvectors
rawRamFile="$tvDir/ramGDB.bin"
ramFile="$tvDir/ram.bin"
@ -36,7 +36,7 @@ then
echo "Launching QEMU in replay mode!"
(qemu-system-riscv64 \
-M virt -dtb /home/ross/repos/buildroot/output/images/wally-artya7.dtb \
-M virt -dtb /home/jpease/repos/buildroot3/output/images/wally-artya7.dtb \
-nographic \
-bios $imageDir/fw_jump.elf -kernel $imageDir/Image -append "root=/dev/vda ro" -initrd $imageDir/rootfs.cpio \
-gdb tcp::$tcpPort -S) \