Надо включить одну дебаг-опцию, которой в стандартном ядре нет, пытаюсь делать как описано тут https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel, при сборке ядра получаю такое:
t530# fakeroot debian/rules binary-headers binary-generic
Debug: install-headers
dh_testdir
dh_testroot
dh_prep
install -d /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14
find . -path './debian' -prune -o -path './debian.master' -prune \
-o -path './include/*' -prune \
-o -path './scripts/*' -prune -o -type f \
\( -name 'Makefile*' -o -name 'Kconfig*' -o -name 'Kbuild*' -o \
-name '*.sh' -o -name '*.pl' -o -name '*.lds' \) \
-print | cpio -pd --preserve-modification-time /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14
11507 blocks
cp -a scripts include /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14
(find arch -name include -type d -print | \
xargs -n1 -i: find : -type f) | \
cpio -pd --preserve-modification-time /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/openrisc/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/openrisc/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/c6x/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/c6x/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/x86/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/x86/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/unicore32/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/unicore32/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/m32r/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/m32r/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/xtensa/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/xtensa/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/mips/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/mips/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/arch-v10/arch/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/uapi/arch-v10/arch/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/uapi/arch-v32/arch/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/arch-v32/arch/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/arch-v32/arch/hwregs/iop/Makefile not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/cris/include/arch-v32/arch/hwregs/Makefile not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/frv/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/frv/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/avr32/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/avr32/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/s390/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/s390/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/arm/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/arm/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/score/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/score/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/alpha/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/alpha/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/powerpc/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/powerpc/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/tile/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/tile/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/tile/include/uapi/arch/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/tile/include/arch/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/h8300/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/h8300/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/um/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/ia64/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/ia64/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/sparc/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/sparc/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/sh/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/sh/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/blackfin/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/blackfin/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/m68k/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/m68k/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/hexagon/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/hexagon/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/metag/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/metag/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/arm64/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/arm64/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/microblaze/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/microblaze/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/arc/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/arc/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/mn10300/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/mn10300/include/uapi/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/parisc/include/asm/Kbuild not created: newer or same age version exists
cpio: /usr/src/ubuntu-saucy/debian/linux-headers-3.11.0-14/usr/src/linux-headers-3.11.0-14/arch/parisc/include/uapi/asm/Kbuild not created: newer or same age version exists
48686 blocks
Debug: binary-headers
dh_installchangelogs -plinux-headers-3.11.0-14
dh_installdocs -plinux-headers-3.11.0-14
dh_compress -plinux-headers-3.11.0-14
dh_fixperms -plinux-headers-3.11.0-14
dh_installdeb -plinux-headers-3.11.0-14
flock -w 60 /usr/src/ubuntu-saucy/debian/.LOCK dh_gencontrol -plinux-headers-3.11.0-14
dh_md5sums -plinux-headers-3.11.0-14
dh_builddeb -plinux-headers-3.11.0-14
dpkg-deb: building package `linux-headers-3.11.0-14' in `../linux-headers-3.11.0-14_3.11.0-14.21_all.deb'.
Debug: /usr/src/ubuntu-saucy/debian/stamps/stamp-prepare-tree-generic
install -d /usr/src/ubuntu-saucy/debian/build/build-generic
touch /usr/src/ubuntu-saucy/debian/build/build-generic/ubuntu-build
[ "false" != 'true' ] && true || \
rsync -a --exclude debian --exclude debian.master --exclude debian.master * /usr/src/ubuntu-saucy/debian/build/build-generic
cat /usr/src/ubuntu-saucy/debian.master/config/config.common.ubuntu /usr/src/ubuntu-saucy/debian.master/config/amd64/config.common.amd64 /usr/src/ubuntu-saucy/debian.master/config/amd64/config.flavour.generic | sed -e 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu 3.11.0-14.21-generic 3.11.7"/' > /usr/src/ubuntu-saucy/debian/build/build-generic/.config
find /usr/src/ubuntu-saucy/debian/build/build-generic -name "*.ko" | xargs rm -f
make ARCH=x86_64 CROSS_COMPILE= KERNELVERSION=3.11.0-14-generic CONFIG_DEBUG_SECTION_MISMATCH=y KBUILD_BUILD_VERSION="21" LOCALVERSION= localver-extra= CFLAGS_MODULE="-DPKG_ABI=14" O=/usr/src/ubuntu-saucy/debian/build/build-generic -j1 silentoldconfig prepare scripts
make[1]: Entering directory `/usr/src/ubuntu-saucy'
make[3]: Nothing to be done for `/usr/src/ubuntu-saucy/Makefile'.
HOSTCC scripts/basic/fixdep
GEN /usr/src/ubuntu-saucy/debian/build/build-generic/Makefile
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
.config:3276:warning: override: M686 changes choice state
.config:7154:warning: override: MUSB_PIO_ONLY changes choice state
.config:7191:warning: override: SPARSEMEM_MANUAL changes choice state
#
# configuration written to .config
#
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_64.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
Using /usr/src/ubuntu-saucy as source for kernel
/usr/src/ubuntu-saucy is not clean, please run 'make mrproper'
in the '/usr/src/ubuntu-saucy' directory.
make[4]: *** [prepare3] Error 1
make[3]: *** [sub-make] Error 2
make[2]: *** [prepare] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/ubuntu-saucy'
make: *** [/usr/src/ubuntu-saucy/debian/stamps/stamp-prepare-tree-generic] Error 2
Если делать mrproper то он удаляет убунтовские утилиты для сборки. Не могу понять как это починить.