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

I can suggest to try below and let me know.

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

also, try make with sudo.