All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: conf/i386.rmk
@ 2008-08-03 19:28 Robert Millan
  2008-08-03 19:30 ` Robert Millan
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Millan @ 2008-08-03 19:28 UTC (permalink / raw)
  To: grub-devel


Hi,

I'm thinking that we have quite a bit of duplicate stuff in each of the 4
i386 ports (cpuid, pci, serial, etc) that could well live in a
firmware-agnostic conf/i386.rmk file.

This would simplify things and make them easier to maintain.  What do you
think?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



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

* Re: RFC: conf/i386.rmk
  2008-08-03 19:28 RFC: conf/i386.rmk Robert Millan
@ 2008-08-03 19:30 ` Robert Millan
  2008-08-04  4:59   ` Pavel Roskin
  2008-08-04 22:08   ` RFC: conf/i386.rmk Marco Gerards
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Millan @ 2008-08-03 19:30 UTC (permalink / raw)
  To: grub-devel

On Sun, Aug 03, 2008 at 09:28:39PM +0200, Robert Millan wrote:
> 
> Hi,
> 
> I'm thinking that we have quite a bit of duplicate stuff in each of the 4
> i386 ports (cpuid, pci, serial, etc) that could well live in a
> firmware-agnostic conf/i386.rmk file.
> 
> This would simplify things and make them easier to maintain.  What do you
> think?

Btw, I think grub-emu could go there too.  The only arch-specific thing in
it AFAICS is cpuid.mod.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



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

* Re: RFC: conf/i386.rmk
  2008-08-03 19:30 ` Robert Millan
@ 2008-08-04  4:59   ` Pavel Roskin
  2008-08-05  6:58     ` Vesa Jääskeläinen
  2008-08-04 22:08   ` RFC: conf/i386.rmk Marco Gerards
  1 sibling, 1 reply; 10+ messages in thread
From: Pavel Roskin @ 2008-08-04  4:59 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, 2008-08-03 at 21:30 +0200, Robert Millan wrote:
> On Sun, Aug 03, 2008 at 09:28:39PM +0200, Robert Millan wrote:
> > 
> > Hi,
> > 
> > I'm thinking that we have quite a bit of duplicate stuff in each of the 4
> > i386 ports (cpuid, pci, serial, etc) that could well live in a
> > firmware-agnostic conf/i386.rmk file.
> > 
> > This would simplify things and make them easier to maintain.  What do you
> > think?
> 
> Btw, I think grub-emu could go there too.  The only arch-specific thing in
> it AFAICS is cpuid.mod.

I tried moving more stuff to common.rmk many times but gave up every
time.  One of the reasons is that the sparc64 support is very
out-of-date and doesn't use common.rmk at all.  I cannot even test it
(well, I haven't tries hard).

Limiting the scope to i386 could help, but I think there is very little
code specific to all i386 platforms but not to other architectures.

-- 
Regards,
Pavel Roskin



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

* Re: RFC: conf/i386.rmk
  2008-08-03 19:30 ` Robert Millan
  2008-08-04  4:59   ` Pavel Roskin
@ 2008-08-04 22:08   ` Marco Gerards
  1 sibling, 0 replies; 10+ messages in thread
From: Marco Gerards @ 2008-08-04 22:08 UTC (permalink / raw)
  To: The development of GRUB 2

Robert Millan <rmh@aybabtu.com> writes:

> On Sun, Aug 03, 2008 at 09:28:39PM +0200, Robert Millan wrote:
>> 
>> Hi,
>> 
>> I'm thinking that we have quite a bit of duplicate stuff in each of the 4
>> i386 ports (cpuid, pci, serial, etc) that could well live in a
>> firmware-agnostic conf/i386.rmk file.
>> 
>> This would simplify things and make them easier to maintain.  What do you
>> think?
>
> Btw, I think grub-emu could go there too.  The only arch-specific thing in
> it AFAICS is cpuid.mod.

Right, seems fine to me.

--
Marco




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

* Re: RFC: conf/i386.rmk
  2008-08-04  4:59   ` Pavel Roskin
@ 2008-08-05  6:58     ` Vesa Jääskeläinen
  2008-08-05 16:49       ` Pavel Roskin
  0 siblings, 1 reply; 10+ messages in thread
From: Vesa Jääskeläinen @ 2008-08-05  6:58 UTC (permalink / raw)
  To: The development of GRUB 2

Pavel Roskin wrote:
> On Sun, 2008-08-03 at 21:30 +0200, Robert Millan wrote:
>> On Sun, Aug 03, 2008 at 09:28:39PM +0200, Robert Millan wrote:
>>> Hi,
>>>
>>> I'm thinking that we have quite a bit of duplicate stuff in each of the 4
>>> i386 ports (cpuid, pci, serial, etc) that could well live in a
>>> firmware-agnostic conf/i386.rmk file.
>>>
>>> This would simplify things and make them easier to maintain.  What do you
>>> think?
>> Btw, I think grub-emu could go there too.  The only arch-specific thing in
>> it AFAICS is cpuid.mod.
> 
> I tried moving more stuff to common.rmk many times but gave up every
> time.  One of the reasons is that the sparc64 support is very
> out-of-date and doesn't use common.rmk at all.  I cannot even test it
> (well, I haven't tries hard).

If sparc64 support is out of date and the maintainer is nowhere to be 
seen then I think you can put that support to graveyard until someone 
comes up to update it. Putting all common stuff to every platform to 
common.rmk is a good way and the only way (in my opinion) to go forward.



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

* Re: RFC: conf/i386.rmk
  2008-08-05  6:58     ` Vesa Jääskeläinen
@ 2008-08-05 16:49       ` Pavel Roskin
  2008-08-05 20:07         ` Robert Millan
  0 siblings, 1 reply; 10+ messages in thread
From: Pavel Roskin @ 2008-08-05 16:49 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, 2008-08-05 at 09:58 +0300, Vesa Jääskeläinen wrote:

> > I tried moving more stuff to common.rmk many times but gave up every
> > time.  One of the reasons is that the sparc64 support is very
> > out-of-date and doesn't use common.rmk at all.  I cannot even test it
> > (well, I haven't tries hard).
> 
> If sparc64 support is out of date and the maintainer is nowhere to be 
> seen then I think you can put that support to graveyard until someone 
> comes up to update it. Putting all common stuff to every platform to 
> common.rmk is a good way and the only way (in my opinion) to go forward.

OK, then there is an issue that it doesn't work if done naively.  Either
genmk.rb should sort statements or we need some makefile magic
(recursively expanded variables, perhaps) that would be transparent to
genmk.rb.  Maybe we need both.

We may want to have another common file for all ieee1275 pratforms.

-- 
Regards,
Pavel Roskin



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

* Re: RFC: conf/i386.rmk
  2008-08-05 16:49       ` Pavel Roskin
@ 2008-08-05 20:07         ` Robert Millan
  2008-08-05 21:08           ` Pavel Roskin
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Millan @ 2008-08-05 20:07 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, Aug 05, 2008 at 12:49:46PM -0400, Pavel Roskin wrote:
> On Tue, 2008-08-05 at 09:58 +0300, Vesa Jääskeläinen wrote:
> 
> > > I tried moving more stuff to common.rmk many times but gave up every
> > > time.  One of the reasons is that the sparc64 support is very
> > > out-of-date and doesn't use common.rmk at all.  I cannot even test it
> > > (well, I haven't tries hard).
> > 
> > If sparc64 support is out of date and the maintainer is nowhere to be 
> > seen then I think you can put that support to graveyard until someone 
> > comes up to update it. Putting all common stuff to every platform to 
> > common.rmk is a good way and the only way (in my opinion) to go forward.
> 
> OK, then there is an issue that it doesn't work if done naively.

What is the problem exactly?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



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

* Re: RFC: conf/i386.rmk
  2008-08-05 20:07         ` Robert Millan
@ 2008-08-05 21:08           ` Pavel Roskin
  2008-09-05 10:54             ` [PATCH] Move cpuid.mod to conf/i386.rmk (Re: RFC: conf/i386.rmk) Robert Millan
  0 siblings, 1 reply; 10+ messages in thread
From: Pavel Roskin @ 2008-08-05 21:08 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, 2008-08-05 at 22:07 +0200, Robert Millan wrote:
> On Tue, Aug 05, 2008 at 12:49:46PM -0400, Pavel Roskin wrote:
> > On Tue, 2008-08-05 at 09:58 +0300, Vesa Jääskeläinen wrote:
> > 
> > > > I tried moving more stuff to common.rmk many times but gave up every
> > > > time.  One of the reasons is that the sparc64 support is very
> > > > out-of-date and doesn't use common.rmk at all.  I cannot even test it
> > > > (well, I haven't tries hard).
> > > 
> > > If sparc64 support is out of date and the maintainer is nowhere to be 
> > > seen then I think you can put that support to graveyard until someone 
> > > comes up to update it. Putting all common stuff to every platform to 
> > > common.rmk is a good way and the only way (in my opinion) to go forward.
> > 
> > OK, then there is an issue that it doesn't work if done naively.
> 
> What is the problem exactly?

Take all text in conf/i386-pc.rmk from "For grub-emu" to "Scripts" and
move it to the end of conf/common.rmk.  Run autogen.sh, configure
--enable-grub-emu and make.  You'll get:

make: *** No rule to make target `grub-emu', needed by `all-local'.
Stop.

-- 
Regards,
Pavel Roskin



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

* [PATCH] Move cpuid.mod to conf/i386.rmk (Re: RFC: conf/i386.rmk)
  2008-08-05 21:08           ` Pavel Roskin
@ 2008-09-05 10:54             ` Robert Millan
  2008-09-07 17:13               ` Robert Millan
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Millan @ 2008-09-05 10:54 UTC (permalink / raw)
  To: The development of GRUB 2

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

On Tue, Aug 05, 2008 at 05:08:29PM -0400, Pavel Roskin wrote:
> On Tue, 2008-08-05 at 22:07 +0200, Robert Millan wrote:
> > On Tue, Aug 05, 2008 at 12:49:46PM -0400, Pavel Roskin wrote:
> > > On Tue, 2008-08-05 at 09:58 +0300, Vesa Jääskeläinen wrote:
> > > 
> > > > > I tried moving more stuff to common.rmk many times but gave up every
> > > > > time.  One of the reasons is that the sparc64 support is very
> > > > > out-of-date and doesn't use common.rmk at all.  I cannot even test it
> > > > > (well, I haven't tries hard).
> > > > 
> > > > If sparc64 support is out of date and the maintainer is nowhere to be 
> > > > seen then I think you can put that support to graveyard until someone 
> > > > comes up to update it. Putting all common stuff to every platform to 
> > > > common.rmk is a good way and the only way (in my opinion) to go forward.
> > > 
> > > OK, then there is an issue that it doesn't work if done naively.
> > 
> > What is the problem exactly?
> 
> Take all text in conf/i386-pc.rmk from "For grub-emu" to "Scripts" and
> move it to the end of conf/common.rmk.  Run autogen.sh, configure
> --enable-grub-emu and make.  You'll get:
> 
> make: *** No rule to make target `grub-emu', needed by `all-local'.
> Stop.

Okay then.  Since it appears this kind of changes are delicate, I propose
doing them granularly.

Here's my first patch, that moves cpuid.mod and sets the base for moving more
stuff later (I've tested the resulting cpuid.mod is built correctly).

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

[-- Attachment #2: i386.diff --]
[-- Type: text/x-diff, Size: 5898 bytes --]

2008-09-05  Robert Millan  <rmh@aybabtu.com>

	* conf/i386.rmk: New file.  Provides declaration for building
	`cpuid.mod'.
	* conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
	(cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
	variables.
	Include `conf/i386.mk'.
	* conf/i386-efi.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.

Index: conf/i386.rmk
===================================================================
--- conf/i386.rmk	(revision 0)
+++ conf/i386.rmk	(revision 0)
@@ -0,0 +1,8 @@
+# -*- makefile -*-
+
+pkglib_MODULES += cpuid.mod
+
+# For cpuid.mod.
+cpuid_mod_SOURCES = commands/i386/cpuid.c
+cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
+cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
Index: conf/i386-pc.rmk
===================================================================
--- conf/i386-pc.rmk	(revision 1851)
+++ conf/i386-pc.rmk	(working copy)
@@ -163,7 +163,7 @@
 pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.mod \
 	_multiboot.mod chain.mod multiboot.mod reboot.mod halt.mod	\
 	vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
-	videotest.mod play.mod bitmap.mod tga.mod cpuid.mod serial.mod	\
+	videotest.mod play.mod bitmap.mod tga.mod serial.mod	\
 	ata.mod vga.mod memdisk.mod jpeg.mod png.mod pci.mod lspci.mod \
 	aout.mod _bsd.mod bsd.mod pxe.mod pxecmd.mod datetime.mod date.mod \
 	datehook.mod
@@ -278,11 +278,6 @@
 tga_mod_CFLAGS = $(COMMON_CFLAGS)
 tga_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
-# For cpuid.mod.
-cpuid_mod_SOURCES = commands/i386/cpuid.c
-cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
-cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
 # For ata.mod.
 ata_mod_SOURCES = disk/ata.c
 ata_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -358,4 +353,5 @@
 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+include $(srcdir)/conf/i386.mk
 include $(srcdir)/conf/common.mk
Index: conf/i386-efi.rmk
===================================================================
--- conf/i386-efi.rmk	(revision 1851)
+++ conf/i386-efi.rmk	(working copy)
@@ -76,7 +76,7 @@
 
 # Modules.
 pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
-	_linux.mod linux.mod cpuid.mod halt.mod reboot.mod pci.mod lspci.mod \
+	_linux.mod linux.mod halt.mod reboot.mod pci.mod lspci.mod \
 	datetime.mod date.mod datehook.mod
 
 # For kernel.mod.
@@ -144,11 +144,6 @@
 linux_mod_CFLAGS = $(COMMON_CFLAGS)
 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
-# For cpuid.mod.
-cpuid_mod_SOURCES = commands/i386/cpuid.c
-cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
-cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
 # For halt.mod.
 halt_mod_SOURCES = commands/halt.c
 halt_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -184,4 +179,5 @@
 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+include $(srcdir)/conf/i386.mk
 include $(srcdir)/conf/common.mk
Index: conf/x86_64-efi.rmk
===================================================================
--- conf/x86_64-efi.rmk	(revision 1851)
+++ conf/x86_64-efi.rmk	(working copy)
@@ -78,7 +78,7 @@
 
 # Modules.
 pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
-	cpuid.mod halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod \
+	halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod \
 	datetime.mod date.mod datehook.mod
 
 # For kernel.mod.
@@ -146,11 +146,6 @@
 linux_mod_CFLAGS = $(COMMON_CFLAGS)
 linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
-# For cpuid.mod.
-cpuid_mod_SOURCES = commands/i386/cpuid.c
-cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
-cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
 # For halt.mod.
 halt_mod_SOURCES = commands/halt.c
 halt_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -186,4 +181,5 @@
 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+include $(srcdir)/conf/i386.mk
 include $(srcdir)/conf/common.mk
Index: conf/i386-coreboot.rmk
===================================================================
--- conf/i386-coreboot.rmk	(revision 1851)
+++ conf/i386-coreboot.rmk	(working copy)
@@ -94,7 +94,7 @@
 # Modules.
 pkglib_MODULES = _linux.mod linux.mod normal.mod	\
 	_multiboot.mod multiboot.mod aout.mod		\
-	play.mod cpuid.mod serial.mod ata.mod		\
+	play.mod serial.mod ata.mod			\
 	memdisk.mod pci.mod lspci.mod reboot.mod	\
 	halt.mod datetime.mod date.mod datehook.mod
 
@@ -156,11 +156,6 @@
 play_mod_CFLAGS = $(COMMON_CFLAGS)
 play_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
-# For cpuid.mod.
-cpuid_mod_SOURCES = commands/i386/cpuid.c
-cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
-cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
 # For ata.mod.
 ata_mod_SOURCES = disk/ata.c
 ata_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -196,4 +191,5 @@
 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+include $(srcdir)/conf/i386.mk
 include $(srcdir)/conf/common.mk
Index: conf/i386-ieee1275.rmk
===================================================================
--- conf/i386-ieee1275.rmk	(revision 1851)
+++ conf/i386-ieee1275.rmk	(working copy)
@@ -96,7 +96,7 @@
 grub_install_SOURCES = util/ieee1275/grub-install.in
 
 # Modules.
-pkglib_MODULES = normal.mod halt.mod reboot.mod suspend.mod cpuid.mod	\
+pkglib_MODULES = normal.mod halt.mod reboot.mod suspend.mod		\
 	multiboot.mod _multiboot.mod aout.mod serial.mod linux.mod	\
 	_linux.mod nand.mod memdisk.mod pci.mod lspci.mod datetime.mod	\
 	date.mod datehook.mod
@@ -143,11 +143,6 @@
 halt_mod_CFLAGS = $(COMMON_CFLAGS)
 halt_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
-# For cpuid.mod.
-cpuid_mod_SOURCES = commands/i386/cpuid.c
-cpuid_mod_CFLAGS = $(COMMON_CFLAGS)
-cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
 # For serial.mod.
 serial_mod_SOURCES = term/i386/pc/serial.c
 serial_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -198,4 +193,5 @@
 datehook_mod_CFLAGS = $(COMMON_CFLAGS)
 datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+include $(srcdir)/conf/i386.mk
 include $(srcdir)/conf/common.mk

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

* Re: [PATCH] Move cpuid.mod to conf/i386.rmk (Re: RFC: conf/i386.rmk)
  2008-09-05 10:54             ` [PATCH] Move cpuid.mod to conf/i386.rmk (Re: RFC: conf/i386.rmk) Robert Millan
@ 2008-09-07 17:13               ` Robert Millan
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Millan @ 2008-09-07 17:13 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, Sep 05, 2008 at 12:54:03PM +0200, Robert Millan wrote:
> 
> Okay then.  Since it appears this kind of changes are delicate, I propose
> doing them granularly.
> 
> Here's my first patch, that moves cpuid.mod and sets the base for moving more
> stuff later (I've tested the resulting cpuid.mod is built correctly).

Committed.  I'll use this base to move similar stuff, and try to make the
i386-*.rmk files smaller this way.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



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

end of thread, other threads:[~2008-09-07 17:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-03 19:28 RFC: conf/i386.rmk Robert Millan
2008-08-03 19:30 ` Robert Millan
2008-08-04  4:59   ` Pavel Roskin
2008-08-05  6:58     ` Vesa Jääskeläinen
2008-08-05 16:49       ` Pavel Roskin
2008-08-05 20:07         ` Robert Millan
2008-08-05 21:08           ` Pavel Roskin
2008-09-05 10:54             ` [PATCH] Move cpuid.mod to conf/i386.rmk (Re: RFC: conf/i386.rmk) Robert Millan
2008-09-07 17:13               ` Robert Millan
2008-08-04 22:08   ` RFC: conf/i386.rmk Marco Gerards

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.