-
Notifications
You must be signed in to change notification settings - Fork 9
/
README
181 lines (108 loc) · 4.87 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
A plan for Fedora/RISC-V
----------------------------------------------------------------------
by Richard W.M. Jones (rjones@redhat.com)
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)