On 11.02.2012 00:14, Lennart Sorensen wrote:
On Fri, Feb 10, 2012 at 03:43:01PM -0500, Lennart Sorensen wrote:
On Fri, Feb 10, 2012 at 09:38:25PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
On 10.02.2012 21:25, Lennart Sorensen wrote:
On Fri, Feb 10, 2012 at 08:25:32PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
On 10.02.2012 20:14, Lennart Sorensen wrote:
On Fri, Feb 10, 2012 at 02:08:52PM -0500, Lennart Sorensen wrote:
On Fri, Feb 10, 2012 at 07:58:25PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
On 10.02.2012 19:15, Lennart Sorensen wrote:
Where should grub_arch_dl_get_tramp_got_size come from?  The linker
whines about it.
It's in grub-core/kern/powerpc/dl.c
I have no trouble to cross-compile ppc port on my amd64 machine.
I will get the exact error again once I get the new code to stop whining
so much. :)

Or I can put the defined(__powerpc__) back in the older code and try
that again.
OK I did that:
Oh, it's powerpc-emu. That changes everything.
Well I am using the debian package rules which build both emu and
ieee1275.

I am not using emu, but I am building it.  Building doesn't take long
on a p710 after all.


--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'grub-core/kern/emu/full.c'
--- grub-core/kern/emu/full.c   2012-02-09 22:15:27 +0000
+++ grub-core/kern/emu/full.c   2012-02-10 20:37:43 +0000
@@ -50,7 +50,7 @@
    grub_no_autoload = 1;
  }

-#ifdef __ia64__
+#if defined (__ia64__) || defined (__powerpc__)
  void grub_arch_dl_get_tramp_got_size (const void *ehdr __attribute__ 
((unused)),
                                      grub_size_t *tramp, grub_size_t *got)
  {

That appears to fix the linker error on powerpc-emu builds.  Yay!
OK I did a build with --disable-werror and captured the output using
gcc 4.5 rather than 4.4 this time, just to see if it made any difference.

It failed though with:

cat kernel_syms.lst>  syminfo.lst.new
for m in trig.module                                                            
                                                                     
regexp.module                                   blocklist.module              
boot.module            cat.module              cmp.module              
configfile.module                     date.module               echo.module     
         extcmd.module          gptsync.module              halt.module         
     reboot.module              hashsum.module                       
help.module              hexdump.module              keystatus.module           
     loadenv.module              ls.module              lsmmap.module           
           memrw.module              minicmd.module              
parttool.module              password.module              
password_pbkdf2.module                     probe.module              
read.module              search.module              search_fs_file.module       
       search_fs_uuid.module              search_label.module                   
   sleep.module                terminal.module              test.module         
     true.module                      videoinfo.module              
videotest.module              xnu_uuid.module              dm_nv.module         
     loopback.module              cryptodisk.module              luks.module    
          geli.module              lvm.module              ldm.module           
   mdraid09.module              mdraid1x.module              diskfilter.module  
            raid5rec.module              raid6rec.module              
scsi.module              memdisk.module                                         
             font.module            affs.module              afs.module         
     bfs.module              btrfs.module              cpio.module              
cpio_be.module              newc.module              odc.module              
ext2.module              fat.module              exfat.module              
fshelp.module              hfs.module              hfsplus.module              
iso9660.module              jfs.module              minix.module              
minix2.module              minix3.module              nilfs2.module             
 ntfs.module              ntfscomp.module              reiserfs.module          
    romfs.module              sfs.module              squash4.module            
  tar.module              udf.module              ufs1.module              
ufs2.module              xfs.module              zfs.module              
zfscrypt.module              zfsinfo.module               gettext.module        
      gfxmenu.module              hello.module              gzio.module         
     bufio.module            elf.module              crypto.module              
pbkdf2.module                                      setjmp.module                
                                                                   
normal.module              part_acorn.module              part_amiga.module     
         part_apple.module              part_gpt.module              
part_msdos.module              part_sun.module              part_plan.module    
          part_dvh.module              part_bsd.module              
part_sunpc.module              msdospart.module                     
gfxterm.module                    terminfo.module                               
     functional_test.module              example_functional_test.module         
     bitmap.module            bitmap_scale.module                 jpeg.module   
           png.module              tga.module                 video_fb.module   
         video.module             sdl.module datehook.module              
net.module              tftp.module              http.module                    
emunet.module legacycfg.module  test_blockarg.module              xzio.module   
           lzopio.module              testload.module               
keylayouts.module            priority_queue.module              time.module     
                       adler32.module              crc64.module              
gcry_rmd160.module              gcry_sha1.module              
gcry_sha256.module              gcry_whirlpool.module              
gcry_tiger.module              gcry_twofish.module              
gcry_blowfish.module              gcry_crc.module              
gcry_rfc2268.module              gcry_serpent.module              
gcry_arcfour.module              gcry_cast5.module              gcry_md4.module 
             gcry_camellia.module              gcry_des.module              
gcry_seed.module              gcry_rijndael.module              gcry_md5.module 
             gcry_sha512.module              ; do \
           sh gensyminfo.sh $m>>  syminfo.lst.new || exit 1; \
         done
mv syminfo.lst.new syminfo.lst
cat syminfo.lst | sort | awk -f ../../../grub-core/genmoddep.awk>  moddep.lst 
|| (rm -f moddep.lst; exit 1)
make[4]: *** [moddep.lst] Error 1
make[4]: Leaving directory `/root/grub2-1.99+20120210/build/grub-emu/grub-core'
make[3]: *** [all-recursive] Error 1

I looked at it a bit and see:

root@rceng03new:~/grub2-1.99+20120210/build/grub-emu/grub-core# cat syminfo.lst 
| sort | awk -f ../../../grub-core/genmoddep.awk
error: 1: unrecognized input format

root@rceng03new:~/grub2-1.99+20120210/build/grub-emu/grub-core# cat syminfo.lst 
| sort | head
defined adler32 _gcry_digest_spec_adler32
defined adler32 grub_adler32_fini
defined adler32 grub_adler32_init
defined affs grub_affs_fini
defined affs grub_affs_init
defined afs grub_afs_fini
defined afs grub_afs_init
defined bfs grub_bfs_fini
defined bfs grub_bfs_init
defined bitmap grub_bitmap_fini

Anyhow, I am attaching the buildlog for as far as it got so you can see
which warnings remain (all of which of course would have aborted the
build with -Werror).  About 1500 warning: lines in the log at the moment.



--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'configure.ac'
--- configure.ac	2012-02-10 15:48:48 +0000
+++ configure.ac	2012-02-10 23:28:12 +0000
@@ -373,9 +373,9 @@
 LIBS=""
 
 # debug flags.
-WARN_FLAGS="-Wall -W -Wshadow -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wmissing-prototypes -Wundef -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Winline -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-overflow -Wswitch -Wsync-nand -Wtrigraphs  -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wmissing-declarations -Wmissing-parameter-type  -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
+WARN_FLAGS="-Wall -W -Wshadow -Wold-style-declaration -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Warray-bounds -Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wswitch -Wsync-nand -Wtrigraphs  -Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-result -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wmissing-declarations -Wmissing-parameter-type  -Wmissing-prototypes -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
 HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS"
-TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls"
+TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes"
 TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
 
 # Force no alignment to save space on i386.

=== modified file 'docs/grub.texi'
--- docs/grub.texi	2012-01-31 21:59:32 +0000
+++ docs/grub.texi	2012-02-10 17:11:59 +0000
@@ -20,7 +20,7 @@
 This manual is for GNU GRUB (version @value{VERSION},
 @value{UPDATED}).
 
-Copyright @copyright{} 1999,2000,2001,2002,2004,2006,2008,2009,2010 Free Software Foundation, Inc.
+Copyright @copyright{} 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document

=== modified file 'gentpl.py'
--- gentpl.py	2011-12-24 14:09:26 +0000
+++ gentpl.py	2012-02-10 17:10:18 +0000
@@ -1,4 +1,19 @@
 #! /usr/bin/python
+#  GRUB  --  GRand Unified Bootloader
+#  Copyright (C) 2010,2011  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 3 of the License, or
+#  (at your option) any later version.
+#
+#  GRUB 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, see <http://www.gnu.org/licenses/>.
 
 #
 # This is the python script used to generate Makefile.tpl

=== modified file 'grub-core/disk/diskfilter.c'
--- grub-core/disk/diskfilter.c	2012-02-09 22:43:43 +0000
+++ grub-core/disk/diskfilter.c	2012-02-10 19:54:58 +0000
@@ -260,6 +260,24 @@
   return list;
 }
 
+void
+grub_diskfilter_print_partmap (grub_disk_t disk)
+{
+  struct grub_diskfilter_lv *lv = disk->data;
+  struct grub_diskfilter_pv *pv;
+
+  if (lv->vg->pvs)
+    for (pv = lv->vg->pvs; pv; pv = pv->next)
+      {
+	grub_size_t s;
+	if (!pv->disk)
+	  grub_util_error (_("Couldn't find physical volume `%s'."
+			     " Check your device.map"), pv->name);
+	for (s = 0; pv->partmaps[s]; s++)
+	  grub_printf ("%s ", pv->partmaps[s]);
+      }
+}
+
 static const char *
 grub_diskfilter_getname (struct grub_disk *disk)
 {
@@ -964,6 +982,19 @@
 	    pv->part_start = grub_partition_get_start (disk->partition);
 	    pv->part_size = grub_disk_get_size (disk);
 
+#ifdef GRUB_UTIL
+	    {
+	      grub_size_t s = 1;
+	      grub_partition_t p;
+	      for (p = disk->partition; p; p = p->parent)
+		s++;
+	      pv->partmaps = xmalloc (s * sizeof (pv->partmaps[0]));
+	      s = 0;
+	      for (p = disk->partition; p; p = p->parent)
+		pv->partmaps[s++] = xstrdup (p->partmap->name);
+	      pv->partmaps[s++] = 0;
+	    }
+#endif
 	    if (start_sector != (grub_uint64_t)-1)
 	      pv->start_sector = start_sector;
 	    pv->start_sector += pv->part_start;

=== modified file 'grub-core/kern/emu/full.c'
--- grub-core/kern/emu/full.c	2012-02-09 22:15:27 +0000
+++ grub-core/kern/emu/full.c	2012-02-10 20:37:43 +0000
@@ -50,7 +50,7 @@
   grub_no_autoload = 1;
 }
 
-#ifdef __ia64__
+#if defined (__ia64__) || defined (__powerpc__)
 void grub_arch_dl_get_tramp_got_size (const void *ehdr __attribute__ ((unused)),
 				      grub_size_t *tramp, grub_size_t *got)
 {

=== modified file 'grub-core/script/execute.c'
--- grub-core/script/execute.c	2012-02-04 11:21:21 +0000
+++ grub-core/script/execute.c	2012-02-10 22:24:15 +0000
@@ -26,6 +26,7 @@
 #include <grub/lib/arg.h>
 #include <grub/normal.h>
 #include <grub/extcmd.h>
+#include <grub/i18n.h>
 
 /* Max digits for a char is 3 (0xFF is 255), similarly for an int it
    is sizeof (int) * 3, and one extra for a possible -ve sign.  */
@@ -312,8 +313,8 @@
   struct grub_script_arg *arg = 0;
   struct grub_script_argv result = { 0, 0, 0 };
 
-  auto int append (char *s, int escape_type);
-  int append (char *s, int escape_type)
+  auto int append (const char *s, int escape_type);
+  int append (const char *s, int escape_type)
   {
     int r;
     char *p = 0;
@@ -379,12 +380,20 @@
 	      break;
 
 	    case GRUB_SCRIPT_ARG_TYPE_TEXT:
-	      if (grub_strlen (arg->str) &&
+	      if (arg->str[0] &&
 		  grub_script_argv_append (&result, arg->str,
 					   grub_strlen (arg->str)))
 		goto fail;
 	      break;
 
+	    case GRUB_SCRIPT_ARG_TYPE_GETTEXT:
+	      {
+		const char *t = _(arg->str);
+		if (grub_script_argv_append (&result, t, grub_strlen (t)))
+		  goto fail;
+	      }
+	      break;
+
 	    case GRUB_SCRIPT_ARG_TYPE_DQSTR:
 	    case GRUB_SCRIPT_ARG_TYPE_SQSTR:
 	      if (append (arg->str, 1))

=== modified file 'grub-core/script/yylex.l'
--- grub-core/script/yylex.l	2012-02-03 10:56:49 +0000
+++ grub-core/script/yylex.l	2012-02-10 22:20:27 +0000
@@ -131,15 +131,17 @@
 SQCHR           [^\']
 DQCHR           {ESC}|[^\\\"]
 DQSTR           \"{DQCHR}*\"
+I18NSTR         \$\"{DQCHR}*\"
 SQSTR           \'{SQCHR}*\'
 SPECIAL         \?|\#|\*|\@
 VARIABLE        ${NAME}|$\{{NAME}\}|${DIGITS}|$\{{DIGITS}\}|${SPECIAL}|$\{{SPECIAL}\}
-WORD            ({CHAR}|{DQSTR}|{SQSTR}|{ESC}|{VARIABLE})+
+WORD            ({CHAR}|{DQSTR}|{SQSTR}|{ESC}|{VARIABLE}|{I18NSTR})+
 
 MULTILINE       {WORD}?((\"{DQCHR}*)|(\'{SQCHR}*)|(\\\n))
 
 %x              SPLIT
 %x              DQUOTE
+%x              I18NQUOTE
 %x              SQUOTE
 %x              VAR
 
@@ -215,6 +217,10 @@
                   yy_push_state (SQUOTE, yyscanner);
                   ARG (GRUB_SCRIPT_ARG_TYPE_TEXT);
                 }
+  "\$\""        {
+                  yy_push_state (I18NQUOTE, yyscanner);
+                  ARG (GRUB_SCRIPT_ARG_TYPE_GETTEXT);
+                }
   \$            {
                   yy_push_state (VAR, yyscanner);
                   ARG (GRUB_SCRIPT_ARG_TYPE_TEXT);
@@ -280,6 +286,18 @@
   (.|\n)        { COPY (yytext, yyleng); }
 }
 
+<I18NQUOTE>{
+  \\\\          { COPY ("\\", 1); }
+  \\\"          { COPY ("\"", 1); }
+  \\\n          { /* ignore */ }
+  [^\"\\\n]+    { COPY (yytext, yyleng); }
+  \"            {
+                  yy_pop_state (yyscanner);
+                  ARG (GRUB_SCRIPT_ARG_TYPE_GETTEXT);
+                }
+  (.|\n)        { COPY (yytext, yyleng); }
+}
+
 <<EOF>>         {
                   yypop_buffer_state (yyscanner);
 		  yyextra->lexerstate->eof = 1;

=== modified file 'include/grub/diskfilter.h'
--- include/grub/diskfilter.h	2012-01-29 13:28:01 +0000
+++ include/grub/diskfilter.h	2012-02-10 19:53:29 +0000
@@ -72,6 +72,9 @@
   struct grub_diskfilter_pv *next;
   /* Optional.  */
   grub_uint8_t *internal_id;
+#ifdef GRUB_UTIL
+  char **partmaps;
+#endif
 };
 
 struct grub_diskfilter_lv {
@@ -186,6 +189,8 @@
 struct grub_diskfilter_pv *
 grub_diskfilter_get_pv_from_disk (grub_disk_t disk,
 				  struct grub_diskfilter_vg **vg);
+void
+grub_diskfilter_print_partmap (grub_disk_t disk);
 #endif
 
 #endif /* ! GRUB_RAID_H */

=== modified file 'include/grub/script_sh.h'
--- include/grub/script_sh.h	2011-11-11 19:34:37 +0000
+++ include/grub/script_sh.h	2012-02-10 20:30:33 +0000
@@ -53,6 +53,7 @@
 {
   GRUB_SCRIPT_ARG_TYPE_VAR,
   GRUB_SCRIPT_ARG_TYPE_TEXT,
+  GRUB_SCRIPT_ARG_TYPE_GETTEXT,
   GRUB_SCRIPT_ARG_TYPE_DQVAR,
   GRUB_SCRIPT_ARG_TYPE_DQSTR,
   GRUB_SCRIPT_ARG_TYPE_SQSTR,

=== modified file 'util/getroot.c'
--- util/getroot.c	2012-02-10 12:17:12 +0000
+++ util/getroot.c	2012-02-10 18:48:24 +0000
@@ -372,7 +372,7 @@
   char *buf = NULL;
   size_t len = 0;
   char **ret = NULL;
-  int entry_len = 0, entry_max = 4;
+  grub_size_t entry_len = 0, entry_max = 4;
   struct mountinfo_entry *entries;
   struct mountinfo_entry parent_entry = { 0, 0, 0, "", "", "", "" };
   int i;
@@ -1991,7 +1991,7 @@
 			const grub_partition_t partition)
       {
 	grub_disk_addr_t part_start = 0;
-	grub_util_info ("Partition %d starts from %lu",
+	grub_util_info ("Partition %d starts from %" PRIuGRUB_UINT64_T,
 			partition->number, partition->start);
 
 	part_start = grub_partition_get_start (partition);
@@ -2022,7 +2022,7 @@
 	return 0;
       }
 
-    grub_util_info ("%s starts from %lu", os_dev, start);
+    grub_util_info ("%s starts from %" PRIuGRUB_UINT64_T, os_dev, start);
 
     if (start == 0 && device_is_wholedisk (os_dev))
       return name;

=== modified file 'util/grub-mkimage.c'
--- util/grub-mkimage.c	2012-02-10 12:56:18 +0000
+++ util/grub-mkimage.c	2012-02-10 23:30:37 +0000
@@ -714,7 +714,7 @@
   grub_uint64_t start_address;
   void *rel_section;
   grub_size_t reloc_size, align;
-  size_t decompress_size;
+  size_t decompress_size = 0;
 
   if (comp == COMPRESSION_AUTO)
     comp = image_target->default_compression;

=== modified file 'util/grub-mkimagexx.c'
--- util/grub-mkimagexx.c	2012-02-10 12:56:18 +0000
+++ util/grub-mkimagexx.c	2012-02-10 23:34:17 +0000
@@ -182,6 +182,7 @@
 
 #define MASK20 ((1 << 20) - 1)
 #define MASK19 ((1 << 19) - 1)
+#define MASK3 (~(grub_addr_t) 3)
 
 static void
 add_value_to_slot_20b (grub_addr_t addr, grub_uint32_t value)
@@ -190,17 +191,17 @@
   switch (addr & 3)
     {
     case 0:
-      p = (struct unaligned_uint32 *) ((addr & ~3ULL) + 2);
+      p = (struct unaligned_uint32 *) ((addr & MASK3) + 2);
       p->val = ((((((p->val >> 2) & MASK20) + value) & MASK20) << 2) 
 		| (p->val & ~(MASK20 << 2)));
       break;
     case 1:
-      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & ~3ULL) + 7);
+      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & MASK3) + 7);
       p->val = ((((((p->val >> 3) & MASK20) + value) & MASK20) << 3)
 		| (p->val & ~(MASK20 << 3)));
       break;
     case 2:
-      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & ~3ULL) + 12);
+      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & MASK3) + 12);
       p->val = ((((((p->val >> 4) & MASK20) + value) & MASK20) << 4)
 		| (p->val & ~(MASK20 << 4)));
       break;
@@ -227,15 +228,15 @@
   switch (addr & 3)
     {
     case 0:
-      p = (struct unaligned_uint32 *) ((addr & ~3ULL) + 2);
+      p = (struct unaligned_uint32 *) ((addr & MASK3) + 2);
       p->val = ((add_value_to_slot_21_real (((p->val >> 2) & MASKF21), value) & MASKF21) << 2) | (p->val & ~(MASKF21 << 2));
       break;
     case 1:
-      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & ~3ULL) + 7);
+      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & MASK3) + 7);
       p->val = ((add_value_to_slot_21_real (((p->val >> 3) & MASKF21), value) & MASKF21) << 3) | (p->val & ~(MASKF21 << 3));
       break;
     case 2:
-      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & ~3ULL) + 12);
+      p = (struct unaligned_uint32 *) ((grub_uint8_t *) (addr & MASK3) + 12);
       p->val = ((add_value_to_slot_21_real (((p->val >> 4) & MASKF21), value) & MASKF21) << 4) | (p->val & ~(MASKF21 << 4));
       break;
     }
@@ -457,8 +458,8 @@
 			    - target_section_addr - (offset & ~3)) >> 4;
 		    tr++;
 		    if (noff & ~MASK19)
-		      grub_util_error ("trampoline offset too big (%lx)",
-				       noff);
+		      grub_util_error ("trampoline offset too big (%"
+				       PRIxGRUB_UINT64_T ")", noff);
 		    add_value_to_slot_20b ((grub_addr_t) target, noff);
 		  }
 		  break;
@@ -919,7 +920,7 @@
   grub_size_t kernel_size;
   grub_size_t ia64jmp_off = 0, ia64_toff = 0, ia64_got_off = 0;
   unsigned ia64jmpnum = 0;
-  Elf_Shdr *symtab_section;
+  Elf_Shdr *symtab_section = 0;
   grub_size_t got = 0;
 
   *start = 0;

=== modified file 'util/grub-probe.c'
--- util/grub-probe.c	2012-02-10 11:57:00 +0000
+++ util/grub-probe.c	2012-02-10 19:56:18 +0000
@@ -87,6 +87,9 @@
   for (part = disk->partition; part; part = part->parent)
     printf ("%s ", part->partmap->name);
 
+  if (disk->dev->id == GRUB_DISK_DEVICE_DISKFILTER_ID)
+    grub_diskfilter_print_partmap (disk);
+
   /* In case of LVM/RAID, check the member devices as well.  */
   if (disk->dev->memberlist)
     {
@@ -304,7 +307,7 @@
   raid_level = probe_raid_level (disk);
   if (raid_level >= 0)
     {
-      printf ("raid ");
+      printf ("diskfilter ");
       if (disk->dev->raidname)
 	printf ("%s ", disk->dev->raidname (disk));
     }

=== modified file 'util/import_gcry.py'
--- util/import_gcry.py	2012-02-10 15:48:48 +0000
+++ util/import_gcry.py	2012-02-10 23:26:06 +0000
@@ -325,7 +325,7 @@
                 confutil.write ("  common = grub-core/%s;\n" % src)
             if modname == "gcry_rijndael" or modname == "gcry_md4" or modname == "gcry_md5" or modname == "gcry_rmd160" or modname == "gcry_sha1" or modname == "gcry_sha256" or modname == "gcry_sha512" or modname == "gcry_tiger":
                 # Alignment checked by hand
-                conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-cast-align';\n");
+                conf.write ("  cflags = '$(CFLAGS_GCRY) -Wno-cast-align -Wno-strict-aliasing';\n");
             else:
                 conf.write ("  cflags = '$(CFLAGS_GCRY)';\n");
             conf.write ("  cppflags = '$(CPPFLAGS_GCRY)';\n");

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to