什么会影响 Linux 内核的最终构建
我有一个小问题。我需要重建一个 Linux 版本,以便它与不久前构建的版本相匹配。但是,我遇到了一些问题。
我想知道 Linux 盒子的哪些方面会影响内核的构建过程?以下是一些事实。
目前我们公司使用预建预装版本的fedora来安装工程师开发盒。该版本只是块复制到空白硬盘上。如果我使用开发盒,我可以成功重建内核,因此它与我尝试重现的原始内核是逐字节匹配的。
但我需要向政府机构证明我们没有对内核做任何坏事,因此他们要求我们在仅使用信任软件从头开始安装的机器上构建 Linux 内核。可信意味着从官方网站下载并通过哈希结果进行验证。以这种方式构建的机器生成的内核与开发盒上构建的内核不同(因此与我试图匹配的原始内核不同)。
哪些变量可能会影响构建的结果?目前,这两个盒子(可信和开发)中的这些是相同的
- GCC 版本
- 运行时内核
- 我正在尝试重建的内核的
源代码(包括 .configs 文件)对于造成差异的原因有什么想法吗?
I have a small problem. I need to rebuild a version of linux so that it matches a version built a while ago. But, I am having some problems.
I was wondering what aspects of a linux box would affect the build process of the kernel? Here are a few facts.
At present our company uses a pre-built and pre-installed version of fedora to install engineers development box. This version is just block copied onto blank hard disks. If I use a development box I can successfully rebuild the kernel so it is a byte for byte match with the original that I am trying to reproduce.
But I need to prove to a government body that we have done nothing bad to the kernel, so they require us to build the linux kernel on a machine that has been installed from scratch using only trust software. Trusted means downloaded from official web sites and verified via hashing results. A machine built in this manner produces a kernel that differs from that built on the development box (and therefore differs from the original I am trying to match).
What variables may affect the outcome of the build? At present these are the same across the two boxes (trusted and development)
- GCC version
- Run time kernel
- source of kernel I am trying to rebuild (including .configs files)
Any ideas on what create the differences?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Linux 内核包含许多时间戳和其他非确定性元素。 此补丁系列消除了这些问题,从而实现确定性构建。
The linux kernel contains a number of timestamps and other non-deterministic elements. This patch series eliminates these, allowing for a deterministic build.