* IDE module problem
@ 2002-12-09 19:58 Jun Sun
2002-12-11 13:21 ` Maciej W. Rozycki
0 siblings, 1 reply; 7+ messages in thread
From: Jun Sun @ 2002-12-09 19:58 UTC (permalink / raw)
To: linux-mips; +Cc: jsun
If you configure IDE support as a module (CONFIG_IDE), you
will soon find that ide-std.o and ide-no.o are missing.
This is because arch/mips/lib/Makefile says:
obj-$(CONFIG_IDE) += ide-std.o ide-no.o
Here are the possible fixes. I'd like to hear your feedbacks.
1) change config-shared.in file so that CONFIG_IDE only
has a binary state (y or n)
2) change Makefile so that ide-std.o and ide-no.o are always
included. Waste about 1K for systems don't use them at all.
3) use some smart trick in Makefile so that we include those
two files only if CONFIG_IDE is 'y' or 'm'. (How?)
Jun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE module problem
2002-12-09 19:58 IDE module problem Jun Sun
@ 2002-12-11 13:21 ` Maciej W. Rozycki
2002-12-11 16:49 ` Jun Sun
0 siblings, 1 reply; 7+ messages in thread
From: Maciej W. Rozycki @ 2002-12-11 13:21 UTC (permalink / raw)
To: Jun Sun; +Cc: linux-mips
On Mon, 9 Dec 2002, Jun Sun wrote:
> If you configure IDE support as a module (CONFIG_IDE), you
> will soon find that ide-std.o and ide-no.o are missing.
> This is because arch/mips/lib/Makefile says:
>
> obj-$(CONFIG_IDE) += ide-std.o ide-no.o
[...]
> 3) use some smart trick in Makefile so that we include those
> two files only if CONFIG_IDE is 'y' or 'm'. (How?)
obj-$(CONFIG_IDE_MODULE)
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE module problem
2002-12-11 13:21 ` Maciej W. Rozycki
@ 2002-12-11 16:49 ` Jun Sun
2002-12-11 17:20 ` Maciej W. Rozycki
0 siblings, 1 reply; 7+ messages in thread
From: Jun Sun @ 2002-12-11 16:49 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: linux-mips, jsun
On Wed, Dec 11, 2002 at 02:21:48PM +0100, Maciej W. Rozycki wrote:
> On Mon, 9 Dec 2002, Jun Sun wrote:
>
> > If you configure IDE support as a module (CONFIG_IDE), you
> > will soon find that ide-std.o and ide-no.o are missing.
> > This is because arch/mips/lib/Makefile says:
> >
> > obj-$(CONFIG_IDE) += ide-std.o ide-no.o
> [...]
> > 3) use some smart trick in Makefile so that we include those
> > two files only if CONFIG_IDE is 'y' or 'm'. (How?)
>
> obj-$(CONFIG_IDE_MODULE)
>
This does not work. Apparently, CONFIG_IDE_MODULE is not created
for makefile part.
Jun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE module problem
2002-12-11 16:49 ` Jun Sun
@ 2002-12-11 17:20 ` Maciej W. Rozycki
2002-12-12 2:56 ` Keith Owens
0 siblings, 1 reply; 7+ messages in thread
From: Maciej W. Rozycki @ 2002-12-11 17:20 UTC (permalink / raw)
To: Jun Sun; +Cc: linux-mips
On Wed, 11 Dec 2002, Jun Sun wrote:
> > > This is because arch/mips/lib/Makefile says:
> > >
> > > obj-$(CONFIG_IDE) += ide-std.o ide-no.o
> > [...]
> > > 3) use some smart trick in Makefile so that we include those
> > > two files only if CONFIG_IDE is 'y' or 'm'. (How?)
> >
> > obj-$(CONFIG_IDE_MODULE)
>
> This does not work. Apparently, CONFIG_IDE_MODULE is not created
> for makefile part.
Indeed -- my fault. Variables such as $(CONFIG_IDE) are four-state and
for the module case they are simply set to "m". But then you can use
"ifeq ($(CONFIG_IDE),m)". Another approach is to invent an additional
variable automatically set to "y" whenever CONFIG_IDE is enabled.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE module problem
2002-12-11 17:20 ` Maciej W. Rozycki
@ 2002-12-12 2:56 ` Keith Owens
2002-12-17 2:20 ` Jun Sun
0 siblings, 1 reply; 7+ messages in thread
From: Keith Owens @ 2002-12-12 2:56 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Jun Sun, linux-mips
On Wed, 11 Dec 2002 18:20:30 +0100 (MET),
"Maciej W. Rozycki" <macro@ds2.pg.gda.pl> wrote:
>On Wed, 11 Dec 2002, Jun Sun wrote:
>
>> > > This is because arch/mips/lib/Makefile says:
>> > >
>> > > obj-$(CONFIG_IDE) += ide-std.o ide-no.o
>> > [...]
>> > > 3) use some smart trick in Makefile so that we include those
>> > > two files only if CONFIG_IDE is 'y' or 'm'. (How?)
>> >
>> > obj-$(CONFIG_IDE_MODULE)
>>
>> This does not work. Apparently, CONFIG_IDE_MODULE is not created
>> for makefile part.
>
> Indeed -- my fault. Variables such as $(CONFIG_IDE) are four-state and
>for the module case they are simply set to "m". But then you can use
>"ifeq ($(CONFIG_IDE),m)". Another approach is to invent an additional
>variable automatically set to "y" whenever CONFIG_IDE is enabled.
obj-$(subst m,y,$(CONFIG_IDE)) += ide-std.o ide-no.o
ide-std.o ide-no.o are built in if CONFIG_IDE is m or y.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE module problem
2002-12-12 2:56 ` Keith Owens
@ 2002-12-17 2:20 ` Jun Sun
2002-12-17 2:25 ` Keith Owens
0 siblings, 1 reply; 7+ messages in thread
From: Jun Sun @ 2002-12-17 2:20 UTC (permalink / raw)
To: Keith Owens; +Cc: Maciej W. Rozycki, linux-mips, jsun
[-- Attachment #1: Type: text/plain, Size: 1140 bytes --]
On Thu, Dec 12, 2002 at 01:56:37PM +1100, Keith Owens wrote:
> On Wed, 11 Dec 2002 18:20:30 +0100 (MET),
> "Maciej W. Rozycki" <macro@ds2.pg.gda.pl> wrote:
> >On Wed, 11 Dec 2002, Jun Sun wrote:
> >
> >> > > This is because arch/mips/lib/Makefile says:
> >> > >
> >> > > obj-$(CONFIG_IDE) += ide-std.o ide-no.o
> >> > [...]
> >> > > 3) use some smart trick in Makefile so that we include those
> >> > > two files only if CONFIG_IDE is 'y' or 'm'. (How?)
> >> >
> >> > obj-$(CONFIG_IDE_MODULE)
> >>
> >> This does not work. Apparently, CONFIG_IDE_MODULE is not created
> >> for makefile part.
> >
> > Indeed -- my fault. Variables such as $(CONFIG_IDE) are four-state and
> >for the module case they are simply set to "m". But then you can use
> >"ifeq ($(CONFIG_IDE),m)". Another approach is to invent an additional
> >variable automatically set to "y" whenever CONFIG_IDE is enabled.
>
> obj-$(subst m,y,$(CONFIG_IDE)) += ide-std.o ide-no.o
>
> ide-std.o ide-no.o are built in if CONFIG_IDE is m or y.
>
This is the most clean solution so far. Anybody would object
this change?
See the attached patch.
Jun
[-- Attachment #2: 021216-ide-module-obj.patch --]
[-- Type: text/plain, Size: 926 bytes --]
diff -Nru linux/arch/mips/lib/Makefile.orig linux/arch/mips/lib/Makefile
--- linux/arch/mips/lib/Makefile.orig Sat Sep 28 15:28:38 2002
+++ linux/arch/mips/lib/Makefile Mon Dec 16 18:13:43 2002
@@ -18,7 +18,7 @@
endif
obj-$(CONFIG_BLK_DEV_FD) += floppy-no.o floppy-std.o
-obj-$(CONFIG_IDE) += ide-std.o ide-no.o
+obj-$(subst m,y,$(CONFIG_IDE)) += ide-std.o ide-no.o
obj-$(CONFIG_PC_KEYB) += kbd-std.o kbd-no.o
include $(TOPDIR)/Rules.make
diff -Nru linux/arch/mips64/lib/Makefile.orig linux/arch/mips64/lib/Makefile
--- linux/arch/mips64/lib/Makefile.orig Sat Sep 28 15:28:38 2002
+++ linux/arch/mips64/lib/Makefile Mon Dec 16 18:17:20 2002
@@ -11,7 +11,7 @@
strnlen_user.o watch.o
obj-$(CONFIG_BLK_DEV_FD) += floppy-no.o floppy-std.o
-obj-$(CONFIG_IDE) += ide-std.o ide-no.o
+obj-$(subst m,y,$(CONFIG_IDE)) += ide-std.o ide-no.o
obj-$(CONFIG_PC_KEYB) += kbd-std.o kbd-no.o
include $(TOPDIR)/Rules.make
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: IDE module problem
2002-12-17 2:20 ` Jun Sun
@ 2002-12-17 2:25 ` Keith Owens
0 siblings, 0 replies; 7+ messages in thread
From: Keith Owens @ 2002-12-17 2:25 UTC (permalink / raw)
To: Jun Sun; +Cc: Maciej W. Rozycki, linux-mips
On Mon, 16 Dec 2002 18:20:50 -0800,
Jun Sun <jsun@mvista.com> wrote:
>On Thu, Dec 12, 2002 at 01:56:37PM +1100, Keith Owens wrote:
>> obj-$(subst m,y,$(CONFIG_IDE)) += ide-std.o ide-no.o
>
>This is the most clean solution so far. Anybody would object
>this change?
>
>See the attached patch.
Add a comment to the end of the line, any nonstandard build entries
should have comments :)
obj-$(subst m,y,$(CONFIG_IDE)) += ide-std.o ide-no.o # must be builtin if ide is builtin or a module
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-12-17 2:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-09 19:58 IDE module problem Jun Sun
2002-12-11 13:21 ` Maciej W. Rozycki
2002-12-11 16:49 ` Jun Sun
2002-12-11 17:20 ` Maciej W. Rozycki
2002-12-12 2:56 ` Keith Owens
2002-12-17 2:20 ` Jun Sun
2002-12-17 2:25 ` Keith Owens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox