blob: 777a893d533d14cb161987085ab471645f2b4c24 [file] [log] [blame]
Jonas Bonn61625762011-06-04 22:45:16 +03001OpenRISC Linux
2==============
3
4This is a port of Linux to the OpenRISC class of microprocessors; the initial
5target architecture, specifically, is the 32-bit OpenRISC 1000 family (or1k).
6
7For information about OpenRISC processors and ongoing development:
8
Stafford Horned01e1f32016-03-21 17:11:10 +09009 website http://openrisc.io
Stafford Hornee4082de2017-10-21 22:39:09 +090010 email openrisc@lists.librecores.org
Jonas Bonn61625762011-06-04 22:45:16 +030011
12---------------------------------------------------------------------
13
14Build instructions for OpenRISC toolchain and Linux
15===================================================
16
17In order to build and run Linux for OpenRISC, you'll need at least a basic
18toolchain and, perhaps, the architectural simulator. Steps to get these bits
19in place are outlined here.
20
Stafford Hornee4082de2017-10-21 22:39:09 +0900211) Toolchain
Jonas Bonn61625762011-06-04 22:45:16 +030022
Stafford Hornee4082de2017-10-21 22:39:09 +090023Toolchain binaries can be obtained from openrisc.io or our github releases page.
24Instructions for building the different toolchains can be found on openrisc.io
25or Stafford's toolchain build and release scripts.
Jonas Bonn61625762011-06-04 22:45:16 +030026
Stafford Hornee4082de2017-10-21 22:39:09 +090027 binaries https://github.com/openrisc/or1k-gcc/releases
28 toolchains https://openrisc.io/software
29 building https://github.com/stffrdhrn/or1k-toolchain-build
Jonas Bonn61625762011-06-04 22:45:16 +030030
Stafford Hornee4082de2017-10-21 22:39:09 +0900312) Building
Jonas Bonn61625762011-06-04 22:45:16 +030032
Stafford Hornee4082de2017-10-21 22:39:09 +090033Build the Linux kernel as usual
Jonas Bonn61625762011-06-04 22:45:16 +030034
35 make ARCH=openrisc defconfig
36 make ARCH=openrisc
37
Stafford Hornee4082de2017-10-21 22:39:09 +0900383) Running on FPGA (optional)
Jonas Bonn61625762011-06-04 22:45:16 +030039
Stafford Hornee4082de2017-10-21 22:39:09 +090040The OpenRISC community typically uses FuseSoC to manage building and programming
41an SoC into an FPGA. The below is an example of programming a De0 Nano
42development board with the OpenRISC SoC. During the build FPGA RTL is code
43downloaded from the FuseSoC IP cores repository and built using the FPGA vendor
44tools. Binaries are loaded onto the board with openocd.
Jonas Bonn61625762011-06-04 22:45:16 +030045
Stafford Hornee4082de2017-10-21 22:39:09 +090046 git clone https://github.com/olofk/fusesoc
47 cd fusesoc
48 sudo pip install -e .
49
50 fusesoc init
51 fusesoc build de0_nano
52 fusesoc pgm de0_nano
53
54 openocd -f interface/altera-usb-blaster.cfg \
55 -f board/or1k_generic.cfg
56
57 telnet localhost 4444
58 > init
59 > halt; load_image vmlinux ; reset
60
614) Running on a Simulator (optional)
62
63QEMU is a processor emulator which we recommend for simulating the OpenRISC
64platform. Please follow the OpenRISC instructions on the QEMU website to get
65Linux running on QEMU. You can build QEMU yourself, but your Linux distribution
66likely provides binary packages to support OpenRISC.
67
68 qemu openrisc https://wiki.qemu.org/Documentation/Platforms/OpenRISC
Jonas Bonn61625762011-06-04 22:45:16 +030069
70---------------------------------------------------------------------
71
72Terminology
73===========
74
75In the code, the following particles are used on symbols to limit the scope
76to more or less specific processor implementations:
77
78openrisc: the OpenRISC class of processors
79or1k: the OpenRISC 1000 family of processors
80or1200: the OpenRISC 1200 processor
81
82---------------------------------------------------------------------
83
84History
85========
86
8718. 11. 2003 Matjaz Breskvar (phoenix@bsemi.com)
88 initial port of linux to OpenRISC/or32 architecture.
89 all the core stuff is implemented and seams usable.
90
9108. 12. 2003 Matjaz Breskvar (phoenix@bsemi.com)
92 complete change of TLB miss handling.
93 rewrite of exceptions handling.
94 fully functional sash-3.6 in default initrd.
95 a much improved version with changes all around.
96
9710. 04. 2004 Matjaz Breskvar (phoenix@bsemi.com)
98 alot of bugfixes all over.
99 ethernet support, functional http and telnet servers.
100 running many standard linux apps.
101
10226. 06. 2004 Matjaz Breskvar (phoenix@bsemi.com)
103 port to 2.6.x
104
10530. 11. 2004 Matjaz Breskvar (phoenix@bsemi.com)
106 lots of bugfixes and enhancments.
107 added opencores framebuffer driver.
108
10909. 10. 2010 Jonas Bonn (jonas@southpole.se)
110 major rewrite to bring up to par with upstream Linux 2.6.36