Difference between revisions of "SiFive Freedom U740"

From Funtoo
Jump to navigation Jump to search
Line 7: Line 7:
|Description=This subarch supports the RISC-V SiFive Freedom U740 processor, featured on the [https://www.sifive.com/boards/hifive-unmatched HiFive Unmatched] board.
|Description=This subarch supports the RISC-V SiFive Freedom U740 processor, featured on the [https://www.sifive.com/boards/hifive-unmatched HiFive Unmatched] board.
}}
}}
== What you need ==
* The [https://www.sifive.com/boards/hifive-unmatched Hifive Unmatched], with an M.2 disk and a GPU installed (see the [https://sifive.cdn.prismic.io/sifive/65937c64-c6ca-4bc7-80d1-e830a895636a_hifive-unmatched-getting-started-guide-v1p4.pdf Getting started guide] about qualified options)
* A microSD card loaded with the [https://github.com/sifive/freedom-u-sdk Freedom U SDK], preferably the CLI version (for example using [https://github.com/sifive/freedom-u-sdk/releases/download/2022.04.00/demo-coreip-cli-unmatched-2022.04.00.rootfs.wic.xz this] disk image).
== Installation ==
* Insert the prepared microSD card and boot into the Linux loaded on it.
* Follow the usual [https://www.funtoo.org/Install/Introduction Funtoo installation process] to prepare the M.2 disk ({{c|/dev/nvme0n1}}), but don't create a separate boot partition, as you're going to be using the one already present on the microSD card ({{c|/dev/mmcblk0p3}}).
* Mount your partitions under {{c|/mnt/funtoo}}, it should look similar to this (ignore additional rows):
{{console|body=
###i## lsblk
mmcblk0    179:0    0    30G  0 disk
|-mmcblk0p1 179:1    0    1M  0 part
|-mmcblk0p2 179:2    0    4M  0 part
|-mmcblk0p3 179:3    0  130M  0 part /mnt/funtoo/boot
`-mmcblk0p4 179:4    0  6.5G  0 part
nvme0n1    259:0    0 931.5G  0 disk
`-nvme0n1p1 259:1    0 931.5G  0 part /mnt/funtoo
}}
* Finish the usual normal Funtoo installation until you need to configure booting (remember to add the microSD card boot partition to your {{c|fstab}}
* Add Funtoo to the U-Boot config on the microSD card:
{{file|name=/mnt/funtoo/boot/extlinux/extlinux.conf|body=
default Funtoo
label OpenEmbedded-SiFive-HiFive-Unmatched
  kernel /Image.gz-initramfs-unmatched.bin
  fdt /hifive-unmatched-a00.dtb
  append root=/dev/mmcblk0p4 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon
label Funtoo
  kernel /Image.gz-initramfs-unmatched.bin
  fdt /hifive-unmatched-a00.dtb
  append root=/dev/nvme0n1p1 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon
}}
* Rebooting should load your Funtoo installation with the official Freedom U SDK kernel
{{note|'''Self-compiled kernel''': Build the kernel into a single (EFI) image (with an embedded initramfs, should you need one), then install that to the microSD card's boot partition, along with the {{c|hifive-unmatched-a00.dtb}} file from your kernel's source directory. Adjust the {{c|kernel}} and {{c|fdt}} entries from {{c|/boot/extlinux/extlinux.conf}} accordingly.}}

Revision as of 10:10, June 5, 2022

This section lists the CPU-optimized Funtoo Linux builds currently available for download for sifive-fu740. This subarch supports the RISC-V SiFive Freedom U740 processor, featured on the HiFive Unmatched board.

next

   stage3
Download

Date: 2022-09-12
Size: 581MB browse

Not sure which to choose? See this portion of our Install docs.

For information on how to verify the integrity of your stage3 tarball using gpg, see GPG Signatures.

Downloads accelerated by Cdn77 logo.png

Architecture and Optimization

The following settings are applied to all stages for this subarch via Funtoo subarch profiles:

CHOSTriscv64-unknown-linux-gnu
CFLAGS-O2 -march=rv64gc -mabi=lp64d


What you need

Installation

  • Insert the prepared microSD card and boot into the Linux loaded on it.
  • Follow the usual Funtoo installation process to prepare the M.2 disk (/dev/nvme0n1), but don't create a separate boot partition, as you're going to be using the one already present on the microSD card (/dev/mmcblk0p3).
  • Mount your partitions under /mnt/funtoo, it should look similar to this (ignore additional rows):
root # lsblk
mmcblk0     179:0    0    30G  0 disk
  • Finish the usual normal Funtoo installation until you need to configure booting (remember to add the microSD card boot partition to your fstab
  • Add Funtoo to the U-Boot config on the microSD card:
   /mnt/funtoo/boot/extlinux/extlinux.conf
default Funtoo

label OpenEmbedded-SiFive-HiFive-Unmatched
   kernel /Image.gz-initramfs-unmatched.bin
   fdt /hifive-unmatched-a00.dtb
   append root=/dev/mmcblk0p4 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon

label Funtoo
   kernel /Image.gz-initramfs-unmatched.bin
   fdt /hifive-unmatched-a00.dtb
   append root=/dev/nvme0n1p1 rootfstype=ext4 rootwait console=ttySIF0,115200 earlycon
  • Rebooting should load your Funtoo installation with the official Freedom U SDK kernel
   Note

Self-compiled kernel: Build the kernel into a single (EFI) image (with an embedded initramfs, should you need one), then install that to the microSD card's boot partition, along with the hifive-unmatched-a00.dtb file from your kernel's source directory. Adjust the kernel and fdt entries from /boot/extlinux/extlinux.conf accordingly.