Implementation For Building Linux

The design and the evaluation result in the following implementation.

Repository

Repository

Important: Each version_platform branch depends strongly on a version_generic branch.

version_generic

This branch exists exactly one time per Linux version. It contains the script, that downloads the sources for the version it is designed for. For obliterating the redundancy throughout the different platforms, it also implements the whole build process.

With the decision to use Gentoo as RootFS, applying the Gentoo specific patches to the Linux kernel is also necessary. Therefore these patches have to be downloaded and applied during the build process.

Build Steps

  1. Download sources
  2. Extract sources
  3. Download Gentoo patches
  4. Extract Gentoo patches
  5. Apply Gentoo patches
  6. If provided in version_platform branch, apply user patches
  7. Build Linux
  8. Provide Output in archives
    • Files for boot partition (kernel, dtb)
    • Files for root partition (modules, kernel sources)

Build Script

The following build script reflects the build steps.

version_platform

This branch exists for each platform as many times as different version of Linux should be built. It contains a build script, which will do the following:

Build Steps

  1. Checkout the needed version_generic branch
  2. Set necessary parameter e.g. configuration
  3. Execute the script from the version_generic branch

Build Script

The following build script reflects the build steps.