Booting Yggdrasil OS on Starfive VisionFive 2 RISC-V board:

* TODO: proper format for initrd image

Prerequisites:

* OpenSBI + u-boot (you can use the regular debian installation from Starfive)
* yggdrasil-kernel.bin
* initrd.img

Steps:

1. Copy yggdrasil-kernel.bin and initrd.img into some directory and start a TFTP server there
2. Connect to VF2's serial port, ethernet and enter u-boot
3. Run the following commands in u-boot:

### If using DHCP
$ dhcp
### If not using DHCP
$ env set ipaddr <VF2-IP-ADDR>
$ env set initrd_addr_r 0x70000000
### [Optional] set some kernel cmdline params
$ env set bootargs "debug.serial-level=info"
$ tftpboot ${initrd_addr_r} <BUILD-MACHINE-IP-ADDR>:initrd.img
$ tftpboot ${loadaddr} <BUILD-MACHINE-IP-ADDR>:yggdrasil-kernel.bin
$ load mmc 1:3 ${fdt_addr_r} dtbs/6.6.20-starfive/starfive/${fdtfile}
$ fdt resize
$ booti ${loadaddr} ${initrd_addr_r}:<initrd-size> ${fdt_addr_r}

###### Assuming BUILD-MACHINE-IP-ADDR is 13.0.0.1 and VF2-IP-ADDR is 13.0.0.2, here's
###### a quick command for a development boot
###### (FIXME when initrd gets larger than 64MiB)

env set ipaddr 13.0.0.2; env set initrd_addr_r 0x70000000; tftpboot ${initrd_addr_r} 13.0.0.1:initrd.img; tftpboot ${loadaddr} 13.0.0.1:yggdrasil-kernel.bin; load mmc 1:3 ${fdt_addr_r} dtbs/6.6.20-starfive/starfive/${fdtfile}; fdt resize; booti ${loadaddr} ${initrd_addr_r}:60000000 ${fdt_addr_r}

#### For DHCP boot with BUILD-MACHINE-IP-ADDR 192.168.88.10

dhcp
dhcp; env set initrd_addr_r 0x70000000; tftpboot ${initrd_addr_r} 192.168.88.10:initrd.img; tftpboot ${loadaddr} 192.168.88.10:yggdrasil-kernel.bin; load mmc 1:3 ${fdt_addr_r} dtbs/6.6.20-starfive/starfive/${fdtfile}; fdt resize; booti ${loadaddr} ${initrd_addr_r}:60000000 ${fdt_addr_r}


Missing drivers:

Clock/reset/pin:
    No driver for Some("pinctrl@17020000") ("starfive,jh7110-aon-pinctrl")
    No driver for Some("clock-controller@19810000") ("starfive,jh7110-ispcrg")
    No driver for Some("clock-controller@295c0000") ("starfive,jh7110-voutcrg")

Power/reg/GPIO:
    No driver for Some("opp-table-0") ("operating-points-v2")
    No driver for Some("pmic@36") ("x-powers,axp15060")
    No driver for Some("power-controller@17030000") ("starfive,jh7110-pmu")
    No driver for Some("leds") ("gpio-leds")
    No driver for Some("gpio-restart") ("gpio-restart")

Serial:
    No driver for Some("i2c@10030000") ("snps,designware-i2c")
    No driver for Some("i2c@10050000") ("snps,designware-i2c")
    No driver for Some("i2c@12050000") ("snps,designware-i2c")
    No driver for Some("i2c@12060000") ("snps,designware-i2c")
    No driver for Some("spi@10060000") ("arm,pl022")
      also "arm,primecell"

Bus:
    No driver for Some("usb@10100000") ("starfive,jh7110-usb")
    No driver for Some("usb@0") ("cdns,usb3")
    No driver for Some("phy@10200000") ("starfive,jh7110-usb-phy")
    No driver for Some("phy@10210000") ("starfive,jh7110-pcie-phy")
    No driver for Some("phy@10220000") ("starfive,jh7110-pcie-phy")
    No driver for Some("pcie@940000000") ("starfive,jh7110-pcie")
    No driver for Some("pcie@9c0000000") ("starfive,jh7110-pcie")

Interrupt:
    No driver for Some("interrupt-controller") ("riscv,cpu-intc")
    No driver for Some("timer@2000000") ("starfive,jh7110-clint")
      also "sifive,clint0"

Display/GPU subsystem:
    No driver for Some("display-subsystem") ("starfive,jh7110-display")
      also "verisilicon,display-subsystem"
    No driver for Some("dsi-output") ("starfive,jh7110-display-encoder")
      also "verisilicon,dsi-encoder"
    No driver for Some("jpu@13090000") ("starfive,jpu")
    No driver for Some("vpu_dec@130a0000") ("starfive,vdec")
    No driver for Some("vpu_enc@130b0000") ("starfive,venc")
    No driver for Some("gpu@18000000") ("img-gpu")
    No driver for Some("vin_sysctl@19800000") ("starfive,jh7110-vin")
    No driver for Some("phy@19820000") ("starfive,jh7110-dphy-rx")
    No driver for Some("dc8200@29400000") ("starfive,jh7110-dc8200")
      also "verisilicon,dc8200"
    No driver for Some("hdmi@29590000") ("starfive,jh7110-hdmi")
      also "inno,hdmi"
    No driver for Some("mipi@295d0000") ("starfive,jh7110-mipi_dsi")
      also "cdns,dsi"
    No driver for Some("mipi-dphy@295e0000") ("starfive,jh7110-mipi-dphy-tx")
      also "m31,mipi-dphy-tx"

Misc:
    No driver for Some("mailbox_client") ("starfive,mailbox-test")
    No driver for Some("cache-controller@2010000") ("starfive,jh7110-ccache")
      also "sifive,ccache0"
      also "cache"
    No driver for Some("pwm@120d0000") ("starfive,jh7110-pwm")
      also "opencores,pwm-v1"
    No driver for Some("temperature-sensor@120e0000") ("starfive,jh7110-temp")
    No driver for Some("timer@13050000") ("starfive,jh7110-timer")
    No driver for Some("mailbox@13060000") ("starfive,mail_box")
    No driver for Some("watchdog@13070000") ("starfive,jh7110-wdt")
    No driver for Some("crypto@16000000") ("starfive,jh7110-crypto")
    No driver for Some("rng@1600c000") ("starfive,jh7110-trng")
    No driver for Some("mdio") ("snps,dwmac-mdio")
    No driver for Some("mdio") ("snps,dwmac-mdio")
    No driver for Some("dma-controller@16050000") ("starfive,jh7110-axi-dma")
    No driver for Some("dma-controller@16008000") ("arm,pl080")
      also "arm,primecell"
    No driver for Some("rtc@17040000") ("starfive,jh7110-rtc")
    No driver for Some("e24@6e210000") ("starfive,e24")
    No driver for Some("linux,cma") ("shared-dma-pool")

Storage:
    No driver for Some("spi@13010000") ("starfive,jh7110-qspi")
      also "cdns,qspi-nor"
    No driver for Some("flash@0") ("jedec,spi-nor")
    No driver for Some("partitions") ("fixed-partitions")
    No driver for Some("mmc@16010000") ("starfive,jh7110-mmc")
    No driver for Some("mmc@16020000") ("starfive,jh7110-mmc")

Audio:
    No driver for Some("pwmdac@100b0000") ("starfive,jh7110-pwmdac")
    No driver for Some("i2s@120b0000") ("starfive,jh7110-i2stx0")
