| 1 |
.. include:: ../../disclaimer-zh_CN.rst |
| 2 |
|
| 3 |
:Original: Documentation/arch/openrisc/openrisc_port.rst |
| 4 |
|
| 5 |
:翻译: |
| 6 |
|
| 7 |
司延腾 Yanteng Si <[email protected]> |
| 8 |
|
| 9 |
.. _cn_openrisc_port: |
| 10 |
|
| 11 |
============== |
| 12 |
OpenRISC Linux |
| 13 |
============== |
| 14 |
|
| 15 |
这是Linux对OpenRISC类微处理器的移植;具体来说,最早移植目标是32位 |
| 16 |
OpenRISC 1000系列(或1k)。 |
| 17 |
|
| 18 |
关于OpenRISC处理器和正在进行中的开发的信息: |
| 19 |
|
| 20 |
======= ============================== |
| 21 |
网站 https://openrisc.io |
| 22 |
邮箱 [email protected] |
| 23 |
======= ============================== |
| 24 |
|
| 25 |
--------------------------------------------------------------------- |
| 26 |
|
| 27 |
OpenRISC工具链和Linux的构建指南 |
| 28 |
=============================== |
| 29 |
|
| 30 |
为了构建和运行Linux for OpenRISC,你至少需要一个基本的工具链,或许 |
| 31 |
还需要架构模拟器。 这里概述了准备就位这些部分的步骤。 |
| 32 |
|
| 33 |
1) 工具链 |
| 34 |
|
| 35 |
工具链二进制文件可以从openrisc.io或我们的github发布页面获得。不同 |
| 36 |
工具链的构建指南可以在openrisc.io或Stafford的工具链构建和发布脚本 |
| 37 |
中找到。 |
| 38 |
|
| 39 |
====== ========================================================== |
| 40 |
二进制 https://github.com/stffrdhrn/or1k-toolchain-build/releases |
| 41 |
工具链 https://openrisc.io/software |
| 42 |
构建 https://github.com/stffrdhrn/or1k-toolchain-build |
| 43 |
====== ========================================================== |
| 44 |
|
| 45 |
2) 构建 |
| 46 |
|
| 47 |
像往常一样构建Linux内核:: |
| 48 |
|
| 49 |
make ARCH=openrisc CROSS_COMPILE="or1k-linux-" defconfig |
| 50 |
make ARCH=openrisc CROSS_COMPILE="or1k-linux-" |
| 51 |
|
| 52 |
3) 在FPGA上运行(可选) |
| 53 |
|
| 54 |
OpenRISC社区通常使用FuseSoC来管理构建和编程SoC到FPGA中。 下面是用 |
| 55 |
OpenRISC SoC对De0 Nano开发板进行编程的一个例子。 在构建过程中, |
| 56 |
FPGA RTL是从FuseSoC IP核库中下载的代码,并使用FPGA供应商工具构建。 |
| 57 |
二进制文件用openocd加载到电路板上。 |
| 58 |
|
| 59 |
:: |
| 60 |
|
| 61 |
git clone https://github.com/olofk/fusesoc |
| 62 |
cd fusesoc |
| 63 |
sudo pip install -e . |
| 64 |
|
| 65 |
fusesoc init |
| 66 |
fusesoc build de0_nano |
| 67 |
fusesoc pgm de0_nano |
| 68 |
|
| 69 |
openocd -f interface/altera-usb-blaster.cfg \ |
| 70 |
-f board/or1k_generic.cfg |
| 71 |
|
| 72 |
telnet localhost 4444 |
| 73 |
> init |
| 74 |
> halt; load_image vmlinux ; reset |
| 75 |
|
| 76 |
4) 在模拟器上运行(可选) |
| 77 |
|
| 78 |
QEMU是一个处理器仿真器,我们推荐它来模拟OpenRISC平台。 请按照QEMU网 |
| 79 |
站上的OpenRISC说明,让Linux在QEMU上运行。 你可以自己构建QEMU,但你的 |
| 80 |
Linux发行版可能提供了支持OpenRISC的二进制包。 |
| 81 |
|
| 82 |
============= ====================================================== |
| 83 |
qemu openrisc https://wiki.qemu.org/Documentation/Platforms/OpenRISC |
| 84 |
============= ====================================================== |
| 85 |
|
| 86 |
--------------------------------------------------------------------- |
| 87 |
|
| 88 |
术语表 |
| 89 |
====== |
| 90 |
|
| 91 |
代码中使用了以下符号约定以将范围限制在几个特定处理器实现上: |
| 92 |
|
| 93 |
========= ======================= |
| 94 |
openrisc: OpenRISC类型处理器 |
| 95 |
or1k: OpenRISC 1000系列处理器 |
| 96 |
or1200: OpenRISC 1200处理器 |
| 97 |
========= ======================= |
| 98 |
|
| 99 |
--------------------------------------------------------------------- |
| 100 |
|
| 101 |
历史 |
| 102 |
==== |
| 103 |
|
| 104 |
2003-11-18 Matjaz Breskvar ([email protected]) |
| 105 |
将linux初步移植到OpenRISC或32架构。 |
| 106 |
所有的核心功能都实现了,并且可以使用。 |
| 107 |
|
| 108 |
2003-12-08 Matjaz Breskvar ([email protected]) |
| 109 |
彻底改变TLB失误处理。 |
| 110 |
重写异常处理。 |
| 111 |
在默认的initrd中实现了sash-3.6的所有功能。 |
| 112 |
大幅改进的版本。 |
| 113 |
|
| 114 |
2004-04-10 Matjaz Breskvar ([email protected]) |
| 115 |
大量的bug修复。 |
| 116 |
支持以太网,http和telnet服务器功能。 |
| 117 |
可以运行许多标准的linux应用程序。 |
| 118 |
|
| 119 |
2004-06-26 Matjaz Breskvar ([email protected]) |
| 120 |
移植到2.6.x。 |
| 121 |
|
| 122 |
2004-11-30 Matjaz Breskvar ([email protected]) |
| 123 |
大量的bug修复和增强功能。 |
| 124 |
增加了opencores framebuffer驱动。 |
| 125 |
|
| 126 |
2010-10-09 Jonas Bonn ([email protected]) |
| 127 |
重大重写,使其与上游的Linux 2.6.36看齐。 |