I’m trying to build the Ubuntu kernel from Launchpad with my custom patch but it takes 10 times longer than a mainline build, and features such as the snap prompting client don’t work. What are the best steps/flags to use to build the proper Ubuntu kernel?
I build a custom mainline kernel on Ubuntu with the following steps:
- Apply my custom patch
- Copy local config from /boot
- Use the following flags:
‘’’
scripts/config --set-str CONFIG_SYSTEM_TRUSTED_KEYS “”
scripts/config --set-str CONFIG_SYSTEM_REVOCATION_KEYS “”
scripts/config --enable CONFIG_DEBUG_INFO_NONE
scripts/config --disable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
scripts/config --disable CONFIG_DEBUG_INFO_DWARF4
scripts/config --disable CONFIG_DEBUG_INFO_DWARF5
scripts/config --disable CONFIG_DEBUG_INFO_BTF
scripts/config --disable CONFIG_DEBUG_INFO_REDUCED
scripts/config --disable CONFIG_DEBUG_INFO_COMPRESSED_NONE
scripts/config --disable CONFIG_DEBUG_INFO_COMPRESSED_ZLIB
scripts/config --disable CONFIG_DEBUG_INFO_COMPRESSED_ZSTD
scripts/config --disable CONFIG_DEBUG_INFO_SPLIT
scripts/config --disable CONFIG_GDB_SCRIPTS
scripts/config --disable CONFIG_MODULE_COMPRESS_NONE
scripts/config --enable CONFIG_MODULE_COMPRESS_ZSTD
‘’’ - make olddefconfig / make -j$(nproc)