Hallo,
mein gcc compiler findet bei einem zu compilieren Kernel Treiber (https://github.com/groeck/nct6775) die stdio.h nicht. (#include <stdio.h> habe ich hinzugefügt, normalerweise es das nicht enthalten)
In einem kleinen "Hello World!"-Programm, das ich im selben Verzeichnis kompilieren lasse, funktioniert das hingegen.
Gibt es in der make-Datei irgendeine Einstellung, die die Verwendung von usr/include verhindert?
Code
# For building for the current running version of Linux
TARGET := $(shell uname -r)
HOME=$(shell pwd)
# Or for a specific version
#TARGET := 2.6.33.5
KERNEL_MODULES := /lib/modules/$(TARGET)
KERNEL_BUILD := $(KERNEL_MODULES)/build
#KERNEL_BUILD := /usr/src/linux-headers-$(TARGET)
#SYSTEM_MAP := $(KERNEL_BUILD)/System.map
SYSTEM_MAP := /boot/System.map-$(TARGET)
DRIVER := nct6775
# Directory below /lib/modules/$(TARGET)/kernel into which to install
# the module:
MOD_SUBDIR = drivers/hwmon
obj-m := $(DRIVER).o
MAKEFLAGS += --no-print-directory
.PHONY: all install modules modules_install clean
all: modules
# Targets for running make directly in the external module directory:
modules clean:
@$(MAKE) -C $(KERNEL_BUILD) M=$(CURDIR) $@ EXTRA_CFLAGS=-g
install: modules_install
modules_install:
cp $(DRIVER).ko $(KERNEL_MODULES)/kernel/$(MOD_SUBDIR)
depmod -a -F $(SYSTEM_MAP) $(TARGET)
Alles anzeigen
Grüße,
Uwe