rwmjones / fedora-riscv-bootstrap Goto Github PK
View Code? Open in Web Editor NEWBootstrapping Fedora on RISC-V
Bootstrapping Fedora on RISC-V
A plan for Fedora/RISC-V ---------------------------------------------------------------------- by Richard W.M. Jones ([email protected]) Project home page: https://fedoraproject.org/wiki/Architectures/RISC-V The aim of the project ---------------------- Get Fedora running on the RISC-V architecture! This will just be an initial pass, which we're calling an "experimental architecture". It won't even be a secondary architecture for perhaps 1 to 3 years. About Fedora: https://getfedora.org/ About RISC-V: https://riscv.org/ https://en.wikipedia.org/wiki/RISC-V lowRISC: http://www.lowrisc.org/ SiFive: https://www.sifive.com/ How do we expect people to consume Fedora/RISC-V? ------------------------------------------------- Most users will download binaries. Of course source will be available for everything, buildable from source RPMS. Currently no hardware is available, so you either have to run RISC-V on an FPGA, or use emulation, either QEMU or Spike. For the FPGA option, you will need a Nexys 4 DDR development kit costing around US$341, plus an ordinary micro SD card (8+ GB), plus a host Fedora/x86-64 computer. - Maximum system RAM is 128 MB (1 GB is available if you use the other far more expensive FPGA development kit) - There is a 115200 bps 8n1 serial port. - There is no ethernet and no display. - Note that some parts of the FPGA toolchain are closed source. For the QEMU emulation option, you will need Fedora 27 (x86_64). - QEMU has unlimited system RAM. - Single virtual CPU. For the Spike emulation option, you will need Fedora 27 (x86_64). - Spike has unlimited system RAM. - Spike can emulate multiple virtual CPUs. - Spike's single thread performance is much slower than QEMU. - No network. What parts of Fedora are we aiming to build? -------------------------------------------- The @Core packages (as RPMs), rpmbuild, gcc, and a bootable binary disk image. For the list of packages in @Core, see: https://github.com/rwmjones/fedora-riscv/blob/master/packages-in-core Only 64 bit RISC-V ("riscv64") will be targeted. Once those are done, we can declare victory. What parts of Fedora are we *not* aiming to build? -------------------------------------------------- Nothing outside @Core except for specific compilers and build tools. Not Anaconda. Not Koji (at least, not at first). Not Grub nor EDK2. We will initially use the Berkeley bootloader (bbl), but aim for a standard bootloader later. Where will we build it? ----------------------- The packages which are run on the host (x86-64) computer are built in a subdirectory (host-tools/, eg host-tools/bin/riscv64-unknown-elf-gcc). However the majority of packages will be built on RISC-V itself. Since there are no RISC-V builders, and we cannot provide any, initially developers will be building them on their own FPGAs / emulators and uploading them to somewhere central. Getting build infrastructure would be a more long-term aim. Bootstrapping stages -------------------- [This plan was loosely based on: https://fedoraproject.org/wiki/Architectures/AArch64/Bootstrap] Bootstrapping, Stage 1 ---------------------- (1a) riscv-qemu.x86_64: QEMU + RISC-V system emulation Not upstream, fork of qemu 2.5.0. https://github.com/riscv/riscv-qemu Note this package runs on x86-64 hosts, and is intended for people who want to run Fedora/RISC-V but who do not have FPGA/hardware. Bootstrapping, Stage 2 ---------------------- (2a) GNU cross-compiler toolchain. https://github.com/riscv/riscv-tools (2b) Berkley Bootloader (bbl) https://github.com/riscv/riscv-pk Used to boot the kernel and act as the "M" layer. Bootstrapping, Stage 3 ---------------------- (3a) kernel.riscv64: The Linux kernel, cross-compiled. https://github.com/riscv/riscv-linux (3b) "Just enough userspace" We cross-compile packages from x86-64 host to riscv64 target filesystem. The aim is to have a filesystem (not RPMs) that can be booted on RISC-V hardware or under emulation, which will be sufficient to use to compile RPMs. Bootstrapping, Stage 4 ---------------------- (4a) Userspace RPMs We will build RPMs using "rpmbuild" on RISC-V itself (under emulation). Full details of this step are on the wiki: https://fedoraproject.org/wiki/Architectures/RISC-V/Bootstrapping See stage3-built-rpms/* (4b) Recreate the filesystem from RPMs. Distribute an initial bootable binary disk image which is completely built from RPMs (but note: not created by Anaconda, we'll use "rpm --root"). (4c) kernel.riscv64: The Linux kernel, compiled as an RPM on RISC-V. (4d) Continue compiling all other RPMs from @Core. For the list of packages in @Core, see: https://github.com/rwmjones/fedora-riscv/blob/master/packages-in-core As more packages are compiled, distribute them as RPMs and distribute updated bootable binary disk image. (4e) Declare victory and celebrate! Open issues ----------- (none at present)
Hello,
Porting Fedora to RISC-V is very interestingly done. Thank you !
Do you think it possible to push another small rtos with rocket cores to the fpga instead of riscv-linux in stage similarly? The rtos in question has its own gcc.
If so, could you please explain what would be a good place to start ?
Thank you.
Dear All,
I have cloned fedora-riscv-bootstrap from https://github.com/rwmjones/fedora-riscv-bootstrap link. I am trying to execute make stage3 command, But I am getting errors. Can anyone help me how to solve these errors.
Error:
[billa@surya fedora-riscv-bootstrap]$ make stage3
rm -f riscv-linux/arch/riscv/include/asm/serial.h
cp asm-serial.h riscv-linux/arch/riscv/include/asm/serial.h
cp: cannot create regular file 'riscv-linux/arch/riscv/include/asm/serial.h': No such file or directory
make: *** [Makefile:276: riscv-linux/arch/riscv/include/asm/serial.h] Error 1
Thanks in Advance
Billa Surendra
Dear all,
I am trying to boot fedora(bootstrap disk) Image on QEMU, but I am unable to understand what exactly stage3 telling. till now I have installed riscv toolchain, risc-v qemu and riscv-pk on fedora 86 host pc and cross compiled Linux by using riscv cross compilers. Can any one please tell me what exactly do on stage3 step. Any help would be appreciated.
Thanks in Advance
Billa
Dear all,
I am trying to clone git clone --recursive https://github.com/rwmjones/fedora-riscv-bootstrap link, but I am getting errors. Can any one please give me solution for cloning without any error.
Error:
billa@surya MDP]$ git clone --recursive https://github.com/rwmjones/fedora-riscv-bootstrap
Cloning into 'fedora-riscv-bootstrap'...
remote: Enumerating objects: 8038, done.
remote: Total 8038 (delta 0), reused 0 (delta 0), pack-reused 8038
Receiving objects: 100% (8038/8038), 2.11 GiB | 4.27 MiB/s, done.
Resolving deltas: 100% (2918/2918), done.
Updating files: 100% (1525/1525), done.
Submodule 'riscv-linux' (https://github.com/riscv/riscv-linux) registered for path 'riscv-linux'
Submodule 'riscv-pk' (https://github.com/riscv/riscv-pk) registered for path 'riscv-pk'
Submodule 'stage2-cross-tools/binutils-gdb' (git://sourceware.org/git/binutils-gdb.git) registered for path 'stage2-cross-tools/binutils-gdb'
Submodule 'gcc' (git://gcc.gnu.org/git/gcc.git) registered for path 'stage2-cross-tools/gcc'
Submodule 'stage2-cross-tools/glibc' (git://sourceware.org/git/glibc.git) registered for path 'stage2-cross-tools/glibc'
Cloning into '/home/billa/MDP/fedora-riscv-bootstrap/riscv-linux'...
remote: Enumerating objects: 87, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (61/61), done.
remote: Total 6654664 (delta 28), reused 26 (delta 26), pack-reused 6654577
Receiving objects: 100% (6654664/6654664), 1.54 GiB | 2.43 MiB/s, done.
Resolving deltas: 100% (5528164/5528164), done.
Cloning into '/home/billa/MDP/fedora-riscv-bootstrap/riscv-pk'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 3808 (delta 0), reused 3 (delta 0), pack-reused 3803
Receiving objects: 100% (3808/3808), 1.25 MiB | 1.32 MiB/s, done.
Resolving deltas: 100% (2732/2732), done.
Cloning into '/home/billa/MDP/fedora-riscv-bootstrap/stage2-cross-tools/binutils-gdb'...
fatal: unable to connect to sourceware.org:
sourceware.org[0: 209.132.180.131]: errno=Connection timed out
fatal: clone of 'git://sourceware.org/git/binutils-gdb.git' into submodule path '/home/billa/MDP/fedora-riscv-bootstrap/stage2-cross-tools/binutils-gdb' failed
Failed to clone 'stage2-cross-tools/binutils-gdb'. Retry scheduled
Cloning into '/home/billa/MDP/fedora-riscv-bootstrap/stage2-cross-tools/gcc'...
fatal: unable to connect to gcc.gnu.org:
gcc.gnu.org[0: 209.132.180.131]: errno=Connection timed out
fatal: clone of 'git://gcc.gnu.org/git/gcc.git' into submodule path '/home/billa/MDP/fedora-riscv-bootstrap/stage2-cross-tools/gcc' failed
Failed to clone 'stage2-cross-tools/gcc'. Retry scheduled
Cloning into '/home/billa/MDP/fedora-riscv-bootstrap/stage2-cross-tools/glibc'...
fatal: unable to connect to sourceware.org:
sourceware.org[0: 209.132.180.131]: errno=Connection timed out
fatal: clone of 'git://sourceware.org/git/glibc.git' into submodule path '/home/billa/MDP/fedora-riscv-bootstrap/stage2-cross-tools/glibc' failed
Failed to clone 'stage2-cross-tools/glibc'. Retry scheduled
Cloning into '/home/billa/MDP/fedora-riscv-bootstrap/stage2-cross-tools/binutils-gdb'...
fatal: unable to connect to sourceware.org:
sourceware.org[0: 209.132.180.131]: errno=Connection timed out
Thanks
Billa
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.