From Fedora Project Wiki
(Remove old stuff and add pointer to repo.)
Line 3: Line 3:
= Introduction =
= Introduction =


Bootstrapping happens in several stages which are outlined in the README and Makefile in [https://github.com/rwmjones/fedora-riscv-bootstrap this repository].
Bootstrapping happens in several stages which are outlined in detail in the <code>README</code> and <code>Makefile</code> in [https://github.com/rwmjones/fedora-riscv-bootstrap this repository].
 
The general idea is that we go in stages (numbered for historical reasons):
 
== Stage 3 ==
 
Build an <code>x86_64</code> disk image, but remove all the binaries and libraries from it.  The binaries and libraries are cross-compiled from the host using the [https://github.com/riscv/riscv-tools riscv64-unknown-linux-gnu-gcc compiler].
 
After building the stage 3 disk image in this way, it is bootable under [http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv/ qemu-system-riscv64] and has working gcc and rpmbuild:
 
<pre>
Tue Dec 19 22:47:00 UTC 2017
 
Welcome to the Fedora/RISC-V stage3 disk image
https://fedoraproject.org/wiki/Architectures/RISC-V
 
stage3:/# ls
bin  dev  home  lib    lost+found  mnt  proc  rpmbuild  sbin  sys  usr
boot  etc  init  lib64  media      opt  root  run      srv  tmp  var
stage3:/# uname -a
Linux stage3 4.15.0-rc3-01064-g418457520fbb #2 Tue Dec 19 22:31:06 GMT 2017 riscv64 GNU/Linux
stage3:/# gcc --version
gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
stage3:/# rpmbuild --version
RPM version 4.12.90
</pre>
 
== Stage 4 ==
 
Using the stage 3 disk image, running under qemu, [https://github.com/rwmjones/fedora-riscv-bootstrap/tree/master/stage3-built-rpms we build RPMs for many core packages].
 
Eventually we have built enough RPMs that we can build a clean stage 4 disk image entirely from RPMs.
 
== After stage 4 ==
 
Using the clean stage 4 disk image we now go on to build the remaining packages from Fedora.  This is a very long, incremental processes aided by an autobuilder which picks up new packages from real Fedora and tries to build them for RISC-V.  In addition we build and fix packages by hand.

Revision as of 16:12, 20 December 2017

All about bootstrapping Fedora on RISC-V.

Introduction

Bootstrapping happens in several stages which are outlined in detail in the README and Makefile in this repository.

The general idea is that we go in stages (numbered for historical reasons):

Stage 3

Build an x86_64 disk image, but remove all the binaries and libraries from it. The binaries and libraries are cross-compiled from the host using the riscv64-unknown-linux-gnu-gcc compiler.

After building the stage 3 disk image in this way, it is bootable under qemu-system-riscv64 and has working gcc and rpmbuild:

Tue Dec 19 22:47:00 UTC 2017

Welcome to the Fedora/RISC-V stage3 disk image
https://fedoraproject.org/wiki/Architectures/RISC-V

stage3:/# ls
bin   dev  home  lib    lost+found  mnt  proc  rpmbuild  sbin  sys  usr
boot  etc  init  lib64  media       opt  root  run       srv   tmp  var
stage3:/# uname -a
Linux stage3 4.15.0-rc3-01064-g418457520fbb #2 Tue Dec 19 22:31:06 GMT 2017 riscv64 GNU/Linux
stage3:/# gcc --version
gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
stage3:/# rpmbuild --version
RPM version 4.12.90

Stage 4

Using the stage 3 disk image, running under qemu, we build RPMs for many core packages.

Eventually we have built enough RPMs that we can build a clean stage 4 disk image entirely from RPMs.

After stage 4

Using the clean stage 4 disk image we now go on to build the remaining packages from Fedora. This is a very long, incremental processes aided by an autobuilder which picks up new packages from real Fedora and tries to build them for RISC-V. In addition we build and fix packages by hand.