162306a36Sopenharmony_ci============== 262306a36Sopenharmony_ciOpenRISC Linux 362306a36Sopenharmony_ci============== 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciThis is a port of Linux to the OpenRISC class of microprocessors; the initial 662306a36Sopenharmony_citarget architecture, specifically, is the 32-bit OpenRISC 1000 family (or1k). 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciFor information about OpenRISC processors and ongoing development: 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci ======= ============================= 1162306a36Sopenharmony_ci website https://openrisc.io 1262306a36Sopenharmony_ci email openrisc@lists.librecores.org 1362306a36Sopenharmony_ci ======= ============================= 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci--------------------------------------------------------------------- 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciBuild instructions for OpenRISC toolchain and Linux 1862306a36Sopenharmony_ci=================================================== 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciIn order to build and run Linux for OpenRISC, you'll need at least a basic 2162306a36Sopenharmony_citoolchain and, perhaps, the architectural simulator. Steps to get these bits 2262306a36Sopenharmony_ciin place are outlined here. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci1) Toolchain 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciToolchain binaries can be obtained from openrisc.io or our github releases page. 2762306a36Sopenharmony_ciInstructions for building the different toolchains can be found on openrisc.io 2862306a36Sopenharmony_cior Stafford's toolchain build and release scripts. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci ========== ================================================= 3162306a36Sopenharmony_ci binaries https://github.com/openrisc/or1k-gcc/releases 3262306a36Sopenharmony_ci toolchains https://openrisc.io/software 3362306a36Sopenharmony_ci building https://github.com/stffrdhrn/or1k-toolchain-build 3462306a36Sopenharmony_ci ========== ================================================= 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci2) Building 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciBuild the Linux kernel as usual:: 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci make ARCH=openrisc CROSS_COMPILE="or1k-linux-" defconfig 4162306a36Sopenharmony_ci make ARCH=openrisc CROSS_COMPILE="or1k-linux-" 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci3) Running on FPGA (optional) 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ciThe OpenRISC community typically uses FuseSoC to manage building and programming 4662306a36Sopenharmony_cian SoC into an FPGA. The below is an example of programming a De0 Nano 4762306a36Sopenharmony_cidevelopment board with the OpenRISC SoC. During the build FPGA RTL is code 4862306a36Sopenharmony_cidownloaded from the FuseSoC IP cores repository and built using the FPGA vendor 4962306a36Sopenharmony_citools. Binaries are loaded onto the board with openocd. 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci:: 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci git clone https://github.com/olofk/fusesoc 5462306a36Sopenharmony_ci cd fusesoc 5562306a36Sopenharmony_ci sudo pip install -e . 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci fusesoc init 5862306a36Sopenharmony_ci fusesoc build de0_nano 5962306a36Sopenharmony_ci fusesoc pgm de0_nano 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_ci openocd -f interface/altera-usb-blaster.cfg \ 6262306a36Sopenharmony_ci -f board/or1k_generic.cfg 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci telnet localhost 4444 6562306a36Sopenharmony_ci > init 6662306a36Sopenharmony_ci > halt; load_image vmlinux ; reset 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci4) Running on a Simulator (optional) 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ciQEMU is a processor emulator which we recommend for simulating the OpenRISC 7162306a36Sopenharmony_ciplatform. Please follow the OpenRISC instructions on the QEMU website to get 7262306a36Sopenharmony_ciLinux running on QEMU. You can build QEMU yourself, but your Linux distribution 7362306a36Sopenharmony_cilikely provides binary packages to support OpenRISC. 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci ============= ====================================================== 7662306a36Sopenharmony_ci qemu openrisc https://wiki.qemu.org/Documentation/Platforms/OpenRISC 7762306a36Sopenharmony_ci ============= ====================================================== 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci--------------------------------------------------------------------- 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ciTerminology 8262306a36Sopenharmony_ci=========== 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ciIn the code, the following particles are used on symbols to limit the scope 8562306a36Sopenharmony_cito more or less specific processor implementations: 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ci========= ======================================= 8862306a36Sopenharmony_ciopenrisc: the OpenRISC class of processors 8962306a36Sopenharmony_cior1k: the OpenRISC 1000 family of processors 9062306a36Sopenharmony_cior1200: the OpenRISC 1200 processor 9162306a36Sopenharmony_ci========= ======================================= 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci--------------------------------------------------------------------- 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ciHistory 9662306a36Sopenharmony_ci======== 9762306a36Sopenharmony_ci 9862306a36Sopenharmony_ci18-11-2003 Matjaz Breskvar (phoenix@bsemi.com) 9962306a36Sopenharmony_ci initial port of linux to OpenRISC/or32 architecture. 10062306a36Sopenharmony_ci all the core stuff is implemented and seams usable. 10162306a36Sopenharmony_ci 10262306a36Sopenharmony_ci08-12-2003 Matjaz Breskvar (phoenix@bsemi.com) 10362306a36Sopenharmony_ci complete change of TLB miss handling. 10462306a36Sopenharmony_ci rewrite of exceptions handling. 10562306a36Sopenharmony_ci fully functional sash-3.6 in default initrd. 10662306a36Sopenharmony_ci a much improved version with changes all around. 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci10-04-2004 Matjaz Breskvar (phoenix@bsemi.com) 10962306a36Sopenharmony_ci a lot of bugfixes all over. 11062306a36Sopenharmony_ci ethernet support, functional http and telnet servers. 11162306a36Sopenharmony_ci running many standard linux apps. 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci26-06-2004 Matjaz Breskvar (phoenix@bsemi.com) 11462306a36Sopenharmony_ci port to 2.6.x 11562306a36Sopenharmony_ci 11662306a36Sopenharmony_ci30-11-2004 Matjaz Breskvar (phoenix@bsemi.com) 11762306a36Sopenharmony_ci lots of bugfixes and enhancements. 11862306a36Sopenharmony_ci added opencores framebuffer driver. 11962306a36Sopenharmony_ci 12062306a36Sopenharmony_ci09-10-2010 Jonas Bonn (jonas@southpole.se) 12162306a36Sopenharmony_ci major rewrite to bring up to par with upstream Linux 2.6.36 122