[beaglebone] ubuntu make error No such file or directory

4,034 views
Skip to first unread message

vitoracmm

unread,
Feb 23, 2012, 9:05:11 PM2/23/12
to Beagle Board
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

Robert Nelson

unread,
Feb 23, 2012, 9:19:29 PM2/23/12
to beagl...@googlegroups.com
On Thu, Feb 23, 2012 at 8:05 PM, vitoracmm <vitor.m...@gmail.com> wrote:
> Hi, I can I solve the following error :
>
> make: *** /lib/modules/3.2.0-psp1/build: No such file or directory.

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,

--
Robert Nelson
http://www.rcn-ee.com/

vitoracmm

unread,
Feb 27, 2012, 11:32:38 PM2/27/12
to Beagle Board
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

vitoracmm

unread,
Feb 27, 2012, 11:40:38 PM2/27/12
to Beagle Board
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

Robert Nelson

unread,
Feb 27, 2012, 11:58:12 PM2/27/12
to beagl...@googlegroups.com


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

vitoracmm

unread,
Feb 28, 2012, 12:40:51 AM2/28/12
to Beagle Board
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






Robert Nelson

unread,
Feb 28, 2012, 10:28:48 AM2/28/12
to beagl...@googlegroups.com

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/

vitoracmm

unread,
Feb 28, 2012, 10:37:35 AM2/28/12
to Beagle Board
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

Robert Nelson

unread,
Feb 28, 2012, 10:47:04 AM2/28/12
to beagl...@googlegroups.com
On Tue, Feb 28, 2012 at 9:37 AM, vitoracmm <vitor.m...@gmail.com> wrote:
> Sorry, can u explain better the steps to do
>
> I have to download  patch-3.2-psp1.diff.gz
> And how to apply patch?

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..

vitoracmm

unread,
Feb 28, 2012, 11:20:34 AM2/28/12
to Beagle Board
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:
--------------------------
|diff --git a/Documentation/arm/memory.txt b/Documentation/arm/
memory.txt
|index 771d48d..208a2d4 100644
|--- a/Documentation/arm/memory.txt
|+++ b/Documentation/arm/memory.txt
--------------------------
File to patch:

It is asking a file to patch...


root@omap:/lib/modules/3.2.0-psp1/build# cp defconfig .config

The copy seem to went ok...




Robert Nelson

unread,
Feb 28, 2012, 11:42:32 AM2/28/12
to beagl...@googlegroups.com
On Tue, Feb 28, 2012 at 10:20 AM, vitoracmm <vitor.m...@gmail.com> wrote:
> I'm miss something..

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

vitoracmm

unread,
Feb 28, 2012, 12:53:44 PM2/28/12
to Beagle Board
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 :/









Robert Nelson

unread,
Feb 28, 2012, 1:35:12 PM2/28/12
to beagl...@googlegroups.com

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 :/

Nah, you've just never done it before. .;)

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..

vitoracmm

unread,
Feb 28, 2012, 5:21:21 PM2/28/12
to Beagle Board
Tanks a lot, finally I got the 8192cu.ko :)

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

Reply all
Reply to author
Forward
0 new messages