cpio is needed by kernel/gen_kheaders.sh to build
kernel/kheaders_data.tar.bz2. Hence include it as part of Dockerfile.
python3 make_linux.py -a x86_64 -s ~/linux -o ~/linux/out -c clang-17 -k ~/linux/out/.config
[+] Going to build the Linux kernel for x86_64
[+] Using "/home/srikar/linux/out/.config" as kernel config
[+] Using "/home/srikar/linux" as Linux kernel sources directory
[+] Using "/home/srikar/linux/out" as build output directory
[+] Going to build with: clang-17
=== Building with clang-17 ===
Output subdirectory for this build: /home/srikar/linux/out/.config__x86_64__clang-17
Output subdirectory already exists, use it (no cleaning!)
kconfig files "/home/srikar/linux/out/.config" and "/home/srikar/linux/out/.config__x86_64__clang-17/.config" are identical, proceed
Going to save build log to "build_log.txt" in output subdirectory
Compiling with clang requires 'CC=clang'
Run the container: bash ./start_container.sh clang-17 /home/srikar/linux /home/srikar/linux/out/.config__x86_64__clang-17 -n -- make O=../out/ CC=clang 2>&1
Hey, we gonna use sudo for running docker
Run docker in NON-interactive mode
Starting "kernel-build-container:clang-17"
Mount source code directory "/home/srikar/linux" at "/home/srikar/src"
Mount build output directory "/home/srikar/linux/out/.config__x86_64__clang-17" at "/home/srikar/out"
Gonna run command "make O=../out/ CC=clang 2>&1"
make[1]: Entering directory '/home/srikar/out'
SYNC include/config/auto.conf.cmd
GEN Makefile
GEN Makefile
UPD include/generated/compile.h
CALL /home/srikar/src/scripts/checksyscalls.sh
CC init/version.o
AR init/built-in.a
make[4]: *** [/home/srikar/src/kernel/Makefile:158: kernel/kheaders_data.tar.xz] Error 127
make[3]: *** [/home/srikar/src/scripts/Makefile.build:480: kernel] Error 2
make[2]: *** [/home/srikar/src/Makefile:2032: .] Error 2
make[1]: *** [/home/srikar/src/Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/home/srikar/out'
make: *** [Makefile:234: __sub-make] Error 2
The container returned 2
Finish building the kernel
Only remove the container id file:
Hey, we gonna use sudo for running docker
Search "container.id" file in build output directory "/home/srikar/linux/out/.config__x86_64__clang-17"
OK, "container.id" file exists, removing it
OK, container 460138d7243910b6ab58ba8da6d28ac10022c4b551b968004af848dfb5f3291f doesn't run
The finish_container.sh script returned 0
See the build log: /home/srikar/linux/out/.config__x86_64__clang-17/build_log.txt
[+] Done, see the results
Signed-off-by: Srikar Dronamraju <[email protected]>