Correct way to configure and rebuild kernel


#1

Hello there.
I need to make some configuration and probably dtb changes in legato kernel
for my mangoh + wp7607-1.

Is there any tutorial how to do it?

It takes a lot of time to rebuild everything.

An always there ares some issues.

  1. poky-swi-ext-glibc-x86_64-meta-~neon-toolchain-swi-ext-2.2.3.sh│
    downloaded version and the one generated by me complains about some modules

scripts/kconfig/conf --silentoldconfig Kconfig
drivers/soc/qcom/Kconfig:368:warning: choice value used outside its choice group
drivers/soc/qcom/Kconfig:373:warning: choice value used outside its choice group
warning: (SND_SOC_QDSP6V2) selects SND_SOC_MSM_QDSP6V2_INTF which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && MSM_QDSP6_APRV2)
warning: (SND_SOC_QDSP6V2) selects SND_SOC_MSM_QDSP6V2_INTF which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && MSM_QDSP6_APRV2)
make -f ./scripts/Makefile.build obj=scripts/basic

  1. Error while Kernel configuration using menuconfig
    menuconfig window opens with"Linux/x86 4.8.26 Kernel Configuration"

  2. is mdm9607_defconfig used for build it ???

  3. building example kernel module with legato-18.03.0 fails like this:
    Modelling module defined in: ‘/home/user/sierra/legato-18.03.0/drivers/mangoh/mangoh.mdef’
    ** ERROR:
    /home/user/sierra/legato-18.03.0/drivers/mangoh/mangoh.mdef: error: ‘usr/src/kernel’ is not a valid kernel source directory.

where to define KDIR ???

  1. Build Linux for wp76
    method with bitbake linux-quic seem sto outdated,
    and Legato-Dist-Source-mdm9x28-SWI9X07Y_02.16.02.00.tar.bz2 does not contain build_src

  2. by the way Legato-Dist… and “make image_bin” produces old version of legato


#2

well after a long compilation night, finally it works:

here are correct steps in correct order:

tar jxf net/Legato-Dist-Source-mdm9x28-SWI9X07Y_02.16.02.00.tar.bz2
cd yocto
make image_bin

. /poky/oe-init-build-env
cd ../build_bin #this is important!

bitbake -c listtasks linux-quic
bitbake -c menuconfig linux-quic
# I also need to modify also some Kconfig to select items not shown in menu
cp tmp/work/swi_mdm9x28-poky-linux-gnueabi/linux-quic/3.18.44-r1/build/.config \ 
       ../kernel/arch/arm/configs/mdm9607_defconfig

cd ..
make image_bin
make toolchain

and finaly

  • generated poky-swi-ext-glibc-x86_64-meta-~neon-toolchain-swi-ext-2.2.3.sh installs correct
  • I can generate example.ko with
    ./bin/legs
    make wp76xx

#3

Another way to get into a ‘bitbake-ready’ environment is to run make dev_bin (or make dev).