summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub/grub-0.97
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/grub/grub-0.97')
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/autohell.patch21
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch101
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch74
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch31
-rw-r--r--meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch40
5 files changed, 267 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/grub-0.97/autohell.patch b/meta/recipes-bsp/grub/grub-0.97/autohell.patch
new file mode 100644
index 0000000000..d66207ae6c
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-0.97/autohell.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Inappropriate [configuration]
2
3---
4 configure.ac | 4 ++--
5 1 file changed, 2 insertions(+), 2 deletions(-)
6
7Index: grub-0.97/configure.ac
8===================================================================
9--- grub-0.97.orig/configure.ac 2008-09-12 17:39:52.000000000 +0200
10+++ grub-0.97/configure.ac 2008-09-12 17:40:21.000000000 +0200
11@@ -60,8 +60,8 @@ AC_PROG_CC
12 _AM_DEPENDENCIES(CC)
13
14 dnl Because recent automake complains about AS, set it here.
15-CCAS="$CC"
16-AC_SUBST(CCAS)
17+AM_PROG_AS
18+AC_SUBST(AS)
19
20 AC_ARG_WITH(binutils,
21 [ --with-binutils=DIR search the directory DIR to find binutils])
diff --git a/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch b/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch
new file mode 100644
index 0000000000..d225d13dce
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch
@@ -0,0 +1,101 @@
1Upstream-Status: Inappropriate [No Longer Maintained]
2
3diff -Naur grub-0.97-800/stage2/fsys_ext2fs.c grub-0.97-810/stage2/fsys_ext2fs.c
4--- grub-0.97-800/stage2/fsys_ext2fs.c 2008-07-21 00:40:21.668879475 -0600
5+++ grub-0.97-810/stage2/fsys_ext2fs.c 2008-07-21 01:01:11.063953773 -0600
6@@ -79,7 +79,52 @@
7 __u32 s_rev_level; /* Revision level */
8 __u16 s_def_resuid; /* Default uid for reserved blocks */
9 __u16 s_def_resgid; /* Default gid for reserved blocks */
10- __u32 s_reserved[235]; /* Padding to the end of the block */
11+ /*
12+ * These fields are for EXT2_DYNAMIC_REV superblocks only.
13+ *
14+ * Note: the difference between the compatible feature set and
15+ * the incompatible feature set is that if there is a bit set
16+ * in the incompatible feature set that the kernel doesn't
17+ * know about, it should refuse to mount the filesystem.
18+ *
19+ * e2fsck's requirements are more strict; if it doesn't know
20+ * about a feature in either the compatible or incompatible
21+ * feature set, it must abort and not try to meddle with
22+ * things it doesn't understand...
23+ */
24+ __u32 s_first_ino; /* First non-reserved inode */
25+ __u16 s_inode_size; /* size of inode structure */
26+ __u16 s_block_group_nr; /* block group # of this superblock */
27+ __u32 s_feature_compat; /* compatible feature set */
28+ __u32 s_feature_incompat; /* incompatible feature set */
29+ __u32 s_feature_ro_compat; /* readonly-compatible feature set */
30+ __u8 s_uuid[16]; /* 128-bit uuid for volume */
31+ char s_volume_name[16]; /* volume name */
32+ char s_last_mounted[64]; /* directory where last mounted */
33+ __u32 s_algorithm_usage_bitmap; /* For compression */
34+ /*
35+ * Performance hints. Directory preallocation should only
36+ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
37+ */
38+ __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
39+ __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
40+ __u16 s_reserved_gdt_blocks;/* Per group table for online growth */
41+ /*
42+ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
43+ */
44+ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
45+ __u32 s_journal_inum; /* inode number of journal file */
46+ __u32 s_journal_dev; /* device number of journal file */
47+ __u32 s_last_orphan; /* start of list of inodes to delete */
48+ __u32 s_hash_seed[4]; /* HTREE hash seed */
49+ __u8 s_def_hash_version; /* Default hash version to use */
50+ __u8 s_jnl_backup_type; /* Default type of journal backup */
51+ __u16 s_reserved_word_pad;
52+ __u32 s_default_mount_opts;
53+ __u32 s_first_meta_bg; /* First metablock group */
54+ __u32 s_mkfs_time; /* When the filesystem was created */
55+ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
56+ __u32 s_reserved[172]; /* Padding to the end of the block */
57 };
58
59 struct ext2_group_desc
60@@ -218,6 +263,14 @@
61 #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
62 #define EXT2_ADDR_PER_BLOCK_BITS(s) (log2(EXT2_ADDR_PER_BLOCK(s)))
63
64+#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
65+#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
66+#define EXT2_GOOD_OLD_INODE_SIZE 128
67+#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
68+ EXT2_GOOD_OLD_INODE_SIZE : \
69+ (s)->s_inode_size)
70+#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
71+
72 /* linux/ext2_fs.h */
73 #define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
74 /* kind of from ext2/super.c */
75@@ -553,7 +606,7 @@
76 gdp = GROUP_DESC;
77 ino_blk = gdp[desc].bg_inode_table +
78 (((current_ino - 1) % (SUPERBLOCK->s_inodes_per_group))
79- >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
80+ >> log2 (EXT2_INODES_PER_BLOCK (SUPERBLOCK)));
81 #ifdef E2DEBUG
82 printf ("inode table fsblock=%d\n", ino_blk);
83 #endif /* E2DEBUG */
84@@ -565,13 +618,12 @@
85 /* reset indirect blocks! */
86 mapblock2 = mapblock1 = -1;
87
88- raw_inode = INODE +
89- ((current_ino - 1)
90- & (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode) - 1));
91+ raw_inode = (struct ext2_inode *)((char *)INODE +
92+ ((current_ino - 1) & (EXT2_INODES_PER_BLOCK (SUPERBLOCK) - 1)) *
93+ EXT2_INODE_SIZE (SUPERBLOCK));
94 #ifdef E2DEBUG
95 printf ("ipb=%d, sizeof(inode)=%d\n",
96- (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)),
97- sizeof (struct ext2_inode));
98+ EXT2_INODES_PER_BLOCK (SUPERBLOCK), EXT2_INODE_SIZE (SUPERBLOCK));
99 printf ("inode=%x, raw_inode=%x\n", INODE, raw_inode);
100 printf ("offset into inode table block=%d\n", (int) raw_inode - (int) INODE);
101 for (i = (unsigned char *) INODE; i <= (unsigned char *) raw_inode;
diff --git a/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch b/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch
new file mode 100644
index 0000000000..0cf7dc96d7
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch
@@ -0,0 +1,74 @@
1Upstream-Status: Inappropriate
2
3Subject: [PATCH] grub: fix for automake-1.12
4
5automake 1.12 has depricated automatic de-ANSI-fication support
6
7this patch avoids these kinds of errors:
8
9| stage1/Makefile.am:2: error: 'pkglibdir' is not a legitimate directory for 'DATA'
10| stage2/Makefile.am:35: error: 'pkglibdir' is not a legitimate directory for 'DATA'
11| stage2/Makefile.am:46: error: 'pkglibdir' is not a legitimate directory for 'DATA'
12| autoreconf: automake failed with exit status: 1
13| ERROR: autoreconf execution failed.
14
15The upstream status is marked as 'Inappropriate' because this problem is not uncommon,
16it has been there for a long time and no change in upstream.
17
18Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
19
20Index: grub-0.97/stage1/Makefile.am
21===================================================================
22--- a/stage1/Makefile.am
23+++ b/stage1/Makefile.am
24@@ -1,7 +1,7 @@
25-pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
26-nodist_pkglib_DATA = stage1
27+pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
28+nodist_pkgdata_DATA = stage1
29
30-CLEANFILES = $(nodist_pkglib_DATA)
31+CLEANFILES = $(nodist_pkgdata_DATA)
32
33 # We can't use builtins or standard includes.
34 AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
35Index: grub-0.97/stage2/Makefile.am
36===================================================================
37--- a/stage2/Makefile.am
38+++ b/stage2/Makefile.am
39@@ -27,12 +27,12 @@ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
40 -DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
41
42 # Stage 2 and Stage 1.5's.
43-pkglibdir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
44+pkgdatadir = $(libdir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
45
46 EXTRA_PROGRAMS = nbloader.exec pxeloader.exec diskless.exec
47
48 if DISKLESS_SUPPORT
49-pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
50+pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
51 ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
52 reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5 \
53 nbgrub pxegrub
54@@ -43,7 +43,7 @@ noinst_PROGRAMS = pre_stage2.exec start.exec start_eltorito.exec \
55 reiserfs_stage1_5.exec ufs2_stage1_5.exec vstafs_stage1_5.exec \
56 xfs_stage1_5.exec nbloader.exec pxeloader.exec diskless.exec
57 else
58-pkglib_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
59+pkgdata_DATA = stage2 stage2_eltorito e2fs_stage1_5 fat_stage1_5 \
60 ffs_stage1_5 iso9660_stage1_5 jfs_stage1_5 minix_stage1_5 \
61 reiserfs_stage1_5 ufs2_stage1_5 vstafs_stage1_5 xfs_stage1_5
62 noinst_DATA = pre_stage2 start start_eltorito
63@@ -105,7 +105,7 @@ else
64 BUILT_SOURCES = stage2_size.h
65 endif
66
67-CLEANFILES = $(pkglib_DATA) $(noinst_DATA) $(BUILT_SOURCES)
68+CLEANFILES = $(pkgdata_DATA) $(noinst_DATA) $(BUILT_SOURCES)
69
70 stage2_size.h: pre_stage2
71 -rm -f stage2_size.h
72--
731.7.9.5
74
diff --git a/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch b/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch
new file mode 100644
index 0000000000..70037e47c7
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Inappropriate [disable feature]
2
3After the commit "tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm",
4we got bug 1099 (http://bugzilla.yoctoproject.org/show_bug.cgi?id=1099):
5
6Running "install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0)
7 /boot/grub/stage2 p /boot/grub/menu list" failed
8Error 6: Mismatched or corrupt version of stage1/stage2
9
10This turned out to be a gcc's bug. See
11https://bugs.gentoo.org/show_bug.cgi?id=360513
12http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333
13
14Upstream gcc seems uninterested in the bug, so at present we can disable the
15option as a workaround. Thanks Ryan Hill for the investigation and the
16workaround patch.
17
18Dexuan Cui <dexuan.cui@intel.com>
19Wed Jun 29 20:21:39 CST 2011
20
21--- grub-0.97/stage2/Makefile.am.orig
22+++ grub-0.97/stage2/Makefile.am
23@@ -79,7 +79,7 @@
24 HERCULES_FLAGS =
25 endif
26
27-STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
28+STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-reorder-functions -fno-builtin -nostdinc \
29 $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
30
31 STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
diff --git a/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch b/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch
new file mode 100644
index 0000000000..bd8e0a89fc
--- /dev/null
+++ b/meta/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch
@@ -0,0 +1,40 @@
1
2This patch is from ubuntu:
3 * objcopy-absolute.diff (update): Remove .note, .comment, and
4 .note.gnu.build-id sections from images (LP: #444703).
5
6Upstream-Status: Inappropriate [no longer maintained]
7
8Index: b/acinclude.m4
9===================================================================
10--- a/acinclude.m4
11+++ b/acinclude.m4
12@@ -61,7 +61,7 @@
13 else
14 AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
15 fi
16- if AC_TRY_COMMAND([${OBJCOPY-objcopy} -O binary conftest.exec conftest]); then :
17+ if AC_TRY_COMMAND([${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest]); then :
18 else
19 AC_MSG_ERROR([${OBJCOPY-objcopy} cannot create binary files])
20 fi
21Index: b/stage1/Makefile.am
22===================================================================
23--- a/stage1/Makefile.am
24+++ b/stage1/Makefile.am
25@@ -12,4 +12,4 @@
26
27 SUFFIXES = .exec
28 .exec:
29- $(OBJCOPY) -O binary $< $@
30+ $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@
31Index: b/stage2/Makefile.am
32===================================================================
33--- a/stage2/Makefile.am
34+++ b/stage2/Makefile.am
35@@ -293,4 +293,4 @@
36 # General rule for making a raw binary.
37 SUFFIXES = .exec
38 .exec:
39- $(OBJCOPY) -O binary $< $@
40+ $(OBJCOPY) -O binary -R .note -R .comment -R .note.gnu.build-id $< $@