ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: shaba@altlinux.ru, devel-kernel@altlinux.ru,
	ALT Devel discussion list <devel@altlinux.ru>,
	Anton Farygin <rider@altlinux.com>,
	taf@altlinux.ru
Subject: [devel] Re: [d-kernel] Re: ipw2x00
Date: Thu, 14 Jul 2005 19:33:30 +0400
Message-ID: <20050714153330.GC10423@master.mivlgu.local> (raw)
In-Reply-To: <20050714130611.GA10423@master.mivlgu.local>

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

On Thu, Jul 14, 2005 at 05:06:11PM +0400, Sergey Vlasov wrote:
> Как-то нужно передать информацию для modpost; возможно, придётся положить
> собранные файлы модулей ещё и в kernel-headers-ieee80211-%flavour, а потом
> как-то их подсовывать при сборке зависимых модулей.

Именно так и пришлось сделать (причём в kernel-headers-ieee80211-%flavour
кладутся даже не *.ko, а *.o, потом при сборке модулей эти файлы
копируются в сборочный каталог, в .tmp_versions/ создаются файлы *.mod, а
потом сборочная система ядра ещё и собирает из них *.ko).

Некрасиво, но другого способа быстро решить эту проблему я пока не вижу.
Если делать совсем правильно, нужно патчить scripts/mod/modpost.c в ядре,
чтобы добавить туда поддержку генерации и использования нескольких файлов
типа имеющегося сейчас Module.symvers.


--- modules/ieee80211/kernel-modules-ieee80211.spec.modpost	2005-07-14 15:20:40 +0400
+++ modules/ieee80211/kernel-modules-ieee80211.spec	2005-07-14 18:33:02 +0400
@@ -63,6 +63,11 @@ modules which interface with these drive
 %install
 %__mkdir_p %buildroot/%module_dir
 %__cp -a *.ko %buildroot/%module_dir
+%__mkdir_p %buildroot/%_prefix/src/linux-%kversion-%flavour/drivers/net/ieee80211
+for f in *.ko; do
+	mod="${f%.ko}"
+	%__cp -a "$mod.o" %buildroot/%_prefix/src/linux-%kversion-%flavour/drivers/net/ieee80211/
+done
 %__mkdir_p %buildroot/%_prefix/src/linux-%kversion-%flavour/include/net
 %__cp -a net/*  %buildroot/%_prefix/src/linux-%kversion-%flavour/include/net/
 echo "%name = %version-%release" \
@@ -81,6 +86,7 @@ echo "%name = %version-%release" \
 %files -n kernel-headers-%module_name-%flavour
 %defattr(644,root,root,755)
 %_prefix/src/linux-%kversion-%flavour/include/net/*
+%_prefix/src/linux-%kversion-%flavour/drivers/net/ieee80211
 %_prefix/src/linux-%kversion-%flavour/kernel-modules-%module_name.release
 
 %changelog
--- modules/ipw2100/kernel-modules-ipw2100.spec.modpost	2005-07-14 15:26:32 +0400
+++ modules/ipw2100/kernel-modules-ipw2100.spec	2005-07-14 18:33:47 +0400
@@ -53,6 +53,16 @@ PRO/Wireless 2100 Network Connection min
 
 %build
 . %_usrsrc/linux-%kversion-%flavour/gcc_version.inc
+
+%__mkdir .tmp_versions
+%__mkdir ieee80211
+for f in %_usrsrc/linux-%kversion-%flavour/drivers/net/ieee80211/*.o; do
+	mod="${f##*/}"
+	mod="${mod%.o}"
+	echo "$(pwd)/ieee80211/$mod.ko" > .tmp_versions/"$mod".mod
+	%__cp -a "$f" ieee80211/
+done
+
 %make_build -C %_usrsrc/linux-%kversion-%flavour SUBDIRS=$PWD \
 	    LINUXSRC=%_usrsrc/linux-%kversion-%flavour/ \
 	    IEEE80211_INC=%_usrsrc/linux-%kversion-%flavour/include
--- modules/ipw2200/kernel-modules-ipw2200.spec.modpost	2005-07-14 15:25:09 +0400
+++ modules/ipw2200/kernel-modules-ipw2200.spec	2005-07-14 18:40:23 +0400
@@ -53,6 +53,16 @@ PRO/Wireless 2200 Network Connection min
 
 %build
 . %_usrsrc/linux-%kversion-%flavour/gcc_version.inc
+
+%__mkdir .tmp_versions
+%__mkdir ieee80211
+for f in %_usrsrc/linux-%kversion-%flavour/drivers/net/ieee80211/*.o; do
+	mod="${f##*/}"
+	mod="${mod%.o}"
+	echo "$(pwd)/ieee80211/$mod.ko" > .tmp_versions/"$mod".mod
+	%__cp -a "$f" ieee80211/
+done
+
 %make_build -C %_usrsrc/linux-%kversion-%flavour SUBDIRS=$PWD \
 	    LINUXSRC=%_usrsrc/linux-%kversion-%flavour/ \
 	    IEEE80211_INC=%_usrsrc/linux-%kversion-%flavour/include

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

  parent reply	other threads:[~2005-07-14 15:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 11:50 [devel] ipw2x00 Alexey Shabalin
2005-07-13 12:25 ` [devel] ipw2x00 Sergey Vlasov
2005-07-14 10:25   ` Alexey Shabalin
2005-07-14 12:23     ` Alexander Bokovoy
2005-07-14 13:37       ` Alexey Shabalin
2005-07-14 13:06     ` Sergey Vlasov
2005-07-14 13:45       ` Alexey Shabalin
2005-07-14 15:33       ` Sergey Vlasov [this message]
2005-07-18 10:28         ` [devel] Re: [d-kernel] " Alexey Shabalin

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=20050714153330.GC10423@master.mivlgu.local \
    --to=vsu@altlinux.ru \
    --cc=devel-kernel@altlinux.ru \
    --cc=devel@altlinux.ru \
    --cc=rider@altlinux.com \
    --cc=shaba@altlinux.ru \
    --cc=taf@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 Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

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


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