Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cpio binary and help with silent and parallel builds #20

Merged
merged 2 commits into from
Sep 19, 2024

Commits on Aug 30, 2024

  1. Need cpio to build kheaders_data.tar.xz

    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]>
    srikard committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    d612885 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. silent and parallel build

    Linux kernel build supports silent build and parallel build.
    By default build, its easy to miss the warnings and errors in the
    compile log, especially when in interactive mode.
    
    Similarly parallel build will help to get the build the kernel faster.
    
    Signed-off-by: Srikar Dronamraju <[email protected]>
    srikard committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    65293c5 View commit details
    Browse the repository at this point in the history