From Fedora Project Wiki
Line 6: Line 6:


= 使用 ARMv8 的 ARM 基础模型 =
= 使用 ARMv8 的 ARM 基础模型 =
Let us suppose that using an NFS root file system for ARMv8 work is not really an option for some reason.  Let us also suppose that you can't get access to the ARM FAST model -- which is almost bound to be the case for most people.  What we describe here is probably the most straightforward way to work with ARMv8 without a lot of sysadmin overhead once the initial setup has been completed.
让我们假设,出于某种原因,ARMv8 工作时无法使用 NFS 作为根文件系统。同时假设,你不能访问 ARM FAST 模型 -- 对于大多数人来说,这几乎是必然的情况。一旦初始设置已经完成,我们在这里描述的是可能是在尽量不骚扰系统管理员的情况下,使 ARMv8 工作的最直接方式,
   
   
The recipe has these ingredients:
这个“配方”需要以下“成分”:
* A copy of the ARM Foundation Model (FM)
* ARM 基础模型 (FM) 的一个拷贝
* A copy of the items needed for booting -- a file called "linux-system.axf", used by the FM -- but containing the kernel, u-boot and other key bits.
* 启动所需“物品” 的一个拷贝 -- 名为 "linux-system.axf" 的文件, FM 使用 -- 但包含内核、u-boot 和其他关键二进制文件.
* A copy of a Fedora 17 root file system (rootfs) as a disk image
* Fedora 17 根文件系统 (rootfs)的一个拷贝,作为一个磁盘镜像。
   
   
Instructions will also be provided for creating the rootfs disk image from scratch, should you need to.
为了创建 rootfs 磁盘镜像的介绍也将被提供,你应该需要这么做。


== 初步安装 ==
== 初步安装 ==
Create a handy place to keep everything.  Some of the files are quite large, so assume you will need at least 20GB of free disk space.  I'd recommend more, just to be safe.  For simplicity's sake, stash everything in a single directory. For example:
创建一个合适的空间存放所有资料。有些文件非常大,所以这里假设你将需要至少 20GB 空闲磁盘空间。保险起见,我建议留更多空间。 为了简单起见,在一个目录中存放一切。例如:
<pre>
<pre>
$ mkdir ~/armv8
$ mkdir ~/armv8
Line 23: Line 23:


== 获取 ARM 基础模型 ==
== 获取 ARM 基础模型 ==
The FM is licensed code and it is <b>NOT</b> redistributableEach user must retrieve their own copy.  And, to do that, each user must register with ARM.  On the other hand, the process is straightforward.  Go to http://www.arm.com/fvp and follow the instructions.  In my case, I was then able to download a file called FM000-KT-00035-r0p8-44rel23.tgz and unpack it:
FM 是许可证保护的代码,且它 <b>不是</b> 可重新发布的每个用户必须获取他们自己的拷贝。 而为此,每个用户必须在 ARM 的官网注册。 另一方面,这个过程是简单的。 访问 http://www.arm.com/fvp 并跟随指引。 我的情况是。我可以下载到一个名为 FM000-KT-00035-r0p8-44rel23.tgz 的文件并解压:
<pre>
<pre>
$ cd ~/armv8
$ cd ~/armv8
$ tar xvzf FM000-KT-00035-r0p8-44rel23.tgz
$ tar xvzf FM000-KT-00035-r0p8-44rel23.tgz
</pre>  
</pre>  
This created a directory called Foundation_v8pkg with the FM in it. To make things easy to run, I also created a quick alias that we'll use later:
这会创建一个名为 Foundation_v8pkg 的目录,其中包含了 FM 为了使它容易被使用,我也创建了一个快捷别名,稍后我们将使用:
<pre>
<pre>
$ alias fv8="~/armv8/Foundation_v8pkg/Foundation_v8"
$ alias fv8="~/armv8/Foundation_v8pkg/Foundation_v8"
</pre>
</pre>


== 获取 the Boot Path ==
== 获取引导路径文件 ==
For now, one can retrieve a copy of the bits being provided by Linaro (http://www.linaro.org) that provide for a basic kernel and boot path in the format required by the FM (a .axf file).  At some point in the future, a Fedora kernel will be made available.  So, retrieve the file:
目前为止, 人们可以获取由 Linaro(http://www.linaro.org)提供的一个二进制副本,其中包含一个基本的内核和 FM 所要求格式的引导路径(一个 .axf 文件)。将来,Fedora 内核也将对其可用。因此,获取该文件:
<pre>
<pre>
$ cd ~/armv8
$ cd ~/armv8
$ wget http://releases.linaro.org/12.10/openembedded/aarch64/rc3/img-foundation.axf
$ wget http://releases.linaro.org/12.10/openembedded/aarch64/rc3/img-foundation.axf
</pre>  
</pre>  
That's all that's needed.
这些就是我们所需要的全部“成分”.


== 获取 Rootfs 镜像文件 ==
== 获取 Rootfs 镜像文件 ==
If you just want to use what has been pre-built, you can retrieve a copy of the rootfs as a disk image and then decompress it:
如果你只想使用预编译的文件,你可以获取一个该 rootfs 的拷贝作为磁盘镜像,并解压它:
<pre>
<pre>
$ cd ~/armv8
$ cd ~/armv8
Line 48: Line 48:
$ bunzip2 f17-stage2-rootfs.img.bz2
$ bunzip2 f17-stage2-rootfs.img.bz2
</pre>
</pre>
This is a large file (~10GB) and it will grow larger.  It does however contain a copy of all of the stage2 bootstrap binaries and sources to date.  Further, at any time, one can cd to /, and then do 'git pull --all' to get the most recent bits and update the rootfs.
这是一个巨大的文件(~10GB)且它还会继续增大。不管怎样,它包含了一个所有第 2 阶段 bootstrap 的二进制拷贝及相关源码。 而且, 在如何时候,人们可以 cd /,然后执行 'git pull --all' 来获取最新的二进制数据并更新 rootfs。


== 运行基础模型 ==
== 运行基础模型 ==
Now that all the parts are in hand, running the FM is pretty straightforward.  In most cases, though, the following will be sufficient:
现在所有部分都就绪了,运行 FM 是非常简单的。 在大多数情况下,以下命令足矣:
<pre>
<pre>
$ cd ~/armv8
$ cd ~/armv8
$ fv8 --image img-foundation.axf --block-device f17-stage2-rootfs.img --network=nat
$ fv8 --image img-foundation.axf --block-device f17-stage2-rootfs.img --network=nat
</pre>
</pre>
After a few moments, an xterm for the console will pop up and you'll have a running ARMv8 system.
一会儿功夫, 一个 xterm for the console 将会弹出,且你将有一个运行中的 ARMv8 系统。


== 配置网络 ==
== 配置网络 ==
There are several ways to configure the networking for the Foundation Model: see [[Architectures/ARM/AArch64/FoundationModel Networking|FoundationModel Networking]].
有几种方法为基础模型配置网络:参见 [[Architectures/ARM/AArch64/FoundationModel Networking|基础模型网络配置]].


== 创建你自己的 RootFS ==
== 创建你自己的 RootFS ==
It is possible to build a custom RootFS for the Foundation Model -- see [[Architectures/ARM/AArch64/FoundationModel-Building a RootFS|Building a RootFS]].
你可能需要为基础模型创建一个自制的 RootFS -- 参见 [[Architectures/ARM/AArch64/FoundationModel-Building a RootFS|创建一个 RootFS]].

Revision as of 15:58, 22 May 2013

准备使用 ARM 基础模型

在安装基础模型到你的系统前, 请检查 系统需求 ,包括其他必须安装的 Fedora 软件包。

使用 ARMv8 的 ARM 基础模型

让我们假设,出于某种原因,ARMv8 工作时无法使用 NFS 作为根文件系统。同时假设,你不能访问 ARM FAST 模型 -- 对于大多数人来说,这几乎是必然的情况。一旦初始设置已经完成,我们在这里描述的是可能是在尽量不骚扰系统管理员的情况下,使 ARMv8 工作的最直接方式,

这个“配方”需要以下“成分”:

  • ARM 基础模型 (FM) 的一个拷贝
  • 启动所需“物品” 的一个拷贝 -- 名为 "linux-system.axf" 的文件, 由 FM 使用 -- 但包含内核、u-boot 和其他关键二进制文件.
  • Fedora 17 根文件系统 (rootfs)的一个拷贝,作为一个磁盘镜像。

为了创建 rootfs 磁盘镜像的介绍也将被提供,你应该需要这么做。

初步安装

创建一个合适的空间存放所有资料。有些文件非常大,所以这里假设你将需要至少 20GB 空闲磁盘空间。保险起见,我建议留更多空间。 为了简单起见,在一个目录中存放一切。例如:

$ mkdir ~/armv8
$ cd ~/armv8

获取 ARM 基础模型

FM 是许可证保护的代码,且它 不是 可重新发布的. 每个用户必须获取他们自己的拷贝。 而为此,每个用户必须在 ARM 的官网注册。 另一方面,这个过程是简单的。 访问 http://www.arm.com/fvp 并跟随指引。 我的情况是。我可以下载到一个名为 FM000-KT-00035-r0p8-44rel23.tgz 的文件并解压:

$ cd ~/armv8
$ tar xvzf FM000-KT-00035-r0p8-44rel23.tgz

这会创建一个名为 Foundation_v8pkg 的目录,其中包含了 FM 。 为了使它容易被使用,我也创建了一个快捷别名,稍后我们将使用:

$ alias fv8="~/armv8/Foundation_v8pkg/Foundation_v8"

获取引导路径文件

目前为止, 人们可以获取由 Linaro(http://www.linaro.org)提供的一个二进制副本,其中包含一个基本的内核和 FM 所要求格式的引导路径(一个 .axf 文件)。将来,Fedora 内核也将对其可用。因此,获取该文件:

$ cd ~/armv8
$ wget http://releases.linaro.org/12.10/openembedded/aarch64/rc3/img-foundation.axf

这些就是我们所需要的全部“成分”.

获取 Rootfs 镜像文件

如果你只想使用预编译的文件,你可以获取一个该 rootfs 的拷贝作为磁盘镜像,并解压它:

$ cd ~/armv8
$ wget http://fedorapeople.org/groups/armv8/f17-stage2-rootfs.img.bz2
$ bunzip2 f17-stage2-rootfs.img.bz2

这是一个巨大的文件(~10GB)且它还会继续增大。不管怎样,它包含了一个所有第 2 阶段 bootstrap 的二进制拷贝及相关源码。 而且, 在如何时候,人们可以 cd 到 /,然后执行 'git pull --all' 来获取最新的二进制数据并更新 rootfs。

运行基础模型

现在所有部分都就绪了,运行 FM 是非常简单的。 在大多数情况下,以下命令足矣:

$ cd ~/armv8
$ fv8 --image img-foundation.axf --block-device f17-stage2-rootfs.img --network=nat

一会儿功夫, 一个 xterm for the console 将会弹出,且你将有一个运行中的 ARMv8 系统。

配置网络

有几种方法为基础模型配置网络:参见 基础模型网络配置.

创建你自己的 RootFS

你可能需要为基础模型创建一个自制的 RootFS -- 参见 创建一个 RootFS.