Go to file
2023-02-16 13:26:46 +01:00
examples examples: init 2022-07-13 07:45:04 +01:00
visionfive2 Add visionfive2 images 2023-02-16 13:26:46 +01:00
.gitignore init 2022-07-09 04:35:35 +01:00
base.nix base: update overlays and remove unnecessary patches 2022-07-13 07:48:58 +01:00
configuration.nix configuration.nix: Add boot.shell_on_fail 2023-02-16 11:53:02 +01:00
flake.lock Add VisionFive 2 inputs 2023-02-16 13:26:38 +01:00
flake.nix Add visionfive2 images 2023-02-16 13:26:46 +01:00
kernel.nix flake: use regexp and flake inputs to automate kernel building 2022-07-09 04:38:33 +01:00
README.md README: init 2022-07-10 08:42:14 +01:00

Flashing the Bootloader

  1. Do not apply power to the board

  2. Attach the board via serial to your system, ensuring power is still not applied

  3. Ensure the serial shows up in /dev/ttyUSB*, you can see this by running dmesg after plugging in the device

     dmesg
    [200199.253566] usb 1-2: new full-speed USB device number 79 using xhci_hcd
    [200199.386983] usb 1-2: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
    [200199.386988] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [200199.386990] usb 1-2: Product: FT232R USB UART
    [200199.386991] usb 1-2: Manufacturer: FTDI
    [200199.386992] usb 1-2: SerialNumber: A50285BI
    [200199.390344] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
    [200199.390363] usb 1-2: Detected FT232RL
    [200199.391207] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
                                                                              ^^^^^^^
                                                                              ^ This becomes /dev/ttyUSB0
    
  4. nix run github:matthewcroughan/visionfive-nix#flashBootloader /dev/ttyUSB0

  5. Wait to be told to apply power to the board this may take a while as U-Boot and OpenSBI are being cross-compiled.

    Terminal ready
    
    ### Apply power to the VisionFive Board ###
    

    Once power is applied, picocom will send the OpenSBI/U-Boot payload via XMODEM. You can then flash NixOS or any other distribution that follows the Distro Boot specification1 to an SD card and boot it.

Why do I need to flash the bootloader?

https://github.com/starfive-tech/u-boot/issues/30

The VisionFive ships with a version of OpenSBI/U-Boot that does not follow the distro-boot specification. NixOS and other distros would like to remain generic, without vendor specific details entering their system. This means booting NixOS requires flashing the bootloader as described above.