ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] Поможите скомпилировать stir4200.o
@ 2006-06-15 20:21 Sergey Stepanov
  2006-06-17 15:05 ` Andrey Rahmatullin
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Stepanov @ 2006-06-15 20:21 UTC (permalink / raw)
  To: community


Здравствуйте товарищи.


Имею AltLinuxMaster2.4, ядро 2.4.26-std-up-alt12.

Вот захотел скомпилировать драйвер для инфракрасника IrMmate 410W.
Система про него рассказывает так

# /usr/sbin/lsusb
Bus 001 Device 003: ID 066f:4200 SigmaTel, Inc. STIr4200 IrDA Bridge

Нашол в инете драйвер stir4200 тут
http://wetlogic.net/stewart/stir4200/stir4200.tgz

Его нужно скомпилировать.
В архиве лежат файлы

# ls -l
-rw-r--r--  1 root root   775 Июн 15 23:33 Makefile
-rw-r--r--  1 root root 53225 Июн 15 22:41 stir4200.c
-rw-r--r--  1 root root  5313 Апр  5  2003 stir4200.h
-rw-r--r--  1 root root  1206 Фев 24  2004 troubleshooting.txt


Запускаю make и получаю лог ошибок

cc -I/lib/modules/2.4.26-std-up-alt12/build/include -I../include -Wall 
-Wcast-align -Wstrict-prototypes -O2 -DLINUX -D__KERNEL__ -DMODULE 
-DMODVERSIONS -fomit-frame-pointer -fno-common -pipe 
-mpreferred-stack-boundary=2 -include 
/lib/modules/2.4.26-std-up-alt12/build/include/linux/modversions.h 
-DKBUILD_BASENAME=stir4200 -o stir4200.o -c stir4200.c
<command line>:2711171:1: 
/lib/modules/2.4.26-std-up-alt12/build/include/linux/modversions.h: No 
such file or directory

In file included from /usr/include/linux/config.h:4,
                  from /usr/include/linux/module.h:10,
                  from stir4200.c:39:
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included 
in userspace

In file included from /usr/include/linux/prefetch.h:13,
                  from /usr/include/linux/list.h:6,
                  from /usr/include/linux/module.h:12,
                  from stir4200.c:39:
/usr/include/asm/processor.h:56: `CONFIG_X86_L1_CACHE_SHIFT' undeclared 
here (not in a function)
/usr/include/asm/processor.h:56: requested alignment is not a constant

In file included from /usr/include/asm/pgtable.h:17,
                  from /usr/include/linux/mm.h:26,
                  from /usr/include/linux/skbuff.h:26,
                  from stir4200.c:45:
/usr/include/asm/fixmap.h:18:22: asm/acpi.h: No such file or directory

In file included from stir4200.c:46:
/usr/include/linux/netdevice.h:171: `CONFIG_X86_L1_CACHE_SHIFT' 
undeclared here (not in a function)


Первую ошибку на modversions.h я могу побороть - файл лежит не по пути
/lib/modules/2.4.26-std-up-alt12/build/include/linux/modversions.h
а по пути
/usr/include/linux/modversions.h
и я могу прописать жестко в Makefile его подключение, если я это делаю,
ошибка исчезает, все остальные остаются.

Вторая ошибка - какая-то дикая. Если пройти по цепочке подклченных
файлов stir4200.c -> module.h -> config.h -> autoconf.h,
то действительно, в файле autoconf.h содержится только директива
генерации ошибки #error Invalid kernel header included in userspace
Что это значит - для меня загадка... Получается что вообще нельзя
подключать #include <linux/module.h> - будет генерироваться ошибка.

Третья ошибка про CONFIG_X86_L1_CACHE_SHIFT мне совсем непонятна,
видимо не хватает какого-то #define.

Четвертая ошибка снова связана с неправильным путем.
/usr/include/asm/fixmap.h:18:22: asm/acpi.h
А файл лежит в другом каталоге
/usr/src/kernel-source-2.4.26/include/acpi/acpi.h
Как указать чтобы этот файл искался по другому пути - я не знаю.


Пятая ошибка ... и т.д. Всего лог ошибок составляет ~350 строк,
и торжественно завершается так

stir4200.c:1757: dereferencing pointer to incomplete type
stir4200.c:1758: dereferencing pointer to incomplete type
stir4200.c: At top level:
stir4200.c:97: storage size of `stir_instance' isn't known
make: *** [stir4200.o] Ошибка 1


Вот. Кто-нибудь может мне рассказать, как же всетаки скомпилить
этот драйвер? Или может, где-то уже есть stir4200.o, готовый,
скомпиленый для AltMaster2.4?


-- 
Со всяческими пожеланиями, Сергей.
http://xi.net.ru


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Comm] Поможите скомпилировать stir4200.o
  2006-06-15 20:21 [Comm] Поможите скомпилировать stir4200.o Sergey Stepanov
@ 2006-06-17 15:05 ` Andrey Rahmatullin
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Rahmatullin @ 2006-06-17 15:05 UTC (permalink / raw)
  To: community

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

On Fri, Jun 16, 2006 at 12:21:32AM +0400, Sergey Stepanov wrote:
> /lib/modules/2.4.26-std-up-alt12/build/include/linux/modversions.h: No 
> such file or directory
kernel-headers-modules

> In file included from /usr/include/linux/config.h:4,
>                   from /usr/include/linux/module.h:10,
>                   from stir4200.c:39:
> /usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included 
> in userspace
adjust_kernel_headers

-- 
WBR, wRAR (ALT Linux Team)
Powered by the ALT Linux fortune(8):

> > Насчет отличий K6 от K6-2 не подскажу - не знаю. Скорее всего, нет.
> Отличия очень большие архитектурно
:-). Знаете, мы, математики, всяким схемотехникам не обучены :-).
		-- morozov in community@

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-17 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-15 20:21 [Comm] Поможите скомпилировать stir4200.o Sergey Stepanov
2006-06-17 15:05 ` Andrey Rahmatullin

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git