2009-12-05 Vladimir Serbinenko <phcoder@gmail.com>
Rename kernel.mod to kernel.img. * conf/i386-efi.rmk (pkglib_MODULES): Change kernel.mod to kernel.img. (kernel_mod_EXPORTS): Rename to ... (kernel_img_EXPORTS): ... this. (kernel_mod_SOURCES): Rename to ... (kernel_img_SOURCES): ... this. (kernel_mod_HEADERS): Rename to ... (kernel_img_HEADERS): ... this. All users updated. (kernel_mod_CFLAGS): Rename to ... (kernel_img_CFLAGS): ... this. (kernel_mod_ASFLAGS): Rename to ... (kernel_img_ASFLAGS): ... this. (kernel_mod_LDFLAGS): Rename to ... (kernel_img_LDFLAGS): ... this. * conf/x86_64-efi.rmk: Likewise. * util/i386/efi/grub-mkimage.c (read_kernel_module): Rename to ... (read_kernel_image): ... this. All users updated. (read_kernel_image): Read "kernel.img" instead of "kernel.mod".
This commit is contained in:
commit
b283f10857
4 changed files with 45 additions and 23 deletions
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
||||||
|
2009-12-05 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Rename kernel.mod to kernel.img.
|
||||||
|
|
||||||
|
* conf/i386-efi.rmk (pkglib_MODULES): Change kernel.mod to kernel.img.
|
||||||
|
(kernel_mod_EXPORTS): Rename to ...
|
||||||
|
(kernel_img_EXPORTS): ... this.
|
||||||
|
(kernel_mod_SOURCES): Rename to ...
|
||||||
|
(kernel_img_SOURCES): ... this.
|
||||||
|
(kernel_mod_HEADERS): Rename to ...
|
||||||
|
(kernel_img_HEADERS): ... this. All users updated.
|
||||||
|
(kernel_mod_CFLAGS): Rename to ...
|
||||||
|
(kernel_img_CFLAGS): ... this.
|
||||||
|
(kernel_mod_ASFLAGS): Rename to ...
|
||||||
|
(kernel_img_ASFLAGS): ... this.
|
||||||
|
(kernel_mod_LDFLAGS): Rename to ...
|
||||||
|
(kernel_img_LDFLAGS): ... this.
|
||||||
|
* conf/x86_64-efi.rmk: Likewise.
|
||||||
|
* util/i386/efi/grub-mkimage.c (read_kernel_module): Rename to ...
|
||||||
|
(read_kernel_image): ... this. All users updated.
|
||||||
|
(read_kernel_image): Read "kernel.img" instead of "kernel.mod".
|
||||||
|
|
||||||
2009-12-05 Carles Pina i Estany <carles@pina.cat>
|
2009-12-05 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
|
||||||
* normal/menu_text.c (grub_color_menu_high): Gettexttize string.
|
* normal/menu_text.c (grub_color_menu_high): Gettexttize string.
|
||||||
|
|
|
@ -30,14 +30,14 @@ sbin_SCRIPTS = grub-install
|
||||||
grub_install_SOURCES = util/i386/efi/grub-install.in
|
grub_install_SOURCES = util/i386/efi/grub-install.in
|
||||||
|
|
||||||
# Modules.
|
# Modules.
|
||||||
pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
|
pkglib_MODULES = kernel.img chain.mod appleldr.mod \
|
||||||
linux.mod halt.mod reboot.mod pci.mod lspci.mod \
|
linux.mod halt.mod reboot.mod pci.mod lspci.mod \
|
||||||
datetime.mod date.mod datehook.mod loadbios.mod \
|
datetime.mod date.mod datehook.mod loadbios.mod \
|
||||||
fixvideo.mod mmap.mod acpi.mod
|
fixvideo.mod mmap.mod acpi.mod
|
||||||
|
|
||||||
# For kernel.mod.
|
# For kernel.img.
|
||||||
kernel_mod_EXPORTS = no
|
kernel_img_EXPORTS = no
|
||||||
kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
kernel_img_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
||||||
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
||||||
kern/misc.c kern/mm.c kern/reader.c kern/term.c \
|
kern/misc.c kern/mm.c kern/reader.c kern/term.c \
|
||||||
kern/rescue_parser.c kern/rescue_reader.c \
|
kern/rescue_parser.c kern/rescue_reader.c \
|
||||||
|
@ -48,22 +48,22 @@ kernel_mod_SOURCES = kern/i386/efi/startup.S kern/main.c kern/device.c \
|
||||||
kern/i386/tsc.c kern/i386/pit.c \
|
kern/i386/tsc.c kern/i386/pit.c \
|
||||||
kern/generic/rtc_get_time_ms.c \
|
kern/generic/rtc_get_time_ms.c \
|
||||||
kern/generic/millisleep.c
|
kern/generic/millisleep.c
|
||||||
kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h i18n.h
|
efi/efi.h efi/time.h efi/disk.h i386/pit.h list.h handler.h command.h i18n.h
|
||||||
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c
|
MOSTLYCLEANFILES += symlist.c
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
||||||
DEFSYMFILES += kernel_syms.lst
|
DEFSYMFILES += kernel_syms.lst
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
|
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# For boot.mod.
|
# For boot.mod.
|
||||||
|
|
|
@ -29,14 +29,14 @@ sbin_SCRIPTS = grub-install
|
||||||
grub_install_SOURCES = util/i386/efi/grub-install.in
|
grub_install_SOURCES = util/i386/efi/grub-install.in
|
||||||
|
|
||||||
# Modules.
|
# Modules.
|
||||||
pkglib_MODULES = kernel.mod chain.mod appleldr.mod \
|
pkglib_MODULES = kernel.img chain.mod appleldr.mod \
|
||||||
halt.mod reboot.mod linux.mod pci.mod lspci.mod \
|
halt.mod reboot.mod linux.mod pci.mod lspci.mod \
|
||||||
datetime.mod date.mod datehook.mod loadbios.mod \
|
datetime.mod date.mod datehook.mod loadbios.mod \
|
||||||
fixvideo.mod mmap.mod acpi.mod ata.mod
|
fixvideo.mod mmap.mod acpi.mod ata.mod
|
||||||
|
|
||||||
# For kernel.mod.
|
# For kernel.img.
|
||||||
kernel_mod_EXPORTS = no
|
kernel_img_EXPORTS = no
|
||||||
kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \
|
kernel_img_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \
|
||||||
kern/main.c kern/device.c \
|
kern/main.c kern/device.c \
|
||||||
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
|
||||||
kern/misc.c kern/mm.c kern/reader.c kern/term.c \
|
kern/misc.c kern/mm.c kern/reader.c kern/term.c \
|
||||||
|
@ -47,23 +47,23 @@ kernel_mod_SOURCES = kern/x86_64/efi/startup.S kern/x86_64/efi/callwrap.S \
|
||||||
kern/i386/tsc.c kern/i386/pit.c \
|
kern/i386/tsc.c kern/i386/pit.c \
|
||||||
kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c \
|
kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c \
|
||||||
term/efi/console.c disk/efi/efidisk.c
|
term/efi/console.c disk/efi/efidisk.c
|
||||||
kernel_mod_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
kernel_img_HEADERS = boot.h cache.h device.h disk.h dl.h elf.h elfload.h \
|
||||||
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \
|
||||||
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
partition.h msdos_partition.h reader.h symbol.h term.h time.h types.h \
|
||||||
efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \
|
efi/efi.h efi/time.h efi/disk.h machine/loader.h i386/pit.h list.h \
|
||||||
handler.h command.h i18n.h
|
handler.h command.h i18n.h
|
||||||
kernel_mod_CFLAGS = $(COMMON_CFLAGS)
|
kernel_img_CFLAGS = $(COMMON_CFLAGS)
|
||||||
kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
||||||
kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
kernel_img_LDFLAGS = $(COMMON_LDFLAGS)
|
||||||
|
|
||||||
MOSTLYCLEANFILES += symlist.c
|
MOSTLYCLEANFILES += symlist.c
|
||||||
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
MOSTLYCLEANFILES += symlist.c kernel_syms.lst
|
||||||
DEFSYMFILES += kernel_syms.lst
|
DEFSYMFILES += kernel_syms.lst
|
||||||
|
|
||||||
symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
|
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
||||||
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
||||||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# For boot.mod.
|
# For boot.mod.
|
||||||
|
|
|
@ -55,12 +55,12 @@ align_pe32_section (Elf_Addr addr)
|
||||||
/* Read the whole kernel image. Return the pointer to a read image,
|
/* Read the whole kernel image. Return the pointer to a read image,
|
||||||
and store the size in bytes in *SIZE. */
|
and store the size in bytes in *SIZE. */
|
||||||
static char *
|
static char *
|
||||||
read_kernel_module (const char *dir, size_t *size)
|
read_kernel_image (const char *dir, size_t *size)
|
||||||
{
|
{
|
||||||
char *kernel_image;
|
char *kernel_image;
|
||||||
char *kernel_path;
|
char *kernel_path;
|
||||||
|
|
||||||
kernel_path = grub_util_get_path (dir, "kernel.mod");
|
kernel_path = grub_util_get_path (dir, "kernel.img");
|
||||||
*size = grub_util_get_image_size (kernel_path);
|
*size = grub_util_get_image_size (kernel_path);
|
||||||
kernel_image = grub_util_read_image (kernel_path);
|
kernel_image = grub_util_read_image (kernel_path);
|
||||||
free (kernel_path);
|
free (kernel_path);
|
||||||
|
@ -945,7 +945,7 @@ convert_elf (const char *dir, char *prefix, FILE *out, char *mods[])
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Get the kernel image and check the format. */
|
/* Get the kernel image and check the format. */
|
||||||
kernel_image = read_kernel_module (dir, &kernel_size);
|
kernel_image = read_kernel_image (dir, &kernel_size);
|
||||||
e = (Elf_Ehdr *) kernel_image;
|
e = (Elf_Ehdr *) kernel_image;
|
||||||
if (! check_elf_header (e, kernel_size))
|
if (! check_elf_header (e, kernel_size))
|
||||||
grub_util_error ("invalid ELF header");
|
grub_util_error ("invalid ELF header");
|
||||||
|
|
Loading…
Reference in a new issue