Building custom ubuntu xenial kernel

Yihua Fang fang.yihua.eric at gmail.com
Mon Mar 4 20:20:51 UTC 2019


Thanks a lot for answering. Answers inline.
On Sun, Mar 3, 2019 at 11:47 PM Juerg Haefliger <
juerg.haefliger at canonical.com> wrote:

> On Fri, 15 Feb 2019 14:49:05 -0800
> Yihua Fang <fang.yihua.eric at gmail.com> wrote:
>
> > Hi,
> >
> > I am new to building the ubuntu kernel. I have found numerous tutorial
> > online, but may are deprecated or offers only part of the information.
> >
> > I am trying to build a ubuntu kernel with edits to some of Kconfig and
> > add/remove some drivers. I mostly
>
> Mostly? where did you deviate from the instructions?
>

After a success build, I tried clean, editconfigs, then build. I also tried
genconfigs instead of editconfigs. Both didn't pick up the changed Kconfig.
Maybe it's because I only changed the default value?


>
> > followed this instruction (
> > https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel). It builds .deb
> > successfully for the stock source code, however it will not pick up my
> > changes to Kconfigs.
>
> Hard to tell what's going on without more data. Can post the build logs and
> the steps your taking?
>

>
> > Also, I seems to need to run `fakeroot debian/rules clean` on every
> build,
> > or the build system complaint certain directory are already created. This
> > takes quite a while to rebuild each time, so I wonder if there is a
> faster
> > compile cycle?
>
> I think you do want to start clean. How long is 'quite a while'?
>

If I don't run `fakeroot debian/rules clean` everytime, the build returns:
"""
mv: cannot move
'/home/yfang/default/kernel/ubuntu/ubuntu-xenial/debian/linux-modules-4.15.0-46-generic/lib/modules/4.15.0-46-generic/kernel'
to
'/home/yfang/default/kernel/ubuntu/ubuntu-xenial/debian/linux-modules-extra-4.15.0-46-generic/lib/modules/4.15.0-46-generic/kernel/kernel':
Directory not empty
debian/rules.d/2-binary-arch.mk:123: recipe for target 'install-generic'
failed
"""
I tried to remove these directory manually but there are a lot more. This
leads me to believe there is a faster way of building the kernel in tree
and incrementally for development purposes. A clean build on the mainline
kernel on the same machine takes about 6-8 minutes where as a clean build
with `fakeroot debian/rule binary-generic binary-headers` takes a good
20-30 minutes each time.


>
> ...Juerg
>
>
> > Thanks a lot in advance.
> > Eric
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190304/b02972c7/attachment-0001.html>


More information about the kernel-team mailing list