Move normal, serial & pci to i386.rmk
PATCH 1/1 Move normal, serial & pci to i386.rmk
This patch moves normal, serial and pci to conf/i386.rmk.
Signature · 5 lines
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."
2008-09-08 Robert Millan <[email protected]>
* conf/i386-pc.rmk (pkglib_MODULES): Remove normal.mod', pci.mod', lspci.mod' and serial.mod'.
(normal_mod_*, serial_mod_*, pci_mod_*, lspci_mod_*): Moved from here ...
* conf/i386.rmk (normal_mod_*, serial_mod_*, pci_mod_*, lspci_mod_*):
... to here.
(pkglib_MODULES): Add normal.mod', pci.mod', lspci.mod' and serial.mod'.
* conf/i386-efi.rmk (pkglib_MODULES): Remove normal.mod', pci.mod', lspci.mod' and serial.mod'. (normal_mod_*, serial_mod_*, pci_mod_*, lspci_mod_*): Remove.
* conf/x86_64-efi.rmk: Likewise.
* conf/i386-coreboot.rmk: Likewise.
* conf/i386-ieee1275.rmk: Likewise.
* normal/i386/setjmp.S [__x86_64__]: Include "../x86_64/setjmp.S".
i386-pc.rmk +3 -29
@@ -160,11 +160,11 @@ grub_mkrescue_SOURCES = util/i386/pc/grub-mkrescue.in # Modules. -pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.mod \ +pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.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 serial.mod \ - ata.mod vga.mod memdisk.mod jpeg.mod png.mod pci.mod lspci.mod \ + videotest.mod play.mod bitmap.mod tga.mod \ + ata.mod vga.mod memdisk.mod jpeg.mod png.mod \ aout.mod _bsd.mod bsd.mod pxe.mod pxecmd.mod datetime.mod date.mod \ datehook.mod
@@ -193,17 +193,6 @@ linux_mod_CFLAGS = $(COMMON_CFLAGS) linux_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For normal.mod. -normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ - normal/completion.c normal/execute.c \ - normal/function.c normal/lexer.c normal/main.c normal/menu.c \ - normal/color.c \ - normal/menu_entry.c normal/misc.c grub_script.tab.c \ - normal/script.c normal/i386/setjmp.S -normal_mod_CFLAGS = $(COMMON_CFLAGS) -normal_mod_ASFLAGS = $(COMMON_ASFLAGS) -normal_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For reboot.mod. reboot_mod_SOURCES = commands/reboot.c reboot_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -214,11 +203,6 @@ halt_mod_CFLAGS = $(COMMON_CFLAGS) halt_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For serial.mod. -serial_mod_SOURCES = term/i386/pc/serial.c -serial_mod_CFLAGS = $(COMMON_CFLAGS) -serial_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For _multiboot.mod. _multiboot_mod_SOURCES = loader/i386/pc/multiboot.c \ loader/i386/pc/multiboot2.c \
@@ -303,16 +287,6 @@ png_mod_CFLAGS = $(COMMON_CFLAGS) png_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For pci.mod -pci_mod_SOURCES = bus/pci.c -pci_mod_CFLAGS = $(COMMON_CFLAGS) -pci_mod_LDFLAGS = $(COMMON_LDFLAGS) - -# For lspci.mod -lspci_mod_SOURCES = commands/lspci.c -lspci_mod_CFLAGS = $(COMMON_CFLAGS) -lspci_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For aout.mod aout_mod_SOURCES = loader/aout.c aout_mod_CFLAGS = $(COMMON_CFLAGS)
i386.rmk +26 -1
@@ -1,8 +1,33 @@ # -*- makefile -*- -pkglib_MODULES += cpuid.mod +pkglib_MODULES += cpuid.mod normal.mod pci.mod lspci.mod serial.mod # For cpuid.mod. cpuid_mod_SOURCES = commands/i386/cpuid.c cpuid_mod_CFLAGS = $(COMMON_CFLAGS) cpuid_mod_LDFLAGS = $(COMMON_LDFLAGS) + +# For normal.mod +normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ + normal/completion.c normal/execute.c \ + normal/function.c normal/lexer.c normal/main.c normal/menu.c \ + normal/menu_entry.c normal/misc.c grub_script.tab.c \ + normal/script.c normal/i386/setjmp.S normal/color.c +normal_mod_CFLAGS = $(COMMON_CFLAGS) +normal_mod_ASFLAGS = $(COMMON_ASFLAGS) +normal_mod_LDFLAGS = $(COMMON_LDFLAGS) + +# For pci.mod +pci_mod_SOURCES = bus/pci.c +pci_mod_CFLAGS = $(COMMON_CFLAGS) +pci_mod_LDFLAGS = $(COMMON_LDFLAGS) + +# For lspci.mod +lspci_mod_SOURCES = commands/lspci.c +lspci_mod_CFLAGS = $(COMMON_CFLAGS) +lspci_mod_LDFLAGS = $(COMMON_LDFLAGS) + +# For serial.mod. +serial_mod_SOURCES = term/i386/pc/serial.c +serial_mod_CFLAGS = $(COMMON_CFLAGS) +serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
i386-efi.rmk +2 -22
@@ -75,8 +75,8 @@ grub_install_SOURCES = util/i386/efi/grub-install.in # Modules. -pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \ - _linux.mod linux.mod halt.mod reboot.mod pci.mod lspci.mod \ +pkglib_MODULES = kernel.mod _chain.mod chain.mod appleldr.mod \ + _linux.mod linux.mod halt.mod reboot.mod \ datetime.mod date.mod datehook.mod # For kernel.mod.
@@ -109,16 +109,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) -# For normal.mod. -normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ - normal/completion.c normal/execute.c \ - normal/function.c normal/lexer.c normal/main.c normal/menu.c \ - normal/menu_entry.c normal/misc.c grub_script.tab.c \ - normal/script.c normal/i386/setjmp.S normal/color.c -normal_mod_CFLAGS = $(COMMON_CFLAGS) -normal_mod_ASFLAGS = $(COMMON_ASFLAGS) -normal_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For _chain.mod. _chain_mod_SOURCES = loader/efi/chainloader.c _chain_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -154,16 +144,6 @@ reboot_mod_CFLAGS = $(COMMON_CFLAGS) reboot_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For pci.mod -pci_mod_SOURCES = bus/pci.c -pci_mod_CFLAGS = $(COMMON_CFLAGS) -pci_mod_LDFLAGS = $(COMMON_LDFLAGS) - -# For lspci.mod -lspci_mod_SOURCES = commands/lspci.c -lspci_mod_CFLAGS = $(COMMON_CFLAGS) -lspci_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For datetime.mod datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c datetime_mod_CFLAGS = $(COMMON_CFLAGS)
x86_64-efi.rmk +2 -22
@@ -77,8 +77,8 @@ grub_install_SOURCES = util/i386/efi/grub-install.in # Modules. -pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \ - halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod \ +pkglib_MODULES = kernel.mod _chain.mod chain.mod appleldr.mod \ + halt.mod reboot.mod _linux.mod linux.mod \ datetime.mod date.mod datehook.mod # For kernel.mod.
@@ -111,16 +111,6 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1) -# For normal.mod. -normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ - normal/completion.c normal/execute.c \ - normal/function.c normal/lexer.c normal/main.c normal/menu.c \ - normal/menu_entry.c normal/misc.c grub_script.tab.c \ - normal/script.c normal/x86_64/setjmp.S normal/color.c -normal_mod_CFLAGS = $(COMMON_CFLAGS) -normal_mod_ASFLAGS = $(COMMON_ASFLAGS) -normal_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For _chain.mod. _chain_mod_SOURCES = loader/efi/chainloader.c _chain_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -156,16 +146,6 @@ reboot_mod_CFLAGS = $(COMMON_CFLAGS) reboot_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For pci.mod -pci_mod_SOURCES = bus/pci.c -pci_mod_CFLAGS = $(COMMON_CFLAGS) -pci_mod_LDFLAGS = $(COMMON_LDFLAGS) - -# For lspci.mod -lspci_mod_SOURCES = commands/lspci.c -lspci_mod_CFLAGS = $(COMMON_CFLAGS) -lspci_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For datetime.mod datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c datetime_mod_CFLAGS = $(COMMON_CFLAGS)
i386-coreboot.rmk +3 -28
@@ -92,10 +92,10 @@ grub_emu_LDFLAGS = $(LIBCURSES) # Modules. -pkglib_MODULES = _linux.mod linux.mod normal.mod \ +pkglib_MODULES = _linux.mod linux.mod \ _multiboot.mod multiboot.mod aout.mod \ - play.mod serial.mod ata.mod \ - memdisk.mod pci.mod lspci.mod reboot.mod \ + play.mod ata.mod \ + memdisk.mod reboot.mod \ halt.mod datetime.mod date.mod datehook.mod # For _linux.mod.
@@ -108,16 +108,6 @@ linux_mod_CFLAGS = $(COMMON_CFLAGS) linux_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For normal.mod. -normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ - normal/completion.c normal/execute.c \ - normal/function.c normal/lexer.c normal/main.c normal/menu.c \ - normal/menu_entry.c normal/misc.c grub_script.tab.c \ - normal/script.c normal/i386/setjmp.S normal/color.c -normal_mod_CFLAGS = $(COMMON_CFLAGS) -normal_mod_ASFLAGS = $(COMMON_ASFLAGS) -normal_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For reboot.mod. reboot_mod_SOURCES = commands/reboot.c kern/i386/reboot.c reboot_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -128,11 +118,6 @@ halt_mod_CFLAGS = $(COMMON_CFLAGS) halt_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For serial.mod. -serial_mod_SOURCES = term/i386/pc/serial.c -serial_mod_CFLAGS = $(COMMON_CFLAGS) -serial_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For _multiboot.mod. _multiboot_mod_SOURCES = loader/i386/pc/multiboot.c \ loader/i386/pc/multiboot2.c \
@@ -166,16 +151,6 @@ memdisk_mod_CFLAGS = $(COMMON_CFLAGS) memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For pci.mod -pci_mod_SOURCES = bus/pci.c -pci_mod_CFLAGS = $(COMMON_CFLAGS) -pci_mod_LDFLAGS = $(COMMON_LDFLAGS) - -# For lspci.mod -lspci_mod_SOURCES = commands/lspci.c -lspci_mod_CFLAGS = $(COMMON_CFLAGS) -lspci_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For datetime.mod datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c datetime_mod_CFLAGS = $(COMMON_CFLAGS)
i386-ieee1275.rmk +2 -27
@@ -96,21 +96,11 @@ grub_install_SOURCES = util/ieee1275/grub-install.in # Modules. -pkglib_MODULES = normal.mod halt.mod reboot.mod suspend.mod \ +pkglib_MODULES = 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 \ + _linux.mod nand.mod memdisk.mod datetime.mod \ date.mod datehook.mod -# For normal.mod. -normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \ - normal/completion.c normal/execute.c \ - normal/function.c normal/lexer.c normal/main.c normal/menu.c \ - normal/menu_entry.c normal/misc.c grub_script.tab.c \ - normal/script.c normal/i386/setjmp.S normal/color.c -normal_mod_CFLAGS = $(COMMON_CFLAGS) -normal_mod_ASFLAGS = $(COMMON_ASFLAGS) -normal_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For _multiboot.mod. _multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \ loader/multiboot2.c \
@@ -143,11 +133,6 @@ halt_mod_CFLAGS = $(COMMON_CFLAGS) halt_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For serial.mod. -serial_mod_SOURCES = term/i386/pc/serial.c -serial_mod_CFLAGS = $(COMMON_CFLAGS) -serial_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For _linux.mod. _linux_mod_SOURCES = loader/i386/ieee1275/linux.c _linux_mod_CFLAGS = $(COMMON_CFLAGS)
@@ -168,16 +153,6 @@ memdisk_mod_CFLAGS = $(COMMON_CFLAGS) memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS) -# For pci.mod -pci_mod_SOURCES = bus/pci.c -pci_mod_CFLAGS = $(COMMON_CFLAGS) -pci_mod_LDFLAGS = $(COMMON_LDFLAGS) - -# For lspci.mod -lspci_mod_SOURCES = commands/lspci.c -lspci_mod_CFLAGS = $(COMMON_CFLAGS) -lspci_mod_LDFLAGS = $(COMMON_LDFLAGS) - # For datetime.mod datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c datetime_mod_CFLAGS = $(COMMON_CFLAGS)
i386/setjmp.S +9 -1
@@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2003,2007 Free Software Foundation, Inc. + * Copyright (C) 2003,2007,2008 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
@@ -16,6 +16,12 @@ * along with GRUB. If not, see <http://www.gnu.org/licenses/>. */ +#ifdef __x86_64__ + +#include "../x86_64/setjmp.S" + +#else /* ! __x86_64__ */ + #include <grub/symbol.h> .file "setjmp.S"
@@ -54,3 +60,5 @@ incl %eax 1: jmp *%ecx + +#endif /* ! __x86_64__ */
Quoting Robert Millan <[email protected]>:
Quoted 2 lines
This patch moves normal, serial and pci to conf/i386.rmk.
Why i386? That code is not i386 specific. Cannot we call it common2 or something like that?
I believe we could declare SPARC broken, but keep PowerPC working. The PowerPC code can be cross-compiled and tested in qemu. I can send my testing scripts if you want.
Then we could make PowerPC use the new common file. As for SPARC, it would eventually be fixed based on the PowerPC code.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 3 lines · Pavel Roskin
I believe we could declare SPARC broken, but keep PowerPC working. The PowerPC code can be cross-compiled and tested in qemu. I can send my testing scripts if you want.
Can you put that on Wiki?
Quoted 6 lines · Pavel Roskin
Quoting Robert Millan <[email protected]>:
Quoted 2 lines
This patch moves normal, serial and pci to conf/i386.rmk.
Why i386? That code is not i386 specific.
It is. Notice it's being moved from conf/i386-*.rmk, not common.rmk.
normal: Includes normal/i386/setjmp.S
serial, pci: Relies on grub_{in,out}{b,w,l} functions, which are only
implemented for i386 so far. Of course, if someone writes the powerpc stubs, then they could be moved to common.rmk, but they're i386-specific now.
Quoted 1 line
I believe we could declare SPARC broken, but keep PowerPC working.
Agreed. I suggest we remove the conf/sparc* files, which are burdensome (since people unaware that SPARC is broken might try to keep them uptodate) and don't really provide any hard-to-find knowledge, and keep the kern/*/sparc/* bits which might be useful if/when someone tries to reinstate the port.
Signature · 5 lines
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."
Quoted 9 lines · Robert Millan
Quoted 4 lines · Pavel Roskin
Quoting Robert Millan <[email protected]>:
Quoted 1 line
This patch moves normal, serial and pci to conf/i386.rmk.
Why i386? That code is not i386 specific.
It is. Notice it's being moved from conf/i386-*.rmk, not common.rmk.
normal: Includes
normal/i386/setjmp.S
Should we move this out of normal.mod ?
Quoted 4 lines · Vesa Jääskeläinen
Quoted 3 lines · Robert Millan
Quoted 2 lines · Pavel Roskin
Quoting Robert Millan <[email protected]>:
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Quoted 1 line
This patch moves normal, serial and pci to conf/i386.rmk.
Why i386? That code is not i386 specific.
It is. Notice it's being moved from conf/i386-*.rmk, not common.rmk.
normal: Includes
normal/i386/setjmp.SShould we move this out of normal.mod ?
You mean as a standalone module, or to kernel? In a standalone module, we'd still want to have that module in i386.rmk? Then it's basicaly the same issue. And in kernel there's the problem about size...
Signature · 5 lines
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."
Quoted 7 lines · Robert Millan
Quoted 6 lines · Vesa Jääskeläinen
Quoted 5 lines · Robert Millan
Quoted 4 lines · Pavel Roskin
Quoting Robert Millan <[email protected]>:
Quoted 1 line
This patch moves normal, serial and pci to conf/i386.rmk.
Why i386? That code is not i386 specific.
Quoted 9 lines
Quoted 4 lines
Quoted 3 lines
It is. Notice it's being moved from conf/i386-*.rmk, not common.rmk.
normal: Includes
normal/i386/setjmp.SShould we move this out of normal.mod ?
You mean as a standalone module, or to kernel? In a standalone module, we'd still want to have that module in i386.rmk? Then it's basicaly the same issue. And in kernel there's the problem about size...
Or another option is to put all common stuff in common.rmk and then concatenate platform features in platform specific .rmk.
Quoted 9 lines · Robert Millan
Quoted 6 lines · Pavel Roskin
Quoting Robert Millan <[email protected]>:
Quoted 2 lines
This patch moves normal, serial and pci to conf/i386.rmk.
Why i386? That code is not i386 specific.
It is. Notice it's being moved from conf/i386-*.rmk, not common.rmk.
OK then. The description was scarier than the actual patch.
Quoted 5 lines
Agreed. I suggest we remove the conf/sparc* files, which are burdensome (since people unaware that SPARC is broken might try to keep them uptodate) and don't really provide any hard-to-find knowledge, and keep the kern/*/sparc/* bits which might be useful if/when someone tries to reinstate the port.
Fine with me.
Signature · 2 lines
Regards, Pavel Roskin