1

I'm trying to get into linux kernels and I found a nice book which I wanted to read. Starting requirement is a readily built kernel which I'm trying to achieve for a few days now. As of now I'm running Debian Squeeze with a 2.6.32-5 kernel which is also the version I'd like to "recompile". The setup is on a VM running Ubuntu as host. I also got enough space left (~21GB).

The last manual I followed is “Compiling a New Kernel” in the Debian jessie release notes.

So I went to my unzipped kernel package I got from kernel.org and ran

make menuconfig #(left the defaults there)
make-kpkg clean
fakeroot make-kpkg --initrd --revision=1.0.custom kernel_image

This results in this output:

====== making target debian/stamp/conf/minimal_debian [new prereqs: ]======
This is kernel package version 13.014+nmu1.
test -d debian             || mkdir debian
test ! -e stamp-building || rm -f stamp-building
install -p -m 755 /usr/share/kernel-package/rules debian/rules
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do                                      \
            cp -f  /usr/share/kernel-package/$file ./debian/;                               \
        done
for dir  in Config docs examples ruleset scripts pkg po;  do                                      \
          cp -af /usr/share/kernel-package/$dir  ./debian/;                                 \
        done
test -f debian/control || sed         -e 's/=V/2.6.32.5/g'  \
                -e 's/=D/1.0.custom/g'         -e 's/=A/amd64/g'  \
    -e 's/=SA//g'  \
    -e 's/=I//g'                    \
    -e 's/=CV/2.6/g'                \
    -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g'             \
    -e 's/=ST/linux/g'      -e 's/=B/x86_64/g'    \
                -e 's/=R//g'    /usr/share/kernel-package/Control > debian/control
test -f debian/changelog ||  sed -e 's/=V/2.6.32.5/g'       \
            -e 's/=D/1.0.custom/g'        -e 's/=A/amd64/g'       \
            -e 's/=ST/linux/g'     -e 's/=B/x86_64/g'         \
            -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g'                            \
             /usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
test -d ./debian/stamp || mkdir debian/stamp
make -f debian/rules debian/stamp/conf/kernel-conf
make[1]: Entering directory '/root/kernel/linux-2.6.32.5'
====== making target debian/stamp/conf/kernel-conf [new prereqs: ]======
make    ARCH=x86_64 \
                    oldconfig;
make[2]: Entering directory '/root/kernel/linux-2.6.32.5'
scripts/kconfig/conf -o arch/x86/Kconfig
#
# configuration written to .config
#
make[2]: Leaving directory '/root/kernel/linux-2.6.32.5'
make    ARCH=x86_64 prepare
make[2]: Entering directory '/root/kernel/linux-2.6.32.5'
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      kernel/bounds.s
  GEN     include/linux/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/asm/asm-offsets.h
  CALL    scripts/checksyscalls.sh
make[2]: Leaving directory '/root/kernel/linux-2.6.32.5'
echo done > debian/stamp/conf/kernel-conf
make[1]: Leaving directory '/root/kernel/linux-2.6.32.5'
make -f debian/rules debian/stamp/conf/full-changelog
make[1]: Entering directory '/root/kernel/linux-2.6.32.5'
====== making target debian/stamp/conf/full-changelog [new prereqs: ]======
for file in ChangeLog  Control  Control.bin86 config templates.in rules; do             \
     cp -f  /usr/share/kernel-package/$file ./debian/;          \
done
for dir  in Config docs examples ruleset scripts pkg po;    do              \
   cp -af /usr/share/kernel-package/$dir  ./debian/;                \
done
install -p -m 755 /usr/share/kernel-package/rules debian/rules
sed         -e 's/=V/2.6.32.5/g'  \
                -e 's/=D/1.0.custom/g'         -e 's/=A/amd64/g'  \
    -e 's/=SA//g'  \
    -e 's/=I//g'                    \
    -e 's/=CV/2.6/g'                \
    -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g'             \
    -e 's/=ST/linux/g'      -e 's/=B/x86_64/g'    \
                -e 's/=R//g'  /usr/share/kernel-package/Control > debian/control
sed -e 's/=V/2.6.32.5/g' -e 's/=D/1.0.custom/g'       \
    -e 's/=A/amd64/g' -e 's/=M/Unknown Kernel Package Maintainer <unknown@unconfigured.in.etc.kernel-pkg.conf>/g' \
    -e 's/=ST/linux/g'   -e 's/=B/x86_64/g'       \
    /usr/share/kernel-package/changelog > debian/changelog
chmod 0644 debian/control debian/changelog
make -f debian/rules debian/stamp/conf/kernel-conf
make[2]: Entering directory '/root/kernel/linux-2.6.32.5'
make[2]: 'debian/stamp/conf/kernel-conf' is up to date.
make[2]: Leaving directory '/root/kernel/linux-2.6.32.5'
make[1]: Leaving directory '/root/kernel/linux-2.6.32.5'
echo done > debian/stamp/conf/minimal_debian
====== making target debian/stamp/conf/vars [new prereqs: ]======

====== making target debian/stamp/build/kernel [new prereqs: vars]======
This is kernel package version 13.014+nmu1.
restore_upstream_debianization
test ! -f scripts/package/builddeb.kpkg-dist || mv -f scripts/package/builddeb.kpkg-dist scripts/package/builddeb
test ! -f scripts/package/Makefile.kpkg-dist || mv -f scripts/package/Makefile.kpkg-dist scripts/package/Makefile
/usr/bin/make    ARCH=x86_64 \
             bzImage
make[1]: Entering directory '/root/kernel/linux-2.6.32.5'
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALL    scripts/checksyscalls.sh
  HOSTCC  scripts/genksyms/genksyms.o
  SHIPPED scripts/genksyms/lex.c
  SHIPPED scripts/genksyms/parse.h
  SHIPPED scripts/genksyms/keywords.c
  HOSTCC  scripts/genksyms/lex.o
  SHIPPED scripts/genksyms/parse.c
  HOSTCC  scripts/genksyms/parse.o
  HOSTLD  scripts/genksyms/genksyms
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  CC      init/main.o
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  CC      init/do_mounts.o
  CC      init/do_mounts_initrd.o
  LD      init/mounts.o
  CC      init/initramfs.o
  CC      init/calibrate.o
  LD      init/built-in.o
  HOSTCC  usr/gen_init_cpio
  GEN     usr/initramfs_data.cpio
  AS      usr/initramfs_data.o
  LD      usr/built-in.o
  LD      arch/x86/crypto/built-in.o
  AS      arch/x86/ia32/ia32entry.o
  CC      arch/x86/ia32/sys_ia32.o
  CC      arch/x86/ia32/ia32_signal.o
  CC      arch/x86/ia32/ipc32.o
  CC      arch/x86/ia32/ia32_aout.o
  CC      arch/x86/ia32/audit.o
  LD      arch/x86/ia32/built-in.o
  CC      arch/x86/kernel/process_64.o
  CC      arch/x86/kernel/signal.o
  AS      arch/x86/kernel/entry_64.o
scripts/Makefile.build:265: recipe for target 'arch/x86/kernel/entry_64.o' failed
scripts/Makefile.build:365: recipe for target 'arch/x86/kernel' failed
Makefile:878: recipe for target 'arch/x86' failed
make[1]: Leaving directory '/root/kernel/linux-2.6.32.5'
debian/ruleset/targets/common.mk:295: recipe for target 'debian/stamp/build/kernel' failed

I am experienced in UNIX-usage (been using Linux for some years) but have no clue about kernels so far. Anyone able to help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.