diff --git a/buildpush.sh b/buildpush.sh index ee19395e0..c1eec77e5 100755 --- a/buildpush.sh +++ b/buildpush.sh @@ -6,10 +6,10 @@ UPDATE_FPGA=1 UPDATE_KERNEL=1 UPDATE_LOADER=1 USE_USB=1 -FPGA_IMAGE=../betrusted-soc/build/gateware/encrypted.bin +FPGA_IMAGE=../betrusted-soc/build/gateware/soc_csr.bin KERNEL_IMAGE=target/riscv32imac-unknown-none-elf/release/xous.img LOADER_IMAGE=target/riscv32imac-unknown-none-elf/release/loader.bin -CSR_CSV=../betrusted-soc/build/csr.csv.1 +CSR_CSV= USE_IDENTITY=0 USE_NIGHTLY= IMAGE=hw-image @@ -46,7 +46,7 @@ do shift ;; --current-csr) - CSR_CSV=../betrusted-soc/build/csr.csv + CSR_CSV="--csr-csv ../betrusted-soc/build/csr.csv" shift ;; -n|--nightly) @@ -119,19 +119,19 @@ then if [ $UPDATE_FPGA -eq 1 ] then echo "Burning FPGA image" - sudo wishbone-tool --csr-csv $CSR_CSV --load-name $FPGA_IMAGE --load-address 0x0 --load-flash + sudo wishbone-tool $CSR_CSV --load-name $FPGA_IMAGE --load-address 0x0 --load-flash echo "*** Manual power cycle required to reload SoC FPGA configuration ***" echo " -> Either issue a power cycle command, or insert paper clip in the hole on the right hand side!" fi if [ $UPDATE_LOADER -eq 1 ] then echo "Burning loader" - sudo wishbone-tool --csr-csv $CSR_CSV --load-name $LOADER_IMAGE --load-address 0x500000 --load-flash + sudo wishbone-tool $CSR_CSV --load-name $LOADER_IMAGE --load-address 0x500000 --load-flash fi if [ $UPDATE_KERNEL -eq 1 ] then echo "Burning kernel" - sudo wishbone-tool --csr-csv $CSR_CSV --load-name $KERNEL_IMAGE --load-address 0x980000 --load-flash + sudo wishbone-tool $CSR_CSV --load-name $KERNEL_IMAGE --load-address 0x980000 --load-flash fi else diff --git a/csr2bin.py b/csr2bin.py deleted file mode 100755 index 5f22043f9..000000000 --- a/csr2bin.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/python3 - -import argparse -import hashlib - -def main(): - parser = argparse.ArgumentParser(description="Convert csr.csv to binary image file") - parser.add_argument( - "-i", "--input-file", required=True, help="file containing CSV input", type=str - ) - parser.add_argument( - "-o", "--output-file", required=True, help="destination file for binary data", type=str - ) - args = parser.parse_args() - - pad_to = 0x7FC0 - with open(args.input_file, "rb") as ifile: - with open(args.output_file, "wb") as ofile: - data = ifile.read() # read in the whole block of CSV data - - odata = bytearray() - odata += len(data).to_bytes(4, 'little') - odata += data - padding = bytes([0xff]) * (pad_to - len(data) - 4) - odata += padding - - hasher = hashlib.sha512() - hasher.update(odata) - digest = hasher.digest() - odata += digest - - ofile.write(odata) - - -if __name__ == "__main__": - main() diff --git a/emulation/renode.svd b/emulation/renode.svd index 26d02466a..7156de6c7 100644 --- a/emulation/renode.svd +++ b/emulation/renode.svd @@ -3,7 +3,7 @@ litex SOC - + 8 32 @@ -1070,10 +1070,10 @@ register to disable individual events.]]> GIT_GITREV 0x0014 - 0x6285e59 + 0x68988db7 32 @@ -1090,7 +1090,7 @@ the exact git version used to build this firmware.]]> is ``1``, then the repository this was built from has one additional commit beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]> 0x0018 - 0x18 + 0x1a 32 @@ -2882,7 +2882,7 @@ inject too fast.]]> SEED1 0x0000 - 0x2c625d10 + 0x35b643e1 32 @@ -2897,7 +2897,7 @@ inject too fast.]]> SEED0 0x0004 - 0x3ac8fff5 + 0x1262af67 32 diff --git a/services/trng/src/main.rs b/services/trng/src/main.rs index efb51d295..934538401 100644 --- a/services/trng/src/main.rs +++ b/services/trng/src/main.rs @@ -354,9 +354,8 @@ fn xmain() -> ! { #[cfg(not(target_os = "none"))] let mut trng = Trng::new(); - if cfg!(feature = "avalanchetest") || cfg!(feature = "ringosctest") { - xous::create_thread_1(tester_thread, trng.get_trng_csr() as usize).expect("couldn't create test thread"); - } + #[cfg(any(feature = "avalanchetest", feature="ringosctest"))] + xous::create_thread_1(tester_thread, trng.get_trng_csr() as usize).expect("couldn't create test thread"); // pump the TRNG hardware to clear the first number out, sometimes it is 0 due to clock-sync issues on the fifo trng.get_trng(2); diff --git a/svd2utra/examples/soc.svd b/svd2utra/examples/soc.svd index 26d02466a..7156de6c7 100644 --- a/svd2utra/examples/soc.svd +++ b/svd2utra/examples/soc.svd @@ -3,7 +3,7 @@ litex SOC - + 8 32 @@ -1070,10 +1070,10 @@ register to disable individual events.]]> GIT_GITREV 0x0014 - 0x6285e59 + 0x68988db7 32 @@ -1090,7 +1090,7 @@ the exact git version used to build this firmware.]]> is ``1``, then the repository this was built from has one additional commit beyond the tag indicated in `MAJOR`, `MINOR`, and `REVISION`.]]> 0x0018 - 0x18 + 0x1a 32 @@ -2882,7 +2882,7 @@ inject too fast.]]> SEED1 0x0000 - 0x2c625d10 + 0x35b643e1 32 @@ -2897,7 +2897,7 @@ inject too fast.]]> SEED0 0x0004 - 0x3ac8fff5 + 0x1262af67 32