Implementation For Building Linux
The design and the evaluation result in the following implementation.
Repository
- The repository is called linux-specs
- Each platform/version combination gets its own branch, which will be referred as version_platform branch
- Each version has also one branch, which will be referred as version_generic branch.
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
- Download sources
- Extract sources
- Download Gentoo patches
- Extract Gentoo patches
- Apply Gentoo patches
- If provided in version_platform branch, apply user patches
- Build Linux
- 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
- Checkout the needed version_generic branch
- Set necessary parameter e.g. configuration
- Execute the script from the version_generic branch
Build Script
The following build script reflects the build steps.