diff --git a/.gitignore b/.gitignore index 435edab08..ad238af08 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ buildpush.ps1 # local-only routines used to start builds /*.ps1 /*.bat +/*.sh # notes to myself /*.txt diff --git a/buildpush.ps1 b/buildpush.ps1 deleted file mode 100644 index 267f25b1e..000000000 --- a/buildpush.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -# a crappy starter script to help with builds under Windows environments. ymmv. - -# set RUSTFLAGS=--remap-path-prefix=F:\largework\rust-win\code\xous-core\=build -# $env:RUSTFLAGS="--remap-path-prefix=$(Get-Location)=build" - -cargo xtask app-image vault -# cargo xtask ditherpunk-image vault -# cargo xtask ffi-test -# cargo xtask minimal precursors/soc.svd - -CertUtil -hashfile precursors/bbram-test1.nky MD5 -CertUtil -hashfile precursors/soc_csr.bin MD5 - -CertUtil -hashfile target/riscv32imac-unknown-xous-elf/release/loader.bin MD5 -CertUtil -hashfile target/riscv32imac-unknown-xous-elf/release/xous.img MD5 -scp -i c:/users/bunnie/.ssh/id_pi target/riscv32imac-unknown-xous-elf/release/xous.img target/riscv32imac-unknown-xous-elf/release/loader.bin precursors/soc_csr.bin pi@10.0.245.135:code/precursors/ - -# scp -i c:/users/bunnie/.ssh/id_ed25519 target/riscv32imac-unknown-xous-elf/release/xous.img target/riscv32imac-unknown-xous-elf/release/loader.bin precursors/soc_csr.bin bunnie@192.168.137.161:code/precursors/ - -# scp -i c:/users/bunnie/.ssh/id_ed25519 target/riscv32imac-unknown-xous-elf/release/xous.img target/riscv32imac-unknown-xous-elf/release/loader.bin precursors/soc_csr.bin bunnie@10.0.245.9:/mnt/c/Users/bunnie/ - -# CertUtil -hashfile target/riscv32imac-unknown-none-elf/release/loader.bin MD5 -# CertUtil -hashfile target/riscv32imac-unknown-none-elf/release/xous.img MD5 -# scp -i c:/users/bunnie/.ssh/id_pi target/riscv32imac-unknown-none-elf/release/xous.img target/riscv32imac-unknown-none-elf/release/loader.bin precursors/soc_csr.bin precursors/bbram-test1.nky pi@10.0.245.90:code/precursors/ - -# wishbone-tool --load-name target/riscv32imac-unknown-none-elf/release/xous.img --load-address 0x980000 --load-flash - -$file = Get-Item target/riscv32imac-unknown-xous-elf/release/xous.img -$SizeinBytes = $file.Length -if($SizeinBytes -gt 6815743) { - $Overage = $SizeinBytes - 6815743 - "Warning: xous.img is getting bloated. Bloat over ideal target: $Overage bytes." -} \ No newline at end of file diff --git a/buildpush.sh b/buildpush.sh deleted file mode 100755 index 8b1504559..000000000 --- a/buildpush.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env bash - -set -e # exit on any error - -UPDATE_FPGA=1 -UPDATE_KERNEL=1 -UPDATE_LOADER=1 -USE_USB=1 -FPGA_IMAGE=precursors/soc_csr.bin -KERNEL_IMAGE=target/riscv32imac-unknown-xous-elf/release/xous.img -LOADER_IMAGE=target/riscv32imac-unknown-xous-elf/release/loader.bin -CSR_CSV= -USE_IDENTITY=0 -USE_NIGHTLY= -IMAGE=hw-image -SOC_SVD=precursors/soc.svd - -POSITIONAL=() -while [[ $# -gt 0 ]] -do - key="$1" - case $key in - -k|--kernel-skip) - UPDATE_KERNEL=0 - shift - ;; - -f|--fpga-skip) - UPDATE_FPGA=0 - shift - ;; - -l|--loader-skip) - UPDATE_LOADER=0 - shift - ;; - -c|--copy-to) - DEST_HOST=$2 - USE_USB=0 - shift - shift - ;; - -i|--identity) - USE_IDENTITY=1 - IDENTITY=$2 - shift - shift - ;; - --current-csr) - CSR_CSV="--csr-csv ../betrusted-soc/build/csr.csv" - shift - ;; - -n|--nightly) - USE_NIGHTLY=+nightly - shift - ;; - -m|--minimal) - IMAGE=minimal - shift - ;; - -t|--trngtest) - IMAGE=trng-test - shift - ;; - -r|--rotest) - IMAGE=ro-test - shift - ;; - -a|--avtest) - IMAGE=av-test - shift - ;; - --image) - IMAGE=$2 - shift - shift - ;; - -h|--help) - echo "$0 provisions betrusted. --kernel-skip skips the kernel, --fpga-skip skips the FPGA. --current-csr indicates to use the CSR for the new FPGA image to do the update (normally you want to use the one corresponding to the older, currently installed version)." - echo "Alternatively, using --copy-to copies the files to a remote host and skips provisioning." - echo " --identity supplies an identity file to the scp command." - echo " Copying assumes betrusted-scripts repo is cloned on ssh-target at ~/code/betrused-scripts/" - exit 0 - ;; - *) - POSITIONAL+=("$1") - shift - ;; - esac -done - -set -- "${POSITIONAL[@]}" - -DESTDIR=code/precursors - -# this didn't work. Timestamping is actually kinda broken, because -# you end up capturing just the time that you managed to trigger a -# full rebuild, and not just an incremental rebuild. :-/ -#touch services/log-server/src/main.rs # bump the build time in the log server - -cargo $USE_NIGHTLY xtask $IMAGE $SOC_SVD - -if [ $? -ne 0 ] -then - echo "build failed, aborting!" - exit 1 -fi - -# case of no private key specified -if [ $USE_USB -eq 1 ] -then - if [ $UPDATE_LOADER -eq 1 ] - then - echo "Burning loader" - cd tools && ./usb_update.py -l - fi - if [ $UPDATE_KERNEL -eq 1 ] - then - echo "Burning kernel" - cd tools && ./usb_update.py -k - fi - if [ $UPDATE_FPGA -eq 1 ] - then - echo "Burning FPGA image" - cd tools && ./usb_update.py -s - echo "*** Select 'Install gateware update' from the main menu to apply the update with your root keys ***" - fi -else - - if [ -n "$OVERRIDE_SVD" ] - then - FPGA_IMAGE=precursors/soc_csr.bin - fi - if [ -e "$FPGA_IMAGE" ] - then - md5sum $FPGA_IMAGE - fi - md5sum $KERNEL_IMAGE - md5sum $LOADER_IMAGE - - if [ $USE_IDENTITY -eq 1 ] - then - # there is a private key - echo "Copying to $DEST_HOST:$DESTDIR/ with public key $IDENTITY" - scp -i $IDENTITY $KERNEL_IMAGE $FPGA_IMAGE $LOADER_IMAGE $DEST_HOST:$DESTDIR/ - else - echo "Copying to $DEST_HOST:$DESTDIR/ without public key" - scp $KERNEL_IMAGE $FPGA_IMAGE $LOADER_IMAGE $DEST_HOST:$DESTDIR/ - fi -fi diff --git a/start-gdb.sh b/start-gdb.sh deleted file mode 100755 index 592d7ded2..000000000 --- a/start-gdb.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -if [ -z "$1" ] -then - echo "Usage: $0 target" - echo "Missing target argument." - exit 0 -fi - -riscv64-unknown-elf-gdb -ex 'set riscv use-compressed-breakpoints off' -ex 'file kernel/target/riscv32imac-unknown-none-elf/release/kernel' -ex "tar rem $1:3333" -#riscv64-unknown-elf-gdb -ex 'set riscv use-compressed-breakpoints off' -ex 'file target/riscv32imac-unknown-none-elf/release/fcc-agent' -ex "tar rem $1:3333" diff --git a/wb-gdb.sh b/wb-gdb.sh deleted file mode 100755 index 883edec48..000000000 --- a/wb-gdb.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -CSR_CSV=../betrusted-soc/build/csr.csv - -#wishbone-tool -s gdb -s terminal --bind-addr 0.0.0.0 --csr-csv=$CSR_CSV --debug-offset=0xefff0000 -wishbone-tool -s gdb --bind-addr 0.0.0.0 --csr-csv=$CSR_CSV --debug-offset=0xefff0000