From Fedora Project Wiki
No edit summary
(→‎News: Added a note to know the latest status of RISC-V.)
 
(63 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[https://riscv.org/ RISC-V] (pronounced "RISC Five") is an [https://en.wikipedia.org/wiki/RISC-V open source instruction set architecture (ISA)].  This project, informally called '''Fedora/RISC-V''', aims to get Fedora bootstrapped on the RISC-V (64 bit) architecture.
[https://riscv.org/ RISC-V] (pronounced "RISC Five") is an [https://en.wikipedia.org/wiki/RISC-V open source instruction set architecture (ISA)].  This project, informally called '''Fedora/RISC-V''', aims to provide a complete Fedora experience on the RISC-V (64 bit, RV64GC) architecture.


= Topics =
= News =


* [[Architectures/RISC-V/Bootstrapping]] - Find out how to take part in the current bootstrapping of Fedora on RISC-V, how to build RPMs, common problems, etc.
Please contact people at the [https://fedoraproject.org/wiki/SIGs/RISC-V RISC-V SIG] if you want to know the latest status.


= Downloads =
'''May 2024''' We're starting a Special Interest Group! See the [https://fedoraproject.org/wiki/SIGs/RISC-V RISC-V SIG] for more details.


* http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv/
'''May 2024''' PLCT have releases a new repo for Fedora RV64 OCI image, currently F39 and F40 is avaliable. https://hub.docker.com/r/fedorariscv/base
** COPR repository (for Fedora 24/x86_64) containing: QEMU, Spike, cross-compiler toolchain
* https://github.com/rwmjones/fedora-riscv
** Git repository containing the bootstrapping work.  Read the README file!
* http://oirase.annexia.org/riscv/
** Interim stage3 disk image.


= Status =
'''Jun 2023''' <s>A new Fedora 38 [https://hub.docker.com/r/imbearchild/fedora-rv64 OCI image] for riscv64 is available.</s>


Last updated: 2016-08-16
'''May 2023'''  T-Head platform (Sipeed LicheePi 4A) description and installation how-to at [[Architectures/RISC-V/T-Head]]


Status: The stage3 disk image boots to a shell, with GCC, numerous developer utilities, and rpmbuild.
'''Jan 2022''' [https://plctlab.github.io/ PLCT Lab] have another new [https://openkoji.iscas.ac.cn/koji/index koji build system] for Riscv64.  


I have started using the stage3 to build stage4 RPMs.
'''Oct 2021''' Community member made a Fedora based BSP image for Allwinner D1 Nezha board. The information is available at [[Architectures/RISC-V/Allwinner]]. Note: Allwinner D1 is '''NOT''' officially supported by Fedora yet.


For the latest information, see:
'''May 2018''' [http://fedora.riscv.rocks/koji/ A Koji build system instance is now building Fedora packages].
https://github.com/rwmjones/fedora-riscv


= Communications =
'''February/March 2018'''  [https://fedorapeople.org/groups/risc-v/disk-images/ Stage4 disk images are available].  These are bootable in qemu and let you try out Fedora/RISC-V.  Make sure you read the [https://fedorapeople.org/groups/risc-v/disk-images/readme.txt readme.txt file] first.  The development environment is quite complete with GCC 7.3.1, Perl 5.26, Python 2 and 3, git, systemd, various editors including vi and emacs, many <code>-devel</code> packages, and some X11 packages.  It will be enough for most developers to start porting their software to RISC-V.  The main missing things at the moment are Ruby, Java and Gtk 3.


There is no specific mailing listUse [https://lists.fedoraproject.org/admin/lists/devel.lists.fedoraproject.org/ Fedora devel] for now.
'''Status January/February 2018'''  The third and hopefully final bootstrap of Fedora 27 has startedPlease follow progress or try building it yourself via [https://github.com/rwmjones/fedora-riscv-bootstrap this git repository]. Expected timelines are: 1-2 weeks until stage 3 disk images are available, 1-2 months until stage 4 pristine RPM-built disk images are available, 2 months until we are autobuilding regular Fedora packages, 3-6 months until we have koji-shadow functionality.


On FreeNode IRC: <code>#fedora-riscv</code>
= Communications =


= People =
Follow (and post to!) [https://discussion.fedoraproject.org/tag/risc-v-sig #risc-v on Fedora Discussion]! (If you prefer, you can follow this tag by email.)


* [[RichardJones|Richard Jones]] <br>
= Topics =
<i>(add your name here)</i>


= Building packages in stage3 =
* [[Architectures/RISC-V/Installing]] - How to download, install and run Fedora/RISC-V.
* <s>[[Architectures/RISC-V/Building]] - Help to build packages for Fedora/RISC-V.</s>
* <s>[[Architectures/RISC-V/Bootstrapping]] - Bootstrapping Fedora on RISC-V.</s>


The stage3 environment can be built from source or you can download a snapshot binary image.  See above for links to git etc.
= Builds =


Pick a package which:
; http://fedora.riscv.rocks:3000/
* has very few dependencies
: RISC-V Package Sources
* is written in C or C++
* is part of Fedora @Core


Grab the source RPM from [http://koji.fedoraproject.org/koji/ Koji].
= Downloads =
 
; http://fedora.riscv.rocks/koji/tasks?state=closed&view=flat&method=createAppliance&order=-id
Copy the source RPM into the stage3 disk image.  The disk image <b>must not</b> be running when you do this:
: Latest disk images
 
; http://fedora.riscv.rocks/koji/
virt-copy-in -a stage3-disk.img the_package.src.rpm /var/tmp/
: Koji build system
 
; http://fedora.riscv.rocks/repos/ http://fedora.riscv.rocks/repos-dist/
Boot the disk image in qemu:
: Packages built by Koji
 
; https://github.com/rwmjones/fedora-riscv-kernel
make boot-stage3-in-qemu
: Linux kernel build scripts and patches
 
; https://bugzilla.redhat.com/show_bug.cgi?id=1553405
Inside the VM you can now "install" the source RPM, which makes it available under <code>/rpmbuild</code>:
: Tracker bug for all issues which affect Fedora on RISC-V
 
rpm -i /var/tmp/the_package.src.rpm
cd /rpmbuild/SPECS
 
You may need to disable hardened build by adding:
 
%undefine _hardened_build
 
to the spec file.  Use <code>vim</code> to edit files.
 
You can now try building the package:
 
rpmbuild -ba the_package.spec --define "debug_package %{nil}"
 
If it builds successfully, brilliant!  More usually this will require many cycles of debugging and fixing things.  Removing dependencies or parts of the spec file is an option for these stage3 builds.
 
If you get a build, it will be in <code>/rpmbuild</code> inside the VM.  sync and shut down the VM, then do:
 
virt-copy-out -a stage3-disk.img /rpmbuild ./
 
and the files will be downloaded to ./SRPMS and ./RPMS in the current directory.  Note: Keep the source RPM too, especially if you modified it.
 
Add notes to the section below.  Also come to <code>#fedora-riscv</code> and discuss where to put your built packages.
 
== Notes on packages built so far ==
 
<i>The list of packages in this section was constantly out of date, so I deleted it</i>
 
To see the packages which have been built so far, look in the git repo. If you are planning to port another package, please ping us on <code>#fedora-riscv</code> first, just to make sure that two people don't do overlapping work.
 
=== "all-recursive" bug in make ===
 
Making all in .
Makefile:742: recipe for target 'all-recursive' failed
 
Added this to the spec file as a workaround:
 
sed 's/\$(am__cd) \$\$subdir \&\&/cd $$subdir ;/g' -i Makefile.in
 
=== debugedit missing ===


Use <code>%global debug_package %{nil}</code> (temporarily for stage3, in stage4 we will attempt to build the debuginfo packages).
; https://hub.docker.com/r/imbearchild/fedora-rv64
: OCI image (for docker and podman) Note: This image uses rpm repo from openkoji.iscas.ac.cn (instead of fedora.riscv.rocks)


=== bugs about locking, random "Permission denied" ===
The following links are now obsolete:


Update to the latest riscv-gnu-toolchain and rebuild the kernel from the repo. All known locking bugs have been fixed.
; <s>https://fedorapeople.org/groups/risc-v/
: Disk images, RPMs, SRPMs. (old)</s>
; <s>https://github.com/rwmjones/fedora-riscv-autobuild
: The autobuilder source.</s>
; <s>http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv/
: The COPR repository (for Fedora 27/x86_64) containing QEMU</s>
; <s>https://github.com/rwmjones/fedora-riscv-stage4
: Scripts used to build the stage4 disk image.</s>
; <s>https://github.com/rwmjones/fedora-riscv-bootstrap</s>
: <s>Git repository containing the bootstrapping work.  Read the README file!</s>
; <s>http://oirase.annexia.org/riscv/</s>
: <s>Interim stage3 disk images built by rwmj</s>
; <s>http://davidlt.web.cern.ch/davidlt/riscv/</s>
: <s>Interim stage3 disk and kernel images built by davidlt.</s>

Latest revision as of 18:08, 24 November 2024

RISC-V (pronounced "RISC Five") is an open source instruction set architecture (ISA). This project, informally called Fedora/RISC-V, aims to provide a complete Fedora experience on the RISC-V (64 bit, RV64GC) architecture.

News

Please contact people at the RISC-V SIG if you want to know the latest status.

May 2024 We're starting a Special Interest Group! See the RISC-V SIG for more details.

May 2024 PLCT have releases a new repo for Fedora RV64 OCI image, currently F39 and F40 is avaliable. https://hub.docker.com/r/fedorariscv/base

Jun 2023 A new Fedora 38 OCI image for riscv64 is available.

May 2023 T-Head platform (Sipeed LicheePi 4A) description and installation how-to at Architectures/RISC-V/T-Head

Jan 2022 PLCT Lab have another new koji build system for Riscv64.

Oct 2021 Community member made a Fedora based BSP image for Allwinner D1 Nezha board. The information is available at Architectures/RISC-V/Allwinner. Note: Allwinner D1 is NOT officially supported by Fedora yet.

May 2018 A Koji build system instance is now building Fedora packages.

February/March 2018 Stage4 disk images are available. These are bootable in qemu and let you try out Fedora/RISC-V. Make sure you read the readme.txt file first. The development environment is quite complete with GCC 7.3.1, Perl 5.26, Python 2 and 3, git, systemd, various editors including vi and emacs, many -devel packages, and some X11 packages. It will be enough for most developers to start porting their software to RISC-V. The main missing things at the moment are Ruby, Java and Gtk 3.

Status January/February 2018 The third and hopefully final bootstrap of Fedora 27 has started. Please follow progress or try building it yourself via this git repository. Expected timelines are: 1-2 weeks until stage 3 disk images are available, 1-2 months until stage 4 pristine RPM-built disk images are available, 2 months until we are autobuilding regular Fedora packages, 3-6 months until we have koji-shadow functionality.

Communications

Follow (and post to!) #risc-v on Fedora Discussion! (If you prefer, you can follow this tag by email.)

Topics

Builds

http://fedora.riscv.rocks:3000/
RISC-V Package Sources

Downloads

http://fedora.riscv.rocks/koji/tasks?state=closed&view=flat&method=createAppliance&order=-id
Latest disk images
http://fedora.riscv.rocks/koji/
Koji build system
http://fedora.riscv.rocks/repos/ http://fedora.riscv.rocks/repos-dist/
Packages built by Koji
https://github.com/rwmjones/fedora-riscv-kernel
Linux kernel build scripts and patches
https://bugzilla.redhat.com/show_bug.cgi?id=1553405
Tracker bug for all issues which affect Fedora on RISC-V
https://hub.docker.com/r/imbearchild/fedora-rv64
OCI image (for docker and podman) Note: This image uses rpm repo from openkoji.iscas.ac.cn (instead of fedora.riscv.rocks)

The following links are now obsolete:

https://fedorapeople.org/groups/risc-v/
Disk images, RPMs, SRPMs. (old)
https://github.com/rwmjones/fedora-riscv-autobuild
The autobuilder source.
http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv/
The COPR repository (for Fedora 27/x86_64) containing QEMU
https://github.com/rwmjones/fedora-riscv-stage4
Scripts used to build the stage4 disk image.
https://github.com/rwmjones/fedora-riscv-bootstrap
Git repository containing the bootstrapping work. Read the README file!
http://oirase.annexia.org/riscv/
Interim stage3 disk images built by rwmj
http://davidlt.web.cern.ch/davidlt/riscv/
Interim stage3 disk and kernel images built by davidlt.