This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Alpha架构常见问题(FAQ)

From Gentoo Wiki (test)
< Alpha
Jump to:navigation Jump to:search
This page is a translated version of the page Alpha/FAQ and the translation is 100% complete.
Other languages:

This FAQ is intended to answer some of the most frequently asked questions relating to Alpha on Gentoo and Alpha on Linux in general.

简介

本文涵盖了关于 Gentoo/Alpha 和 Alpha/Linux 相关的最经常遇到的相关问题。本文的目标受众包括新手和具有经验的用户。

About the Alpha Project

What is Alpha?

The Alpha project is responsible for keeping the Gentoo distribution updated and current for the Alpha platform. This primarily includes keywording packages, porting software, and making new releases. The Alpha project aims to provide a usable environment for both desktops and servers.

Alpha 体系架构

Alpha 架构已死?

Kind of, yes. HP stopped taking orders for new Alpha systems on April 27, 2007. and for Alpha options and upgrades on April 25, 2008.

我能在Alpha平台上运行 32位应用程序吗?

不行。所有的 Alpha 系统使用纯64位内核以及纯64位的用户区。即使你使用-m32 编译器标识强制 gcc 输出32位代码,也做不到这一点。

Alpha 系统使用高位优先编码还是低位优先编码体系?

Alpha系统使用低位优先编码体系。在一些巨型机克雷系统上的Alpha系统使用高位优先编码,但是 Linux 从未支持过它。

能在 Alpha 系统上运行Linux/x86 应用程序吗?

不行。除非你使用某种 x86 模拟器,比如 qemu。过去某个时期 DEC/Compaq/HP 曾经提供过一个称作 em86 的程序,允许 Linux/x86 应用程序运行在 Linux/Alpha 系统上。 但是,该程序是封闭源代码的,并且不再提供更新。因此现在已经没有可用的em86 二进制文件与 gcc-3 的二进制接口兼容。

那我们在 Alpha 上安装 Gentoo 有何意义?

不可否认,您可以找到更快的64位系统,比如说 amd64。但是这并不意味着 Alpha 系统就毫无用处了。下面列出了你可能希望在某些 Alpha 硬件上安装 Linux 系统的一些理由:

  • 你可能想发掘某些旧计算机的用处。旧的 Alpha 系统可以充当很棒的路由器和服务器。他们的桌面系统的性能也不见得非常差。
  • 你可能想学习那些不常见的计算机硬件。
  • 这件事情非常酷。有多少人敢说他们曾经在 Alpha 机器上运行过 Linux?

哪儿能买到 Alpha 硬件?

一般情况下在市面上已经找不到 Alpha 架构的硬件。如果运费不太高的话,eBay 是个不错的选择。通过 Google 也可以找到不少二手设备经销商,当然一般情况下大多数都相对比较昂贵。

硬件

打开 AlphaServer 机箱之后,它不能启动,该怎么办?

请确保机箱的顶部面板打开并在正确的位置上。机箱顶部面板的中间有个朝下的小金属片。当顶部面板放在了合适位置时,该金属片会把一个开关压住。如果这个开关没有压住,系统就不会启动。

Alpha 系统特定的编译器标记

推荐使用 Alpha 系统特定的编译器标记吗?

就像使用其他编译器优化一样,应该遵循适度把握的原则。小心而正确的使用这些编译器标记,可以实现稳定的系统、提高系统速度;但是鲁莽而不加辨别地使用这些编译器标记,则很有可能造成系统崩溃。如果对某个标记心存疑虑,就不要使用。如果想获得这些标记更多的说明,请参考 gcc 的man page。

如何为特定指令集的优化制订规划模型?

可以通过 -mcpu=XXX来制订特定指令集的优化模型,这里 XXX 是指 cpu 型号。合法的 cpu 型号包括 ev4, ev45, ev5, ev56, pca56, ev6ev67。如果不指定 -mcpu=XXX 标记,那么 gcc 将会使用编译它本身时所在机器的 cpu 型号。 -mcpu= 等同于 x86 平台上的 -march= 标记。

Note
AlphaServer 800 用户应该将 cpu 型号设置为 ev5。 一个已知存在的与 Xorg 相关的特定问题是,如果设置成 ev56 ,将会导致整个系统锁死。

在不改变指令集的情况下,如何制订优化模型列表?

可以通过使用 -mtune=XXX 来达成不改变指令集制定优化模型列表的目的,这里 XXX 是你的 cpu 型号。合法的 cpu 型号包括 ev4, ev45, ev5, ev56, pca56, ev6ev67-mcpu= 标记中隐含了 -mtune= 标记,因此如果你设置了 -mcpu= 标记,那么就无需再次设置这个标记。 -mtune= 等同于 x86 平台的 -mcpu= 标记。

如何启用软件协助浮点数据处理功能?

可以通过 -mieee 来启用软件协助浮点数据处理功能。这将启用软件来正确地处理非规范的数字和诸如 not-a-number 和正/负无穷大等 IEEE 规定的异常值。

除非你能够确定自己正在做什么,以上标记都应该在你的全局 CFLAGS 中设置。

如何指定系统的内存延迟?

可以通过指定 -mmemory-latency=XXX 来实现内存延迟,这里 XXX 是(延迟的)时钟周期数。这个标记设置了系统调度程序在引用内存时假定的延迟时间。gcc有个预定义的"typical" 值也可用作设置 -mmemory-latency=XXX,这些值包括: 用于 Dcache 的L1,用于 Scache 的L2,用于Bcache 的 L3,以及用于主内存的 main

这些标记可能不能在全局的 CFLAGS 中设置,因为该值的设置高度依赖于你所编译的程序的内存访问模式。

那些需要放置在小型数据区域(small data area)的静态数据,具体应该如何设置?

可以通过 -msmall-data 标记来设置那些需要放置在小型数据区域(small data area)的静态数据。 这样可以让 gcc 利用 Alpha 架构将频繁使用的数据存储在名为小型数据段中的特性。该段大小限制为 64KiB ,意味着访问存储其中的数据仅需一条指令。

-fPIC 标记能够覆盖 -msmall-data 标记,因此如果你想利用 -msmall-data 所提供特性的话,请使用-fpic 标记替代-fPIC 标记。

-msmall-data 可能不能用在全局的 CFLAGS 中,因为可能有某些对象要求大于 65KiB 的内存,这样将会导致 gp_overflow 错误。

那些需要放在小型代码区域(small text area)的对象代码,具体应该如何设置?

可以通过 -msmall-text 标记进行设置。这将使得 gcc 假定整个程序 (或库)控制在 4MB 之内,并且可以通过一个分支指令就可到达。这样可以将某个功能调用所需的指令数目从 4 降到 1。

这个标记可能不能用在全局的 CFLAGS 段中,因为某些程序(或库)可能大于 4MB,否则将会导致一个 ld 错误。

如果这些编译标记导致某个编译错误、连接错误或者运行时错误,该怎么处理?

As CFLAGS, please use these CFLAGS cautiously. They may break your system. If you experience problems, try using less aggressive CFLAGS before bugs.

Alpha 系统启动和系统引导程序

SRM 是什么?

SRM is based on the Alpha Console Subsystem specification, which provides an operating environment for OpenVMS, Tru64 UNIX, and Linux operating systems. See the SRM Howto for more information about SRM.

ARC 是什么?

ARC 基于高级精简指令集计算机计算规格 (ARC) ,为 Windows NT 提供了操作环境。

如何获知我的 Alpha 使用的固件是 ARC 还是 SRM ?

如果系统基于 SRM,那么开机时会看见屏幕上为蓝底白字。如果系统基于 ARC,那么将会出现图形启动界面。

应该使用哪种引导程序?

If your Alpha system supports SRM, then you should use aboot. If your system supports both SRM and ARCs (ARC, AlphaBIOS, ARCSBIOS), then you should follow the SRM Firmware Howto for switching to SRM and use aboot. If your system can only use ARCs (Ruffian, xl, etc.) then you will need to choose milo.

aboot 引导程序能够从 EXT4, XFS, ReiserFS, 或者 JFS 分区启动内核吗?

不行。aboot 仅仅支持从文件系统为 ext2ext3 的分区启动内核。不过你还是可以在 root 分区使用其他文件系统,只需要创建一个使用 ext2 或者 ext3 文件系统的 /boot 分区即可。

对 ext4 的支持已列入计划。实际上,目前已经有部分支持ReiserFS, XFS, 和 ext4 的补丁在网络上流传了。

软件

How is Java support in Alpha?

Compaq/HP 公司曾经提供了名为 compaq-jrecompaq-jdk 的二进制包用于支持 Java。但是他们已经停止了所有支持,而2006年10月11日已经从 Gentoo 移除了这些包。从那时开始,我们就不再支持 Java 了。

将会开展支持 Java 的相关工作吗?

在 Alpha 平台上可能通过 icedtea 实现对 Java 的支持,但是我们没有将其列入计划,主要是因为如此将带来数以百计额外软件包测试工作的巨大维护成本。

How is .NET support in Alpha?

.NET的两个主要开源成果 monoDotGNU,均不支持 alpha 体系架构。

支持 .NET 需要哪些条件?

将 .NET 引入 Alpha 平台并非易事。这需要对 JIT (即时)编译器的所有相关汇编代码进行重新编码,并对架构特定的功能(比如寄存器分配器等等)进行重新编码。

Alpha Linux 内核

我应该使用哪个内核源代码?

We recommend using gentoo-sources but vanilla-sources is also supported by Alpha. You should read the Gentoo Kernel Guide to determine which one is right for your needs.

我的系统使用 kernel-2.6 时崩溃了,能够改用一个 2.4 版本的系统吗?

Alpha stopped supporting 2.4 kernel and profile in January 2008. Technically you can build a 2.4 Gentoo System (the kernel is in the tree) but you will have to mask all the 2.6 only packages by yourself and you won't have support from developers.

Alpha will review all bug reports about non-working 2.6 systems and will try to help as much as we can.

支持加固的代码吗?

简单的回答是不支持。一段时间前我们支持过,但是我们失去了硬件和维护机制,所以现在不再支持了。如果你有兴趣继续这些基础性工作,请告诉我们。

2.6 版本的内核支持 Alpha SMP 吗?

有一段时间它不稳定。但是,据了解现在的内核版本工作得很好。

Helping out the Alpha project

如何报告 bugs?

If you find a bug or you want to send us patches, then you need to file a bug report. It only takes you a little bit of your time, and your help is really appreciated. Please follow the Gentoo Bug Reporting Guide.

How can I help the Alpha project?

用户可以通过以下方式帮助我们:

  • Filing clear and concise bugs.
  • Testing software that does not yet have the ~alpha keyword.
  • Answering questions on the mailing lists, forum and IRC channel.
  • Sending patches
  • Becoming an AT

Is there an Alpha arch testers project?

Yes, see the Alpha arch testers project page for details.

故障排除

为何 Xorg 锁住我的 Alpha?

一般情况下是由于不恰当的 -mcpu 设置造成的。例如,AlphaServer 800 就需要采用ev5 进行编译,以保持对 xorg and glibc 的兼容性。如果不这样做,将会导致不希望出现的结果。

更多资源

为何没有 Gentoo on Alpha 论坛?

On the Gentoo Forums there are several arch specific categories like Gentoo on PPC and Gentoo on Sparc. There is no Gentoo on Alpha category because there simply isn't enough Alpha activity on the forums to warrant one. All Alpha related posts should go in the Gentoo on Alternative Architectures category.

Where can I get more help or information about Alpha?

If any of your questions weren't answered here, you can try other resources like the Alpha Handbook or our project homepage. You can also ask us at #gentoo-alpha on irc.freenode.net, Gentoo on Alternative Architectures Forum, or on the gentoo-alpha@lists.gentoo.org mailing list.

Where can I get more help or information about Alpha on Linux?

AlphaLinux.org 是一个关于 Alpha/Linux 的中心知识库。


This page is based on a document formerly found on our main website gentoo.org.
The following people contributed to the original document: Thomas Cort, Brian Evans, nightmorph, Matt Turner
They are listed here because wiki history does not allow for any external attribution. If you edit the wiki article, please do not add yourself here; your contributions are recorded on each article's associated history page.