Can not compile Linux Kernel

Discussion in 'Kernels' started by Iacopo, Jun 9, 2021.

Tags:
  1. Iacopo

    Iacopo New Member

    Joined:
    Jun 8, 2021
    Messages:
    1
    Likes Received:
    0
    Hello everyone,

    I was about to recompile the kernel for Neo's board following the guide https://www.udoo.org/docs-neo/Advanced_Topics/Compile_Linux_Kernel.html and got stuck since the installation of the dependencies. I run Ubuntu desktop 18.04.5 and this is the error:

    $sudo apt-get install gawk wget git diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm picocom ncurses-dev lzop gcc-arm-linux-gnueabihf
    ...
    The following packages have unmet dependencies:
    gcc-arm-linux-gnueabihf : Depends: gcc-7-arm-linux-gnueabihf (>= 7.4.0-1~)
    E: Unable to correct problems, you have held broken packages.


    if I continue anyway I get error while compiling:

    $ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage -j8
    CHK include/config/kernel.release
    CHK include/generated/uapi/linux/version.h
    CC scripts/mod/devicetable-offsets.s
    In file included from include/linux/compiler.h:54:0,
    from include/uapi/linux/stddef.h:1,
    from include/linux/stddef.h:4,
    from /home/roma/udoo-dev/linux_kernel/include/uapi/linux/posix_types.h:4,
    from include/uapi/linux/types.h:13,
    from include/linux/types.h:5,
    from include/linux/mod_devicetable.h:11,
    from scripts/mod/devicetable-offsets.c:2:
    include/linux/compiler-gcc.h:106:1: fatal error: linux/compiler-gcc7.h: No such file or directory
    #include gcc_header(__GNUC__)
    ^~~~
    compilation terminated.
    scripts/Makefile.build:204: recipe for target 'scripts/mod/devicetable-offsets.s' failed
    make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
    scripts/Makefile.build:455: recipe for target 'scripts/mod' failed
    make[1]: *** [scripts/mod] Error 2
    Makefile:529: recipe for target 'scripts' failed
    make: *** [scripts] Error 2
    make: *** Waiting for unfinished jobs....


    I have just installed Ubuntu, so nothing else is in it.
    Can't go any further, I am a noob so any help will be really appreciated!
    Thank you
     

Share This Page