DocKernBuilder provides an easy-to-use Docker environment for building old Linux kernels required for IOT security research. The setup uses Docker Compose to ensure that all necessary dependencies and configurations are managed within a container.
This repository contains a Docker setup for compiling the Linux kernel for MIPS architecture. The Docker environment simplifies the build process by providing all required dependencies, including the GCC cross-toolchain, within an isolated container.
Before using this project, make sure you have the following installed:
-
Clone this repository to your local machine:
git clone https://github.com/R3dHash/DocKernBuilder.git cd DocKernBuilder
-
Ensure that the
docker-compose.yml
andDockerfile
are in the same directory. -
The shared directory
./shared
will be used to store kernel sources, logs, and compiled kernel binaries.
-
Start the container with Docker Compose:
docker-compose up --build
-
Once the container is running, it will automatically begin the process of downloading, extracting, and compiling the Linux kernel for MIPS.
-
The kernel image (
vmlinux
) and a stripped version (vmlinux-stripped
) will be available in the./shared
directory on your host machine after the build completes.
The logs of the kernel build are saved inside the container and can be accessed using the following commands:
docker logs kernel_builder
Additionally, logs are saved in /shared/build.log
.
Include screenshots of the following steps:
-
DocKernBuilder tree project
-
Docker Compose running the build
-
Kernel Compilation Log
-
Compiled Kernel Output
- Out of memory errors: If your system runs out of memory during the build process, consider limiting the number of jobs (
-j
flag) in theDockerfile
. - Slow build times: You can improve build times by allocating more resources to Docker (CPU and memory).
For more troubleshooting help, please consult the Docker documentation or raise an issue in this repository.