LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 716|回复: 2

LFS-BOOK-6.6_LFS Target Architectures

[复制链接]
发表于 2010-7-16 14:03:53 | 显示全部楼层 |阅读模式
LFS Target Architectures


The primary target architecture of LFS is the 32-bit Intel CPU. If you have not built an LFS system before, you should probably start with that target. The 32-bit architecture is the most widely supported Linux system and is most compatible with both open source and proprietary software.

On the other hand, the instructions in this book are known to work, with some modifications, with both Power PC and 64-bit AMD/Intel CPUs. To build a system that utilizes one of these CPUs, the main prerequisite, in addition to those on the next few pages, is an existing Linux system such as an earlier LFS installation, Ubuntu, Red Hat/Fedora, SuSE, or other distribution that targets the architecture that you have. Also note that a 32-bit distribution can be installed and used as a host system on a 64-bit AMD/Intel computer.

Some other facts about 64-bit systems need to be added here. When compared to a 32-bit system, the sizes of executable programs are slightly larger and the execution speeds are only slightly faster. For example, in a test build of LFS-6.5 on a Core2Duo CPU based system, the following statistics were measured:

Architecture Build Time Build Size
32-bit 198.5 minutes 648 MB
64-bit 190.6 minutes 709 MB



As you can see, the 64-bit build is only 4% faster and is 9% larger than the 32-bit build. The gain from going to a 64-bit system is relatively minimal. Of course, if you have more than 4GB of RAM or want to manipulate data that exceeds 4GB, the advantages of a 64-bit system are substantial.

The default 64-bit build that results from LFS is considered a "pure" 64-bit system. That is, it supports 64-bit executables only. Building a "multi-lib" system requires compiling many applications twice, once for a 32-bit system and once for a 64-bit system. This is not directly supported in LFS because it would interfere with the educational objective of providing the instructions needed for a straightforward base Linux system. You can refer to the Cross Linux From Scratch project for this advanced topic.

There is one last comment about 64-bit systems. There are some packages that cannot currently be built in a "pure" 64-bit system or require specialized build instructions. Generally, these packages have some embedded 32-bit specific assembly language instructions that fail when building on a 64-bit system. This includes some Xorg drivers from Beyond Linux From Scratch (BLFS). Many of these problems can be worked around, but may require some specialized procedures or patches.
 楼主| 发表于 2010-7-16 14:05:59 | 显示全部楼层
LFS的目标架构


LFS系统主要的目标架构是32位的Intel CPU。如果你以前没有构建过Linux系统,你应该从这个目标开始。 32位架构是得到Linux最广泛支持的,并且对开放资源和商业软件的兼容性最好。

另一方面,本书的用法说明已知,通过一些修改,该系统可以在 Power PC 和64位的AMD/Intel CPU 架构下运行。 为了构建适合这些CPU的系统,除了接下来几页以外,主要的先决条件是你要有一个相同目标架构的现存Linux系统,比如以前安装的LFS, Ubuntu, Red Hat/Fedora, SuSE 或其他发布系统。 还要注意,32位发布系统可以在64位 AMD/Intel 计算机上安装和使用。

一些关于64位系统的其他情况需要添加在这里。和32位系统比较,可执行程序的容量稍微大一些,而速度仅快一点。例如, 在 Core2Duo CPU 上的 LFS-6.5 基础系统测试中,下面是统计结果:

Architecture Build Time     Build Size
32-bit       198.5 minutes  648 MB
64-bit       190.6 minutes  709 MB
就像你看到的,64位的编译速度只比32位的快 4%,而容量大9%。 使用64位系统得到的好处相对很少。当然,如果你有超过4GB的内存,或者要操作超过4GB的数据,那么64位系统的优点是很明显的。

在默认情况下,LFS 编译的64位系统是“纯净的”64位系统。也就是说,它只支持64位可执行文件。 构建一个 “多库(multi-lib)” 系统,需要将很多应用软件编译两次,一次用于32位系统,一次用于63位系统。在LFS系统不直接支持,是因为它干扰了提供易用的基本Linux系统指南的教育目标。 对于这个高级主题,你可以参考 Cross Linux From Scratch 项目。

这是关于64位系统的最后讨论。当前有一些软件包不能在“纯净的”64位系统中编译,或者专门的编译指南。通常,这些包有一些嵌入式32位特定汇编语言指令,它们在64位系统编译时会失败。 这包括 Beyond Linux From Scratch (BLFS) 中的一些Xorg 驱动。其中很多问题可以被绕过, 但是可能需要专门的程序或补丁。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-7-16 15:05:42 | 显示全部楼层
Post by raine;2103522
LFS的目标架构

这是关于64位系统的最后讨论。当前有一些软件包不能在“纯净的”64位系统中编译,或者专门的编译指南。通常,这些包有一些嵌入式32位特定汇编语言指令,它们在64位系统编译时会失败。 这包括 Beyond Linux From Scratch (BLFS) 中的一些Xorg 驱动。其中很多问题可以被绕过, 但是可能需要专门的程序或补丁。



在64位的linux 做64位的lfs 还有点问题?  需要哪些 专门的程序或补丁??
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表