[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch] Move normal.mod to conf/common.rmk
From: |
phcoder |
Subject: |
[Patch] Move normal.mod to conf/common.rmk |
Date: |
Mon, 23 Mar 2009 16:10:07 +0100 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090318) |
Hello. I propose to create a symlink normal/cpu. This way normal.mod can
be moved to conf/common.rmk. Works fine on i386-pc. Can people having
other platforms test?
--
Regards
Vladimir 'phcoder' Serbinenko
diff --git a/Makefile.in b/Makefile.in
index 28aa385..c4c641a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -120,7 +120,7 @@ SCRIPTS = $(bin_SCRIPTS) $(sbin_SCRIPTS)
$(grub-mkconfig_SCRIPTS)
CLEANFILES =
MOSTLYCLEANFILES =
DISTCLEANFILES = config.status config.cache config.log config.h \
- Makefile stamp-h include/grub/cpu include/grub/machine \
+ Makefile stamp-h include/grub/cpu include/grub/machine normal/cpu \
gensymlist.sh genkernsyms.sh build_env.mk
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
diff --git a/conf/common.rmk b/conf/common.rmk
index 43bc683..72a46bf 100644
--- a/conf/common.rmk
+++ b/conf/common.rmk
@@ -54,6 +54,21 @@ grub_mkfont_CFLAGS = $(freetype_cflags)
grub_mkfont_LDFLAGS = $(freetype_libs)
endif
+pkglib_MODULES += normal.mod
+
+normal_mod_SOURCES = 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_text.c \
+ normal/color.c \
+ normal/menu_viewer.c normal/menu_entry.c \
+ normal/misc.c grub_script.tab.c \
+ normal/script.c \
+ normal/cpu/setjmp.S
+normal_mod_CFLAGS = $(COMMON_CFLAGS)
+normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
+normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
# For the parser.
grub_script.tab.c grub_script.tab.h: normal/parser.y
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
diff --git a/conf/i386-coreboot.rmk b/conf/i386-coreboot.rmk
index 53595de..84d21e5 100644
--- a/conf/i386-coreboot.rmk
+++ b/conf/i386-coreboot.rmk
@@ -96,7 +96,7 @@ sbin_SCRIPTS += grub-install
grub_install_SOURCES = util/i386/pc/grub-install.in
# Modules.
-pkglib_MODULES = linux.mod normal.mod multiboot.mod \
+pkglib_MODULES = linux.mod multiboot.mod \
aout.mod play.mod serial.mod ata.mod \
memdisk.mod pci.mod lspci.mod reboot.mod \
halt.mod datetime.mod date.mod datehook.mod \
@@ -107,27 +107,6 @@ linux_mod_SOURCES = loader/i386/linux.c
linux_mod_CFLAGS = $(COMMON_CFLAGS)
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = 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_text.c \
- normal/color.c \
- normal/menu_viewer.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 kern/i386/reboot.c
reboot_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk
index 18a99df..6dd569e 100644
--- a/conf/i386-efi.rmk
+++ b/conf/i386-efi.rmk
@@ -77,7 +77,7 @@ sbin_SCRIPTS = grub-install
grub_install_SOURCES = util/i386/efi/grub-install.in
# Modules.
-pkglib_MODULES = kernel.mod normal.mod chain.mod appleldr.mod \
+pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
linux.mod halt.mod reboot.mod pci.mod lspci.mod \
datetime.mod date.mod datehook.mod
@@ -111,27 +111,6 @@ symlist.c: $(addprefix
include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h
genkernsyms.sh
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = 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_text.c \
- normal/color.c \
- normal/menu_viewer.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 chain.mod.
chain_mod_SOURCES = loader/efi/chainloader.c
chain_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk
index a84b5aa..b285d4f 100644
--- a/conf/i386-ieee1275.rmk
+++ b/conf/i386-ieee1275.rmk
@@ -99,32 +99,11 @@ sbin_SCRIPTS = grub-install
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 aout.mod serial.mod linux.mod \
nand.mod memdisk.mod pci.mod lspci.mod datetime.mod \
date.mod datehook.mod lsmmap.mod
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = 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_text.c \
- normal/color.c \
- normal/menu_viewer.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 multiboot.mod.
multiboot_mod_SOURCES = loader/ieee1275/multiboot2.c \
loader/i386/multiboot_helper.S \
diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk
index 60d5182..6e3bcf1 100644
--- a/conf/i386-pc.rmk
+++ b/conf/i386-pc.rmk
@@ -167,7 +167,7 @@ grub_install_SOURCES = util/i386/pc/grub-install.in
# For grub-mkrescue.
grub_mkrescue_SOURCES = util/i386/pc/grub-mkrescue.in
-pkglib_MODULES = biosdisk.mod chain.mod linux.mod normal.mod \
+pkglib_MODULES = biosdisk.mod chain.mod linux.mod \
multiboot.mod reboot.mod halt.mod \
vbe.mod vbetest.mod vbeinfo.mod play.mod serial.mod \
ata.mod vga.mod memdisk.mod pci.mod lspci.mod \
@@ -190,27 +190,6 @@ linux_mod_SOURCES = loader/i386/pc/linux.c
linux_mod_CFLAGS = $(COMMON_CFLAGS)
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = 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_text.c \
- normal/color.c \
- normal/menu_viewer.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)
diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk
index 5aaaf56..01df91c 100644
--- a/conf/powerpc-ieee1275.rmk
+++ b/conf/powerpc-ieee1275.rmk
@@ -107,7 +107,6 @@ grub_mkrescue_SOURCES =
util/powerpc/ieee1275/grub-mkrescue.in
# Modules.
pkglib_MODULES = halt.mod \
linux.mod \
- normal.mod \
reboot.mod \
suspend.mod \
multiboot.mod \
@@ -119,27 +118,6 @@ linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
linux_mod_CFLAGS = $(COMMON_CFLAGS)
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = 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_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/powerpc/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For suspend.mod
suspend_mod_SOURCES = commands/ieee1275/suspend.c
suspend_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/sparc64-ieee1275.rmk b/conf/sparc64-ieee1275.rmk
index 1658a66..7fc8f7d 100644
--- a/conf/sparc64-ieee1275.rmk
+++ b/conf/sparc64-ieee1275.rmk
@@ -86,7 +86,7 @@ kernel_elf_LDFLAGS = -mno-app-regs -nostdlib
-Wl,-N,-Ttext,0x200000,-Bstatic,-me
# Modules.
#_linux.mod linux.mod
pkglib_MODULES = fat.mod ufs.mod ext2.mod minix.mod \
- hfs.mod jfs.mod normal.mod hello.mod font.mod ls.mod \
+ hfs.mod jfs.mod hello.mod font.mod ls.mod \
boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \
pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \
configfile.mod search.mod gzio.mod xfs.mod \
@@ -157,27 +157,6 @@ sfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
#linux_mod_CFLAGS = $(COMMON_CFLAGS)
#linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-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_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/sparc64/setjmp.S
-normal_mod_CFLAGS = $(COMMON_CFLAGS)
-normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
-normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
-
# For hello.mod.
hello_mod_SOURCES = hello/hello.c
hello_mod_CFLAGS = $(COMMON_CFLAGS)
diff --git a/conf/x86_64-efi.rmk b/conf/x86_64-efi.rmk
index faa59fb..e7338a1 100644
--- a/conf/x86_64-efi.rmk
+++ b/conf/x86_64-efi.rmk
@@ -79,7 +79,7 @@ sbin_SCRIPTS = grub-install
grub_install_SOURCES = util/i386/efi/grub-install.in
# Modules.
-pkglib_MODULES = kernel.mod normal.mod chain.mod appleldr.mod \
+pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
halt.mod reboot.mod linux.mod pci.mod lspci.mod \
datetime.mod date.mod datehook.mod
@@ -114,27 +114,6 @@ symlist.c: $(addprefix
include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h
genkernsyms.sh
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
-#
-# Only arch dependant part of normal.mod will be here. Common part for
-# all architecures of normal.mod is at start and should be kept at sync
-# with other makefiles.
-#
-# Please put arch dependant part of normal.mod at the end of list to
-# keep it simpler to update to different architectures.
-#
-normal_mod_SOURCES = 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_text.c \
- normal/color.c \
- normal/menu_viewer.c normal/menu_entry.c \
- normal/misc.c grub_script.tab.c \
- normal/script.c \
- normal/x86_64/setjmp.S
-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)
diff --git a/configure.ac b/configure.ac
index 80b499c..65a9c4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -476,13 +476,16 @@ AC_SUBST([freetype_libs])
grub_CHECK_LINK_DIR
if test x"$link_dir" = xyes ; then
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$target_cpu
- include/grub/machine:include/grub/$target_cpu/$platform])
+ include/grub/machine:include/grub/$target_cpu/$platform
+ normal/cpu:normal/$target_cpu])
else
mkdir -p include/grub 2>/dev/null
rm -rf include/grub/cpu
cp -rp $srcdir/include/grub/$target_cpu include/grub/cpu 2>/dev/null
rm -rf include/grub/machine
cp -rp $srcdir/include/grub/$target_cpu/$platform include/grub/machine
2>/dev/null
+ rm -rf normal/cpu
+ cp -rp $srcdir/normal/$target_cpu normal/cpu 2>/dev/null
fi
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
- [Patch] Move normal.mod to conf/common.rmk,
phcoder <=