Add `lsmmap' command (lists firmware-provided memory map):
* commands/lsmmap.c: New file. * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'. (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New variables. * conf/powerpc-ieee1275.rmk: Likewise. * conf/i386-coreboot.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise.
This commit is contained in:
parent
79d29fd7b8
commit
60d6b16e1e
11 changed files with 322 additions and 8 deletions
|
@ -30,6 +30,15 @@
|
|||
* include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
|
||||
Likewise.
|
||||
|
||||
Add `lsmmap' command (lists firmware-provided memory map):
|
||||
* commands/lsmmap.c: New file.
|
||||
* conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
|
||||
(lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
|
||||
variables.
|
||||
* conf/powerpc-ieee1275.rmk: Likewise.
|
||||
* conf/i386-coreboot.rmk: Likewise.
|
||||
* conf/i386-ieee1275.rmk: Likewise.
|
||||
|
||||
2008-11-19 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
|
||||
|
|
1
DISTLIST
1
DISTLIST
|
@ -48,6 +48,7 @@ commands/help.c
|
|||
commands/hexdump.c
|
||||
commands/loadenv.c
|
||||
commands/ls.c
|
||||
commands/lsmmap.c
|
||||
commands/lspci.c
|
||||
commands/read.c
|
||||
commands/reboot.c
|
||||
|
|
52
commands/lsmmap.c
Normal file
52
commands/lsmmap.c
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/normal.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/arg.h>
|
||||
#include <grub/misc.h>
|
||||
|
||||
static grub_err_t
|
||||
grub_cmd_lsmmap (struct grub_arg_list *state __attribute__ ((unused)),
|
||||
int argc __attribute__ ((unused)), char **args __attribute__ ((unused)))
|
||||
|
||||
{
|
||||
auto int NESTED_FUNC_ATTR hook (grub_uint64_t, grub_uint64_t, grub_uint32_t);
|
||||
int NESTED_FUNC_ATTR hook (grub_uint64_t addr, grub_uint64_t size, grub_uint32_t type)
|
||||
{
|
||||
grub_printf ("base_addr = 0x%llx, length = 0x%llx, type = 0x%x\n",
|
||||
addr, size, type);
|
||||
return 0;
|
||||
}
|
||||
grub_machine_mmap_iterate (hook);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
GRUB_MOD_INIT(lsmmap)
|
||||
{
|
||||
(void) mod; /* To stop warning. */
|
||||
grub_register_command ("lsmmap", grub_cmd_lsmmap, GRUB_COMMAND_FLAG_BOTH,
|
||||
"lsmmap", "List memory map provided by firmware.", 0);
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(lsmmap)
|
||||
{
|
||||
grub_unregister_command ("lsmmap");
|
||||
}
|
|
@ -570,7 +570,8 @@ pkglib_MODULES = _linux.mod linux.mod normal.mod \
|
|||
_multiboot.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
|
||||
halt.mod datetime.mod date.mod datehook.mod \
|
||||
lsmmap.mod
|
||||
|
||||
# For _linux.mod.
|
||||
_linux_mod_SOURCES = loader/i386/linux.c
|
||||
|
@ -1929,5 +1930,62 @@ partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPEND
|
|||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
CLEANFILES += lsmmap.mod mod-lsmmap.o mod-lsmmap.c pre-lsmmap.o lsmmap_mod-commands_lsmmap.o und-lsmmap.lst
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
CLEANFILES += def-lsmmap.lst
|
||||
DEFSYMFILES += def-lsmmap.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += lsmmap_mod-commands_lsmmap.d
|
||||
UNDSYMFILES += und-lsmmap.lst
|
||||
|
||||
lsmmap.mod: pre-lsmmap.o mod-lsmmap.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-lsmmap.o mod-lsmmap.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-lsmmap.o: $(lsmmap_mod_DEPENDENCIES) lsmmap_mod-commands_lsmmap.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ lsmmap_mod-commands_lsmmap.o
|
||||
|
||||
mod-lsmmap.o: mod-lsmmap.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-lsmmap.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'lsmmap' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
def-lsmmap.lst: pre-lsmmap.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 lsmmap/' > $@
|
||||
endif
|
||||
|
||||
und-lsmmap.lst: pre-lsmmap.o
|
||||
echo 'lsmmap' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
lsmmap_mod-commands_lsmmap.o: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include lsmmap_mod-commands_lsmmap.d
|
||||
|
||||
CLEANFILES += cmd-lsmmap_mod-commands_lsmmap.lst fs-lsmmap_mod-commands_lsmmap.lst partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
COMMANDFILES += cmd-lsmmap_mod-commands_lsmmap.lst
|
||||
FSFILES += fs-lsmmap_mod-commands_lsmmap.lst
|
||||
PARTMAPFILES += partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
|
||||
cmd-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/i386.mk
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -95,7 +95,8 @@ pkglib_MODULES = _linux.mod linux.mod normal.mod \
|
|||
_multiboot.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
|
||||
halt.mod datetime.mod date.mod datehook.mod \
|
||||
lsmmap.mod
|
||||
|
||||
# For _linux.mod.
|
||||
_linux_mod_SOURCES = loader/i386/linux.c
|
||||
|
@ -190,5 +191,10 @@ datehook_mod_SOURCES = hook/datehook.c
|
|||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/i386.mk
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -588,7 +588,7 @@ grub-install: util/ieee1275/grub-install.in $(util/ieee1275/grub-install.in_DEPE
|
|||
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
|
||||
date.mod datehook.mod lsmmap.mod
|
||||
|
||||
# For normal.mod.
|
||||
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
||||
|
@ -1889,5 +1889,62 @@ partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPEND
|
|||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
CLEANFILES += lsmmap.mod mod-lsmmap.o mod-lsmmap.c pre-lsmmap.o lsmmap_mod-commands_lsmmap.o und-lsmmap.lst
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
CLEANFILES += def-lsmmap.lst
|
||||
DEFSYMFILES += def-lsmmap.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += lsmmap_mod-commands_lsmmap.d
|
||||
UNDSYMFILES += und-lsmmap.lst
|
||||
|
||||
lsmmap.mod: pre-lsmmap.o mod-lsmmap.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-lsmmap.o mod-lsmmap.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-lsmmap.o: $(lsmmap_mod_DEPENDENCIES) lsmmap_mod-commands_lsmmap.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ lsmmap_mod-commands_lsmmap.o
|
||||
|
||||
mod-lsmmap.o: mod-lsmmap.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-lsmmap.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'lsmmap' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
def-lsmmap.lst: pre-lsmmap.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 lsmmap/' > $@
|
||||
endif
|
||||
|
||||
und-lsmmap.lst: pre-lsmmap.o
|
||||
echo 'lsmmap' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
lsmmap_mod-commands_lsmmap.o: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include lsmmap_mod-commands_lsmmap.d
|
||||
|
||||
CLEANFILES += cmd-lsmmap_mod-commands_lsmmap.lst fs-lsmmap_mod-commands_lsmmap.lst partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
COMMANDFILES += cmd-lsmmap_mod-commands_lsmmap.lst
|
||||
FSFILES += fs-lsmmap_mod-commands_lsmmap.lst
|
||||
PARTMAPFILES += partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
|
||||
cmd-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/i386.mk
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -99,7 +99,7 @@ grub_install_SOURCES = util/ieee1275/grub-install.in
|
|||
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
|
||||
date.mod datehook.mod lsmmap.mod
|
||||
|
||||
# For normal.mod.
|
||||
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
||||
|
@ -193,5 +193,10 @@ datehook_mod_SOURCES = hook/datehook.c
|
|||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/i386.mk
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -930,7 +930,7 @@ pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.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
|
||||
datehook.mod lsmmap.mod
|
||||
|
||||
# For biosdisk.mod.
|
||||
biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
|
||||
|
@ -3336,5 +3336,62 @@ partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPEND
|
|||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
CLEANFILES += lsmmap.mod mod-lsmmap.o mod-lsmmap.c pre-lsmmap.o lsmmap_mod-commands_lsmmap.o und-lsmmap.lst
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
CLEANFILES += def-lsmmap.lst
|
||||
DEFSYMFILES += def-lsmmap.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += lsmmap_mod-commands_lsmmap.d
|
||||
UNDSYMFILES += und-lsmmap.lst
|
||||
|
||||
lsmmap.mod: pre-lsmmap.o mod-lsmmap.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-lsmmap.o mod-lsmmap.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-lsmmap.o: $(lsmmap_mod_DEPENDENCIES) lsmmap_mod-commands_lsmmap.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ lsmmap_mod-commands_lsmmap.o
|
||||
|
||||
mod-lsmmap.o: mod-lsmmap.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-lsmmap.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'lsmmap' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
def-lsmmap.lst: pre-lsmmap.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 lsmmap/' > $@
|
||||
endif
|
||||
|
||||
und-lsmmap.lst: pre-lsmmap.o
|
||||
echo 'lsmmap' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
lsmmap_mod-commands_lsmmap.o: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include lsmmap_mod-commands_lsmmap.d
|
||||
|
||||
CLEANFILES += cmd-lsmmap_mod-commands_lsmmap.lst fs-lsmmap_mod-commands_lsmmap.lst partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
COMMANDFILES += cmd-lsmmap_mod-commands_lsmmap.lst
|
||||
FSFILES += fs-lsmmap_mod-commands_lsmmap.lst
|
||||
PARTMAPFILES += partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
|
||||
cmd-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/i386.mk
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -165,7 +165,7 @@ pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.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
|
||||
datehook.mod lsmmap.mod
|
||||
|
||||
# For biosdisk.mod.
|
||||
biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
|
||||
|
@ -352,5 +352,10 @@ datehook_mod_SOURCES = hook/datehook.c
|
|||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/i386.mk
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -581,7 +581,8 @@ pkglib_MODULES = halt.mod \
|
|||
suspend.mod \
|
||||
_multiboot.mod \
|
||||
multiboot.mod \
|
||||
memdisk.mod
|
||||
memdisk.mod \
|
||||
lsmmap.mod
|
||||
|
||||
# For _linux.mod.
|
||||
_linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
|
||||
|
@ -1407,5 +1408,62 @@ partmap-memdisk_mod-disk_memdisk.lst: disk/memdisk.c $(disk/memdisk.c_DEPENDENCI
|
|||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
CLEANFILES += lsmmap.mod mod-lsmmap.o mod-lsmmap.c pre-lsmmap.o lsmmap_mod-commands_lsmmap.o und-lsmmap.lst
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
CLEANFILES += def-lsmmap.lst
|
||||
DEFSYMFILES += def-lsmmap.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += lsmmap_mod-commands_lsmmap.d
|
||||
UNDSYMFILES += und-lsmmap.lst
|
||||
|
||||
lsmmap.mod: pre-lsmmap.o mod-lsmmap.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-lsmmap.o mod-lsmmap.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-lsmmap.o: $(lsmmap_mod_DEPENDENCIES) lsmmap_mod-commands_lsmmap.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(lsmmap_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ lsmmap_mod-commands_lsmmap.o
|
||||
|
||||
mod-lsmmap.o: mod-lsmmap.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-lsmmap.c: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'lsmmap' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(lsmmap_mod_EXPORTS),no)
|
||||
def-lsmmap.lst: pre-lsmmap.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 lsmmap/' > $@
|
||||
endif
|
||||
|
||||
und-lsmmap.lst: pre-lsmmap.o
|
||||
echo 'lsmmap' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
lsmmap_mod-commands_lsmmap.o: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include lsmmap_mod-commands_lsmmap.d
|
||||
|
||||
CLEANFILES += cmd-lsmmap_mod-commands_lsmmap.lst fs-lsmmap_mod-commands_lsmmap.lst partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
COMMANDFILES += cmd-lsmmap_mod-commands_lsmmap.lst
|
||||
FSFILES += fs-lsmmap_mod-commands_lsmmap.lst
|
||||
PARTMAPFILES += partmap-lsmmap_mod-commands_lsmmap.lst
|
||||
|
||||
cmd-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-lsmmap_mod-commands_lsmmap.lst: commands/lsmmap.c $(commands/lsmmap.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(lsmmap_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh lsmmap > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
||||
|
|
|
@ -106,7 +106,8 @@ pkglib_MODULES = halt.mod \
|
|||
suspend.mod \
|
||||
_multiboot.mod \
|
||||
multiboot.mod \
|
||||
memdisk.mod
|
||||
memdisk.mod \
|
||||
lsmmap.mod
|
||||
|
||||
# For _linux.mod.
|
||||
_linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
|
||||
|
@ -160,5 +161,10 @@ memdisk_mod_SOURCES = disk/memdisk.c
|
|||
memdisk_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
memdisk_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For lsmmap.mod
|
||||
lsmmap_mod_SOURCES = commands/lsmmap.c
|
||||
lsmmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lsmmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
||||
|
|
Loading…
Reference in a new issue