grub: Reduce patches applied and don't utilise any external optimisations on grub, fixes some issues.
This commit is contained in:
parent
2326053d76
commit
ff09407492
@ -7,10 +7,27 @@ drwxr-xr-x root/root sbin/
|
||||
-rwxr-xr-x root/root sbin/grub
|
||||
-rwxr-xr-x root/root sbin/grub-install
|
||||
-rwxr-xr-x root/root sbin/grub-md5-crypt
|
||||
-rwxr-xr-x root/root sbin/grub-set-default
|
||||
-rwxr-xr-x root/root sbin/grub-terminfo
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/mbchk
|
||||
drwxr-xr-x root/root usr/lib/
|
||||
drwxr-xr-x root/root usr/lib/grub/
|
||||
drwxr-xr-x root/root usr/lib/grub/i386-pc/
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/e2fs_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/fat_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/ffs_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/iso9660_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/jfs_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/minix_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/reiserfs_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/stage1
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/stage2
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/stage2_eltorito
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/ufs2_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/vstafs_stage1_5
|
||||
-rw-r--r-- root/root usr/lib/grub/i386-pc/xfs_stage1_5
|
||||
drwxr-xr-x root/root usr/man/
|
||||
drwxr-xr-x root/root usr/man/man1/
|
||||
-rw-r--r-- root/root usr/man/man1/mbchk.1.gz
|
||||
@ -20,18 +37,3 @@ drwxr-xr-x root/root usr/man/man8/
|
||||
-rw-r--r-- root/root usr/man/man8/grub-terminfo.8.gz
|
||||
-rw-r--r-- root/root usr/man/man8/grub.8.gz
|
||||
drwxr-xr-x root/root usr/share/
|
||||
drwxr-xr-x root/root usr/share/grub/
|
||||
drwxr-xr-x root/root usr/share/grub/i386-pc/
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/e2fs_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/fat_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/ffs_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/iso9660_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/jfs_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/minix_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/reiserfs_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/stage1
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/stage2
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/stage2_eltorito
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/ufs2_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/vstafs_stage1_5
|
||||
-rw-r--r-- root/root usr/share/grub/i386-pc/xfs_stage1_5
|
||||
|
@ -1,6 +1,5 @@
|
||||
571ab75bb9f4c247853d93264eda1df4 crux02.xpm.gz
|
||||
55e343038043e16df5293d63782373d0 crux03.xpm.gz
|
||||
e0fce491c713805650df3d8962ead526 grub-0.97-patches.tar.gz
|
||||
a1103d28cd5d28e3af261192b1517612 grub-0.97-patches-2.tar.bz2
|
||||
cd3f3eb54446be6003156158d51f4884 grub-0.97.tar.gz
|
||||
ada26cbc681907823cc4ff2a55b97866 grub-ext2-ext3-inodesize.patch
|
||||
1f2733522ab27183e3830d93733141ac grub.conf.sample
|
||||
|
62
grub/Pkgfile
62
grub/Pkgfile
@ -6,12 +6,11 @@
|
||||
|
||||
name=grub
|
||||
version=0.97
|
||||
release=3
|
||||
release=4
|
||||
source=(ftp://alpha.gnu.org/gnu/grub/$name-$version.tar.gz \
|
||||
http://crux.nu/files/grub/$version/$name-$version-patches.tar.gz \
|
||||
http://crux.nu/files/grub/0.97/$name-$version-patches-2.tar.bz2 \
|
||||
http://crux.nu/files/grub/common/crux02.xpm.gz \
|
||||
http://crux.nu/files/grub/common/crux03.xpm.gz \
|
||||
grub-ext2-ext3-inodesize.patch \
|
||||
grub.conf.sample)
|
||||
|
||||
build () {
|
||||
@ -20,60 +19,13 @@ build () {
|
||||
# automake 1.10 fix
|
||||
sed -i '19i\AM_PROG_AS' configure.ac
|
||||
|
||||
# Apply Fedora Core patches
|
||||
PATCH_LIST=(
|
||||
0.93-configfile
|
||||
0.90-symlinkmenulst
|
||||
0.97-install.in
|
||||
0.94-installcopyonly
|
||||
0.94-addsyncs
|
||||
0.95-staticcurses
|
||||
0.93-endedit
|
||||
0.90-append
|
||||
0.97-once
|
||||
0.95-graphics
|
||||
0.91-splashimagehelp
|
||||
0.93-graphics-bootterm
|
||||
0.95-hiddenmenu-tweak
|
||||
0.93-special-device-names
|
||||
0.94-i2o
|
||||
0.95-moreraid
|
||||
0.94-initrdmax
|
||||
0.95-odirect
|
||||
0.95-geometry-26kernel
|
||||
0.95-md
|
||||
0.95-md-rework
|
||||
0.95-xpmjunk
|
||||
0.95-splash-error-term
|
||||
0.97-nxstack
|
||||
0.97-nx-multiinstall
|
||||
0.97-mdadm-path
|
||||
0.95-md-mbr
|
||||
0.97-gcc4
|
||||
0.95-nonmbr
|
||||
0.95-recheck-bad
|
||||
0.97-prototypes
|
||||
0.97-datadir
|
||||
0.97-dmraid
|
||||
0.97-dmraid-recheck-bad
|
||||
0.97-dmraid-partition-names
|
||||
0.97-mactel-kbd
|
||||
0.97-stderr
|
||||
0.97-mpath
|
||||
)
|
||||
|
||||
for PATCH in ${PATCH_LIST[@]}
|
||||
do
|
||||
patch -p1 -i $SRC/$name-patches/$name-$PATCH.patch
|
||||
for i in $SRC/*.patch; do
|
||||
patch -p1 -i $i
|
||||
done
|
||||
|
||||
# http://lists.gnu.org/archive/html/bug-grub/2005-04/msg00031.html
|
||||
patch -p0 -i $SRC/$name-patches/$name-0.95-xfs-writable-strings.patch
|
||||
# Fix a problem with ext2/ext3 filesystems that have a certain inode size.
|
||||
patch -p1 -i $SRC/grub-ext2-ext3-inodesize.patch
|
||||
|
||||
unset CXXFLAGS
|
||||
export CFLAGS="-Os"
|
||||
# We really shouldn't optimise GRUB at all.
|
||||
unset CXXFLAGS
|
||||
unset CFLAGS
|
||||
|
||||
autoreconf --install --force
|
||||
|
||||
|
@ -1,94 +0,0 @@
|
||||
diff -Nrup a/stage2/fsys_ext2fs.c b/stage2/fsys_ext2fs.c
|
||||
--- a/stage2/fsys_ext2fs.c 2004-08-08 20:19:18.000000000 +0200
|
||||
+++ b/stage2/fsys_ext2fs.c 2008-01-30 14:27:20.000000000 +0100
|
||||
@@ -79,7 +79,52 @@ struct ext2_super_block
|
||||
__u32 s_rev_level; /* Revision level */
|
||||
__u16 s_def_resuid; /* Default uid for reserved blocks */
|
||||
__u16 s_def_resgid; /* Default gid for reserved blocks */
|
||||
- __u32 s_reserved[235]; /* Padding to the end of the block */
|
||||
+ /*
|
||||
+ * These fields are for EXT2_DYNAMIC_REV superblocks only.
|
||||
+ *
|
||||
+ * Note: the difference between the compatible feature set and
|
||||
+ * the incompatible feature set is that if there is a bit set
|
||||
+ * in the incompatible feature set that the kernel doesn't
|
||||
+ * know about, it should refuse to mount the filesystem.
|
||||
+ *
|
||||
+ * e2fsck's requirements are more strict; if it doesn't know
|
||||
+ * about a feature in either the compatible or incompatible
|
||||
+ * feature set, it must abort and not try to meddle with
|
||||
+ * things it doesn't understand...
|
||||
+ */
|
||||
+ __u32 s_first_ino; /* First non-reserved inode */
|
||||
+ __u16 s_inode_size; /* size of inode structure */
|
||||
+ __u16 s_block_group_nr; /* block group # of this superblock */
|
||||
+ __u32 s_feature_compat; /* compatible feature set */
|
||||
+ __u32 s_feature_incompat; /* incompatible feature set */
|
||||
+ __u32 s_feature_ro_compat; /* readonly-compatible feature set */
|
||||
+ __u8 s_uuid[16]; /* 128-bit uuid for volume */
|
||||
+ char s_volume_name[16]; /* volume name */
|
||||
+ char s_last_mounted[64]; /* directory where last mounted */
|
||||
+ __u32 s_algorithm_usage_bitmap; /* For compression */
|
||||
+ /*
|
||||
+ * Performance hints. Directory preallocation should only
|
||||
+ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
|
||||
+ */
|
||||
+ __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
|
||||
+ __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
|
||||
+ __u16 s_reserved_gdt_blocks;/* Per group table for online growth */
|
||||
+ /*
|
||||
+ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
|
||||
+ */
|
||||
+ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
|
||||
+ __u32 s_journal_inum; /* inode number of journal file */
|
||||
+ __u32 s_journal_dev; /* device number of journal file */
|
||||
+ __u32 s_last_orphan; /* start of list of inodes to delete */
|
||||
+ __u32 s_hash_seed[4]; /* HTREE hash seed */
|
||||
+ __u8 s_def_hash_version; /* Default hash version to use */
|
||||
+ __u8 s_jnl_backup_type; /* Default type of journal backup */
|
||||
+ __u16 s_reserved_word_pad;
|
||||
+ __u32 s_default_mount_opts;
|
||||
+ __u32 s_first_meta_bg; /* First metablock group */
|
||||
+ __u32 s_mkfs_time; /* When the filesystem was created */
|
||||
+ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
|
||||
+ __u32 s_reserved[172]; /* Padding to the end of the block */
|
||||
};
|
||||
|
||||
struct ext2_group_desc
|
||||
@@ -218,6 +263,9 @@ struct ext2_dir_entry
|
||||
#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
|
||||
#define EXT2_ADDR_PER_BLOCK_BITS(s) (log2(EXT2_ADDR_PER_BLOCK(s)))
|
||||
|
||||
+#define EXT2_INODE_SIZE(s) (SUPERBLOCK->s_inode_size)
|
||||
+#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
|
||||
+
|
||||
/* linux/ext2_fs.h */
|
||||
#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
|
||||
/* kind of from ext2/super.c */
|
||||
@@ -553,7 +601,7 @@ ext2fs_dir (char *dirname)
|
||||
gdp = GROUP_DESC;
|
||||
ino_blk = gdp[desc].bg_inode_table +
|
||||
(((current_ino - 1) % (SUPERBLOCK->s_inodes_per_group))
|
||||
- >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
|
||||
+ >> log2 (EXT2_INODES_PER_BLOCK (SUPERBLOCK)));
|
||||
#ifdef E2DEBUG
|
||||
printf ("inode table fsblock=%d\n", ino_blk);
|
||||
#endif /* E2DEBUG */
|
||||
@@ -565,13 +613,12 @@ ext2fs_dir (char *dirname)
|
||||
/* reset indirect blocks! */
|
||||
mapblock2 = mapblock1 = -1;
|
||||
|
||||
- raw_inode = INODE +
|
||||
- ((current_ino - 1)
|
||||
- & (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode) - 1));
|
||||
+ raw_inode = (struct ext2_inode *)((char *)INODE +
|
||||
+ ((current_ino - 1) & (EXT2_INODES_PER_BLOCK (SUPERBLOCK) - 1)) *
|
||||
+ EXT2_INODE_SIZE (SUPERBLOCK));
|
||||
#ifdef E2DEBUG
|
||||
printf ("ipb=%d, sizeof(inode)=%d\n",
|
||||
- (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)),
|
||||
- sizeof (struct ext2_inode));
|
||||
+ EXT2_INODES_PER_BLOCK (SUPERBLOCK), EXT2_INODE_SIZE (SUPERBLOCK));
|
||||
printf ("inode=%x, raw_inode=%x\n", INODE, raw_inode);
|
||||
printf ("offset into inode table block=%d\n", (int) raw_inode - (int) INODE);
|
||||
for (i = (unsigned char *) INODE; i <= (unsigned char *) raw_inode;
|
Loading…
Reference in New Issue
Block a user