Bootloader is Completely Wiped on HiFive RevB board

Hello,
I just got a HiFive Rev B board, and was running my first test program
via
make PROGRAM=hello TARGET=sifive-hifive1-revb upload

it then asked to update firmware and I said ok, then the next thing I see it says I ejected my Rev B board improperly (mac osx).

After that, the RGB light no longer turns on. I think in the midst of updating the firmware it wiped everything.
I can no longer use “screen” to connect as it just hangs.

I found this thread Bootloader restore and attempted to use the .hex file to drag it to my rev B board.

It does nothing.

Also I see this new text file Board Info.txt which says No valid board info found

uploading the make program also yields this as an output
/opt/riscv/riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-apple-darwin/bin/riscv64-unknown-elf-objcopy -O ihex /Users/efatehi/projects/sifive/freedom-e-sdk/software/hello/debug/hello.elf /Users/efatehi/projects/sifive/freedom-e-sdk/software/hello/debug/hello.hex

scripts/upload --hex /Users/efatehi/projects/sifive/freedom-e-sdk/software/hello/debug/hello.hex --jlink JLinkExe

SEGGER J-Link Commander V6.82c (Compiled Jul 31 2020 17:37:44)

DLL version V6.82c, compiled Jul 31 2020 17:37:28

Connecting to J-Link via USB…O.K.

Firmware: J-Link OB-K22-SiFive compiled Jun 17 2020 14:52:05

Hardware version: V1.00

S/N: 979015891

VTref=3.300V

Device “FE310” selected.

Connecting to target via JTAG

ConfigTargetSettings() start

ConfigTargetSettings() end

TotalIRLen = 5, IRPrint = 0x01

JTAG chain detection found 1 devices:

#0 Id: 0x20000913, IRLen: 05, Unknown device

Debug architecture:

RISC-V debug: 0.13

AddrBits: 7

DataBits: 32

IdleClks: 5

Memory access:

Via system bus: No

Via ProgBuf: Yes (16 ProgBuf entries)

DataBuf: 1 entries

autoexec[0] implemented: Yes

Detected: RV32 core

CSR access via abs. commands: No

Temp. halted CPU for NumHWBP detection

HW instruction/data BPs: 8

Support set/clr BPs while running: No

HW data BPs trigger before execution of inst

RISC-V identified.

Downloading file [/Users/efatehi/projects/sifive/freedom-e-sdk/software/hello/debug/hello.hex]…

J-Link: Flash download: Bank 0 @ 0x20000000: Skipped. Contents already match

O.K.

ConfigTargetSettings() start

ConfigTargetSettings() end

TotalIRLen = 5, IRPrint = 0x01

JTAG chain detection found 1 devices:

#0 Id: 0x20000913, IRLen: 05, Unknown device

Debug architecture:

RISC-V debug: 0.13

AddrBits: 7

DataBits: 32

IdleClks: 5

Memory access:

Via system bus: No

Via ProgBuf: Yes (16 ProgBuf entries)

DataBuf: 1 entries

autoexec[0] implemented: Yes

Detected: RV32 core

CSR access via abs. commands: No

HW instruction/data BPs: 8

Support set/clr BPs while running: No

HW data BPs trigger before execution of inst

RISC-V: Performing reset via

Any ideas on how to fix this?
Thanks

Could you try this? https://github.com/riscv-rust/hifive1-recover/tree/master/hifive1-revb
You can download the repository and run recover script for your board.

worked. thank you so much!