6

I am on Ubuntu 18.04 and I am trying to build my own kernel by this guide and this guide.

Unfortunately the command:

AUTOBUILD=1 fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbg=false

Give me this error:

dh binary-headers
dh: Unknown sequence binary-headers (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)
debian/rules:35: recipe for target 'binary-headers' failed
make: *** [binary-headers] Error 2

I suspect the guide is not updated, and I searched a lot about rules script recipies list, but I did not find anything useful.

Could somebody help me?

Thank you!

Edit 1 The allowed recipies are binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep but with these does not yet produce a kernel with embedded debug symbols.

Edit 2 Debian rules are stored into /usr/src/linux-source-{KERNEL-VERSION}/debian/rules.d and into 0-common-vars.mk you can find all the allowed switches.

0

If you are looking for Debug Symbols (dbgsym) of unmodified kernel then just download them from the official repository, as documented in these:

Otherwise for any kernel from other sources (as Debian package).

  • Ubuntu Wiki - Build Your Own Kernel: Debug Symbols

    All you need to do is just install pkg-config-dbgsym package and add skipdbg=false flag to Debian make file (debian/rules)

    sudo apt-get install pkg-config-dbgsym
    LANG=C fakeroot debian/rules clean
    LANG=C fakeroot debian/rules binary-headers binary-generic binary-perarch skipdbg=false
    

    Important Note clean command here is a must after changing config, adding flags or missed to install some build dependencies. So for each try, you need to run clean command, make will reconfigure the build tree with updated and current settings.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.