0

I'm trying to build a custom variant of the 3.13.0-43 kernel on Ubuntu 14.04. Following the normal procedure (directions posted at https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel) is not working for me if I setup a local version value (i.e. "-custom") during the "make menuconfig" phase of the build.

Everything actually builds clean, but at the end of the process when things are getting packaged up, I run into a problem within the execution of debian/rules.d/2-binary-arch.mk; The file attempts to "Remove all modules not in the inclusion list" and the argument passed into $* contains the word "generic" instead of "generic-custom" like it should.

This causes the mv command on line 130 to fail because the kernel build output didn't get stored in a path named [...]generic, it was in [...]generic-custom

    #
    # Remove all modules not in the inclusion list.
    #
    if [ -f $(DEBIAN)/control.d/$(target_flavour).inclusion-list ] ; then \
            mkdir -p $(pkgdir_ex)/lib/modules/$(abi_release)-$*; \

==>>> Problem first manifests here $* is "generic" instead of "generic-custom":
            mv $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
                    $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel; \


            $(SHELL) $(DROOT)/scripts/module-inclusion --master \
                    $(pkgdir_ex)/lib/modules/$(abi_release)-$*/kernel \
                    $(pkgdir)/lib/modules/$(abi_release)-$*/kernel \
                    $(DEBIAN)/control.d/$(target_flavour).inclusion-list 2>&1 | \
                            tee $(target_flavour).inclusion-list.log; \
            /sbin/depmod -b $(pkgdir) -ea -F $(pkgdir)/boot/System.map-$(abi_release)-$* \
                    $(abi_release)-$* 2>&1 |tee $(target_flavour).depmod.log; \
            if [ `grep -c 'unknown symbol' $(target_flavour).depmod.log` -gt 0 ]; then \
                    echo "EE: Unresolved module dependencies in base package!"; \
                    exit 1; \
            fi \
    fi

I assume some top level input is getting missed and this is probably a simple script or makefile tweak to correct, but I'm not familiar enough with the debian style build system to find it quickly.

Has anyone seen this before and can point out what to tweak?

1 Answer 1

0

So, I'm having the exact same problem you're having. While I haven't tried it yet, there are alternate steps on the GitKernelBuild page which look much more promising. Full disclaimer, I haven't tried it yet, but I was planning to when I get home. Also, the description for the "BuildYourOwnKernel" on https://wiki.ubuntu.com/Kernel/Dev lists it as a "minimalist kernel build guide," so I'm sure some things are missing. I hope this helps!

On a side note, I'm quite disappointed with the Ubuntu wiki; there are many duplicated topics with varying levels of being up-to-date. It's quite a mess.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .