Issue with Building Linux Kernel Single module


#1

Hi,

I downloaded Legato Linux Distribution Legato-Dist-Source-mdm9x28-SWI9X07Y_02.09.02.00.tar.bz2 . I extracted this distro. I also have toolchain installed in my machine. I am build for WP76 module.
I am trying to build only serial module with following command in Kernel directory:

make ARCH=arm CROSS_COMPILE=/opt/swi/y22-ext/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi- M=drivers/usb/serial/

But I am stuck at following error:

ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run ‘make oldconfig && make prepare’ on kernel src to fix it.

WARNING: Symbol version dump ./Module.symvers
is missing; modules will have no dependencies and modversions.

LD drivers/usb/serial/built-in.o
Building modules, stage 2.
./scripts/Makefile.modpost:42: include/config/auto.conf: No such file or directory
make[1]: *** No rule to make target `include/config/auto.conf’. Stop.
make: *** [modules] Error 2

And if I run

make ARCH=arm CROSS_COMPILE=/opt/swi/y22-ext/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

then I get following error:

arch/arm/kernel/hibernate.c: In function ‘swsusp_arch_suspend’:
arch/arm/kernel/hibernate.c:82:9: error: too many arguments to function ‘cpu_suspend’
return cpu_suspend(0, arch_save_image);
^~~~~~~~~~~
In file included from arch/arm/kernel/hibernate.c:22:0:
./arch/arm/include/asm/suspend.h:10:12: note: declared here
extern int cpu_suspend(unsigned long);
^~~~~~~~~~~
make[1]: *** [arch/arm/kernel/hibernate.o] Error 1
make: *** [arch/arm/kernel] Error 2

Can someone please help?

Thanks,
Yogesh


#2

Hi,

I am able to build to build the image with “make image” command in yocto folder. But now build is failing at the last step while creating the image. Below is the log:

make image
Makefile:30: “Legato: build disabled since ‘/home/warlord/legato_source/yocto/legato/’ does not exist”
“meta-swi-extras/build.sh” -p poky/ -o meta-openembedded/ -l meta-swi -x “kernel/.git” -j 9 -t 9 -a “LK_REPO=”/home/warlord/legato_source/yocto/lk"" -m swi-mdm9x28 -b build_bin -q
Poky dir: /home/warlord/legato_source/yocto/poky
OE meta: /home/warlord/legato_source/yocto/meta-openembedded
SWI meta dir: /home/warlord/legato_source/yocto/meta-swi
Linux repo dir: /home/warlord/legato_source/yocto/kernel/.git
Number of make threads 9
Number of bitbake tasks 9
Extra options added - LK_REPO=/home/warlord/legato_source/yocto/lk
SWI machine: swi-mdm9x28
Build dir: /home/warlord/legato_source/yocto/build_bin
Enable Qualcomm Proprietary bin

Shell environment set up for builds.

You can now run 'bitbake ’

Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
adt-installer
meta-ide-support

You can also run generated qemu images with a command like ‘runqemu qemux86’

  • layer: meta-swi-mdm9xxx
  • layer: meta-swi-mdm9x28
  • layer: meta-swi/common
  • layer: meta-oe
  • layer: meta-networking
  • layer: meta-python
  • layer: meta-swi-extras/meta-swi-mdm9x28-bin
  • layer: meta-swi-extras/common
  • layer: meta-swi-extras/meta-swi-mdm9x28
    Updating LEGATO_BUILD to false
    Updating ROOTFS_VERSION to
    Updating LK_REPO to /home/warlord/legato_source/yocto/lk
    Updating INITRAMFS_IMAGE_BUNDLE to 1
    Updating INITRAMFS_IMAGE to mdm9x28-image-initramfs
    Updating FIRMWARE_PATH to
    Build image of minimal rootfs (for swi-mdm9x28).
    Loading cache: 100% |###############################################################################################################################| ETA: 00:00:00
    Loaded 2102 entries from dependency cache.
    Parsing recipes: 100% |#############################################################################################################################| Time: 00:00:37
    Parsing of 1627 .bb files complete (1625 cached, 2 parsed). 2103 targets, 202 skipped, 0 masked, 0 errors.
    NOTE: Resolving any missing task queue dependencies
    NOTE: multiple providers are available for runtime gps-utils (gps-utils, gpsd)
    NOTE: consider defining a PREFERRED_PROVIDER entry to match gps-utils
    NOTE: multiple providers are available for jpeg-native (jpeg-native, libjpeg-turbo-native)
    NOTE: consider defining a PREFERRED_PROVIDER entry to match jpeg-native

Build Configuration:
BB_VERSION = “1.24.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “Ubuntu-14.04”
TARGET_SYS = “arm-poky-linux-gnueabi”
MACHINE = “swi-mdm9x28”
DISTRO = “poky-swi-ext”
DISTRO_VERSION = “1.7.3”
TUNE_FEATURES = “arm armv7a vfp neon”
TARGET_FPU = “vfp-neon”
meta
meta-yocto
meta-yocto-bsp = “(nobranch):c282df8993828bd7b1d50cfcf637a477eaf481a1”
meta-python
meta-networking
meta-oe = “(nobranch):70beecb2716bca1b9dfbc7d6a264233e1f05e82b”
common
meta-swi-mdm9xxx
meta-swi-mdm9x28 = “master:95d759c58243a20e19c92039a13acb6de29bf6b9”
meta-swi-mdm9x28
common
meta-swi-mdm9x28-bin
meta-swi-mdm9x28
common = “master:341909ed82cbcf113693825e1d42fbaf1e0ce315”

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Error: The image creation script ‘/home/warlord/legato_source/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/create_image.2k.yaffs2’ returned 127:
/home/warlord/legato_source/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/create_image.2k.yaffs2: line 106: mkyaffs2image: command not found
WARNING: /home/warlord/legato_source/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/create_image.2k.yaffs2:1 exit 127 from
mkyaffs2image /home/warlord/legato_source/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs /home/warlord/legato_source/yocto/build_bin/tmp/deploy/images/swi-mdm9x28/mdm9x28-image-minimal-swi-mdm9x28-20180212063538.rootfs.2k.yaffs2

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/warlord/legato_source/yocto/build_bin/tmp/work/swi_mdm9x28-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/temp/log.do_rootfs.584
ERROR: Task 9 (/home/warlord/legato_source/yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image-minimal.bb, do_rootfs) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 2101 tasks of which 2098 didn’t need to be rerun and 1 failed.
No currently running tasks (2100 of 2886)

Summary: 1 task failed:
/home/warlord/legato_source/yocto/meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image-minimal.bb, do_rootfs
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
make: *** [image_bin] Error 1

Can someone provide some insight?

Thanks,
Yogesh


#3

I’ve been fighting with the same problem. I’m still trying to track down why the mkyaffs2image command isn’t found. I did discover if I run make image_bin a second time the build finishes. Seems like the build scripts don’t know where to find mkyaffs2image until the second run.


#4

Updating to the newest toolchain and yocto source fixed the issue for me. I think the older toolchain script wasn’t building something correctly.