Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
it's clear that you are missing a rule in your Makefile in the `/home/mac/projects/drivers' directory, I think you should have a look in your Makefiles
I would put this driver in /usr/src/linux/drivers/misc as this is what the makefile says
#
# Makefile for misc devices that really don't fit anywhere else.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now inherited from the
# parent makes..
#
hi there. no idea about compiling. but i do get this error if i am trying to compile my kernel in a wrong way. for explample if i type "make menuconfigggggg" instead of "make menuconfig"
it will say smth like "no rule to make "menuconfigggggg" (translated into english)
The problem ended up being that I was using instructions for build in 2.6 kernel when I was using a 2.4 kernel. I am still having other problems. I am getting "error unknown processor family" error now.
I also had to run
make mrproper
make cloneconfig
make dep
Great, I think you didn't set this option in the config. Start again make xconfig or menuconfig and look for Processor type and features - you click the first field and set your CPU-type.
you can also look in the .config file and uncomment one option corresponding to you cpu
# Processor type and features
#
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
CONFIG_MPENTIUMIII=y
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MELAN is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
If it doesn't help I suggest you start over.
# cd /usr/src
# cp linux/.config .
# rm -rf linux......
# tar xjvf linux-.......
# ln -s linux-......... linux
I am trying to compile a linux kernel module (hello world). I am getting an error unknown processor.
I noticed that in "/usr/src/linux/arch/i386/defconfig"
CONFIG_M586NOCX8=y
is set.
However, in "/usr/inlcude/asm/module.h" as seen below that option
is not available. Does any one know ehich MODULE_PROC_FAMILY to use??
how do I get around this??
#ifdef __KERNEL__
#ifdef CONFIG_M386
#define MODULE_PROC_FAMILY "386 "
#elif defined CONFIG_M486
#define MODULE_PROC_FAMILY "486 "
#elif defined CONFIG_M586
#define MODULE_PROC_FAMILY "586 "
#elif defined CONFIG_M586TSC
#define MODULE_PROC_FAMILY "586TSC "
#elif defined CONFIG_M586MMX
#define MODULE_PROC_FAMILY "586MMX "
#elif defined CONFIG_M686
#define MODULE_PROC_FAMILY "686 "
#elif defined CONFIG_MPENTIUMII
#define MODULE_PROC_FAMILY "PENTIUMII "
#elif defined CONFIG_MPENTIUMIII
#define MODULE_PROC_FAMILY "PENTIUMIII "
#elif defined CONFIG_MPENTIUM4
#define MODULE_PROC_FAMILY "PENTIUM4 "
#elif defined CONFIG_MK6
#define MODULE_PROC_FAMILY "K6 "
#elif defined CONFIG_MK7
#define MODULE_PROC_FAMILY "K7 "
#elif defined CONFIG_MK8
#define MODULE_PROC_FAMILY "K8 "
#elif defined CONFIG_MELAN
#define MODULE_PROC_FAMILY "ELAN "
#elif defined CONFIG_MCRUSOE
#define MODULE_PROC_FAMILY "CRUSOE "
#elif defined CONFIG_MWINCHIPC6
#define MODULE_PROC_FAMILY "WINCHIPC6 "
#elif defined CONFIG_MWINCHIP2
#define MODULE_PROC_FAMILY "WINCHIP2 "
#elif defined CONFIG_MWINCHIP3D
#define MODULE_PROC_FAMILY "WINCHIP3D "
#elif defined CONFIG_MCYRIXIII
#define MODULE_PROC_FAMILY "CYRIXIII "
#elif CONFIG_MVIAC3_2
#define MODULE_PROC_FAMILY "VIAC3-2 "
#else
#error unknown processor family
#endif
the asm directory contains system-type specific definitions and a link is made to the directory containing your system definitions i.e. i386 for ibm-pc (386 style)
# root@bendida:/mnt/devel/src/linux# ls -al include/asm
# lrwxrwxrwx 1 root root 8 Feb 15 14:01 include/asm -> asm-i386
Uhh read the kernel docs finally - everything is written there!
first you are not reading the right manuals and now I doubt, you know what you are doing.
What do you need this all stuff for
Include the header files and they will find their way, otherwise I don't think your program will be usable - of course you should check (include) the architecture type but starting let say with standard 386 proccessor type would fit all.
It is in fact enough to
include asm/modules.h
from "YOUR_KERNELSRC_DIR"/include (YOUR_KERNELSRC_DIR is usally /usr/src/linux)
or something like this so your preprocessor knows the system type you are building for.
NB: asm is linked when you save and exit the configure script as you define the system type there. If you dont run make menuconfig or make xconfig than you should link asm yourself
What do you need this dummy kernel module before moveing on - where to are you moving - I don't understand, but anyway in my .config it stays CONFIG_MPENTIUMIII=y and that's what I have, but I build a kernel for another machine and it says CONFIG_M586=y and truly it's Pnetium I (585). When are you going to read the kernel doc's finally it's always there. You can find out what processor you have by typing
# less /proc/cpuinfo
optionally less /proc/cpuinfo | grep model
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 7
model name : Pentium III (Katmai)
stepping : 3
cpu MHz : 501.891
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 mmx fxsr sse
bogomips : 1002.70
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.