From Fedora Project Wiki
Line 2: Line 2:
  
 
Go [http://fedora-riscv.tranquillity.se/koji/tasks?state=closed&view=flat&method=createAppliance&order=-id to this link for the nightly builds] and select the most recent (top) build.  Look for the <code>-sda.raw.xz</code> file and download it.  It will usually be quite large, around 200-300 MB.
 
Go [http://fedora-riscv.tranquillity.se/koji/tasks?state=closed&view=flat&method=createAppliance&order=-id to this link for the nightly builds] and select the most recent (top) build.  Look for the <code>-sda.raw.xz</code> file and download it.  It will usually be quite large, around 200-300 MB.
 
The disk image is compressed and partitioned, but usually we need an uncompressed, unpartitioned ("naked") filesystem.  There are several ways to get this, but the easiest is:
 
 
<pre>
 
$ unxz Fedora-Developer-Rawhide-xxxx.n.0-sda.raw.xz
 
$ guestfish -a Fedora-Developer-Rawhide-xxxx.n.0-sda.raw \
 
    run : download /dev/sda1 Fedora-Developer-Rawhide-xxxx.n.0-sda1.raw
 
</pre>
 
 
This creates a naked ext4 filesystem called <code>*-sda1.raw</code> which can be used in qemu or booted on the [https://www.sifive.com/products/hifive-unleashed/ HiFive Unleashed board].
 
  
 
== Root password ==
 
== Root password ==
Line 22: Line 12:
  
 
Get [https://fedorapeople.org/groups/risc-v/disk-images/bbl bbl from here] or [https://github.com/rwmjones/fedora-riscv-kernel compile it from source].
 
Get [https://fedorapeople.org/groups/risc-v/disk-images/bbl bbl from here] or [https://github.com/rwmjones/fedora-riscv-kernel compile it from source].
 +
 +
You will need to uncompress the disk image.
  
 
<pre>
 
<pre>
Line 32: Line 24:
 
     -object rng-random,filename=/dev/urandom,id=rng0 \
 
     -object rng-random,filename=/dev/urandom,id=rng0 \
 
     -device virtio-rng-device,rng=rng0 \
 
     -device virtio-rng-device,rng=rng0 \
     -append "console=ttyS0 ro root=/dev/vda" \
+
     -append "console=ttyS0 ro root=/dev/vda1" \
 
     -device virtio-blk-device,drive=hd0 \
 
     -device virtio-blk-device,drive=hd0 \
 
     -drive file=Fedora-Developer-Rawhide-xxxx.n.0-sda1.raw,format=raw,id=hd0 \
 
     -drive file=Fedora-Developer-Rawhide-xxxx.n.0-sda1.raw,format=raw,id=hd0 \
Line 41: Line 33:
 
= Install on the HiFive Unleashed SD card =
 
= Install on the HiFive Unleashed SD card =
  
The naked ext4 filesystem can be copied over the second partition of the SD card.
+
These are instructions for the [https://www.sifive.com/products/hifive-unleashed/ HiFive Unleashed board].
 +
 
 +
The disk image (above) is compressed and partitioned, but usually we need an uncompressed, unpartitioned ("naked") filesystem.  There are several ways to get this, but the easiest is:
 +
 
 +
<pre>
 +
$ unxz Fedora-Developer-Rawhide-xxxx.n.0-sda.raw.xz
 +
$ guestfish -a Fedora-Developer-Rawhide-xxxx.n.0-sda.raw \
 +
    run : download /dev/sda1 Fedora-Developer-Rawhide-xxxx.n.0-sda1.raw
 +
</pre>
 +
 
 +
This creates a naked ext4 filesystem called <code>*-sda1.raw</code>.  The naked ext4 filesystem can be copied over the second partition of the SD card.
  
 
You can also build a custom bbl+kernel+initramfs to boot directly into the SD card using [https://github.com/rwmjones/fedora-riscv-kernel these sources].
 
You can also build a custom bbl+kernel+initramfs to boot directly into the SD card using [https://github.com/rwmjones/fedora-riscv-kernel these sources].

Revision as of 14:05, 24 August 2018

Download the latest disk image

Go to this link for the nightly builds and select the most recent (top) build. Look for the -sda.raw.xz file and download it. It will usually be quite large, around 200-300 MB.

Root password

riscv

Boot under qemu

You will need a very recent version of qemu. If in doubt, compile from upstream qemu sources.

Get bbl from here or compile it from source.

You will need to uncompress the disk image.

qemu-system-riscv64 \
    -nographic \
    -machine virt \
    -smp 4 \
    -m 2G \
    -kernel bbl \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-device,rng=rng0 \
    -append "console=ttyS0 ro root=/dev/vda1" \
    -device virtio-blk-device,drive=hd0 \
    -drive file=Fedora-Developer-Rawhide-xxxx.n.0-sda1.raw,format=raw,id=hd0 \
    -device virtio-net-device,netdev=usernet \
    -netdev user,id=usernet,hostfwd=tcp::10000-:22

Install on the HiFive Unleashed SD card

These are instructions for the HiFive Unleashed board.

The disk image (above) is compressed and partitioned, but usually we need an uncompressed, unpartitioned ("naked") filesystem. There are several ways to get this, but the easiest is:

$ unxz Fedora-Developer-Rawhide-xxxx.n.0-sda.raw.xz
$ guestfish -a Fedora-Developer-Rawhide-xxxx.n.0-sda.raw \
    run : download /dev/sda1 Fedora-Developer-Rawhide-xxxx.n.0-sda1.raw

This creates a naked ext4 filesystem called *-sda1.raw. The naked ext4 filesystem can be copied over the second partition of the SD card.

You can also build a custom bbl+kernel+initramfs to boot directly into the SD card using these sources.

Install on the HiFive Unleashed using NBD server

Look at https://github.com/rwmjones/fedora-riscv-kernel in the sifive_u540 branch. This is quite complex to set up so it's best to ask on the #fedora-riscv IRC channel.