[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] Grub for ia64



Hi, Tristan 

 That's fine that GRUB support IA64 platform!
 Do you plan to support TrustedGRUB?
http://sourceforge.net/projects/trustedgrub/

Thanks
Atsushi SAKAI


>Hi,
>
>here is my port of grub to ia64.  I hope it has all the requested features
>(kernel, initrd, modules, relocation and fpswa).
>
>This is a port of grub 1.94, which is not the legacy grub used by x86.  The
>syntax is slightly different.  See an attached example.
>
>Attached is grub.efi, patch and grub.cfg example as well as modifications for
>Xen (to support acm).
>
>Tested in many configurations (including acm).
>
>I will post the patches to grub-devel later.
>
>Tristan.
>

>menuentry "Xen-3.4-acm" {
> set root=(hd0,1)
> linux /efi/xen/xen.gz com2=57600,8n1 console=com2
> module /efi/xen/vmlinux-xen0 xencons=ttyS4 console=ttyS4 root=8:6
> module /efi/xen/client_v1.bin
>}

>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/Makefile.in 
>grub-1.94/Makefile.in
>*** grub-1.94.orig/Makefile.in Mon May 29 01:01:43 2006
>--- grub-1.94/Makefile.in      Fri Aug 25 13:45:38 2006
>***************
>*** 76,82 ****
>  ### General variables.
>
>  RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \
>!      sparc64-ieee1275.rmk i386-efi.rmk)
>  MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
>
>  DATA = $(pkgdata_IMAGES) $(pkgdata_MODULES) $(pkgdata_PROGRAMS) \
>--- 76,82 ----
>  ### General variables.
>
>  RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \
>!      sparc64-ieee1275.rmk i386-efi.rmk ia64-efi.rmk)
>  MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
>
>  DATA = $(pkgdata_IMAGES) $(pkgdata_MODULES) $(pkgdata_PROGRAMS) \
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/blocklist.c 
>grub-1.94/commands/blocklist.c
>*** grub-1.94.orig/commands/blocklist.c        Sat May 27 23:09:25 2006
>--- grub-1.94/commands/blocklist.c     Thu Aug 31 09:00:31 2006
>***************
>*** 99,105 ****
>  }
>
>
>! GRUB_MOD_INIT(blocklist)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("blocklist", grub_cmd_blocklist,
>--- 99,106 ----
>  }
>
>
>! static void
>! grub_blocklist_init (grub_dl_t mod)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("blocklist", grub_cmd_blocklist,
>***************
>*** 108,114 ****
>                        "Print a block list.", 0);
>  }
>
>! GRUB_MOD_FINI(blocklist)
>  {
>    grub_unregister_command ("blocklist");
>  }
>--- 109,118 ----
>                        "Print a block list.", 0);
>  }
>
>! static void
>! grub_blocklist_fini (void)
>  {
>    grub_unregister_command ("blocklist");
>  }
>+
>+ GRUB_MODULE(blocklist, grub_blocklist_init, grub_blocklist_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/boot.c 
>grub-1.94/commands/boot.c
>*** grub-1.94.orig/commands/boot.c     Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/boot.c  Thu Aug 31 09:00:10 2006
>***************
>*** 38,51 ****
>
>
>
>! GRUB_MOD_INIT(boot)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("boot", grub_cmd_boot, GRUB_COMMAND_FLAG_BOTH,
>                        "boot", "Boot an operating system.", 0);
>  }
>
>! GRUB_MOD_FINI(boot)
>  {
>    grub_unregister_command ("boot");
>  }
>--- 38,55 ----
>
>
>
>! static void
>! grub_boot_init (grub_dl_t mod)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("boot", grub_cmd_boot, GRUB_COMMAND_FLAG_BOTH,
>                        "boot", "Boot an operating system.", 0);
>  }
>
>! static void
>! grub_boot_fini (void)
>  {
>    grub_unregister_command ("boot");
>  }
>+
>+ GRUB_MODULE(boot, grub_boot_init, grub_boot_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/cat.c 
>grub-1.94/commands/cat.c
>*** grub-1.94.orig/commands/cat.c      Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/cat.c   Thu Aug 31 09:00:37 2006
>***************
>*** 70,83 ****
>  }
>
>
>! GRUB_MOD_INIT(cat)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("cat", grub_cmd_cat, GRUB_COMMAND_FLAG_BOTH,
>                        "cat FILE", "Show the contents of a file.", 0);
>  }
>
>! GRUB_MOD_FINI(cat)
>  {
>    grub_unregister_command ("cat");
>  }
>--- 70,87 ----
>  }
>
>
>! static void
>! grub_cat_init (grub_dl_t mod)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("cat", grub_cmd_cat, GRUB_COMMAND_FLAG_BOTH,
>                        "cat FILE", "Show the contents of a file.", 0);
>  }
>
>! static void
>! grub_cat_fini (void)
>  {
>    grub_unregister_command ("cat");
>  }
>+
>+ GRUB_MODULE(cat, grub_cat_init, grub_cat_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/cmp.c 
>grub-1.94/commands/cmp.c
>*** grub-1.94.orig/commands/cmp.c      Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/cmp.c   Thu Aug 31 09:00:42 2006
>***************
>*** 102,115 ****
>  }
>
>
>! GRUB_MOD_INIT(cmp)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("cmp", grub_cmd_cmp, GRUB_COMMAND_FLAG_BOTH,
>                        "cmp FILE1 FILE2", "Compare two files.", 0);
>  }
>
>! GRUB_MOD_FINI(cmp)
>  {
>    grub_unregister_command ("cmp");
>  }
>--- 102,119 ----
>  }
>
>
>! static void
>! grub_cmp_init (grub_dl_t mod)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("cmp", grub_cmd_cmp, GRUB_COMMAND_FLAG_BOTH,
>                        "cmp FILE1 FILE2", "Compare two files.", 0);
>  }
>
>! static void
>! grub_cmp_fini (void)
>  {
>    grub_unregister_command ("cmp");
>  }
>+
>+ GRUB_MODULE(cmp, grub_cmp_init, grub_cmp_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/configfile.c 
>grub-1.94/commands/configfile.c
>*** grub-1.94.orig/commands/configfile.c       Sun Apr 30 22:48:05 2006
>--- grub-1.94/commands/configfile.c    Thu Aug 31 09:00:49 2006
>***************
>*** 54,60 ****
>  }
>
>
>! GRUB_MOD_INIT(configfile)
>  {
>    (void) mod;                   /* To stop warning. */
>    grub_register_command ("configfile", grub_cmd_configfile,
>--- 54,61 ----
>  }
>
>
>! static void
>! grub_configfile_init (grub_dl_t mod)
>  {
>    (void) mod;                   /* To stop warning. */
>    grub_register_command ("configfile", grub_cmd_configfile,
>***************
>*** 70,78 ****
>                        0);
>  }
>
>! GRUB_MOD_FINI(configfile)
>  {
>    grub_unregister_command ("configfile");
>    grub_unregister_command ("source");
>    grub_unregister_command (".");
>  }
>--- 71,82 ----
>                        0);
>  }
>
>! static void
>! grub_configfile_fini (void)
>  {
>    grub_unregister_command ("configfile");
>    grub_unregister_command ("source");
>    grub_unregister_command (".");
>  }
>+
>+ GRUB_MODULE(configfile, grub_configfile_init, grub_configfile_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/efi/memmap.c 
>grub-1.94/commands/efi/memmap.c
>*** grub-1.94.orig/commands/efi/memmap.c       Thu Jan  1 01:00:00 1970
>--- grub-1.94/commands/efi/memmap.c    Fri Sep  1 08:01:01 2006
>***************
>*** 0 ****
>--- 1,143 ----
>+ /* memmap.c  - Display memory map.  */
>+ /*
>+  *  GRUB  --  GRand Unified Bootloader
>+  *  Copyright (C) 2003,2005  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 2 of the License, or
>+  *  (at your option) any later version.
>+  *
>+  *  This program 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, write to the Free Software
>+  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
>+  */
>+
>+ #include <grub/types.h>
>+ #include <grub/mm.h>
>+ #include <grub/misc.h>
>+ #include <grub/normal.h>
>+ #include <grub/efi/api.h>
>+ #include <grub/efi/efi.h>
>+
>+ #define ADD_MEMORY_DESCRIPTOR(desc, size)    \
>+   ((grub_efi_memory_descriptor_t *) ((char *) (desc) + (size)))
>+
>+ static grub_err_t
>+ grub_cmd_memmap (struct grub_arg_list *state, int argc, char **args)
>+ {
>+   grub_efi_uintn_t map_size;
>+   grub_efi_memory_descriptor_t *memory_map;
>+   grub_efi_memory_descriptor_t *memory_map_end;
>+   grub_efi_memory_descriptor_t *desc;
>+   grub_efi_uintn_t desc_size;
>+
>+   if (grub_efi_get_memory_map (&map_size, NULL, NULL, &desc_size, 0) < 0)
>+     return 0;
>+
>+   memory_map = grub_malloc (map_size);
>+   if (memory_map == NULL)
>+     return 0;
>+
>+   if (grub_efi_get_memory_map (&map_size, memory_map, NULL, &desc_size, 0) < 
>0)
>+     goto fail;
>+
>+   grub_printf
>+     ("Type      Physical start  - end             #Pages   Attributes"
>+      "       Size\n");
>+   memory_map_end = ADD_MEMORY_DESCRIPTOR(memory_map, map_size);
>+   for (desc = memory_map;
>+        desc < memory_map_end;
>+        desc = ADD_MEMORY_DESCRIPTOR (desc, desc_size))
>+     {
>+       grub_efi_uintn_t size;
>+       grub_efi_uint64_t attr;
>+       static const char types_str[][9] =
>+      {
>+        "reserved",
>+        "ldr-code",
>+        "ldr-data",
>+        "BS-code ",
>+        "BS-data ",
>+        "RT-code ",
>+        "RT-data ",
>+        "conv-mem",
>+        "unusable",
>+        "ACPI-rec",
>+        "ACPI-nvs",
>+        "MMIO    ",
>+        "IO-ports",
>+        "PAL-code"
>+      };
>+       if (desc->type < sizeof (types_str) / sizeof (types_str[0]))
>+      grub_printf ("%s ", types_str[desc->type]);
>+       else
>+      grub_printf ("Unk %02x   ", desc->type);
>+
>+       grub_printf (" %016llx-%016llx %08lx",
>+                 desc->physical_start,
>+                 desc->physical_start + (desc->num_pages << 12) - 1,
>+                 desc->num_pages);
>+       attr = desc->attribute;
>+       if (attr & GRUB_EFI_MEMORY_RUNTIME)
>+      grub_printf (" RT");
>+       if (attr & GRUB_EFI_MEMORY_UC)
>+      grub_printf (" UC");
>+       if (attr & GRUB_EFI_MEMORY_WC)
>+      grub_printf (" WC");
>+       if (attr & GRUB_EFI_MEMORY_WT)
>+      grub_printf (" WT");
>+       if (attr & GRUB_EFI_MEMORY_WB)
>+      grub_printf (" WB");
>+       if (attr & GRUB_EFI_MEMORY_UCE)
>+      grub_printf (" UCE");
>+       if (attr & GRUB_EFI_MEMORY_WP)
>+      grub_printf (" WP");
>+       if (attr & GRUB_EFI_MEMORY_RP)
>+      grub_printf (" RP");
>+       if (attr & GRUB_EFI_MEMORY_XP)
>+      grub_printf (" XP");
>+
>+       size = desc->num_pages << (12 - 10);
>+       if (size < 1024)
>+      grub_printf (" %uKB", size);
>+       else
>+      {
>+        size /= 1024;
>+        if (size < 1024)
>+          grub_printf (" %uMB", size);
>+        else
>+          {
>+            size /= 1024;
>+            grub_printf (" %uGB", size);
>+          }
>+      }
>+       grub_printf ("\n");
>+     }
>+
>+  fail:
>+   grub_free (memory_map);
>+   return 0;
>+ }
>+
>+ static void
>+ grub_memmap_init (grub_dl_t mod)
>+ {
>+   (void)mod;                 /* To stop warning. */
>+   grub_register_command ("memmap", grub_cmd_memmap, GRUB_COMMAND_FLAG_BOTH,
>+                       "memmap",
>+                       "Display memory map.", NULL);
>+ }
>+
>+ static void
>+ grub_memmap_fini (void)
>+ {
>+   grub_unregister_command ("memmap");
>+ }
>+
>+ GRUB_MODULE(memmap, grub_memmap_init, grub_memmap_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/help.c 
>grub-1.94/commands/help.c
>*** grub-1.94.orig/commands/help.c     Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/help.c  Thu Aug 31 09:00:55 2006
>***************
>*** 94,107 ****
>
>
>
>! GRUB_MOD_INIT(help)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("help", grub_cmd_help, GRUB_COMMAND_FLAG_CMDLINE,
>                        "help [PATTERN ...]", "Show a help message.", 0);
>  }
>
>! GRUB_MOD_FINI(help)
>  {
>    grub_unregister_command ("help");
>  }
>--- 94,111 ----
>
>
>
>! static void
>! grub_help_init (grub_dl_t mod)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("help", grub_cmd_help, GRUB_COMMAND_FLAG_CMDLINE,
>                        "help [PATTERN ...]", "Show a help message.", 0);
>  }
>
>! static void
>! grub_help_fini (void)
>  {
>    grub_unregister_command ("help");
>  }
>+
>+ GRUB_MODULE(help, grub_help_init, grub_help_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/ls.c 
>grub-1.94/commands/ls.c
>*** grub-1.94.orig/commands/ls.c       Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/ls.c    Thu Aug 31 13:48:30 2006
>***************
>*** 157,163 ****
>        grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
>        goto fail;
>      }
>!
>    if (! *path)
>      {
>        if (grub_errno == GRUB_ERR_UNKNOWN_FS)
>--- 157,163 ----
>        grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
>        goto fail;
>      }
>!
>    if (! *path)
>      {
>        if (grub_errno == GRUB_ERR_UNKNOWN_FS)
>***************
>*** 228,234 ****
>    return 0;
>  }
>
>! GRUB_MOD_INIT(ls)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("ls", grub_cmd_ls, GRUB_COMMAND_FLAG_BOTH,
>--- 228,235 ----
>    return 0;
>  }
>
>! static void
>! grub_ls_init (grub_dl_t mod)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("ls", grub_cmd_ls, GRUB_COMMAND_FLAG_BOTH,
>***************
>*** 236,242 ****
>                        "List devices and files.", options);
>  }
>
>! GRUB_MOD_FINI(ls)
>  {
>    grub_unregister_command ("ls");
>  }
>--- 237,246 ----
>                        "List devices and files.", options);
>  }
>
>! static void
>! grub_ls_fini (void)
>  {
>    grub_unregister_command ("ls");
>  }
>+
>+ GRUB_MODULE(ls, grub_ls_init, grub_ls_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/search.c 
>grub-1.94/commands/search.c
>*** grub-1.94.orig/commands/search.c   Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/search.c        Thu Aug 31 09:01:08 2006
>***************
>*** 148,154 ****
>    return grub_errno;
>  }
>
>! GRUB_MOD_INIT(search)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("search", grub_cmd_search, GRUB_COMMAND_FLAG_BOTH,
>--- 148,155 ----
>    return grub_errno;
>  }
>
>! static void
>! grub_search_init (grub_dl_t mod)
>  {
>    (void) mod;                        /* To stop warning. */
>    grub_register_command ("search", grub_cmd_search, GRUB_COMMAND_FLAG_BOTH,
>***************
>*** 160,166 ****
>                        options);
>  }
>
>! GRUB_MOD_FINI(search)
>  {
>    grub_unregister_command ("search");
>  }
>--- 161,170 ----
>                        options);
>  }
>
>! static void
>! grub_search_fini (void)
>  {
>    grub_unregister_command ("search");
>  }
>+
>+ GRUB_MODULE(search, grub_search_init, grub_search_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/terminal.c 
>grub-1.94/commands/terminal.c
>*** grub-1.94.orig/commands/terminal.c Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/terminal.c      Thu Aug 31 09:00:19 2006
>***************
>*** 71,84 ****
>  }
>
>
>! GRUB_MOD_INIT(terminal)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("terminal", grub_cmd_terminal, 
> GRUB_COMMAND_FLAG_BOTH,
>                        "terminal [TERM...]", "Select a terminal.", 0);
>  }
>
>! GRUB_MOD_FINI(terminal)
>  {
>    grub_unregister_command ("terminal");
>  }
>--- 71,88 ----
>  }
>
>
>! static void
>! grub_terminal_init (grub_dl_t mod)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("terminal", grub_cmd_terminal, 
> GRUB_COMMAND_FLAG_BOTH,
>                        "terminal [TERM...]", "Select a terminal.", 0);
>  }
>
>! static void
>! grub_terminal_fini (void)
>  {
>    grub_unregister_command ("terminal");
>  }
>+
>+ GRUB_MODULE(terminal, grub_terminal_init, grub_terminal_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/test.c 
>grub-1.94/commands/test.c
>*** grub-1.94.orig/commands/test.c     Sun Nov 13 16:47:08 2005
>--- grub-1.94/commands/test.c  Thu Aug 31 09:01:15 2006
>***************
>*** 55,61 ****
>
>
>
>! GRUB_MOD_INIT(test)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("[", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
>--- 55,62 ----
>
>
>
>! static void
>! grub_test_init (grub_dl_t mod)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("[", grub_cmd_test, GRUB_COMMAND_FLAG_CMDLINE,
>***************
>*** 64,71 ****
>                        "test EXPRESSION", "Evaluate an expression", 0);
>  }
>
>! GRUB_MOD_FINI(test)
>  {
>    grub_unregister_command ("[");
>    grub_unregister_command ("test");
>  }
>--- 65,75 ----
>                        "test EXPRESSION", "Evaluate an expression", 0);
>  }
>
>! static void
>! grub_test_fini (void)
>  {
>    grub_unregister_command ("[");
>    grub_unregister_command ("test");
>  }
>+
>+ GRUB_MODULE(test, grub_test_init, grub_test_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/commands/videotest.c 
>grub-1.94/commands/videotest.c
>*** grub-1.94.orig/commands/videotest.c        Tue Mar 14 20:08:33 2006
>--- grub-1.94/commands/videotest.c     Thu Aug 31 09:01:28 2006
>***************
>*** 114,120 ****
>    return grub_errno;
>  }
>
>! GRUB_MOD_INIT(videotest)
>  {
>    grub_register_command ("videotest",
>                           grub_cmd_videotest,
>--- 114,121 ----
>    return grub_errno;
>  }
>
>! static void
>! grub_videotest_init (grub_dl_t mod)
>  {
>    grub_register_command ("videotest",
>                           grub_cmd_videotest,
>***************
>*** 124,130 ****
>                           0);
>  }
>
>! GRUB_MOD_FINI(videotest)
>  {
>    grub_unregister_command ("videotest");
>  }
>--- 125,134 ----
>                           0);
>  }
>
>! static void
>! grub_videotest_fini (void)
>  {
>    grub_unregister_command ("videotest");
>  }
>+
>+ GRUB_MODULE(videotest, grub_videotest_init, grub_videotest_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/conf/ia64-efi.rmk 
>grub-1.94/conf/ia64-efi.rmk
>*** grub-1.94.orig/conf/ia64-efi.rmk   Thu Jan  1 01:00:00 1970
>--- grub-1.94/conf/ia64-efi.rmk        Mon Sep  4 07:46:21 2006
>***************
>*** 0 ****
>--- 1,141 ----
>+ # -*- makefile -*-
>+
>+ COMMON_ASFLAGS = -nostdinc -fno-builtin
>+ COMMON_CFLAGS = -fno-builtin -fpic
>+ COMMON_LDFLAGS = -melf_64 -nostdlib
>+
>+ # Utilities.
>+ #bin_UTILITIES = grub-mkimage
>+ #sbin_UTILITIES = grub-emu
>+
>+ # Scripts.
>+ sbin_SCRIPTS = grub-install
>+
>+ # For grub-install.
>+ grub_install_SOURCES = util/ia64/efi/grub-install.in
>+
>+ # For grub-mkimage.
>+ #grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
>+ #    util/resolve.c
>+
>+ # For grub-setup.
>+ #grub_setup_SOURCES = util/i386/pc/grub-setup.c util/i386/pc/biosdisk.c      
>\
>+ #    util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c    \
>+ #    kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c    \
>+ #    fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c            \
>+ #    fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/hfsplus.c kern/file.c  \
>+ #    kern/fs.c kern/env.c fs/fshelp.c
>+
>+ # For grub-mkdevicemap.
>+ #grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c
>+
>+ # For grub-probefs.
>+ #grub_probefs_SOURCES = util/i386/pc/grub-probefs.c  \
>+ #    util/i386/pc/biosdisk.c util/misc.c util/i386/pc/getroot.c      \
>+ #    kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c       \
>+ #    fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c fs/ufs.c  \
>+ #    fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c   \
>+ #    fs/xfs.c fs/affs.c fs/sfs.c fs/hfsplus.c
>+
>+ # For grub-emu.
>+ grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c     \
>+      commands/configfile.c commands/help.c                           \
>+      commands/terminal.c commands/ls.c commands/test.c               \
>+      commands/search.c commands/blocklist.c                          \
>+      disk/loopback.c                                                 \
>+      fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c  \
>+      fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c     \
>+      io/gzio.c                                                       \
>+      kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c       \
>+      normal/execute.c kern/file.c kern/fs.c normal/lexer.c           \
>+      kern/loader.c kern/main.c kern/misc.c kern/parser.c             \
>+      grub_script.tab.c kern/partition.c kern/rescue.c kern/term.c    \
>+      normal/arg.c normal/cmdline.c normal/command.c normal/function.c\
>+      normal/completion.c normal/main.c                               \
>+      normal/menu.c normal/menu_entry.c normal/misc.c normal/script.c \
>+      partmap/amiga.c partmap/apple.c partmap/pc.c partmap/sun.c      \
>+      partmap/acorn.c partmap/gpt.c                                   \
>+      util/console.c util/grub-emu.c util/misc.c                      \
>+      util/i386/pc/misc.c grub_emu_init.c
>+
>+ grub_emu_LDFLAGS = $(LIBCURSES)
>+
>+ # Scripts.
>+ #sbin_SCRIPTS = grub-install
>+
>+ # For grub-install.
>+ #grub_install_SOURCES = util/efi/pc/grub-install.in
>+
>+ # Modules.
>+ pkgdata_MODULES = kernel.mod normal.mod _chain.mod chain.mod \
>+      _linux.mod linux.mod memmap.mod
>+
>+ # For kernel.mod.
>+ kernel_mod_EXPORTS = no
>+ kernel_mod_SOURCES = kern/ia64/startup.S kern/ia64/reloc_ia64.S \
>+      kern/ia64/umodsi3.S kern/ia64/umoddi3.S \
>+      kern/ia64/udivdi3.S kern/ia64/divdi3.S \
>+      kern/ia64/divsi3.S kern/ia64/modsi3.S kern/ia64/udivsi3.S \
>+      kern/ia64/trampoline.S \
>+      kern/main.c kern/device.c \
>+      kern/disk.c kern/dl.c kern/file.c kern/fs.c kern/err.c \
>+      kern/misc.c kern/mm.c kern/loader.c kern/rescue.c kern/term.c \
>+      kern/i386/dl.c kern/ia64/efi/init.c kern/parser.c kern/partition.c \
>+      kern/env.c symlist.c kern/efi/efi.c kern/efi/init.c kern/efi/mm.c \
>+      term/efi/console.c disk/efi/efidisk.c
>+ kernel_mod_HEADERS = arg.h boot.h device.h disk.h dl.h elf.h env.h err.h \
>+      file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h partition.h \
>+      pc_partition.h rescue.h symbol.h term.h types.h cache.h \
>+      i386/efi/time.h efi/efi.h efi/time.h efi/disk.h ia64/libgcc.h
>+ kernel_mod_CFLAGS = $(COMMON_CFLAGS)
>+ kernel_mod_ASFLAGS = $(COMMON_ASFLAGS)
>+ kernel_mod_LDFLAGS = $(COMMON_LDFLAGS)
>+
>+ MOSTLYCLEANFILES += symlist.c
>+ MOSTLYCLEANFILES += symlist.c kernel_syms.lst
>+ DEFSYMFILES += kernel_syms.lst
>+
>+ symlist.c: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h 
>gensymlist.sh
>+      /bin/sh gensymlist.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
>+
>+ kernel_syms.lst: $(addprefix include/grub/,$(kernel_mod_HEADERS)) config.h 
>genkernsyms.sh
>+      /bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
>+
>+ # For normal.mod.
>+ normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c  \
>+      normal/completion.c normal/execute.c            \
>+      normal/function.c normal/lexer.c normal/main.c normal/menu.c    \
>+      normal/menu_entry.c normal/misc.c grub_script.tab.c             \
>+      normal/script.c \
>+      normal/ia64/setjmp.S normal/ia64/longjmp.S
>+
>+ normal_mod_CFLAGS = $(COMMON_CFLAGS)
>+ normal_mod_ASFLAGS = $(COMMON_ASFLAGS)
>+ normal_mod_LDFLAGS = $(COMMON_LDFLAGS)
>+
>+ # For _chain.mod.
>+ _chain_mod_SOURCES = loader/efi/chainloader.c
>+ _chain_mod_CFLAGS = $(COMMON_CFLAGS)
>+ _chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
>+
>+ # For chain.mod.
>+ chain_mod_SOURCES = loader/efi/chainloader_normal.c
>+ chain_mod_CFLAGS = $(COMMON_CFLAGS)
>+ chain_mod_LDFLAGS = $(COMMON_LDFLAGS)
>+
>+ # For _linux.mod.
>+ _linux_mod_SOURCES = loader/ia64/linux.c
>+ _linux_mod_CFLAGS = $(COMMON_CFLAGS)
>+ _linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
>+
>+ # For linux.mod.
>+ linux_mod_SOURCES = loader/ia64/linux_normal.c
>+ linux_mod_CFLAGS = $(COMMON_CFLAGS)
>+ linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
>+
>+ # For memmap.mod.
>+ memmap_mod_SOURCES = commands/efi/memmap.c
>+ memmap_mod_CFLAGS = $(COMMON_CFLAGS)
>+ memmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
>+
>+ include $(srcdir)/conf/common.mk
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/configure grub-1.94/configure
>*** grub-1.94.orig/configure   Sun Jun  4 14:41:00 2006
>--- grub-1.94/configure        Thu Aug 31 14:05:51 2006
>***************
>*** 1440,1447 ****
>    powerpc) ;;
>    powerpc64) target_cpu=powerpc target_m32=1;;
>    sparc64) ;;
>!   *) { { echo "$as_me:$LINENO: error: unsupported CPU type" >&5
>! echo "$as_me: error: unsupported CPU type" >&2;}
>     { (exit 1); exit 1; }; } ;;
>  esac
>
>--- 1440,1448 ----
>    powerpc) ;;
>    powerpc64) target_cpu=powerpc target_m32=1;;
>    sparc64) ;;
>!   ia64) ;;
>!   *) { { echo "$as_me:$LINENO: error: unsupported CPU type $target_cpu" >&5
>! echo "$as_me: error: unsupported CPU type $target_cpu" >&2;}
>     { (exit 1); exit 1; }; } ;;
>  esac
>
>***************
>*** 1460,1465 ****
>--- 1461,1467 ----
>      i386-*) platform=pc ;;
>      powerpc-*) platform=ieee1275 ;;
>      sparc64-*) platform=ieee1275 ;;
>+     ia64*) platform=efi ;;
>      *) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5
>  echo "$as_me: error: unsupported machine type" >&2;}
>     { (exit 1); exit 1; }; } ;;
>***************
>*** 1474,1479 ****
>--- 1476,1482 ----
>    i386-pc) ;;
>    powerpc-ieee1275) ;;
>    sparc64-ieee1275) ;;
>+   ia64-efi) ;;
>    *) { { echo "$as_me:$LINENO: error: unsupported machine type" >&5
>  echo "$as_me: error: unsupported machine type" >&2;}
>     { (exit 1); exit 1; }; } ;;
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/configure.ac 
>grub-1.94/configure.ac
>*** grub-1.94.orig/configure.ac        Sun Jun  4 14:39:23 2006
>--- grub-1.94/configure.ac     Fri Aug 25 13:33:35 2006
>***************
>*** 50,56 ****
>    powerpc) ;;
>    powerpc64) target_cpu=powerpc target_m32=1;;
>    sparc64) ;;
>!   *) AC_MSG_ERROR([unsupported CPU type]) ;;
>  esac
>
>  # Specify the platform (such as firmware).
>--- 50,57 ----
>    powerpc) ;;
>    powerpc64) target_cpu=powerpc target_m32=1;;
>    sparc64) ;;
>!   ia64) ;;
>!   *) AC_MSG_ERROR([unsupported CPU type $target_cpu]) ;;
>  esac
>
>  # Specify the platform (such as firmware).
>***************
>*** 65,70 ****
>--- 66,72 ----
>      i386-*) platform=pc ;;
>      powerpc-*) platform=ieee1275 ;;
>      sparc64-*) platform=ieee1275 ;;
>+     ia64*) platform=efi ;;
>      *) AC_MSG_ERROR([unsupported machine type]) ;;
>    esac
>  else
>***************
>*** 77,82 ****
>--- 79,85 ----
>    i386-pc) ;;
>    powerpc-ieee1275) ;;
>    sparc64-ieee1275) ;;
>+   ia64-efi) ;;
>    *) AC_MSG_ERROR([unsupported machine type]) ;;
>  esac
>
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/disk/efi/efidisk.c 
>grub-1.94/disk/efi/efidisk.c
>*** grub-1.94.orig/disk/efi/efidisk.c  Sun Apr 30 23:09:37 2006
>--- grub-1.94/disk/efi/efidisk.c       Mon Sep  4 09:19:26 2006
>***************
>*** 146,151 ****
>--- 146,152 ----
>    /* Find handles which support the disk io interface.  */
>    handles = grub_efi_locate_handle (GRUB_EFI_BY_PROTOCOL, &disk_io_guid,
>                                   0, &num_handles);
>+
>    if (! handles)
>      return 0;
>
>***************
>*** 305,311 ****
>  name_devices (struct grub_efidisk_data *devices)
>  {
>    struct grub_efidisk_data *d;
>!
>    /* First, identify devices by media device paths.  */
>    for (d = devices; d; d = d->next)
>      {
>--- 306,312 ----
>  name_devices (struct grub_efidisk_data *devices)
>  {
>    struct grub_efidisk_data *d;
>!
>    /* First, identify devices by media device paths.  */
>    for (d = devices; d; d = d->next)
>      {
>***************
>*** 427,433 ****
>    devices = make_devices ();
>    if (! devices)
>      return;
>-
>    name_devices (devices);
>    free_devices (devices);
>  }
>--- 428,433 ----
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/disk/loopback.c 
>grub-1.94/disk/loopback.c
>*** grub-1.94.orig/disk/loopback.c     Sun Nov 13 16:47:09 2005
>--- grub-1.94/disk/loopback.c  Thu Aug 31 09:01:44 2006
>***************
>*** 241,247 ****
>
>
>
>! GRUB_MOD_INIT(loop)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("loopback", grub_cmd_loopback, 
> GRUB_COMMAND_FLAG_BOTH,
>--- 241,248 ----
>
>
>
>! static void
>! grub_loop_init (grub_dl_t mod)
>  {
>    (void)mod;                 /* To stop warning. */
>    grub_register_command ("loopback", grub_cmd_loopback, 
> GRUB_COMMAND_FLAG_BOTH,
>***************
>*** 250,258 ****
>    grub_disk_dev_register (&grub_loopback_dev);
>  }
>
>! GRUB_MOD_FINI(loop)
>  {
>    grub_unregister_command ("loopback");
>    grub_disk_dev_unregister (&grub_loopback_dev);
>  }
>
>--- 251,262 ----
>    grub_disk_dev_register (&grub_loopback_dev);
>  }
>
>! static void
>! grub_loop_fini (void)
>  {
>    grub_unregister_command ("loopback");
>    grub_disk_dev_unregister (&grub_loopback_dev);
>  }
>
>+
>+ GRUB_MODULE(loop, grub_loop_init, grub_loop_fini);
>diff -rcN -x '*~' -x ia64-efi.mk grub-1.94.orig/font/manager.c 
>grub-1.94/font/manager.c
>*** grub-1.94.orig/font/manager.c      Fri Mar 31 15:32:52 2006
>--- grub-1.94/font/manager.c   Thu Aug 31 09:03:52 2006
>***************
>*** 249,262 ****
>    return 0;
>  }
>
>! GRUB_MOD_INIT(font_manager)
>  {
>    grub_register_command ("font", font_command, GRUB_COMMAND_FLAG_BOTH,
>                        "font FILE...",
>                        "Specify one or more font files to display.", 0);
>  }
>
>! GRUB_MOD_FINI(font_manager)
>  {
>    grub_unregister_command ("font");
>  }
>--- 249,266 ----
>    return 0;
>  }
>
>! static void
>! grub_font_manager_init (grub_dl_t mod)
>  {
>    grub_register_command ("font", font_command, GRUB_COMMAND_FLAG_BOTH,
>                        "font FILE...",
>                        "Specify one or more font files to display.", 0);
>  }
>
>! static void
>! grub_font_manager_fini (void)








_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.