Skip to content

Latest commit

 

History

History

patches

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

🟥 Common errors when compiling older kernels (4.4, 4.9, 4.14)

← Back to the main guide

Feel free to contribute to this documentation by explaining the issue and linking the commit that helped you fix it.

Note

How to apply a patch file?

patch -p1 < filename.patch

Not all patch files can be applied that way. I recommend opening the patch in a code editor and editing your files by hand, so you understand what changed.


  • If the errors you are facing are related to -Werror, aka treating warnings as errors, you can use this patch to disable treating warnings as errors, even though it's not a good practice :)

  1. Fix: ../scripts/gcc-version.sh: line 25: aarch64-linux-gnu-gcc: command not found

  2. Fix: -fstack-protector-strong not supported by compiler

    • This happens when the compiler is not compatible with your source code. It is recommended to try changing the compiler instead of using this patch.

    • Be warned that using this patch may make your device vulnerable.

    • Patch, Commit

  3. Fix: multiple definition of 'yylloc'

    • Note: If you are unable to find the scripts/dtc/dtc-lexer.lex.c_shipped file, that's fine.

    • Commit, Patch

  4. Fix: #error New address family defined, please update secclass_map.

  5. Fix: sec_debug_test.c:773:(.text+0x1044): relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against...

  6. Fix: fatal error: 'linux/state_notifier.h' file not found

  7. Fix: ./include/linux/ologk.h:5:10: fatal error: 'olog.pb.h' file not found

  8. Fix: drivers/misc/tzdev/tz_deploy_tzar: fix startup.tzar inclusion

  9. Fix: ioctl_cfg80211.c: error: too many arguments to function call, expected 3, have 8

  10. Fix: drivers/input/touchscreen/gt1151q_1695/gt1x_test.c: multiple definition of 'is_space'

  11. Fix: yamltree.c:(.text+0xa41): undefined reference to `yaml_emitter_initialize'

    • This happens because older scripts/dtc/Makefile files look for /usr/include/yaml.h with a hardcoded path. On modern distros the header is somewhere else, so the check guesses wrong.

    • Commit, Patch

    • There is also an upstream fix that uses pkg-config to find libyaml properly instead of guessing: Patch

  12. Fix: as: unrecognized option '-EL'

  13. Fix: undefined reference to 'stpcpy'

  14. Fix: ../kernel/gen_kheaders.sh: 71: ../tools/build/cpio: not found

    • Patch, Commit

    • You must export the Kernel root like this if you are not using my build scripts:

      export KERNEL_ROOT="(pwd)"

← Back to the main guide