Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can affect the final build of a linux kernel

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?

like image 416
Dark Templer Avatar asked Nov 05 '22 21:11

Dark Templer


1 Answers

The linux kernel contains a number of timestamps and other non-deterministic elements. This patch series eliminates these, allowing for a deterministic build.

like image 52
bdonlan Avatar answered Nov 10 '22 17:11

bdonlan