ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Сборка драйверов для платы реле dm6952
Date: Fri, 27 May 2005 17:40:02 +0400
Message-ID: <20050527134002.GD17177@master.mivlgu.local> (raw)
In-Reply-To: <429715A6.20600@mail.ru>


[-- Attachment #1.1: Type: text/plain, Size: 1417 bytes --]

On Fri, May 27, 2005 at 04:42:14PM +0400, Aleksey P. Karelin wrote:
> >А вообще собирать модули ядра через autoconf - извращение.
> Вот из трех специфичных плат (производитель один) у двух обошлись без 
> него и прекрасно собрались и работают.
> 
> Я вот тут восмотрел - у меня в домашнем каталоге RPM/SOURCES 
> образовались, где исходники лежат (все три небольших файла). Вроде как 
> библиотек своих никаких не используется. А возможно их собрать 
> самостоятельно без autoconf?

Вполне - с использованием прилагаемого Makefile.

	make -C /usr/src/linux-2.4.26-std-up modules SUBDIRS=`pwd`

Проблема с подобными драйверами для старых ядер (2.4.x и более ранних) в
том, что в подавляющем большинстве дистрибутивов присутствуют только файлы
заголовков ядра, но нет элементов его сборочной системы.   Из-за этого
такой простой метод сборки дополнительных модулей в общем случае
неприменим, и разработчики модулей вынуждены использовать свою систему
сборки (причём стандартного варианта нет - все изобретают свой собственный
велосипед).

С 2.6.x ситуация должна улучшиться, поскольку нормально собрать модуль, не
используя сборочную систему ядра, стало практически невозможно, поэтому
метод сборки через Makefile ядра стал стандартным.  Впрочем, это тоже не
спасает от всех проблем - например, может произойти какая-то ошибка на
этапе определения, какой способ сборки должен использоваться.

[-- Attachment #1.2: Makefile --]
[-- Type: text/plain, Size: 258 bytes --]

O_TARGET	:= dm6952hr.o
obj-m		:= dm6952hr.o
list-multi	:= dm6952hr.o
dm6952hr-objs	:= Dm6952hrDevice.o

EXTRA_CFLAGS	:= -I. -DPACKAGE=\"dm6952hr\" -DVERSION=\"1.0\"

include $(TOPDIR)/Rules.make

dm6952hr.o: $(dm6952hr-objs)
	$(LD) -r -o $@ $(dm6952hr-objs)

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

  reply	other threads:[~2005-05-27 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-27  9:27 Aleksey P. Karelin
2005-05-27  9:33 ` Anton Gorlov
2005-05-27  9:43   ` Aleksey P. Karelin
2005-05-27 10:11     ` Re[2]: " Anton Gorlov
2005-05-27 11:38       ` Aleksey P. Karelin
2005-05-27  9:36 ` Grigory Milev
2005-05-27 11:52 ` Sergey Vlasov
2005-05-27 12:42   ` Aleksey P. Karelin
2005-05-27 13:40     ` Sergey Vlasov [this message]
2005-05-30  6:25       ` Aleksey P. Karelin
2005-05-30  6:32         ` Aleksey P. Karelin
2005-05-30  6:33         ` Re[2]: " Anton Gorlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050527134002.GD17177@master.mivlgu.local \
    --to=vsu@altlinux.ru \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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