[beaglebone] ubuntu make error No such file or directory

Hi, I can I solve the following error :

make: *** /lib/modules/3.2.0-psp1/build: No such file or directory.
Stop.
make: *** [modules] Error 2

Regards

Did you install the kernel headers?

It's not installed by default to save space..

http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/linux-headers-3.2.0-psp1_1.0oneiric_armel.deb

Although, you'll probally still have to symlink it back to the build
dir.. mainline 'make deb-pkg' isn't perfect for generating
linux-headers..

Regards,

Hi, i think that something went wrong because i get again the error
for a make

make[1]: Entering directory `/lib/modules/3.2.0-psp1/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/3.2.0-psp1/build'
make: *** [modules] Error 2

I done
dpkg --install linux-headers-3.2.0-psp1_1.0oneiric_armel.deb

Was that the correct way to install headers to /lib/modules/3.2.0-psp1/
build ?

Regards

I also done ln -s /usr/src/linux-headers-3.2.0-psp1/ /lib/modules/
3.2.0-psp1/build
to get the symlink

but now the error is other like :

make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/3.2.0-psp1/build M=/
home/ubuntu/rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103
modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-psp1'
Makefile:567: /usr/src/linux-headers-3.2.0-psp1/arch/armv7l/Makefile:
No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-headers-3.2.0-psp1/
arch/armv7l/Makefile'. Stop.
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-psp1'
make: *** [modules] Error 2

Any help is welcome

ARCH=arm... not 'armv7l'...

Regards,

Tanks, my mistake
I'm a new to linux..

I have to add in the Makefile the following

CONFIG_PLATFORM_ARM_BEAGLE = y

ifeq ($(CONFIG_PLATFORM_ARM_BEAGLE), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
ARCH := arm
CROSS_COMPILE := arm-linux-gnueabi-
KVER := 3.2.0-psp1
KSRC ?= /usr/src/linux-headers-3.2.0-psp1/
endif

but now facing another problem:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -C /usr/src/linux-
headers-3.2.0-psp1/ M=/home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-psp1'
  CC [M] /home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/core/rtw_cmd.o
In file included from include/linux/timex.h:174:0,
                 from include/linux/jiffies.h:8,
                 from include/linux/ktime.h:25,
                 from include/linux/timer.h:5,
                 from include/linux/workqueue.h:8,
                 from include/linux/kmod.h:26,
                 from include/linux/module.h:13,
                 from /home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/include/
osdep_service.h:46,
                 from /home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/core/rtw_cmd.c:23:
/usr/src/linux-headers-3.2.0-psp1/arch/arm/include/asm/timex.h:15:24:
fatal error: mach/timex.h: No such file or directory
compilation terminated.
make[2]: *** [/home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/core/rtw_cmd.o]
Error 1
make[1]: *** [_module_/home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-psp1'
make: *** [modules] Error 2

Any ideia?
Regards

Sorry, that's yet, another annoying thing that happens for only ARM
devices with "linux-headers"..

Since it needs something from the mach dir, your going to just have to
use the full source..

Download v3.2, apply patch and copy defconfig from:
http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/

Regards,

Sorry, can u explain better the steps to do

I have to download patch-3.2-psp1.diff.gz
And how to apply patch?

And copy defconfig to where?

Tanks

ahh patch...

download: http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/patch-3.2-psp1.diff.gz
download: http://rcn-ee.net/deb/oneiric-armel/v3.2.0-psp1/defconfig

cd /mainline/kernel/v3.2/source/

apply patch to kernel source: zcat
/dir/downloaded/patch-3.2-psp1.diff.gz | patch -p1
copy defconfig: cp /dir/downloaded/defconfig .config

Tweak build symlink to new kernel source folder..

Regards,

I'm miss something..

directory /mainline/kernel/v3.2/source/ is the same has /lib/
modules/3.2.0-psp1/build/ or /usr/src/linux-headers-3.2.0-
psp1 ?
They are allready symlinked because I've done ln -s /usr/src/linux-
headers-3.2.0-psp1/ /lib/modules/3.2.0-psp1/build

root@omap:/lib/modules/3.2.0-psp1/build# ls
arch defconfig firmware init kernel
Makefile net scripts tools
block Documentation fs ipc lib
mm patch-3.2-psp1.diff.gz security usr
crypto drivers include Kconfig linux-headers-3.2.0-psp1
Module.symvers samples sound virt

root@omap:/lib/modules/3.2.0-psp1/build# zcat patch-3.2-psp1.diff.gz

patch -p1

can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

Yeap, the full "v3.2" kernel source, mentioned previously...

you can get it via:

wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.tar.bz2

Regards,

Sorry about my confusions but this is not going the easy way for me..

root@omap:/lib/modules/3.2.0-psp1/build# wget
http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.tar.bz2
root@omap:/lib/modules/3.2.0-psp1/build# tar -xvf linux-3.2.tar.bz2
root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# cd linux-3.2

root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# zcat /patch-3.2-
psp1.diff.gz | patch -p1

   patch is applied ok..

root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# cp /
defconfig .config
root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# ln -s /usr/src/
linux-headers-3.2.0-psp1/ /lib/modules/3.2.0-psp1/build

I've changed in Makefile link to KSRC ?= /usr/src/linux-headers-3.2.0-
psp1/linux-3.2/

Now when build driver just have other stuff:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -C /usr/src/linux-
headers-3.2.0-psp1/linux-3.2/ M=/home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-psp1/
linux-3.2'

  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 /usr/src/linux-headers-3.2.0-psp1/
linux-3.2/Module.symvers
           is missing; modules will have no dependencies and
modversions.

  Building modules, stage 2.
/usr/src/linux-headers-3.2.0-psp1/linux-3.2/scripts/Makefile.modpost:
42: include/config/auto.conf: No such file or directory
make[2]: *** No rule to make target `include/config/auto.conf'. Stop.
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-psp1/
linux-3.2'
make: *** [modules] Error 2

Any problem with symlink?

So much confusion just to make the system ready to build a simple
driver :confused:

Sorry about my confusions but this is not going the easy way for me..

root@omap:/lib/modules/3.2.0-psp1/build# wget
http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.tar.bz2
root@omap:/lib/modules/3.2.0-psp1/build# tar -xvf linux-3.2.tar.bz2
root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# cd linux-3.2

root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# zcat /patch-3.2-
psp1.diff.gz | patch -p1

patch is applied ok..

root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# cp /
defconfig .config
root@omap:/lib/modules/3.2.0-psp1/build/linux-3.2# ln -s /usr/src/
linux-headers-3.2.0-psp1/ /lib/modules/3.2.0-psp1/build

I've changed in Makefile link to KSRC ?= /usr/src/linux-headers-3.2.0-
psp1/linux-3.2/

Now when build driver just have other stuff:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -C /usr/src/linux-
headers-3.2.0-psp1/linux-3.2/ M=/home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-psp1/
linux-3.2'

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.

Hint: Read ^^^ =;) (that's why you had to copy the defconfig to that
dir as .config, your basicly going to be rebuilding the whole
kernel..)

WARNING: Symbol version dump /usr/src/linux-headers-3.2.0-psp1/
linux-3.2/Module.symvers
is missing; modules will have no dependencies and
modversions.

Building modules, stage 2.
/usr/src/linux-headers-3.2.0-psp1/linux-3.2/scripts/Makefile.modpost:
42: include/config/auto.conf: No such file or directory

This file is created when you fix the error above

make[2]: *** No rule to make target `include/config/auto.conf'. Stop.
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-psp1/
linux-3.2'
make: *** [modules] Error 2

Any problem with symlink?

So much confusion just to make the system ready to build a simple
driver :confused:

Nah, you've just never done it before. .:wink:

Some of the confusion would be gone, if the upsteam "rtlwifi" driver
in the "3.2-psp1" worked across all devices.. I have one of these
small wifi modules that works fine with no modification to the current
demo image.. While another refuses to work.. Of course the both work
fine on an x86 machine.. For now, i'd really recommend you use any
other chipset, i've had very good luck with arl9170 based devices on
the bone..

Regards,

Tanks a lot, finally I got the 8192cu.ko :slight_smile:

root@omap:/usr/src/linux-headers-3.2.0-psp1/linux-3.2# make oldconfig
&& make prepare && make modules_prepare

This had solved my last problem

Everything went ok but for curiosity why I got a warning like:

make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-headers-3.2.0-psp1/
linux-3.2/ M=/home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-psp1/
linux-3.2'

  WARNING: Symbol version dump /usr/src/linux-headers-3.2.0-psp1/
linux-3.2/Module.symvers
           is missing; modules will have no dependencies and
modversions.

  CC [M] /home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/core/rtw_cmd.o
  CC [M] /home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/core/
rtw_security.o
..
..
..
..
Building modules, stage 2.
  MODPOST 1 modules
  CC /home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/8192cu.mod.o
  LD [M] /home/ubuntu/
rtl8188C_8192C_8192D_usb_linux_v3.3.2_3192.20120103/8192cu.ko

Regards