Welcome to the Linux Foundation Forum!

Error while compiling the Linux Mainline.

I'm new to this Linux Bug fixing Mentorship. I have cloned linux mainline and compiled it using make -j$(nproc). It is showing this error after sometime.
make[1]: *** [/home/ubuntu/linux_work/linux_mainline/Makefile:2011: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2
Can anybody explain what to do and how to fix? or do we have to clone the sable line of linux?

Answers

  • rujrabhatt
    rujrabhatt Posts: 11

    hi @sudarshan19 ,
    If its config trusted key issues then it might get resolved by this : CONFIG_MODULE_SIG_KEY="/tmp/signing_key.pem" to CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
    this will be inside Makefile.
    OR
    by using this command : scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
    Try it.
    post that
    use command : make -j4 (where 4 is number of your CPU cores)
    I had quadcore 4.

  • Thankyou for responding @rujrabhatt within no time. I have run that command, But it is still giving the same error again. I'm building this in Ubuntu in my Virtual Box and I'll tell you what have I done to make problem Identification easier.
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux_mainline
    cd linux_mainline
    cp /boot/config-$(uname -r) .config
    make olddefconfig
    scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
    make -j4
    did I miss anything?

  • imanseyed
    imanseyed Posts: 10
    edited April 30

    What you've sent is not the main error. Rebuild the kernel with -j1 or without the -j option to actually catch it. One of your sub-makefiles is returning an error. Probably a dependency issue...

  • Yes, If I run it sequentially using make -j1, it got successfully compiled. It's probably dependency issue only. Thankyou @imanseyed and @rujrabhatt for your support.

Categories

Upcoming Training