Skip to content

Latest commit

 

History

History
executable file
·
88 lines (50 loc) · 4.48 KB

File metadata and controls

executable file
·
88 lines (50 loc) · 4.48 KB

Common Errors When Compiling Older Kernels (4.4, 4.9, 4.14)

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

However, I recommend opening the patch file in a code editor and manually editing your files for better understanding.

  • Not all patch files can be applied using the command above.


  • 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'

  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)"