]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* Makefile.in (CPPFLAGS): Replace -DGRUB_LIBDIR with
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 18 May 2010 11:55:26 +0000 (13:55 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 18 May 2010 11:55:26 +0000 (13:55 +0200)
-DGRUB_PKGLIBROOTDIR= and prepend @PACKAGE_TARNAME@. All users updated.
* util/grub-mkimage.c (image_targets): Add i386-multiboot.
(main): Add a slash after pkglibdirroot.

ChangeLog
Makefile.in
util/grub-mkimage.c

index 34e7b76ddd0a082de8fc52c2f01d3b5a026c8cde..2ce1c23e3c2113307b2b9189022d81706c5d06ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-05-18  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * Makefile.in (CPPFLAGS): Replace -DGRUB_LIBDIR with
+       -DGRUB_PKGLIBROOTDIR= and prepend @PACKAGE_TARNAME@. All users updated.
+       * util/grub-mkimage.c (image_targets): Add i386-multiboot.
+       (main): Add a slash after pkglibdirroot.
+
 2010-05-18  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * util/grub-install.in: Add missing "in" keyword.
index 26a494518f48a8499da163f8b8b699d1c63e0399..75388e3c8c99d8fc8fc4de238ebfbe0c676565b0 100644 (file)
@@ -90,7 +90,7 @@ GNULIB_CFLAGS = $(GNULIB_UTIL_CFLAGS) $(POSIX_CFLAGS)
 ASFLAGS = @ASFLAGS@
 LDFLAGS = @LDFLAGS@ $(LIBS)
 CPPFLAGS = @CPPFLAGS@ -I$(builddir) -I$(builddir)/include -I$(srcdir)/gnulib -I$(srcdir)/include -Wall -W \
-        -DGRUB_LIBDIR=\"$(libdir)\" -DLOCALEDIR=\"$(localedir)\"
+        -DGRUB_PKGLIBROOTDIR=\"$(libdir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`\" -DLOCALEDIR=\"$(localedir)\"
 TARGET_CC = @TARGET_CC@
 TARGET_CFLAGS = -ffreestanding @TARGET_CFLAGS@
 TARGET_ASFLAGS = -nostdinc -fno-builtin @TARGET_ASFLAGS@
index cc4a225d4e597d07062bdf0457106ce3bfb0a852..6366a98036d13ee361a394688b1ffdb4a2e64ce5 100644 (file)
@@ -99,6 +99,28 @@ struct image_target_desc image_targets[] =
       .mod_gap = GRUB_KERNEL_I386_COREBOOT_MOD_GAP,
       .mod_align = GRUB_KERNEL_I386_COREBOOT_MOD_ALIGN
     },
+    {
+      .name = "i386-multiboot",
+      .voidp_sizeof = 4,
+      .bigendian = 0,
+      .id = IMAGE_COREBOOT,
+      .flags = PLATFORM_FLAGS_NONE,
+      .prefix = GRUB_KERNEL_I386_COREBOOT_PREFIX,
+      .data_end = GRUB_KERNEL_I386_COREBOOT_DATA_END,
+      .raw_size = 0,
+      .total_module_size = TARGET_NO_FIELD,
+      .kernel_image_size = TARGET_NO_FIELD,
+      .compressed_size = TARGET_NO_FIELD,
+      .section_align = 1,
+      .vaddr_offset = 0,
+      .install_dos_part = TARGET_NO_FIELD,
+      .install_bsd_part = TARGET_NO_FIELD,
+      .link_addr = GRUB_KERNEL_I386_COREBOOT_LINK_ADDR,
+      .elf_target = EM_386,
+      .link_align = 4,
+      .mod_gap = GRUB_KERNEL_I386_COREBOOT_MOD_GAP,
+      .mod_align = GRUB_KERNEL_I386_COREBOOT_MOD_ALIGN
+    },
     {
       .name = "i386-pc",
       .voidp_sizeof = 4,
@@ -1182,7 +1204,7 @@ Make a bootable image of GRUB.\n\
 \n\
 Report bugs to <%s>.\n\
 "), 
-             program_name, GRUB_LIBDIR, DEFAULT_DIRECTORY,
+             program_name, GRUB_PKGLIBROOTDIR, DEFAULT_DIRECTORY,
              formats,
              PACKAGE_BUGREPORT);
       free (formats);
@@ -1320,14 +1342,16 @@ main (int argc, char *argv[])
        last = strchr (last + 1, '-');
       if (!last)
        last = image_target->name + strlen (image_target->name);
-      dir = xmalloc (sizeof (GRUB_LIBDIR) + (last - image_target->name));
-      memcpy (dir, GRUB_LIBDIR, sizeof (GRUB_LIBDIR) - 1);
-      memcpy (dir + sizeof (GRUB_LIBDIR) - 1, image_target->name,
+      dir = xmalloc (sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name)
+                    + 1);
+      memcpy (dir, GRUB_PKGLIBROOTDIR, sizeof (GRUB_PKGLIBROOTDIR) - 1);
+      *(dir + sizeof (GRUB_PKGLIBROOTDIR) - 1) = '/';
+      memcpy (dir + sizeof (GRUB_PKGLIBROOTDIR), image_target->name,
              last - image_target->name);
-      *(dir + sizeof (GRUB_LIBDIR) - 1 +  (last - image_target->name)) = 0;
+      *(dir + sizeof (GRUB_PKGLIBROOTDIR) + (last - image_target->name)) = 0;
     }
 
-  generate_image (dir ? : GRUB_LIBDIR, prefix ? : DEFAULT_DIRECTORY, fp,
+  generate_image (dir, prefix ? : DEFAULT_DIRECTORY, fp,
                  argv + optind, memdisk, font, config,
                  image_target, note);