Pozz. Jucer sam uzeo neki stari LCD display i odlucio ga spojiti na racunar da mi ispisuje osnovne parametre sistema. Instalirao sam lcdproc i radi fino, medjutim ovo je za sada samo test na displeju velicine 16x1 pa tako da je ispis prilicno skucen prilikom koristenja lcdproc, bar dok ne nabavim displej 20x4.
Da bi ja sam mogao formatirati ispis na displeju nashao sam “lcdmod” koji je dosta prihvatljiviji za moj slucaj jer se moze napisati bash sktipta, koja se moze staviti u cron, i jednostavno ispisivati bilo sto na
echo “Hello LCD world!” > /dev/lcd . Problem je sto lcdmod ne mogu uopste kompajlirati. Greska koju ispise je:
make -C /lib/modules/2.6.4/build SUBDIRS=/home/damir/src/lcdmod-1.0.2 modules
make: *** /lib/modules/2.6.4/build: No such file or directory. Stop.
make: *** [lcd2.6] Error 2
Zaglavlje samog Makefile-a je:
[code]# $Id: Makefile,v 1.5 2004/08/09 01:10:29 mikey Exp $
CC=cc
KERNEL_VERSION=$(shell uname -r )
KERNEL_VERSION=2.6.4
KERNEL_SRC_DIR=/lib/modules/$(KERNEL_VERSION)/build
ifeq “$(shell echo $(KERNEL_VERSION) | cut -d . -f 2)” "6"
DESTDIR=/lib/modules/$(KERNEL_VERSION)/misc
else
DESTDIR=/lib/modules/$(KERNEL_VERSION)/kernel/drivers/misc
endif
.
.
.[/code]
Ukoliko stavim koment na #KERNEL_VERSION=2.6.4 onda dobijem:
make -C /lib/modules/2.6.20-16-generic/build SUBDIRS=/home/damir/src/lcdmod-1.0.2 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-16-generic'
CC [M] /home/damir/src/lcdmod-1.0.2/lcd.o
/home/damir/src/lcdmod-1.0.2/lcd.c:12:1: warning: "KBUILD_MODNAME" redefined
<command line>:1:1: warning: this is the location of the previous definition
/home/damir/src/lcdmod-1.0.2/lcd.c:15:26: error: linux/config.h: No such file or directory
In file included from include/asm/processor.h:18,
from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/asm/uaccess.h:8,
from /home/damir/src/lcdmod-1.0.2/lcd.c:27:
include/asm/system.h: In function ‘__set_64bit_var’:
include/asm/system.h:218: warning: dereferencing type-punned pointer will break strict-aliasing rules
include/asm/system.h:218: warning: dereferencing type-punned pointer will break strict-aliasing rules
In file included from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/asm/uaccess.h:8,
from /home/damir/src/lcdmod-1.0.2/lcd.c:27:
include/asm/processor.h: In function ‘cpuid_count’:
include/asm/processor.h:611: warning: pointer targets in passing argument 1 of ‘__cpuid’ differ in signedness
include/asm/processor.h:611: warning: pointer targets in passing argument 2 of ‘__cpuid’ differ in signedness
include/asm/processor.h:611: warning: pointer targets in passing argument 3 of ‘__cpuid’ differ in signedness
include/asm/processor.h:611: warning: pointer targets in passing argument 4 of ‘__cpuid’ differ in signedness
In file included from include/asm/smp.h:18,
from include/linux/smp.h:18,
from include/linux/topology.h:33,
from include/linux/mmzone.h:544,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/proc_fs.h:4,
from include/linux/parport.h:100,
from /home/damir/src/lcdmod-1.0.2/lcd.c:32:
include/asm/mpspec.h:6:25: error: mach_mpspec.h: No such file or directory
In file included from include/asm/smp.h:18,
from include/linux/smp.h:18,
from include/linux/topology.h:33,
from include/linux/mmzone.h:544,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/proc_fs.h:4,
from include/linux/parport.h:100,
from /home/damir/src/lcdmod-1.0.2/lcd.c:32:
include/asm/mpspec.h: At top level:
include/asm/mpspec.h:8: error: ‘MAX_MP_BUSSES’ undeclared here (not in a function)
include/asm/mpspec.h:22: error: ‘MAX_IRQ_SOURCES’ undeclared here (not in a function)
In file included from include/linux/smp.h:18,
from include/linux/topology.h:33,
from include/linux/mmzone.h:544,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/proc_fs.h:4,
from include/linux/parport.h:100,
from /home/damir/src/lcdmod-1.0.2/lcd.c:32:
include/asm/smp.h:82:26: error: mach_apicdef.h: No such file or directory
In file included from include/linux/smp.h:18,
from include/linux/topology.h:33,
from include/linux/mmzone.h:544,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/proc_fs.h:4,
from include/linux/parport.h:100,
from /home/damir/src/lcdmod-1.0.2/lcd.c:32:
include/asm/smp.h: In function ‘hard_smp_processor_id’:
include/asm/smp.h:86: warning: implicit declaration of function ‘GET_APIC_ID’
/home/damir/src/lcdmod-1.0.2/lcd.c:33:2: warning: #warning - Your kernel has parallel-port support compiled as a
/home/damir/src/lcdmod-1.0.2/lcd.c:34:2: warning: #warning - module, you must ensure that the parport module is
/home/damir/src/lcdmod-1.0.2/lcd.c:35:2: warning: #warning - inserted before lcdmod. This should happen automatically
/home/damir/src/lcdmod-1.0.2/lcd.c:36:2: warning: #warning - whenever you send data to /dev/lcd if you "make install"
In file included from include/linux/aio.h:5,
from include/linux/sched.h:260,
from include/linux/utsname.h:35,
from include/asm/elf.h:12,
from include/linux/elf.h:7,
from include/linux/module.h:15,
from /home/damir/src/lcdmod-1.0.2/lcd.c:43:
include/linux/workqueue.h: In function ‘cancel_delayed_work’:
include/linux/workqueue.h:203: warning: dereferencing type-punned pointer will break strict-aliasing rules
/home/damir/src/lcdmod-1.0.2/lcd.c: At top level:
/home/damir/src/lcdmod-1.0.2/lcd.c:109: error: expected ‘)’ before string constant
/home/damir/src/lcdmod-1.0.2/lcd.c:110: error: expected ‘)’ before string constant
/home/damir/src/lcdmod-1.0.2/lcd.c:111: error: expected ‘)’ before string constant
/home/damir/src/lcdmod-1.0.2/lcd.c: In function ‘start_module’:
/home/damir/src/lcdmod-1.0.2/lcd.c:656: warning: initialization from incompatible pointer type
/home/damir/src/lcdmod-1.0.2/lcd.c:656: warning: initialization from incompatible pointer type
make[2]: *** [/home/damir/src/lcdmod-1.0.2/lcd.o] Error 1
make[1]: *** [_module_/home/damir/src/lcdmod-1.0.2] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-generic'
make: *** [lcd2.6] Error 2
Ovo je zadnja verzija tog programa lcdmod-1.0.2 i pishe da od verzije 1.0.0 podrzava 2.6.x kernele. Jeli stvar da nema podrsku za moj kernel ili je do gcc kompajlera neznam pa zato i pitam sve ovo.
Nadam se da sam dovoljno dobro obrazlozio svoj problem.
Hvala