AMD64/常见问答

From Gentoo Wiki
< AMD64
Jump to:navigation Jump to:search
This page is a translated version of the page AMD64/FAQ and the translation is 51% complete.
Outdated translations are marked like this.


Gentoo Linux 在 AMD64 平台上经常被问到的问题的文章。

另请参阅
See also the main FAQ, or the Portage FAQ for frequently asked questions about the package manager. There is also a FAQ secion in the handbook. For frequently asked questions relating to the documentation wiki and editing the wiki, see the wiki FAQ. There are also other architecture-specific FAQs, such as: PPC/FAQ, MIPS/FAQ, and Alpha/FAQ.
Article status
This article has some todo items:


介绍

这个文档包括在amd64平台上使用Gentoo Linux的最常见问题。其中的很多问题都来自于论坛、IRC以及各个邮件列表AMD项目提供在此架构上Gentoo Linux的支持。如果您对这个常见问答有疑问或建议,可以在关联的 talk page上面留言。

安装

AMD64 和 EM64T 有什么区别?

AMD64 和 EM64T 指的都是64位处理器,只是一个是AMD的(AMD64),一个是英特尔的(EM64T)。AMD的64位处理器包括Athlon 64(速龙64),Opteron(皓龙),Turion(炫龙),Neo(速龙 Neo),Phenom(羿龙),FX, AX/EX/CX ,Ryzen (锐龙)和 EPYC(霄龙) 系列。英特尔的64位处理器包括 Core 2(酷睿2),Core i3/i5/i7,Xeon(至强)和Pentium(奔腾)(它们全都基于Core 2 架构。last few versions 中的较老的奔腾四代和至强处理器也支持M64T。

AMD的64位处理器生产线的发布远远早于英特尔。因此,出于历史原因,在 Gentoo 中所有兼容 x86-64 的架构的关键字都是amd64。所以,"AMD64"只是个64位处理器芯片的通称,并不专指某个公司的处理器。

我该使用哪种CFLAGS参数?

你只需简单地使用CFLAGS来避免你的系统未来可能会出现的问题。 既支持AMD又支持英特尔的CFLAGS值有-O2 -march=native -pipe

我该使用哪种内核?

您可以使用 Portage 中几乎所有的内核源代码。我们推荐使用sys-kernel/gentoo-sources 因为它是专为 Gentoo Linux 设计的。它包含了许多针对AMD64构架的补丁,因此是在 AMD64 平台上受 Gentoo 官方支持的唯一的内核。

请确保您激活了内核中IA32_EMULATION的选项。

root #cd /usr/src/linux
root #make menuconfig
内核 Enabling IA32 emulation
Executable file formats / Emulations  --->
  [*] IA32 Emulation
警告
如果你关闭此选项你可能在 multilib 系统上遇到编译失败的情况。

如果我从32位系统升级到64位系统,电脑会有更好的表现么?

这是一个很难回答的问题。在某些情况下,你将会体验到性能的提高,但这不是绝对的。仅就日常使用而言,64位和32位之间几乎没有差别。当涉及到浮点运算时, 64位通常的速度更快,这是通常运行多媒体应用程序和3D渲染的情形。您可能会对Linux.com的文章 64-bit performance in Gentoo Linux64-bit Linux and BSD are maturing steadily 感兴趣。在我们的论坛里,还有一个很好的帖子:Article: 64-bit performance in Gentoo Linux

现在大多数系统将是 64 位的,除非有其他具体要求。

什么是multilib,我该怎么使用它?

每一台AMD64处理器都能够运行32位代码和64位代码。但是,当你使用一个32位的应用程序,你将不能把它和64位的库混用,反之亦然。然而,如果一个32位程序所需要的共享库都完备地作为32位对象,你就可以以原生(无仿真)的方式运行32位应用程序,这就是multilib。您可以通过配置选择是否要[multilib的]支持。默认配置是启用multilib的。

警告
当前并不支持从 no-multilib 到 multilib-enabled 的切换 ,所以在你决定用 no-multilib 之前请三思。

我该怎么创建一个32位的chroot?

请阅读32bit chroot guide.

我能通过emerge -e @world的方式升级我的x86系统到AMD64系统么?

因为 x86 (32位) 和amd64 (64位) 安装的一些差异,无法通过这种方法升级。请使用AMD64 Handbook的方法执行全新安装。

注意在 x8 6系统上创建的二进制文件很有可能无法被 AMD64 系统上的软件包读取。特别是一些数据库,例如OpenLDAP,不能简单地按原样复制。尝试在 AMD64 系统上恢复数据库之前,你需要将数据库转储为与体系结构无关的格式,例如文本文件。 MySQL、Berkley DB 和 SQLite 的数据库文件与架构无关,可以在相关守护程序(如果有)彻底关闭时自由移动。

硬件

我的 NVIDIA/ATI 的驱动程序能工作么?

是的,NVIDIA和ATI提供在AMD64平台下工作的驱动程序。你可以安装x11-drivers/nvidia-driversx11-drivers/xf86-video-ati。如果对这些驱动有疑问,您应该阅读nvidia-drivers guideATI FAQ

我该怎么使用 Cool'n'Quiet(清凉安静技术)、PowerNow 和SpeedStep(智能功效管理)?

自定义内核用户必须为支持这些特性编译内核。启用如下功能:

内核 Kernel options for Cool'n'Quiet/PowerNow/SpeedStep
Power management and ACPI options --->
  [*] Device power management core functionality
  [*] ACPI (Advanced Configuration and Power Interface) Support --->
    <*>   Processor
    <*>     Thermal Zone
  CPU Frequency scaling --->
  [*] CPU Frequency scaling
         Default CPUFreq governor (ondemand) --->
  -*-   'performance' governor
  <*>   'userspace' governor for userspace frequency scaling
  -*-   'ondemand' cpufreq policy governor
  <*>   ACPI Processor P-States driver
  CPU Idle  --->
    -*- CPU idle PM support

然后安装 sys-power/cpupower ,并使用您喜欢的文本编辑器编辑 /etc/conf.d/cpupower

文件 /etc/conf.d/cpupower配置实例
# Options when starting cpufreq (given to the `cpupower` program)
START_OPTS="--governor ondemand"
  
# Options when stopping cpufreq (given to the `cpupower` program)
STOP_OPTS="--governor performance"

现在运行下面的命令,以确保每次系统启动时都能启动 cpupower 守护程序:

root #rc-update add cpupower boot
附注
关于 CPU 电源管理的更多技巧你可以参考电源管理指南

应用程序

我想安装某个Package,但是Emerge显示:(masked by: ~amd64 keyword)

这表示这个Package还在测试树(testing tree)中。请阅读Portage使用手册(man portage)或者AMD64 Handbook中的Mixing Software Branches章节来获取更多信息。

我想安装某个Package,但是Emerge显示:(masked by: missing keyword)

这意味着 Package 还没有被测试过。它不一定意味着Package不能正常工作。您可以通过接受另一种(一些)架构的方式来接受它。下面的例子显示,你可以通过给Portage一些关键字使之接受给定Package的安装。

root #echo "category/packagename **" >> /etc/portage/package.accept_keywords
root #emerge packagename

如果你运行正常,请在Gentoo's Bugzilla登记Bug来让我们知道,这样AMD64平台团队就可以把此Package标记,其他用户就可以从你的测试中受益。

警告
请不要试图使用像ACCEPT_KEYWORDS="~x86" emerge packagename这样的命令。这样会破坏 Portage 树并导致系统形同虚设。

另请参阅

  • Project:AMD64
    This page is based on a document formerly found on our main website gentoo.org.
    The following people contributed to the original document: Simon Stelling, Luis Medinas, Gerald J. Normandin Jr., Xavier Neys,
    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.