A recent upgrade of Yocto, from Dora to Daisy, broke the things worked before. Actually, CONFIG_USB_MASS_STORAGE, enabled in the defconfig of the Overo, was not passed to the .config during the kernel build. This weird missing config costed me 24-hour debugging. And it turns out nobody was doing wrong but bitbake could do better indeed. This post talks about building Gumstix image using Yocto Daisy, the missing kernel config, and debug and the take away in the summary. Happy debug!
0. Build the Gumstix Overo image using Yocto Daisy
The Gumstix-Yocto-Repo now uses Yocto Daisy as the default/master branch for its recipes. Before following the gumstix-yocto building procedure, we have to update the Yocto into Daisy:
0.0. Quick Start
0.1. Download the SDK
0.2. Download the toolchain (for 1.6)
0.4. Check the Yocto version before build (make sure Daisy is invoked instead of others, like Dora)
1. The missing config – CONFIG_USB_MASS_STORAGE
Before “bitbake gumstix-consle-image” is submitted, the new config CONFIG_USB_MASS_STORAGE is enabled as a module in the defconfig of the Overo kernel recipe. Then weird thing happened. The USB mass storage kernel module was not contained in the modules.tgz. Actually, it had never been built.
While the kernel source code locates within the git directory under build/tmp/work/overo-poky-linux-gnueabi/linux-gumstix/3.5.7-r0, the building directory is linux-overo-standard-build under the same directory. Checking the .config for the previous build, I found no config for the USB mass storage was enabled. A direct doubt was something wrong with the bb file, as “bitbake -f -c virtual/kernel” triggers the parsing of “poky/meta-gumstix/recipes-kernel/linux/linux-gumstix_3.5.7.bb“. And the parse was good because the defconfig was located under /tmp/work/overo-poky-linux-gnueabi/linux-gumstix/3.5.7-r0, as well as bunch of patch files. After hours and hours debugging, “bitbake -v -D -f -c virtual/kernel” showed the clue:
scripts/kconfig/conf –silentoldconfig Kconfig
.config:2751:warning: override: USB_CDC_COMPOSITE changes choice state
# configuration written to .config
The kernel config checking tool ‘conf’ reported an warning about a config conflict and a config rewriting because of this conflict. After disabling CONFIG_USB_CDC_COMPOSITE in the defconfig, we now have the USB mass storage kernel module.
CONFIG_USB_CDC_COMPOSITE was disabled in the Dora recipes but is enabled in the Daisy recipes for certain reasons. The bug could be found easily by normal “make menuconfig” as it is reported as a warning. However, bitbake silences the warning and makes everything look well even if the .config has been rewritten because of some config conflict.
What’s up, just wanted to mention, I loved this article.
It was practical. Keep on posting!
It’s amazing to pay a quick visit this web site and reading the
views of all friends concerning this piece of writing,
while I am also keen of getting knowledge.