Solved

Error compiling Geode V4l2 driver - 1.1.8b

Posted on 2003-11-07
25
664 Views
Last Modified: 2008-02-20
Hi all,
  When I compiled "Geode V4l2 driver", version 1.1.8b, the following error occurs.

[root@Suriya v4l2]# make
make: /scripts/pathdown.sh: Command not found
make -C VidLib
make[1]: Entering directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/v4l2/VidLib'
cc -D__KERNEL__ -DMODULE -Wall -O2   -DOS_LINUX -I. -I../durango -I../VidLib -I/usr/include   -c -o vl_os.o vl_os.c
cc1: warning: changing search order for system directory "/usr/include"
cc1: warning:   as it has already been specified as a non-system directory
vl_os.c: In function `OS_Interface_init':
vl_os.c:370: warning: implicit declaration of function `memset'
vl_os.c: In function `OS_Interface_close':
vl_os.c:390: warning: implicit declaration of function `free_irq'
vl_os.c: At top level:
vl_os.c:399: warning: `struct pt_regs' declared inside parameter list
vl_os.c:399: warning: its scope is only this definition or declaration, which is probably not what you want
vl_os.c: In function `OS_InterruptConnect':
vl_os.c:421: warning: implicit declaration of function `request_irq'
vl_os.c: In function `OS_RingCreate':
vl_os.c:472: warning: implicit declaration of function `kmalloc'
vl_os.c:472: `GFP_KERNEL' undeclared (first use in this function)
vl_os.c:472: (Each undeclared identifier is reported only once
vl_os.c:472: for each function it appears in.)
vl_os.c: In function `OS_RingDelete':
vl_os.c:497: warning: implicit declaration of function `kfree'
vl_os.c: In function `OS_PciReadByte':
vl_os.c:581: warning: implicit declaration of function `pcibios_read_config_byte'
vl_os.c: In function `OS_PciWriteByte':
vl_os.c:590: warning: implicit declaration of function `pcibios_write_config_byte'
vl_os.c: In function `OS_PciReadWord':
vl_os.c:599: warning: implicit declaration of function `pcibios_read_config_word'
vl_os.c: In function `OS_PciWriteWord':
vl_os.c:608: warning: implicit declaration of function `pcibios_write_config_word'
vl_os.c: In function `OS_PciReadDWord':
vl_os.c:617: warning: implicit declaration of function `pcibios_read_config_dword'
vl_os.c: In function `OS_PciWriteDWord':
vl_os.c:626: warning: implicit declaration of function `pcibios_write_config_dword'
make[1]: *** [vl_os.o] Error 1
make[1]: Leaving directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/v4l2/VidLib'
make: *** [libs] Error 2

How to rectify this ? All the functions are declared in the relevant header files. But still the warnings occurs. I am working in the following environment. Red Hat Linux 8.0, Vanilla kernel 2.4.20, "bttv" based tv tuner card (Pixel View PlayTV Pro).

With Regards,
S.Suriya Mohan.
0
Comment
Question by:suriyamohan
  • 10
  • 8
  • 5
25 Comments
 
LVL 5

Expert Comment

by:g0rath
ID: 9702080
vl_os.c:472 `GFP_KERNEL' undeclared (first use in this function)

This is your error

include/linux/mm.h

You may be missing this header file in that c file, check to see it's there

it's a preprocessor macro

I would be look at what this error is

make: /scripts/pathdown.sh: Command not found

It may be that this script sets up all the paths for the compile and would make the above help a moot point
0
 

Author Comment

by:suriyamohan
ID: 9705957
Hi,
  In the source file "vl_os.c", header file "slab.h" is included and in this header file "mm.h" is included. So I think the problem is not with the header files because relevant header files are included. But still I get the warnings "implicit decalaration of function", which leads to error. How to rectify this ? Shall I send the source files ?

With Regards,
S.Suriya Mohan.
0
 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9714396
>>/scripts/pathdown.sh: Command not found
This has to be fixed first The script seems to be required to set up the paths
Make it ./scripts/pathdown.sh and try.If this doesnt
If this doesn't work then find the script and replace the path in the Makefile.
Then try.
What is the libc version you r using?
Think it is 3.2 or above right?
Faced a similar problem but it was only warnings in my case.
Should be fixed by changing the order of a few include files in the sources.
But what to change is a little bit hard to figure out :-)
0
 

Author Comment

by:suriyamohan
ID: 9714639
Hi,
  I can't find where in the Makefile the path of the script file is specified. The script file is available in the following path "/usr/src/linux-2.4.20/scripts/pathdown.sh". Following is the MakeFile for your perception.

CC=gcc
CFLAGS += -D__KERNEL__ -DMODULE
CFLAGS += -DCYGNUS -Dlinux -DOS_LINUX -DLINUX -Wall -O2 -I./durango -I./tvlib -I./VidLib
CFLAGS += -DSIGNAL_USER
CFLAGS += -DFREQ_IS_CHANNEL
#CFLAGS += -DSIGMA_DIRECT
#CFLAGS += -DCYGNUS_PAL_TUNER
CFLAGS += -DXPRESSROM
CFLAGS += -DUSE_SYSTEM_I2C
#CFLAGS += -DNO_DECODER
#CFLAGS += -DEXCLUDE_TUNER
CFLAGS += -DVBI_IN_FB
#CFLAGS += -DDEFAULT_OVERLAY_ALWAYS_ON
#CFLAGS += -DDEBUG
#CFLAGS += -DWEBMEDIA_COMPAT
LDLIBS=

# Point to your Linux source directory here
LINUXDIR = /usr/src/linux-2.4.20/

all: libs geode_v.o Makefile Durango.o tvlib.o testapps ioctl_geode_v.h Makefile geodedrv.o

libs:
      make -C VidLib

modules: geode_v

clean:
      rm -f *.o *tags* .*.o.flags raw.txt core errs tags testapp vbitest
      make -C VidLib clean

captest: captest.c
vbitest: vbitest.c

obj-m           :=      geode_v.o
list-multi      :=      geode_v.o
geode-objs      :=      geodedrv.o vbi.o tvlib.o VidLib/VidLib.o Durango.o kthread.o

obj-$(CONFIG_GEODE) +=  geode.o

# Extract lists of the multi-part drivers.
# The 'int-*' lists are the intermediate files used to build the multi's.

multi-m         := $(filter $(list-multi), $(obj-m))
int-m           := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))

# Files that are both resident and modular: remove from modular.

obj-m           := $(filter-out $(obj-y), $(obj-m))
int-m           := $(filter-out $(int-y), $(int-m))

include $(LINUXDIR)/Rules.make

#fastdep:

geode_v.o: $(geode-objs)
      $(LD) $(LD_RFLAG) -r -o $@ $(geode-objs)

Durango.o: durango.c
      $(CC) -c durango.c -Idurango -o Durango.o -DOS_LINUX

tvlib.o:tvlib.c
      $(CC) -c tvlib.c -Itvlib -O -DOS_LINUX -DLINUX -DCYGNUS -DTV_OS_LINUX_2_4 -Wall -o tvlib.o $(CFLAGS)

testapps: testapp.c vbitest.c
      $(CC) testapp.c -o testapp
      $(CC) vbitest.c -o vbitest
      $(CC) dumpimg2video.c -o dumpimg2video
      $(CC) capture.c -o capture
#geode_v.o: $(GEODE_V_OBJS)
#      $(LD) -r -o $@ $(GEODE_V_OBJS)
#

devices:
      ./make_dev

# installing and uninstalling the geode v4l2 driver
INCLUDE_DIR                := /usr/include/linux
KERNEL_VERSION             := `uname -r`
MODULES_DIR          := $(shell \ test -d "$(INSTALL_MOD_PATH)/lib/modules/$(KERNEL_VERSION)/kernel" && \ echo "$(INSTALL_MOD_PATH)/lib/modules/$(KERNEL_VERSION)/kernel/drivers/media/video" || \ echo "$(INSTALL_MOD_PATH)/lib/modules/$(KERNEL_VERSION)/misc" )

install:
      mv -v $(INCLUDE_DIR)/ioctl_geode_v.h \
            $(INCLUDE_DIR)/ioctl_geode_v.h.old; \
      cp -v ./ioctl_geode_v.h $(INCLUDE_DIR); \
      mv -v $(MODULES_DIR)/$(obj-m)
              $(MODULES_DIR)/$(obj-m).old; \
      mkdir -p $(MODULES_DIR); \
      cp -v $(obj-m) $(MODULES_DIR);
      /sbin/depmod -a

uninstall:
      mv -v $(INCLUDE_DIR)/ioctl_geode_v.h.old $(INCLUDE_DIR)/ioctl_geode_v.h; \
      mv -v $(MODULES_DIR)/$(obj-m).old $(MODULES_DIR)/$(obj-m); \
      /sbin/depmod -a

---------------------------------------------------------

Following is the Makefile inside the directory "VidLib"

# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y

# Change it here or specify it on the "make" commandline
INCLUDEDIR = /usr/include/linux

ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DDEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif

CFLAGS = -D__KERNEL__ -DMODULE -Wall $(DEBFLAGS)
CFLAGS += -DOS_LINUX -I. -I../durango -I../VidLib -I$(INCLUDEDIR)

TARGET = VidLib
OBJS = $(TARGET).o
SRC = vl_alpha.c vl_os.c vl_vbi.c vl_vid.c vl_win.c

all: $(TARGET).o

$(TARGET).o: $(SRC:.c=.o)
      $(LD) -r $^ -o $@
clean:
      rm -f *.o *~ core

How to rectify the error ?
0
 
LVL 5

Expert Comment

by:g0rath
ID: 9714792
include $(LINUXDIR)/Rules.make

This is including another makefile, and this file is where you need to find that .sh file source path.
0
 

Author Comment

by:suriyamohan
ID: 9715019
Hi,
  In the "Rules.make" file in /usr/src/linux-2.4.20, I can find the following line.

MOD_DESTDIR := $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)

I think TOPDIR denotes "/usr/src/linux-2.4.20". So the path is already specified in "Rules.make" file. And I specified Linux source directory in the MakeFile as "LINUXDIR = /usr/src/linux-2.4.20/".

The srcript file "/usr/src/linux-2.4.20/scripts/pathdown.sh" for your perception.

#!/bin/sh
UP=
DN=${PWD:?}
TP=${TOPDIR:?}

while [ ! $TP/$UP/. -ef $DN ] ;do
      UP=`basename $PWD`/$UP
      cd ..
      if [ "$PWD" = "/" ]; then echo "Lost"; exit 1; fi
done

echo $UP
exit 0

Any clue ?
0
 
LVL 5

Expert Comment

by:g0rath
ID: 9715067
in all that you listed $(TOPDIR) is undefined.

So it's really just /scripts/pathdown.sh

which is what the error says...if it was the directory you mentioned then you would see

make: /usr/src/linux-2.4.20/scripts/pathdown.sh: Command not found

and you do not
0
 

Author Comment

by:suriyamohan
ID: 9715344

Any solution ?
0
 
LVL 5

Expert Comment

by:g0rath
ID: 9715421
Add this just below your LINUXDIR line in your main makefile

TOPDIR ?= $(LINUXDIR)
0
 

Author Comment

by:suriyamohan
ID: 9715575

The result is as follows.

[root@Suriya v4l2]# make
make: execvp: /usr/src/linux-2.4.20/scripts/pathdown.sh: Permission denied
make -C VidLib
make[1]: Entering directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/v4l2/VidLib'
cc -D__KERNEL__ -DMODULE -Wall -O2 -DOS_LINUX -I. -I../durango -I../VidLib -I/usr/include/linux   -c -o vl_os.o vl_os.c
vl_os.c: In function `OS_Interface_init':
vl_os.c:370: warning: implicit declaration of function `memset'
vl_os.c: In function `OS_Interface_close':
vl_os.c:390: warning: implicit declaration of function `free_irq'
vl_os.c: At top level:
vl_os.c:399: warning: `struct pt_regs' declared inside parameter list
vl_os.c:399: warning: its scope is only this definition or declaration, which is probably not what you want
vl_os.c: In function `OS_InterruptConnect':
vl_os.c:421: warning: implicit declaration of function `request_irq'
vl_os.c: In function `OS_RingCreate':
vl_os.c:472: warning: implicit declaration of function `kmalloc'
vl_os.c:472: `GFP_KERNEL' undeclared (first use in this function)
vl_os.c:472: (Each undeclared identifier is reported only once
vl_os.c:472: for each function it appears in.)
vl_os.c: In function `OS_RingDelete':
vl_os.c:497: warning: implicit declaration of function `kfree'
vl_os.c: In function `OS_PciReadByte':
vl_os.c:581: warning: implicit declaration of function `pcibios_read_config_byte'
vl_os.c: In function `OS_PciWriteByte':
vl_os.c:590: warning: implicit declaration of function `pcibios_write_config_byte'
vl_os.c: In function `OS_PciReadWord':
vl_os.c:599: warning: implicit declaration of function `pcibios_read_config_word'
vl_os.c: In function `OS_PciWriteWord':
vl_os.c:608: warning: implicit declaration of function `pcibios_write_config_word'
vl_os.c: In function `OS_PciReadDWord':
vl_os.c:617: warning: implicit declaration of function `pcibios_read_config_dword'
vl_os.c: In function `OS_PciWriteDWord':
vl_os.c:626: warning: implicit declaration of function `pcibios_write_config_dword'
make[1]: *** [vl_os.o] Error 1
make[1]: Leaving directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/v4l2/VidLib'
make: *** [libs] Error 2

What is the implicit declaration is all about ? The relevant header files are included. Still warnings ? This leads to error.
0
 
LVL 5

Accepted Solution

by:
g0rath earned 63 total points
ID: 9715663
you need to be root to perform these functions.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9719999
Switch to root and do the make.
Though all the relevant headers are included, the Order in which they r  included
is important for kernel headers and seems like something has changed in the
new compiler or the headers that causes this problem.
As I told you earlier, I faced a similar problem and I took quite a while to
figure out the correct order. Lot of trial and error.
Dont know what the script does. If it fixes the problem, good for you :-)

0
 

Author Comment

by:suriyamohan
ID: 9720400

Still the problem persists after switchig to root. I had modified the header files order in the source file
"vl_os.c".

"cc1: warning: changing search order for system directory "/usr/include"
cc1: warning:   as it has already been specified as a non-system directory"

The above two warnings are not displayed. This is fine. After running "make" the following results.

make: /scripts/pathdown.sh: Command not found
make -C VidLib
make[1]: Entering directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/VidLib'
cc -D__KERNEL__ -DMODULE -Wall -O2   -DOS_LINUX -I. -I../durango -I../VidLib -I/usr/include/linux   -c -o vl_os.o vl_os.c
vl_os.c: In function `OS_Interface_init':
vl_os.c:84: warning: implicit declaration of function `memset'
vl_os.c: In function `OS_Interface_close':
vl_os.c:104: warning: implicit declaration of function `free_irq'
vl_os.c: At top level:
vl_os.c:113: warning: `struct pt_regs' declared inside parameter list
vl_os.c:113: warning: its scope is only this definition or declaration, which is probably not what you want
vl_os.c: In function `OS_InterruptConnect':
vl_os.c:135: warning: implicit declaration of function `request_irq'
vl_os.c: In function `OS_RingCreate':
vl_os.c:186: warning: implicit declaration of function `kmalloc'
vl_os.c:186: `GFP_KERNEL' undeclared (first use in this function)
vl_os.c:186: (Each undeclared identifier is reported only once
vl_os.c:186: for each function it appears in.)
vl_os.c: In function `OS_RingDelete':
vl_os.c:211: warning: implicit declaration of function `kfree'
vl_os.c: In function `OS_PciReadByte':
vl_os.c:295: warning: implicit declaration of function `pcibios_read_config_byte'
vl_os.c: In function `OS_PciWriteByte':
vl_os.c:304: warning: implicit declaration of function `pcibios_write_config_byte'
vl_os.c: In function `OS_PciReadWord':
vl_os.c:313: warning: implicit declaration of function `pcibios_read_config_word'
vl_os.c: In function `OS_PciWriteWord':
vl_os.c:322: warning: implicit declaration of function `pcibios_write_config_word'
vl_os.c: In function `OS_PciReadDWord':
vl_os.c:331: warning: implicit declaration of function `pcibios_read_config_dword'
vl_os.c: In function `OS_PciWriteDWord':
vl_os.c:340: warning: implicit declaration of function `pcibios_write_config_dword'
vl_os.c:393:25: warning: no newline at end of file
make[1]: *** [vl_os.o] Error 1
make[1]: Leaving directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/VidLib'
make: *** [libs] Error 2
-----------------------------------------------------

Check the following line.
vl_os.c:186: `GFP_KERNEL' undeclared (first use in this function)

'GFP_KERNEL' is declared in "/linux/slab.h" as follows. (The first few lines).

#if      !defined(_LINUX_SLAB_H)
#define      _LINUX_SLAB_H

#if      defined(__KERNEL__)

typedef struct kmem_cache_s kmem_cache_t;

#include      <linux/mm.h>
#include      <linux/cache.h>

/* flags for kmem_cache_alloc() */
#define      SLAB_NOFS            GFP_NOFS
#define      SLAB_NOIO            GFP_NOIO
#define SLAB_NOHIGHIO            GFP_NOHIGHIO
#define      SLAB_ATOMIC            GFP_ATOMIC
#define      SLAB_USER            GFP_USER
#define      SLAB_KERNEL            GFP_KERNEL
#define      SLAB_NFS            GFP_NFS
#define      SLAB_DMA            GFP_DMA

'GKP_KERNEL' is declared under
"#if defined(__KERNEL__)" . Is this is the reason why 'GKP_KERNEL' stays undeclared ?
0
 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9721256
>>/scripts/pathdown.sh: Command not found
Did you revert to the old Rules.Make?
In your previous post you got a Permission Denied error. That was because you were not root
or the script did not have execute permissions.
Verify that pathdown.sh has execute permissions set, have the right path in the Rules.Make
and then as root do a make.

>>'GKP_KERNEL' is declared under
>>"#if defined(__KERNEL__)" . Is this is the reason why 'GKP_KERNEL' stays undeclared ?

__KERNEL__ is required to be defined for any kernel module or driver and it is defined at
compilation. see the -D__KERNEL__ in the cc command in the Makefile?
That's it. Check if the header files are under some ifdef. May be some flag is to be defined that is missing.
That might be the case as the definitions are not being found.
0
 

Author Comment

by:suriyamohan
ID: 9738828
Hi,
  The driver I am trying to compile is "Geode V4l2" for SC1200/SC1210 based platforms. The V4l2 programming guide says "Any Geode SP1SC10 reference platform specific code is flagged with CYGNUS. Modify the Makefile to build for a particular platform". I am trying to install this driver in linux desktop. Is that a problem ? Following are first few lines in the Makefile. IS there any problem with CFLAGS which leads to error ?

CC=gcc
CFLAGS += -D__KERNEL__ -DMODULE
CFLAGS += -DCYGNUS -Dlinux -DOS_LINUX -DLINUX -Wall -O2 -I./durango -I./tvlib -I./VidLib
CFLAGS += -DSIGNAL_USER
CFLAGS += -DFREQ_IS_CHANNEL
#CFLAGS += -DSIGMA_DIRECT
#CFLAGS += -DCYGNUS_PAL_TUNER
CFLAGS += -DXPRESSROM
CFLAGS += -DUSE_SYSTEM_I2C
#CFLAGS += -DNO_DECODER
#CFLAGS += -DEXCLUDE_TUNER
CFLAGS += -DVBI_IN_FB
#CFLAGS += -DDEFAULT_OVERLAY_ALWAYS_ON
#CFLAGS += -DDEBUG
#CFLAGS += -DWEBMEDIA_COMPAT
LDLIBS=

# Point to your Linux source directory here
LINUXDIR = /usr/src/linux-2.4.20

Durango is a graphics/video software support package designed to assist in the development of display drivers and embedded applications. The core of this
package is source code that performs most of the graphics related functionality for the National Semiconductor  Geode family of products.

Any suggestion ?
0
 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9745280
>>Any Geode SP1SC10 reference platform specific code is flagged with CYGNUS

But you r compiling it for SC1200/SC1210 based platforms you said.

Try compiling the driver without the -DCYGNUS in the Makefile.
0
 

Author Comment

by:suriyamohan
ID: 9745378
Hi,
  I tried. Still the problem occurs. I am having more than one source in "/usr/src". (linux-2.4.18-14,linux-2.4.20,linux-2.4.19). Is this the reason for "implicit declaration" warning and error. Following is the output for your perception.

[root@Suriya geode_v4l2-1.1.8b]# make
make: /scripts/pathdown.sh: Command not found
make -C VidLib
make[1]: Entering directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/VidLib'
cc -D__KERNEL__ -DMODULE -Wall -O2 -DOS_LINUX -I. -I../durango -I../VidLib -I/usr/src/linux-2.4.20/include/linux   -c -o vl_os.o vl_os.c
vl_os.c: In function `OS_Interface_init':
vl_os.c:84: warning: implicit declaration of function `memset'
vl_os.c: In function `OS_Interface_close':
vl_os.c:104: warning: implicit declaration of function `free_irq'
vl_os.c: At top level:
vl_os.c:113: warning: `struct pt_regs' declared inside parameter list
vl_os.c:113: warning: its scope is only this definition or declaration, which is probably not what you want
vl_os.c: In function `OS_InterruptConnect':
vl_os.c:135: warning: implicit declaration of function `request_irq'
vl_os.c: In function `OS_RingCreate':
vl_os.c:186: warning: implicit declaration of function `kmalloc'
vl_os.c:186: `GFP_KERNEL' undeclared (first use in this function)
vl_os.c:186: (Each undeclared identifier is reported only once
vl_os.c:186: for each function it appears in.)
vl_os.c: In function `OS_RingDelete':
vl_os.c:212: warning: implicit declaration of function `kfree'
vl_os.c: In function `OS_PciReadByte':
vl_os.c:296: warning: implicit declaration of function `pcibios_read_config_byte'
vl_os.c: In function `OS_PciWriteByte':
vl_os.c:305: warning: implicit declaration of function `pcibios_write_config_byte'
vl_os.c: In function `OS_PciReadWord':
vl_os.c:314: warning: implicit declaration of function `pcibios_read_config_word'
vl_os.c: In function `OS_PciWriteWord':
vl_os.c:323: warning: implicit declaration of function `pcibios_write_config_word'
vl_os.c: In function `OS_PciReadDWord':
vl_os.c:332: warning: implicit declaration of function `pcibios_read_config_dword'
vl_os.c: In function `OS_PciWriteDWord':
vl_os.c:341: warning: implicit declaration of function `pcibios_write_config_dword'
make[1]: *** [vl_os.o] Error 1
make[1]: Leaving directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/VidLib'
make: *** [libs] Error 2
0
 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9745719
Post the list of all header files included in this source file
0
 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9745733
And also get rid of this first
>>make: /scripts/pathdown.sh: Command not found
Put the right path whereever it is required
0
 

Author Comment

by:suriyamohan
ID: 9745778

Yes the path of /scripts/pathdown.sh is correct. In the main Makefile I had specified the linux source directory as "LINUXDIR = /usr/src/linux-2.4.20". I had posted the Makefiles in previous post, Dated: 11/10/03 05:08AM PST . Have a look into it.

Header files in the source file "vl_os.c".

#include <asm/io.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include "vl_rtns.h"
#include "vl_os.h"

In the main Makefile we can find a line as follows.

include $(LINUXDIR)/Rules.make

In the "Rules.make" file in "/usr/src/linux-2.4.20" we can find the following line as follows.

MOD_DESTDIR := $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)

I don't know where things going wrong.
0
 
LVL 2

Expert Comment

by:asbharadwaj
ID: 9746023
Add this line to your Makefile after LINUX_DIR

TOPDIR = $(LINUXDIR)

Also
Add -nostdinc to your CFLAGS and if you have a -I/usr/src/linux-2.4.20/include/linux in your CFLAGS
(make shows there is) change it to -I/usr/src/linux-2.4.20/include
and try
0
 

Author Comment

by:suriyamohan
ID: 9747157
Following is the result after relevant changes in Makefile. Now no warnings and error in "vl_os.c". But problem with main driver source file (geodedrv.c) file.

root@Suriya geode_v4l2-1.1.8b]# make
/usr/src/linux-2.4.20/scripts/pathdown.sh: line 4: TOPDIR: parameter null or not set
make -C VidLib
make[1]: Entering directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/VidLib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/PT06/References/linux4tv/geode_v4l2-1.1.8b/VidLib'
gcc -D__KERNEL__ -DMODULE -nostdinc -DCYGNUS -Dlinux -DOS_LINUX -DLINUX -Wall -O2 -I./durango -I./tvlib -I./VidLib -DSIGNAL_USER -DFREQ_IS_CHANNEL -DXPRESSROM -DUSE_SYSTEM_I2C -DVBI_IN_FB   -DKBUILD_BASENAME=geodedrv  -c -o geodedrv.o geodedrv.c
In file included from geodedrv.c:71:
geodedrv.h:67:26: linux/module.h: No such file or directory
geodedrv.h:68:25: linux/delay.h: No such file or directory
geodedrv.h:69:25: linux/errno.h: No such file or directory
geodedrv.h:70:22: linux/fs.h: No such file or directory
geodedrv.h:71:26: linux/kernel.h: No such file or directory
geodedrv.h:72:26: linux/malloc.h: No such file or directory
geodedrv.h:73:24: linux/poll.h: No such file or directory
geodedrv.h:74:26: linux/ioport.h: No such file or directory
geodedrv.h:75:20: asm/io.h: No such file or directory
geodedrv.h:76:28: linux/videodev.h: No such file or directory
geodedrv.h:77:27: linux/version.h: No such file or directory
geodedrv.h:78:25: asm/uaccess.h: No such file or directory
geodedrv.h:79:24: linux/init.h: No such file or directory

and more............

First few lines in "geodedrv.h".

#ifndef _GEODEDRV_H_
#define _GEODEDRV_H_

/* System includes */
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/malloc.h>
#include <linux/poll.h>
#include <linux/ioport.h>
#include <asm/io.h>
#include <linux/videodev.h>
#include <linux/version.h>
#include <asm/uaccess.h>
#include <linux/init.h>

Where to make changes in main Makefile so that the relevant path of header files is available to the source files ?
0
 
LVL 2

Assisted Solution

by:asbharadwaj
asbharadwaj earned 62 total points
ID: 9757829
Well
You also will have to add export TOPDIR to your main Makefile after setting TOPDIR
And assuming you have set LINUX_DIR to the relevant linux source directory
add -I$(LINUX_DIR)/include to your CFLAGS
That should solve your problem
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now