Dragonboard: kernel file modification

i had pulled this git git://kernel.ubuntu.com/ubuntu/ubuntu-xenial.git

this is my snapcraft.yaml for kernel part

plugin: kernel
source: .
kdefconfig: [defconfig, distro.config]

i had added few printk in drivers/net/usb/smsc75xx.c . “git d” shows the git diffs

After building the kernel snap and merging with gadget, smsc75xx (usb2ethernet) driver is loading in target, but i do not see my kernel logs.
file modification to the driver file is not impacting in the target.

did i miss any method for modification of files in kernel and building?


Hi, I am trying to do something similar but did you figure out what the problem was?

file modifications will not work. you need to create a patch and apply the patch in snapcraft.yaml

Can you please post how your snapcraft.yaml looks like then?
Thank you.

 kconfigflavour: snapdragon
  •  - CONFIG_LOCALVERSION="-ifc63b0"
    kernel-image-target: Image
  • prepare: |
  •        git am --3way ../../../0001-leds-bt-wlan-user-leds-for-ifc63b0.patch
  •        git am --3way ../../../0002-net-usb-smsc75xx-mac-address-read-from-firmware.patch


Initially you wrote the above parameters in your snapcraft.yaml file, but what make to change this to kconfigflavour: snapdragon

Actually i am following this - “https://github.com/96boards/documentation/blob/master/consumer/dragonboard/dragonboard410c/build/kernel.md” as a reference.

In this article kernel version is “qcomlt-4.14” and to build we used $make defconfig distro.config command which you have wrote in your first snapcraft.yaml file.
But later on, you have changed to kconfigflavour: snapdragon.

My question is are you using some other version of kernel for dragonboard 410c which made to change this parameters ?

snapdragon is the correct kconfigflavour name when using an ubuntu source tree …

Hello @ogra,

Sorry for bothering you again!

Why do we use kconfigflavour if we already using kdefconfig. in armhf arch.
Is there any dependency of arch while choosing these parameters?

What ubuntu source tree signify here ?

debian based kernels usually use config “flavours” which are assembled from a bunch of generic defaults (true for all kernels on all arches for an ubuntu kernel) plus hardware related bits on top … these flavour configs are assembled from bunch of scripts in the debian directory.

so if you use a kernel source tree from kernel.ubuntu.com and just re-build it to make a minor config change, use the kconfigflavour plus kconfg overrides …

upstream or BSP kernels usually ship with a defconfig file … the kernel plugin allows you here as well to assemble a complete config from multiple snippets, but using its internal scriptery instead …

here is an example using kconfigflavour and overrides via kconfig:

while the one below uses a BSP kernel from raspberrypi.org with the default kdefconfig and a bunch of ubuntu core related config snippets i ship as patches:

Thanku @ogra for your explanations & for being supportive :slight_smile: