2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments explicitly to suppress gcc's warnings. * fs/fat.c (grub_fat_find_dir): Likewise. (grub_fat_label): Likewise. * fs/xfs.c (grub_xfs_read_inode): Likewise. (grub_xfs_mount): Likewise. (grub_xfs_label): Likewise. * fs/affs.c (grub_affs_mount): Likewise. (grub_affs_label): Likewise. (grub_affs_iterate_dir): Likewise. * fs/sfs.c (grub_sfs_mount): Likewise. (grub_sfs_iterate_dir): Likewise. * fs/ufs.c (grub_ufs_lookup_symlink): Likewise. * fs/hfs.c (grub_hfs_mount): Likewise. (grub_hfs_cmp_catkeys): Likewise. (grub_hfs_find_dir): Likewise. (grub_hfs_dir): Likewise. (grub_hfs_label): Likewise. * fs/jfs.c (grub_jfs_mount): Likewise. (grub_jfs_opendir): Likewise. (grub_jfs_getent): Likewise. (grub_jfs_lookup_symlink): Likewise. (grub_jfs_label): Likewise. * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise. (grub_hfsplus_iterate_dir): Likewise. (grub_hfsplus_btree_iterate_node): Made static. * util/grub-emu.c (prefix): New variable. (grub_machine_set_prefix): New function. (main): Do not set the environment variable "prefix" here. Only set PREFIX, which is used later by grub_machine_set_prefix. * include/grub/video.h: Do not include grub/symbol.h. (grub_video_register): Not exported. This symbol is not defined in the kernel. (grub_video_unregister): Likewise. (grub_video_iterate): Likewise. (grub_video_setup): Likewise. (grub_video_restore): Likewise. (grub_video_get_info): Likewise. (grub_video_get_blit_format): Likewise. (grub_video_set_palette): Likewise. (grub_video_get_palette): Likewise. (grub_video_set_viewport): Likewise. (grub_video_get_viewport): Likewise. (grub_video_map_color): Likewise. (grub_video_map_rgb): Likewise. (grub_video_map_rgba): Likewise. (grub_video_fill_rect): Likewise. (grub_video_blit_glyph): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. (grub_video_scroll): Likewise. (grub_video_swap_buffers): Likewise. (grub_video_create_render_target): Likewise. (grub_video_delete_render_target): Likewise. (grub_video_set_active_render_target): Likewise. * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC): Undefined. [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise. * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and genkernsyms.sh. * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and genkernsyms.sh. (gensymlist.sh): New target. (genkernsyms.sh): Likewise. * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added genkernsyms.sh.in and gensymlist.sh.in. * genkernsyms.sh: Removed. * gensymlist.sh: Likewise. * genkernsyms.sh.in: New file. * gensymlist.sh.in: Likewise.
This commit is contained in:
parent
1885bb2790
commit
7b455f4dd3
28 changed files with 308 additions and 163 deletions
101
ChangeLog
101
ChangeLog
|
@ -1,3 +1,104 @@
|
||||||
|
2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
|
||||||
|
explicitly to suppress gcc's warnings.
|
||||||
|
* fs/fat.c (grub_fat_find_dir): Likewise.
|
||||||
|
(grub_fat_label): Likewise.
|
||||||
|
* fs/xfs.c (grub_xfs_read_inode): Likewise.
|
||||||
|
(grub_xfs_mount): Likewise.
|
||||||
|
(grub_xfs_label): Likewise.
|
||||||
|
* fs/affs.c (grub_affs_mount): Likewise.
|
||||||
|
(grub_affs_label): Likewise.
|
||||||
|
(grub_affs_iterate_dir): Likewise.
|
||||||
|
* fs/sfs.c (grub_sfs_mount): Likewise.
|
||||||
|
(grub_sfs_iterate_dir): Likewise.
|
||||||
|
* fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
|
||||||
|
* fs/hfs.c (grub_hfs_mount): Likewise.
|
||||||
|
(grub_hfs_cmp_catkeys): Likewise.
|
||||||
|
(grub_hfs_find_dir): Likewise.
|
||||||
|
(grub_hfs_dir): Likewise.
|
||||||
|
(grub_hfs_label): Likewise.
|
||||||
|
* fs/jfs.c (grub_jfs_mount): Likewise.
|
||||||
|
(grub_jfs_opendir): Likewise.
|
||||||
|
(grub_jfs_getent): Likewise.
|
||||||
|
(grub_jfs_lookup_symlink): Likewise.
|
||||||
|
(grub_jfs_label): Likewise.
|
||||||
|
* fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
|
||||||
|
(grub_hfsplus_iterate_dir): Likewise.
|
||||||
|
(grub_hfsplus_btree_iterate_node): Made static.
|
||||||
|
|
||||||
|
* util/grub-emu.c (prefix): New variable.
|
||||||
|
(grub_machine_set_prefix): New function.
|
||||||
|
(main): Do not set the environment variable "prefix" here. Only
|
||||||
|
set PREFIX, which is used later by grub_machine_set_prefix.
|
||||||
|
|
||||||
|
* include/grub/video.h: Do not include grub/symbol.h.
|
||||||
|
(grub_video_register): Not exported. This symbol is not defined in
|
||||||
|
the kernel.
|
||||||
|
(grub_video_unregister): Likewise.
|
||||||
|
(grub_video_iterate): Likewise.
|
||||||
|
(grub_video_setup): Likewise.
|
||||||
|
(grub_video_restore): Likewise.
|
||||||
|
(grub_video_get_info): Likewise.
|
||||||
|
(grub_video_get_blit_format): Likewise.
|
||||||
|
(grub_video_set_palette): Likewise.
|
||||||
|
(grub_video_get_palette): Likewise.
|
||||||
|
(grub_video_set_viewport): Likewise.
|
||||||
|
(grub_video_get_viewport): Likewise.
|
||||||
|
(grub_video_map_color): Likewise.
|
||||||
|
(grub_video_map_rgb): Likewise.
|
||||||
|
(grub_video_map_rgba): Likewise.
|
||||||
|
(grub_video_fill_rect): Likewise.
|
||||||
|
(grub_video_blit_glyph): Likewise.
|
||||||
|
(grub_video_blit_bitmap): Likewise.
|
||||||
|
(grub_video_blit_render_target): Likewise.
|
||||||
|
(grub_video_scroll): Likewise.
|
||||||
|
(grub_video_swap_buffers): Likewise.
|
||||||
|
(grub_video_create_render_target): Likewise.
|
||||||
|
(grub_video_delete_render_target): Likewise.
|
||||||
|
(grub_video_set_active_render_target): Likewise.
|
||||||
|
|
||||||
|
* include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
|
||||||
|
Undefined.
|
||||||
|
[GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
|
||||||
|
|
||||||
|
* conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
|
||||||
|
config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
|
||||||
|
(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
|
||||||
|
instead of $(srcdir)/genkernsyms.sh.
|
||||||
|
|
||||||
|
* conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
|
||||||
|
config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
|
||||||
|
(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
|
||||||
|
instead of $(srcdir)/genkernsyms.sh.
|
||||||
|
|
||||||
|
* conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
|
||||||
|
gensymlist.sh instead of $(srcdir)/gensymlist.sh.
|
||||||
|
(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
|
||||||
|
instead of $(srcdir)/genkernsyms.sh.
|
||||||
|
|
||||||
|
* conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
|
||||||
|
gensymlist.sh instead of $(srcdir)/gensymlist.sh.
|
||||||
|
(kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
|
||||||
|
instead of $(srcdir)/genkernsyms.sh.
|
||||||
|
|
||||||
|
* configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
|
||||||
|
genkernsyms.sh.
|
||||||
|
|
||||||
|
* Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
|
||||||
|
genkernsyms.sh.
|
||||||
|
(gensymlist.sh): New target.
|
||||||
|
(genkernsyms.sh): Likewise.
|
||||||
|
|
||||||
|
* DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
|
||||||
|
genkernsyms.sh.in and gensymlist.sh.in.
|
||||||
|
|
||||||
|
* genkernsyms.sh: Removed.
|
||||||
|
* gensymlist.sh: Likewise.
|
||||||
|
|
||||||
|
* genkernsyms.sh.in: New file.
|
||||||
|
* gensymlist.sh.in: Likewise.
|
||||||
|
|
||||||
2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
|
2006-04-25 Hollis Blanchard <hollis@penguinppc.org>
|
||||||
|
|
||||||
* kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
|
* kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
|
||||||
|
|
4
DISTLIST
4
DISTLIST
|
@ -20,10 +20,10 @@ gendistlist.sh
|
||||||
genfslist.sh
|
genfslist.sh
|
||||||
geninitheader.sh
|
geninitheader.sh
|
||||||
geninit.sh
|
geninit.sh
|
||||||
genkernsyms.sh
|
genkernsyms.sh.in
|
||||||
genmk.rb
|
genmk.rb
|
||||||
genmodsrc.sh
|
genmodsrc.sh
|
||||||
gensymlist.sh
|
gensymlist.sh.in
|
||||||
install-sh
|
install-sh
|
||||||
mkinstalldirs
|
mkinstalldirs
|
||||||
stamp-h.in
|
stamp-h.in
|
||||||
|
|
|
@ -84,7 +84,8 @@ SCRIPTS = $(sbin_SCRIPTS)
|
||||||
CLEANFILES =
|
CLEANFILES =
|
||||||
MOSTLYCLEANFILES =
|
MOSTLYCLEANFILES =
|
||||||
DISTCLEANFILES = config.status config.cache config.log config.h \
|
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 \
|
||||||
|
gensymlist.sh genkernsyms.sh
|
||||||
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
|
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
|
||||||
|
|
||||||
# The default target.
|
# The default target.
|
||||||
|
@ -250,6 +251,12 @@ Makefile: Makefile.in config.status
|
||||||
config.status: configure
|
config.status: configure
|
||||||
./config.status --recheck
|
./config.status --recheck
|
||||||
|
|
||||||
|
gensymlist.sh: gensymlist.sh.in config.status
|
||||||
|
./config.status
|
||||||
|
|
||||||
|
genkernsyms.sh: genkernsyms.sh.in config.status
|
||||||
|
./config.status
|
||||||
|
|
||||||
.PHONY: all install install-strip uninstall clean mostlyclean distclean
|
.PHONY: all install install-strip uninstall clean mostlyclean distclean
|
||||||
.PHONY: maintainer-clean info dvi dist check
|
.PHONY: maintainer-clean info dvi dist check
|
||||||
|
|
||||||
|
|
|
@ -621,11 +621,11 @@ 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)) gensymlist.sh
|
symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %.h,$^) > $@ || rm -f $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# For normal.mod.
|
# For normal.mod.
|
||||||
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
||||||
|
|
|
@ -89,11 +89,11 @@ 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)) gensymlist.sh
|
symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %.h,$^) > $@ || rm -f $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# For normal.mod.
|
# For normal.mod.
|
||||||
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
||||||
|
|
|
@ -271,11 +271,11 @@ kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
|
||||||
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_img_HEADERS)) gensymlist.sh
|
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# Utilities.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
|
|
|
@ -43,11 +43,11 @@ kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
|
||||||
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_img_HEADERS)) gensymlist.sh
|
symlist.c: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(kernel_img_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# Utilities.
|
# Utilities.
|
||||||
bin_UTILITIES = grub-mkimage
|
bin_UTILITIES = grub-mkimage
|
||||||
|
|
|
@ -16,11 +16,11 @@ grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
|
||||||
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
||||||
machine/kernel.h
|
machine/kernel.h
|
||||||
|
|
||||||
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh
|
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
pkgdata_PROGRAMS = grubof
|
pkgdata_PROGRAMS = grubof
|
||||||
|
|
|
@ -16,11 +16,11 @@ grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
|
||||||
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
||||||
machine/kernel.h
|
machine/kernel.h
|
||||||
|
|
||||||
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh
|
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
pkgdata_PROGRAMS = grubof
|
pkgdata_PROGRAMS = grubof
|
||||||
|
|
|
@ -16,15 +16,15 @@ grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
|
||||||
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
||||||
machine/kernel.h
|
machine/kernel.h
|
||||||
|
|
||||||
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh
|
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# For the parser.
|
# For the parser.
|
||||||
grub_script.tab.c grub_script.tab.h: normal/parser.y
|
grub_script.tab.c grub_script.tab.h: normal/parser.y
|
||||||
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
|
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
pkgdata_PROGRAMS = grubof
|
pkgdata_PROGRAMS = grubof
|
||||||
|
|
|
@ -16,15 +16,15 @@ grubof_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
|
||||||
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
partition.h pc_partition.h ieee1275/ieee1275.h machine/time.h \
|
||||||
machine/kernel.h
|
machine/kernel.h
|
||||||
|
|
||||||
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) gensymlist.sh
|
grubof_symlist.c: $(addprefix include/grub/,$(grubof_HEADERS)) config.h gensymlist.sh
|
||||||
sh $(srcdir)/gensymlist.sh $(filter %.h,$^) > $@
|
/bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# For the parser.
|
# For the parser.
|
||||||
grub_script.tab.c grub_script.tab.h: normal/parser.y
|
grub_script.tab.c grub_script.tab.h: normal/parser.y
|
||||||
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
|
$(YACC) -d -p grub_script_yy -b grub_script $(srcdir)/normal/parser.y
|
||||||
|
|
||||||
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) genkernsyms.sh
|
kernel_syms.lst: $(addprefix include/grub/,$(grubof_HEADERS)) config.h genkernsyms.sh
|
||||||
sh $(srcdir)/genkernsyms.sh $(filter %h,$^) > $@
|
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
pkgdata_PROGRAMS = grubof
|
pkgdata_PROGRAMS = grubof
|
||||||
|
|
4
configure
vendored
4
configure
vendored
|
@ -6578,7 +6578,7 @@ fi;
|
||||||
# Output files.
|
# Output files.
|
||||||
ac_config_links="$ac_config_links include/grub/cpu:include/grub/$host_cpu include/grub/machine:include/grub/$host_cpu/$host_vendor"
|
ac_config_links="$ac_config_links include/grub/cpu:include/grub/$host_cpu include/grub/machine:include/grub/$host_cpu/$host_vendor"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files Makefile"
|
ac_config_files="$ac_config_files Makefile gensymlist.sh genkernsyms.sh"
|
||||||
|
|
||||||
ac_config_files="$ac_config_files stamp-h"
|
ac_config_files="$ac_config_files stamp-h"
|
||||||
|
|
||||||
|
@ -7111,6 +7111,8 @@ do
|
||||||
case "$ac_config_target" in
|
case "$ac_config_target" in
|
||||||
# Handling of arguments.
|
# Handling of arguments.
|
||||||
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||||
|
"gensymlist.sh" ) CONFIG_FILES="$CONFIG_FILES gensymlist.sh" ;;
|
||||||
|
"genkernsyms.sh" ) CONFIG_FILES="$CONFIG_FILES genkernsyms.sh" ;;
|
||||||
"stamp-h" ) CONFIG_FILES="$CONFIG_FILES stamp-h" ;;
|
"stamp-h" ) CONFIG_FILES="$CONFIG_FILES stamp-h" ;;
|
||||||
"include/grub/cpu" ) CONFIG_LINKS="$CONFIG_LINKS include/grub/cpu:include/grub/$host_cpu" ;;
|
"include/grub/cpu" ) CONFIG_LINKS="$CONFIG_LINKS include/grub/cpu:include/grub/$host_cpu" ;;
|
||||||
"include/grub/machine" ) CONFIG_LINKS="$CONFIG_LINKS include/grub/machine:include/grub/$host_cpu/$host_vendor" ;;
|
"include/grub/machine" ) CONFIG_LINKS="$CONFIG_LINKS include/grub/machine:include/grub/$host_cpu/$host_vendor" ;;
|
||||||
|
|
|
@ -190,6 +190,6 @@ AC_ARG_ENABLE([mm-debug],
|
||||||
# Output files.
|
# Output files.
|
||||||
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$host_cpu
|
AC_CONFIG_LINKS([include/grub/cpu:include/grub/$host_cpu
|
||||||
include/grub/machine:include/grub/$host_cpu/$host_vendor])
|
include/grub/machine:include/grub/$host_cpu/$host_vendor])
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile gensymlist.sh genkernsyms.sh])
|
||||||
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -182,7 +182,7 @@ grub_affs_mount (grub_disk_t disk)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* Make sure this is an affs filesystem. */
|
/* Make sure this is an affs filesystem. */
|
||||||
if (grub_strncmp (data->bblock.type, "DOS", 3))
|
if (grub_strncmp ((char *) (data->bblock.type), "DOS", 3))
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_FS, "not an affs filesystem");
|
grub_error (GRUB_ERR_BAD_FS, "not an affs filesystem");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -364,7 +364,7 @@ grub_affs_iterate_dir (grub_fshelp_node_t dir,
|
||||||
else
|
else
|
||||||
type = GRUB_FSHELP_UNKNOWN;
|
type = GRUB_FSHELP_UNKNOWN;
|
||||||
|
|
||||||
if (grub_affs_create_node (file.name, next,
|
if (grub_affs_create_node ((char *) (file.name), next,
|
||||||
grub_be_to_cpu32 (file.size), type))
|
grub_be_to_cpu32 (file.size), type))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -527,7 +527,7 @@ grub_affs_label (grub_device_t device, char **label)
|
||||||
if (grub_errno)
|
if (grub_errno)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
*label = grub_strndup (file.name, file.namelen);
|
*label = grub_strndup ((char *) (file.name), file.namelen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*label = 0;
|
*label = 0;
|
||||||
|
|
5
fs/fat.c
5
fs/fat.c
|
@ -557,7 +557,8 @@ grub_fat_find_dir (grub_disk_t disk, struct grub_fat_data *data,
|
||||||
for (u = 0; u < slots * 13; u++)
|
for (u = 0; u < slots * 13; u++)
|
||||||
unibuf[u] = grub_le_to_cpu16 (unibuf[u]);
|
unibuf[u] = grub_le_to_cpu16 (unibuf[u]);
|
||||||
|
|
||||||
*grub_utf16_to_utf8 (filename, unibuf, slots * 13) = '\0';
|
*grub_utf16_to_utf8 ((grub_uint8_t *) filename, unibuf,
|
||||||
|
slots * 13) = '\0';
|
||||||
|
|
||||||
if (*dirname == '\0' && call_hook)
|
if (*dirname == '\0' && call_hook)
|
||||||
{
|
{
|
||||||
|
@ -779,7 +780,7 @@ grub_fat_label (grub_device_t device, char **label)
|
||||||
|
|
||||||
if (dir.attr == GRUB_FAT_ATTR_VOLUME_ID)
|
if (dir.attr == GRUB_FAT_ATTR_VOLUME_ID)
|
||||||
{
|
{
|
||||||
*label = grub_strndup (dir.name, 11);
|
*label = grub_strndup ((char *) dir.name, 11);
|
||||||
return GRUB_ERR_NONE;
|
return GRUB_ERR_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
15
fs/hfs.c
15
fs/hfs.c
|
@ -357,7 +357,7 @@ grub_hfs_mount (grub_disk_t disk)
|
||||||
volume name. */
|
volume name. */
|
||||||
key.parent_dir = grub_cpu_to_be32 (1);
|
key.parent_dir = grub_cpu_to_be32 (1);
|
||||||
key.strlen = data->sblock.volname[0];
|
key.strlen = data->sblock.volname[0];
|
||||||
grub_strcpy (key.str, data->sblock.volname + 1);
|
grub_strcpy ((char *) key.str, (char *) (data->sblock.volname + 1));
|
||||||
|
|
||||||
if (grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
if (grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
||||||
0, (char *) &dir, sizeof (dir)) == 0)
|
0, (char *) &dir, sizeof (dir)) == 0)
|
||||||
|
@ -393,7 +393,7 @@ grub_hfs_cmp_catkeys (struct grub_hfs_catalog_key *k1,
|
||||||
if (cmp != 0)
|
if (cmp != 0)
|
||||||
return cmp;
|
return cmp;
|
||||||
|
|
||||||
cmp = grub_strncasecmp (k1->str, k2->str, k1->strlen);
|
cmp = grub_strncasecmp ((char *) (k1->str), (char *) (k2->str), k1->strlen);
|
||||||
|
|
||||||
/* This is required because the compared strings are not of equal
|
/* This is required because the compared strings are not of equal
|
||||||
length. */
|
length. */
|
||||||
|
@ -673,11 +673,11 @@ grub_hfs_find_dir (struct grub_hfs_data *data, const char *path,
|
||||||
|
|
||||||
key.parent_dir = grub_cpu_to_be32 (inode);
|
key.parent_dir = grub_cpu_to_be32 (inode);
|
||||||
key.strlen = grub_strlen (path);
|
key.strlen = grub_strlen (path);
|
||||||
grub_strcpy (key.str, path);
|
grub_strcpy ((char *) (key.str), path);
|
||||||
|
|
||||||
/* Lookup this node. */
|
/* Lookup this node. */
|
||||||
if (!grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
if (! grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
||||||
0, (char *) &frec, sizeof (frec)))
|
0, (char *) &frec, sizeof (frec)))
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -717,7 +717,7 @@ grub_hfs_dir (grub_device_t device, const char *path,
|
||||||
char *filetype = rec->data;
|
char *filetype = rec->data;
|
||||||
struct grub_hfs_catalog_key *ckey = rec->key;
|
struct grub_hfs_catalog_key *ckey = rec->key;
|
||||||
|
|
||||||
grub_strncpy (fname, ckey->str, ckey->strlen);
|
grub_strncpy (fname, (char *) (ckey->str), ckey->strlen);
|
||||||
|
|
||||||
if (*filetype == GRUB_HFS_FILETYPE_DIR)
|
if (*filetype == GRUB_HFS_FILETYPE_DIR)
|
||||||
return hook (fname, 1);
|
return hook (fname, 1);
|
||||||
|
@ -834,7 +834,8 @@ grub_hfs_label (grub_device_t device, char **label)
|
||||||
data = grub_hfs_mount (device->disk);
|
data = grub_hfs_mount (device->disk);
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
*label = grub_strndup (data->sblock.volname + 1, *data->sblock.volname);
|
*label = grub_strndup ((char *) (data->sblock.volname + 1),
|
||||||
|
*data->sblock.volname);
|
||||||
else
|
else
|
||||||
*label = 0;
|
*label = 0;
|
||||||
|
|
||||||
|
|
|
@ -480,7 +480,7 @@ grub_hfsplus_cmp_catkey (struct grub_hfsplus_key *keya,
|
||||||
|
|
||||||
filename = grub_malloc (grub_be_to_cpu16 (catkey_a->namelen) + 1);
|
filename = grub_malloc (grub_be_to_cpu16 (catkey_a->namelen) + 1);
|
||||||
|
|
||||||
if (! grub_utf16_to_utf8 (filename, catkey_a->name,
|
if (! grub_utf16_to_utf8 ((grub_uint8_t *) filename, catkey_a->name,
|
||||||
grub_be_to_cpu16 (catkey_a->namelen)))
|
grub_be_to_cpu16 (catkey_a->namelen)))
|
||||||
return -1; /* XXX: This error never occurs, but in case it happens
|
return -1; /* XXX: This error never occurs, but in case it happens
|
||||||
just skip this entry. */
|
just skip this entry. */
|
||||||
|
@ -563,7 +563,7 @@ grub_hfsplus_read_symlink (grub_fshelp_node_t node)
|
||||||
return symlink;
|
return symlink;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
grub_hfsplus_btree_iterate_node (struct grub_hfsplus_btree *btree,
|
grub_hfsplus_btree_iterate_node (struct grub_hfsplus_btree *btree,
|
||||||
struct grub_hfsplus_btnode *first_node,
|
struct grub_hfsplus_btnode *first_node,
|
||||||
int first_rec,
|
int first_rec,
|
||||||
|
@ -723,7 +723,7 @@ grub_hfsplus_iterate_dir (grub_fshelp_node_t dir,
|
||||||
for (i = 0; i < grub_be_to_cpu16 (catkey->namelen); i++)
|
for (i = 0; i < grub_be_to_cpu16 (catkey->namelen); i++)
|
||||||
catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
|
catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
|
||||||
|
|
||||||
if (! grub_utf16_to_utf8 (filename, catkey->name,
|
if (! grub_utf16_to_utf8 ((grub_uint8_t *) filename, catkey->name,
|
||||||
grub_be_to_cpu16 (catkey->namelen)))
|
grub_be_to_cpu16 (catkey->namelen)))
|
||||||
{
|
{
|
||||||
grub_free (filename);
|
grub_free (filename);
|
||||||
|
|
10
fs/jfs.c
10
fs/jfs.c
|
@ -342,7 +342,7 @@ grub_jfs_mount (grub_disk_t disk)
|
||||||
sizeof (struct grub_jfs_sblock), (char *) &data->sblock))
|
sizeof (struct grub_jfs_sblock), (char *) &data->sblock))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (grub_strncmp (data->sblock.magic, "JFS1", 4))
|
if (grub_strncmp ((char *) (data->sblock.magic), "JFS1", 4))
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_FS, "not a jfs filesystem");
|
grub_error (GRUB_ERR_BAD_FS, "not a jfs filesystem");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -398,7 +398,7 @@ grub_jfs_opendir (struct grub_jfs_data *data, struct grub_jfs_inode *inode)
|
||||||
{
|
{
|
||||||
diro->leaf = inode->dir.dirents;
|
diro->leaf = inode->dir.dirents;
|
||||||
diro->next_leaf = (struct grub_jfs_leaf_next_dirent *) de;
|
diro->next_leaf = (struct grub_jfs_leaf_next_dirent *) de;
|
||||||
diro->sorted = inode->dir.header.sorted;
|
diro->sorted = (char *) (inode->dir.header.sorted);
|
||||||
diro->count = inode->dir.header.count;
|
diro->count = inode->dir.header.count;
|
||||||
diro->dirpage = 0;
|
diro->dirpage = 0;
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ grub_jfs_getent (struct grub_jfs_diropen *diro)
|
||||||
diro->index++;
|
diro->index++;
|
||||||
|
|
||||||
/* Convert the temporary UTF16 filename to UTF8. */
|
/* Convert the temporary UTF16 filename to UTF8. */
|
||||||
*grub_utf16_to_utf8 (diro->name, filename, strpos) = '\0';
|
*grub_utf16_to_utf8 ((grub_uint8_t *) (diro->name), filename, strpos) = '\0';
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -703,7 +703,7 @@ grub_jfs_lookup_symlink (struct grub_jfs_data *data, int ino)
|
||||||
return grub_error (GRUB_ERR_SYMLINK_LOOP, "too deep nesting of symlinks");
|
return grub_error (GRUB_ERR_SYMLINK_LOOP, "too deep nesting of symlinks");
|
||||||
|
|
||||||
if (size <= 128)
|
if (size <= 128)
|
||||||
grub_strncpy (symlink, data->currinode.symlink.path, 128);
|
grub_strncpy (symlink, (char *) (data->currinode.symlink.path), 128);
|
||||||
else if (grub_jfs_read_file (data, 0, 0, size, symlink) < 0)
|
else if (grub_jfs_read_file (data, 0, 0, size, symlink) < 0)
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
|
@ -851,7 +851,7 @@ grub_jfs_label (grub_device_t device, char **label)
|
||||||
data = grub_jfs_mount (device->disk);
|
data = grub_jfs_mount (device->disk);
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
*label = grub_strndup (data->sblock.volname, 11);
|
*label = grub_strndup ((char *) (data->sblock.volname), 11);
|
||||||
else
|
else
|
||||||
*label = 0;
|
*label = 0;
|
||||||
|
|
||||||
|
|
8
fs/sfs.c
8
fs/sfs.c
|
@ -288,7 +288,7 @@ grub_sfs_mount (grub_disk_t disk)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* Make sure this is a sfs filesystem. */
|
/* Make sure this is a sfs filesystem. */
|
||||||
if (grub_strncmp (data->rblock.header.magic, "SFS", 4))
|
if (grub_strncmp ((char *) (data->rblock.header.magic), "SFS", 4))
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_FS, "not a sfs filesystem");
|
grub_error (GRUB_ERR_BAD_FS, "not a sfs filesystem");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -296,7 +296,7 @@ grub_sfs_mount (grub_disk_t disk)
|
||||||
|
|
||||||
data->blocksize = grub_be_to_cpu32 (data->rblock.blocksize);
|
data->blocksize = grub_be_to_cpu32 (data->rblock.blocksize);
|
||||||
rootobjc_data = grub_malloc (data->blocksize);
|
rootobjc_data = grub_malloc (data->blocksize);
|
||||||
if (!rootobjc_data)
|
if (! rootobjc_data)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
/* Read the root object container. */
|
/* Read the root object container. */
|
||||||
|
@ -312,7 +312,7 @@ grub_sfs_mount (grub_disk_t disk)
|
||||||
data->diropen.block = blk;
|
data->diropen.block = blk;
|
||||||
data->diropen.data = data;
|
data->diropen.data = data;
|
||||||
data->disk = disk;
|
data->disk = disk;
|
||||||
data->label = grub_strdup (rootobjc->objects[0].filename);
|
data->label = grub_strdup ((char *) (rootobjc->objects[0].filename));
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
|
@ -403,7 +403,7 @@ grub_sfs_iterate_dir (grub_fshelp_node_t dir,
|
||||||
{
|
{
|
||||||
struct grub_sfs_obj *obj;
|
struct grub_sfs_obj *obj;
|
||||||
obj = (struct grub_sfs_obj *) ((char *) objc + pos);
|
obj = (struct grub_sfs_obj *) ((char *) objc + pos);
|
||||||
char *filename = obj->filename;
|
char *filename = (char *) (obj->filename);
|
||||||
int len;
|
int len;
|
||||||
enum grub_fshelp_filetype type;
|
enum grub_fshelp_filetype type;
|
||||||
unsigned int block;
|
unsigned int block;
|
||||||
|
|
2
fs/ufs.c
2
fs/ufs.c
|
@ -363,7 +363,7 @@ grub_ufs_lookup_symlink (struct grub_ufs_data *data, int ino)
|
||||||
|
|
||||||
if (INODE_SIZE (data) < (GRUB_UFS_DIRBLKS + GRUB_UFS_INDIRBLKS
|
if (INODE_SIZE (data) < (GRUB_UFS_DIRBLKS + GRUB_UFS_INDIRBLKS
|
||||||
* INODE_BLKSZ (data)))
|
* INODE_BLKSZ (data)))
|
||||||
grub_strcpy (symlink, INODE (data, symlink));
|
grub_strcpy (symlink, (char *) INODE (data, symlink));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
grub_disk_read (data->disk,
|
grub_disk_read (data->disk,
|
||||||
|
|
6
fs/xfs.c
6
fs/xfs.c
|
@ -191,7 +191,7 @@ grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
|
||||||
sizeof (struct grub_xfs_inode), (char *) inode))
|
sizeof (struct grub_xfs_inode), (char *) inode))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
if (grub_strncmp (inode->magic, "IN", 2))
|
if (grub_strncmp ((char *) inode->magic, "IN", 2))
|
||||||
return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode.\n");
|
return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode.\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -494,7 +494,7 @@ grub_xfs_mount (grub_disk_t disk)
|
||||||
sizeof (struct grub_xfs_sblock), (char *) &data->sblock))
|
sizeof (struct grub_xfs_sblock), (char *) &data->sblock))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (grub_strncmp (data->sblock.magic, "XFSB", 4))
|
if (grub_strncmp ((char *) (data->sblock.magic), "XFSB", 4))
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_FS, "not a xfs filesystem");
|
grub_error (GRUB_ERR_BAD_FS, "not a xfs filesystem");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -663,7 +663,7 @@ grub_xfs_label (grub_device_t device, char **label)
|
||||||
|
|
||||||
data = grub_xfs_mount (disk);
|
data = grub_xfs_mount (disk);
|
||||||
if (data)
|
if (data)
|
||||||
*label = grub_strndup (data->sblock.label, 12);
|
*label = grub_strndup ((char *) (data->sblock.label), 12);
|
||||||
else
|
else
|
||||||
*label = 0;
|
*label = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
#
|
|
||||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This gensymlist.sh is free software; the author
|
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
|
||||||
# with or without modifications, as long as this notice is preserved.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
|
||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
||||||
# PARTICULAR PURPOSE.
|
|
||||||
|
|
||||||
cat $* | grep -v '^#' | sed -n '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/\1 kernel/;p;}'
|
|
||||||
cat $* | grep -v '^#' | sed -n '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/\1 kernel/;p;}'
|
|
24
genkernsyms.sh.in
Normal file
24
genkernsyms.sh.in
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2002,2006 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This gensymlist.sh is free software; the author
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
### The configure script will replace these variables.
|
||||||
|
|
||||||
|
srcdir=@srcdir@
|
||||||
|
CC=@CC@
|
||||||
|
|
||||||
|
$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I$srcdir/include $* \
|
||||||
|
| grep -v '^#' \
|
||||||
|
| sed -n \
|
||||||
|
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/\1 kernel/;p;}' \
|
||||||
|
-e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/\1 kernel/;p;}' \
|
||||||
|
| sort -u
|
|
@ -1,8 +1,8 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
# Copyright (C) 2002,2006 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This gensymlist.sh is free software; the author
|
# This gensymlist.sh.in is free software; the author
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# with or without modifications, as long as this notice is preserved.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
#
|
#
|
||||||
|
@ -11,11 +11,17 @@
|
||||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
### The configure script will replace these variables.
|
||||||
|
|
||||||
|
srcdir=@srcdir@
|
||||||
|
CC=@CC@
|
||||||
|
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */
|
/* This file is automatically generated by gensymlist.sh. DO NOT EDIT! */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2002 Free Software Foundation, Inc.
|
* Copyright (C) 2002,2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software; you can redistribute it and/or modify
|
* GRUB is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -52,8 +58,12 @@ cat <<EOF
|
||||||
{
|
{
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat $* | grep -v '^#' | sed -n '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/ {"\1", \1},/;p;}'
|
$CC -DGRUB_SYMBOL_GENERATOR=1 -E -I. -Iinclude -I$srcdir/include $* \
|
||||||
cat $* | grep -v '^#' | sed -n '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/ {"\1", \&\1},/;p;}'
|
| grep -v '^#' \
|
||||||
|
| sed -n \
|
||||||
|
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/ {"\1", \1},/;p;}' \
|
||||||
|
-e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/ {"\1", \&\1},/;p;}' \
|
||||||
|
| sort -u
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
{0, 0}
|
{0, 0}
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc.
|
* Copyright (C) 1999,2000,2001,2002,2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software; you can redistribute it and/or modify
|
* GRUB is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +33,9 @@
|
||||||
#define VARIABLE(x) .globl EXT_C(x) ; .type EXT_C(x), "object" ; EXT_C(x):
|
#define VARIABLE(x) .globl EXT_C(x) ; .type EXT_C(x), "object" ; EXT_C(x):
|
||||||
|
|
||||||
/* Mark an exported symbol. */
|
/* Mark an exported symbol. */
|
||||||
#define EXPORT_FUNC(x) x
|
#ifndef GRUB_SYMBOL_GENERATOR
|
||||||
#define EXPORT_VAR(x) x
|
# define EXPORT_FUNC(x) x
|
||||||
|
# define EXPORT_VAR(x) x
|
||||||
|
#endif /* ! GRUB_SYMBOL_GENERATOR */
|
||||||
|
|
||||||
#endif /* ! GRUB_SYMBOL_HEADER */
|
#endif /* ! GRUB_SYMBOL_HEADER */
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#define GRUB_VIDEO_HEADER 1
|
#define GRUB_VIDEO_HEADER 1
|
||||||
|
|
||||||
#include <grub/err.h>
|
#include <grub/err.h>
|
||||||
#include <grub/symbol.h>
|
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
|
|
||||||
typedef grub_uint32_t grub_video_color_t;
|
typedef grub_uint32_t grub_video_color_t;
|
||||||
|
@ -241,89 +240,89 @@ struct grub_video_adapter
|
||||||
};
|
};
|
||||||
typedef struct grub_video_adapter *grub_video_adapter_t;
|
typedef struct grub_video_adapter *grub_video_adapter_t;
|
||||||
|
|
||||||
void EXPORT_FUNC(grub_video_register) (grub_video_adapter_t adapter);
|
void grub_video_register (grub_video_adapter_t adapter);
|
||||||
void EXPORT_FUNC(grub_video_unregister) (grub_video_adapter_t adapter);
|
void grub_video_unregister (grub_video_adapter_t adapter);
|
||||||
void EXPORT_FUNC(grub_video_iterate) (int (*hook) (grub_video_adapter_t adapter));
|
void grub_video_iterate (int (*hook) (grub_video_adapter_t adapter));
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_setup) (unsigned int width,
|
grub_err_t grub_video_setup (unsigned int width,
|
||||||
unsigned int height,
|
unsigned int height,
|
||||||
unsigned int mode_type);
|
unsigned int mode_type);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_restore) (void);
|
grub_err_t grub_video_restore (void);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_get_info) (struct grub_video_mode_info *mode_info);
|
grub_err_t grub_video_get_info (struct grub_video_mode_info *mode_info);
|
||||||
|
|
||||||
enum grub_video_blit_format EXPORT_FUNC(grub_video_get_blit_format) (struct grub_video_mode_info *mode_info);
|
enum grub_video_blit_format grub_video_get_blit_format (struct grub_video_mode_info *mode_info);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_set_palette) (unsigned int start,
|
grub_err_t grub_video_set_palette (unsigned int start,
|
||||||
unsigned int count,
|
unsigned int count,
|
||||||
struct grub_video_palette_data *palette_data);
|
struct grub_video_palette_data *palette_data);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_get_palette) (unsigned int start,
|
grub_err_t grub_video_get_palette (unsigned int start,
|
||||||
unsigned int count,
|
unsigned int count,
|
||||||
struct grub_video_palette_data *palette_data);
|
struct grub_video_palette_data *palette_data);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_set_viewport) (unsigned int x,
|
grub_err_t grub_video_set_viewport (unsigned int x,
|
||||||
unsigned int y,
|
unsigned int y,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height);
|
unsigned int height);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_get_viewport) (unsigned int *x,
|
grub_err_t grub_video_get_viewport (unsigned int *x,
|
||||||
unsigned int *y,
|
unsigned int *y,
|
||||||
unsigned int *width,
|
unsigned int *width,
|
||||||
unsigned int *height);
|
unsigned int *height);
|
||||||
|
|
||||||
grub_video_color_t EXPORT_FUNC(grub_video_map_color) (grub_uint32_t color_name);
|
grub_video_color_t grub_video_map_color (grub_uint32_t color_name);
|
||||||
|
|
||||||
grub_video_color_t EXPORT_FUNC(grub_video_map_rgb) (grub_uint8_t red,
|
grub_video_color_t grub_video_map_rgb (grub_uint8_t red,
|
||||||
grub_uint8_t green,
|
grub_uint8_t green,
|
||||||
grub_uint8_t blue);
|
grub_uint8_t blue);
|
||||||
|
|
||||||
grub_video_color_t EXPORT_FUNC(grub_video_map_rgba) (grub_uint8_t red,
|
grub_video_color_t grub_video_map_rgba (grub_uint8_t red,
|
||||||
grub_uint8_t green,
|
grub_uint8_t green,
|
||||||
grub_uint8_t blue,
|
grub_uint8_t blue,
|
||||||
grub_uint8_t alpha);
|
grub_uint8_t alpha);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_fill_rect) (grub_video_color_t color,
|
grub_err_t grub_video_fill_rect (grub_video_color_t color,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height);
|
unsigned int height);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_blit_glyph) (struct grub_font_glyph *glyph,
|
grub_err_t grub_video_blit_glyph (struct grub_font_glyph *glyph,
|
||||||
grub_video_color_t color,
|
grub_video_color_t color,
|
||||||
int x,
|
int x,
|
||||||
int y);
|
int y);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_blit_bitmap) (struct grub_video_bitmap *bitmap,
|
grub_err_t grub_video_blit_bitmap (struct grub_video_bitmap *bitmap,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int offset_x,
|
int offset_x,
|
||||||
int offset_y,
|
int offset_y,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height);
|
unsigned int height);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_blit_render_target) (struct grub_video_render_target *source,
|
grub_err_t grub_video_blit_render_target (struct grub_video_render_target *source,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int offset_x,
|
int offset_x,
|
||||||
int offset_y,
|
int offset_y,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height);
|
unsigned int height);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_scroll) (grub_video_color_t color,
|
grub_err_t grub_video_scroll (grub_video_color_t color,
|
||||||
int dx,
|
int dx,
|
||||||
int dy);
|
int dy);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_swap_buffers) (void);
|
grub_err_t grub_video_swap_buffers (void);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_create_render_target) (struct grub_video_render_target **result,
|
grub_err_t grub_video_create_render_target (struct grub_video_render_target **result,
|
||||||
unsigned int width,
|
unsigned int width,
|
||||||
unsigned int height,
|
unsigned int height,
|
||||||
unsigned int mode_type);
|
unsigned int mode_type);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_delete_render_target) (struct grub_video_render_target *target);
|
grub_err_t grub_video_delete_render_target (struct grub_video_render_target *target);
|
||||||
|
|
||||||
grub_err_t EXPORT_FUNC(grub_video_set_active_render_target) (struct grub_video_render_target *target);
|
grub_err_t grub_video_set_active_render_target (struct grub_video_render_target *target);
|
||||||
|
|
||||||
#endif /* ! GRUB_VIDEO_HEADER */
|
#endif /* ! GRUB_VIDEO_HEADER */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
* Copyright (C) 2003,2004,2005,2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software; you can redistribute it and/or modify
|
* GRUB is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -53,6 +53,9 @@
|
||||||
/* Used for going back to the main function. */
|
/* Used for going back to the main function. */
|
||||||
jmp_buf main_env;
|
jmp_buf main_env;
|
||||||
|
|
||||||
|
/* Store the prefix specified by an argument. */
|
||||||
|
static char *prefix = 0;
|
||||||
|
|
||||||
grub_addr_t
|
grub_addr_t
|
||||||
grub_arch_modules_addr (void)
|
grub_arch_modules_addr (void)
|
||||||
{
|
{
|
||||||
|
@ -83,6 +86,14 @@ grub_machine_init (void)
|
||||||
grub_console_init ();
|
grub_console_init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
grub_machine_set_prefix (void)
|
||||||
|
{
|
||||||
|
grub_env_set ("prefix", prefix);
|
||||||
|
free (prefix);
|
||||||
|
prefix = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
grub_machine_fini (void)
|
grub_machine_fini (void)
|
||||||
{
|
{
|
||||||
|
@ -147,8 +158,8 @@ static struct argp argp = {options, parse_opt, 0, doc, 0, 0, 0};
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char *prefix = 0;
|
char *dir;
|
||||||
char rootprefix[100];
|
|
||||||
struct arguments args =
|
struct arguments args =
|
||||||
{
|
{
|
||||||
.dir = DEFAULT_DIRECTORY,
|
.dir = DEFAULT_DIRECTORY,
|
||||||
|
@ -184,10 +195,10 @@ main (int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prefix = grub_get_prefix (args.dir ? : DEFAULT_DIRECTORY);
|
dir = grub_get_prefix (args.dir ? : DEFAULT_DIRECTORY);
|
||||||
sprintf (rootprefix, "%s%s", args.root_dev, prefix);
|
prefix = xmalloc (strlen (args.root_dev) + strlen (dir) + 1);
|
||||||
|
sprintf (prefix, "%s%s", args.root_dev, dir);
|
||||||
grub_env_set ("prefix", rootprefix);
|
free (dir);
|
||||||
|
|
||||||
/* XXX: This is a bit unportable. */
|
/* XXX: This is a bit unportable. */
|
||||||
grub_util_biosdisk_init (args.dev_map);
|
grub_util_biosdisk_init (args.dev_map);
|
||||||
|
|
|
@ -61,9 +61,11 @@ compress_kernel (char *kernel_img, size_t kernel_size,
|
||||||
memcpy (*core_img, kernel_img, GRUB_KERNEL_MACHINE_RAW_SIZE);
|
memcpy (*core_img, kernel_img, GRUB_KERNEL_MACHINE_RAW_SIZE);
|
||||||
|
|
||||||
grub_util_info ("compressing the core image");
|
grub_util_info ("compressing the core image");
|
||||||
if (lzo1x_999_compress (kernel_img + GRUB_KERNEL_MACHINE_RAW_SIZE,
|
if (lzo1x_999_compress ((const lzo_byte *) (kernel_img
|
||||||
|
+ GRUB_KERNEL_MACHINE_RAW_SIZE),
|
||||||
kernel_size - GRUB_KERNEL_MACHINE_RAW_SIZE,
|
kernel_size - GRUB_KERNEL_MACHINE_RAW_SIZE,
|
||||||
*core_img + GRUB_KERNEL_MACHINE_RAW_SIZE,
|
(lzo_byte *) (*core_img
|
||||||
|
+ GRUB_KERNEL_MACHINE_RAW_SIZE),
|
||||||
&size, wrkmem)
|
&size, wrkmem)
|
||||||
!= LZO_E_OK)
|
!= LZO_E_OK)
|
||||||
grub_util_error ("cannot compress the kernel image");
|
grub_util_error ("cannot compress the kernel image");
|
||||||
|
|
Loading…
Reference in a new issue