Alpha/FAQ/zh-cn

本文试图回答与 Gentoo/Alpha 和 Linux/Alpha 相关的一般性常见问题.

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

Gentoo/Alpha 是什么?
Gentoo/Alpha 项目负责保持 Alpha 平台上 Gentoo 发行版的更新. 该项目主要包括系统关键包、可移植软件，并制作全新的发行版. Gentoo/Alpha 项目同时为桌面系统和服务器提供可用环境.

Alpha 架构已死?
从某种意义上而言，答案是肯定的. HP公司自从2007年4月27日起停止采购新的Alpha系统，并于2008年4月25日起停止了Alpha机型的销售和升级服务. 可以参考如下链接获得更多细节：planning page

我能在Alpha平台上运行 32位应用程序吗?
不行. 所有的 Alpha 系统使用纯64位内核以及纯64位的用户区. 即使你使用 编译器标识强制 gcc 输出32位代码，也做不到这一点.

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

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

那我们在 Alpha 上安装 Gentoo 有何意义?
不可否认，您可以找到更快的64位系统，比如说 amd64. 但是这并不意味着 Alpha 系统就毫无用处了. 下面列出了你可能希望在某些 Alpha 硬件上安装 Linux 系统的一些理由：


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

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

打开 AlphaServer 机箱之后，它不能启动，该怎么办?
请确保机箱的顶部面板打开并在正确的位置上. 机箱顶部面板的中间有个朝下的小金属片. 当顶部面板放在了合适位置时，该金属片会把一个开关压住. 如果这个开关没有压住，系统就不会启动.

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

如何为特定指令集的优化制订规划模型?
可以通过 来制订特定指令集的优化模型，这里 XXX 是指 cpu 型号. 合法的 cpu 型号包括,  ,  ,  ,  ,   和. 如果不指定  标记，那么   将会使用编译它本身时所在机器的 cpu 型号. 等同于 x86 平台上的  标记.

在不改变指令集的情况下，如何制订优化模型列表?
可以通过使用  来达成不改变指令集制定优化模型列表的目的，这里 XXX 是你的 cpu 型号. 合法的 cpu 型号包括,  ,  ,  ,  ,   和. 标记中隐含了  标记，因此如果你设置了   标记，那么就无需再次设置这个标记. 等同于 x86 平台的  标记.

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

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

如何指定系统的内存延迟?
可以通过指定  来实现内存延迟，这里 XXX 是（延迟的）时钟周期数. 这个标记设置了系统调度程序在引用内存时假定的延迟时间. 有个预定义的"typical" 值也可用作设置 ，这些值包括： 用于 Dcache 的 ，用于 Scache 的 ，用于Bcache 的  ，以及用于主内存的.

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

那些应该放置在小型数据区域的静态数据如何具体设置?
You can specify that static data should be placed in the small data area with. This will cause  to take advantage of some features of the Alpha architecture by storing heavily used pieces of data in specific sections called the small memory sections. The sections are limited to 64KiB which means accessing anything stored in them will only take one instruction.

will override, so you should use the flag instead if you do not want  to be overridden.

This flag should probably not be used in your global  as some objects require more than 64KiB to be stored, and this will cause a gp_overflow ld error.

How do I specify that object code should be placed in the small text area?
You can specify that object code should be placed in the small text area with. This will cause  to assume that the entire program (or library) fits in 4MB, and is thus reachable with a branch instruction. This reduces the number of instructions required for a function call from 4 to 1.

This flag should probably not be used in your global  as some programs (or libraries) are larger than 4MB, and this will cause an ld error.

What do I do if any of these compiler flags cause a compile, linker, or runtime error?
As, please use these  cautiously. They may break your system. If you experience problems, try using less aggressive  before.

What is 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.

What is ARC?
ARC is based on the Advanced RISC Computing (ARC) specification, which provides an operating environment for Windows NT.

How can I tell if which firmware my Alpha has, ARC or SRM?
When you power your system on you will see a screen with a blue background and white text if it is using SRM. You will see a graphical boot system if it is using ARC.

Which bootloader do I use?
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.

Can aboot boot kernels from EXT4, XFS, ReiserFS, or JFS partitions?
No,  only supports booting kernels from   and   partitions. You may still use other files systems for your root partition, you just need to create a partition with either   or   on it.

Support for ext4 is planned. In fact, there are patches floating around that add support for ReiserFS, XFS, and ext4.

How is Java support in Gentoo/Alpha?
Compaq/HP offered binary packages, called  and. They stopped all support, and the packages were removed from Gentoo on October 11, 2006. Since then, we haven't supported Java.

Will there ever be working Java support?
It's possible to use  on Alpha, but we have no plans to support it, due to the high maintenance costs involved with testing hundreds of additional packages.

How is .NET support in Gentoo/Alpha?
Neither of the two main open source efforts, mono nor DotGNU, support the alpha architecture.

What is needed for .NET support?
Bringing .NET to Alpha isn't a simple task. It requires coding all of the assembly language code generation macros for the JIT (just in time) compiler and coding architecture specific functions (register allocators, etc).

Which kernel sources should I use?
We recommend using  but   is also supported by Gentoo/Alpha. You should read the Gentoo Kernel Guide to determine which one is right for your needs.

My system is broken with kernel-2.6, Can I build a 2.4 bassed system?
Gentoo/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.

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

Are hardened-sources supported?
Short answer is no. They were supported some time ago, but we lost the hardware and the maintainer so now they are not supported. If you are interested and want to continue the initial work, please let us know.

Does the 2.6 kernel support Alpha SMP?
There were some times in the past when it was broken. However, modern kernel versions are known to work well.

How do I report 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 Gentoo/Alpha Project?
Users can help us by:


 * Filing clear and concise.
 * Testing software that does not yet have the  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 Gentoo Linux Alpha Arch Testers Project page for details.

Why is Xorg locking up my Alpha?
This is usually caused by a bad -mcpu setting. For example, the AlphaServer 800 needs to be compiled with the  flag for xorg and glibc. Failing to do so will cause undesired results.

Why is there no Gentoo on Alpha forum?
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 Gentoo/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 Gentoo/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  on , Gentoo on Alternative Architectures Forum, or on the  mailing list.

Where can I get more help or information about Alpha/Linux?
AlphaLinux.org is a central repository for all things Alpha/Linux.