riscv-edk2-platforms icon indicating copy to clipboard operation
riscv-edk2-platforms copied to clipboard

Create CI with hardware

Open JohnAZoidberg opened this issue 4 years ago • 6 comments

Can use https://github.com/HewlettPackard/osfci.

Need to figure out:

  • What device to run CI on
  • How to flash FW to SUT
  • How to reset SUT
  • How to collect serial log from SUT

Possibly for:

  • BeagleV Starlight
  • Nezha Allwinner D1
  • SiFive Hifive Unleashed

JohnAZoidberg avatar Aug 16 '21 17:08 JohnAZoidberg

Seems to be the easiest with the Nezha D1.

It has:

  • [x] Reset pin
  • [x] FEL pin to start FEL mode. It needs to be connected to GND during reset. Then we can connect to the OTG USB-C port and load FW into RAM and execute it
  • [x] UART Serial pins

JohnAZoidberg avatar Dec 26 '21 07:12 JohnAZoidberg

Board Reset Flash Serial
Nezha D1 P6 contact to GND Binary in RAM with FEL UART
BeagleV Starlight ? ? UART
Sifive Unleashed ? ? ?

JohnAZoidberg avatar Dec 26 '21 07:12 JohnAZoidberg

Hi @JohnAZoidberg

I'm Wei Wu, the director of PLCT Lab, which is a development partner of RVI. We're building and maintaining the first RISC-V Lab. There are hundreds of D1 and Unmatched machines for RISC-V CI in open source projects. I'd like to contribute to this issue if remote CI is possible. (The devices are located in Nanjing, China.)

(There is only one BeagleV Starlight in my lab, so I'm afraid that it may need more help from others.)

lazyparser avatar Dec 27 '21 03:12 lazyparser

That sounds great, @lazyparser, thanks! Do you have some more information about that? You've got my email address, right?

You (are going to) have an API to flash and reset the system, as well as to get the serial output?

JohnAZoidberg avatar Dec 28 '21 14:12 JohnAZoidberg

That sounds great, @lazyparser, thanks! Do you have some more information about that? You've got my email address, right?

Yes sure. I've found your [anything] email address :)

I'll write a short manual after the new year holiday. Basically developers can login to these boards directly using ssh.

You (are going to) have an API to flash and reset the system, as well as to get the serial output?

Sure. The idea is to leverage a Jenkins instance for the triggering and log downloading. (e.g. https://ci.rvperf.org/ . the Jenkins itself does not save scripts. it pulls scripts from https://github.com/plctlab/riscv-ci . so we can use github PR for adding and updating build scripts)

lazyparser avatar Dec 29 '21 03:12 lazyparser

Yes sure. I've found your [anything] email address :)

Oh good, I thought you were someone else.

Basically developers can login to these boards directly using ssh.

Since EDK2 is the firmware (like u-boot), we need to flash the SD card from outside the board and get the console using physical serial port (UART). Would that be possible? edk2 isn't software that runs inside the OS and can be run through an ssh shell.

JohnAZoidberg avatar Dec 29 '21 09:12 JohnAZoidberg