Skip to content

Commit

Permalink
Implement grub_file tool and use it to implement generating of config
Browse files Browse the repository at this point in the history
	in separate root.
  • Loading branch information
phcoder committed Dec 17, 2013
1 parent 296f760 commit ec824e0
Show file tree
Hide file tree
Showing 26 changed files with 1,113 additions and 122 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2013-12-17 Vladimir Serbinenko <[email protected]>

Implement grub_file tool and use it to implement generating of config
in separate root.

2013-12-17 Vladimir Serbinenko <[email protected]>

Change to v1 xen grants.
Expand Down
37 changes: 30 additions & 7 deletions Makefile.util.def
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ library = {
common = grub-core/script/script.c;
common = grub-core/script/argv.c;
common = grub-core/io/gzio.c;
common = grub-core/io/xzio.c;
common = grub-core/io/lzopio.c;
common = grub-core/kern/ia64/dl_helper.c;
common = grub-core/kern/arm/dl_helper.c;
Expand Down Expand Up @@ -422,49 +423,42 @@ script = {
name = '10_hurd';
common = util/grub.d/10_hurd.in;
installdir = grubconf;
condition = COND_HOST_HURD;
};

script = {
name = '10_kfreebsd';
common = util/grub.d/10_kfreebsd.in;
installdir = grubconf;
condition = COND_HOST_KFREEBSD;
};

script = {
name = '10_illumos';
common = util/grub.d/10_illumos.in;
installdir = grubconf;
condition = COND_HOST_ILLUMOS;
};

script = {
name = '10_netbsd';
common = util/grub.d/10_netbsd.in;
installdir = grubconf;
condition = COND_HOST_NETBSD;
};

script = {
name = '10_linux';
common = util/grub.d/10_linux.in;
installdir = grubconf;
condition = COND_HOST_LINUX;
};

script = {
name = '10_xnu';
common = util/grub.d/10_xnu.in;
installdir = grubconf;
condition = COND_HOST_XNU;
};

script = {
name = '20_linux_xen';
common = util/grub.d/20_linux_xen.in;
installdir = grubconf;
condition = COND_HOST_LINUX;
};

script = {
Expand Down Expand Up @@ -1255,3 +1249,32 @@ program = {
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};

program = {
name = grub-file;
mansection = 1;

common = util/grub-file.c;
common = util/render-label.c;
common = grub-core/commands/file.c;
common = grub-core/commands/file32.c;
common = grub-core/commands/file64.c;
common = grub-core/loader/i386/xen_file.c;
common = grub-core/loader/i386/xen_file32.c;
common = grub-core/loader/i386/xen_file64.c;
common = grub-core/io/offset.c;
common = grub-core/kern/elf.c;
common = grub-core/loader/lzss.c;
common = grub-core/loader/macho.c;
common = grub-core/loader/macho32.c;
common = grub-core/loader/macho64.c;
common = grub-core/kern/emu/hostfs.c;
common = grub-core/disk/host.c;
common = grub-core/osdep/init.c;

ldadd = libgrubmods.a;
ldadd = libgrubgcry.a;
ldadd = libgrubkern.a;
ldadd = grub-core/gnulib/libgnu.a;
ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
};
7 changes: 1 addition & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ grub_TRANSFORM([grub-script-check])
grub_TRANSFORM([grub-set-default])
grub_TRANSFORM([grub-sparc64-setup])
grub_TRANSFORM([grub-render-label])
grub_TRANSFORM([grub-file])

# Optimization flag. Allow user to override.
if test "x$TARGET_CFLAGS" = x; then
Expand Down Expand Up @@ -1608,13 +1609,7 @@ AM_CONDITIONAL([COND_arm_efi], [test x$target_cpu = xarm -a x$platform = xefi])
AM_CONDITIONAL([COND_arm64], [test x$target_cpu = xarm64 ])
AM_CONDITIONAL([COND_arm64_efi], [test x$target_cpu = xarm64 -a x$platform = xefi])

AM_CONDITIONAL([COND_HOST_HURD], [test x$host_kernel = xhurd])
AM_CONDITIONAL([COND_HOST_LINUX], [test x$host_kernel = xlinux])
AM_CONDITIONAL([COND_HOST_NETBSD], [test x$host_kernel = xnetbsd])
AM_CONDITIONAL([COND_HOST_WINDOWS], [test x$host_kernel = xwindows])
AM_CONDITIONAL([COND_HOST_KFREEBSD], [test x$host_kernel = xkfreebsd])
AM_CONDITIONAL([COND_HOST_XNU], [test x$host_kernel = xxnu])
AM_CONDITIONAL([COND_HOST_ILLUMOS], [test x$host_kernel = xillumos])

AM_CONDITIONAL([COND_MAN_PAGES], [test x$cross_compiling = xno -a x$HELP2MAN != x])
AM_CONDITIONAL([COND_GRUB_EMU_USB], [test x$enable_grub_emu_usb = xyes])
Expand Down
2 changes: 2 additions & 0 deletions docs/man/grub-file.h2m
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[NAME]
grub-file \- check file type
31 changes: 22 additions & 9 deletions grub-core/Makefile.core.def
Original file line number Diff line number Diff line change
Expand Up @@ -1659,10 +1659,6 @@ module = {
name = linux;
x86 = loader/i386/linux.c;
xen = loader/i386/xen.c;
xen = loader/i386/xen_file.c;
xen = loader/i386/xen_file32.c;
xen = loader/i386/xen_file64.c;
extra_dist = loader/i386/xen_fileXX.c;
xen_cppflags = '$(CPPFLAGS_XEN)';
i386_pc = lib/i386/pc/vesa_modes_table.c;
mips = loader/mips/linux.c;
Expand All @@ -1680,16 +1676,21 @@ module = {
name = xnu;
x86 = loader/xnu_resume.c;
x86 = loader/i386/xnu.c;
x86 = loader/macho32.c;
x86 = loader/macho64.c;
x86 = loader/macho.c;
x86 = loader/xnu.c;
x86 = loader/lzss.c;

extra_dist = loader/machoXX.c;
enable = x86;
};

module = {
name = macho;

common = loader/macho.c;
common = loader/macho32.c;
common = loader/macho64.c;
common = loader/lzss.c;
extra_dist = loader/machoXX.c;
};

module = {
name = appleldr;
common = loader/efi/appleloader.c;
Expand Down Expand Up @@ -2269,3 +2270,15 @@ module = {
name = progress;
common = lib/progress.c;
};

module = {
name = file;
common = commands/file.c;
common = commands/file32.c;
common = commands/file64.c;
extra_dist = commands/fileXX.c;
common = loader/i386/xen_file.c;
common = loader/i386/xen_file32.c;
common = loader/i386/xen_file64.c;
extra_dist = loader/i386/xen_fileXX.c;
};
Loading

0 comments on commit ec824e0

Please sign in to comment.