diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-02 12:24:31 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-02 12:30:01 +0000 |
commit | 8ba70a1c28a4e0ee73db5308b38abc923b0be44d (patch) | |
tree | 0ed9bff8e4bd70766c81dbb559d32781bdd93ce8 /recipes-bsp | |
download | meta-gplv2-8ba70a1c28a4e0ee73db5308b38abc923b0be44d.tar.gz |
Create meta-gplv2 from files from OE-Core
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/grub/grub-0.97/autohell.patch | 21 | ||||
-rw-r--r-- | recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch | 101 | ||||
-rw-r--r-- | recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch | 74 | ||||
-rw-r--r-- | recipes-bsp/grub/grub-0.97/no-reorder-functions.patch | 31 | ||||
-rw-r--r-- | recipes-bsp/grub/grub-0.97/objcopy-absolute.patch | 40 | ||||
-rw-r--r-- | recipes-bsp/grub/grub_0.97.bb | 35 |
6 files changed, 302 insertions, 0 deletions
diff --git a/recipes-bsp/grub/grub-0.97/autohell.patch b/recipes-bsp/grub/grub-0.97/autohell.patch new file mode 100644 index 0000000..d66207a --- /dev/null +++ b/recipes-bsp/grub/grub-0.97/autohell.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | --- | ||
4 | configure.ac | 4 ++-- | ||
5 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
6 | |||
7 | Index: 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/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch b/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch new file mode 100644 index 0000000..d225d13 --- /dev/null +++ b/recipes-bsp/grub/grub-0.97/grub-support-256byte-inode.patch | |||
@@ -0,0 +1,101 @@ | |||
1 | Upstream-Status: Inappropriate [No Longer Maintained] | ||
2 | |||
3 | diff -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/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch b/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch new file mode 100644 index 0000000..0cf7dc9 --- /dev/null +++ b/recipes-bsp/grub/grub-0.97/grub_fix_for_automake-1.12.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | Upstream-Status: Inappropriate | ||
2 | |||
3 | Subject: [PATCH] grub: fix for automake-1.12 | ||
4 | |||
5 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
6 | |||
7 | this 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 | |||
15 | The upstream status is marked as 'Inappropriate' because this problem is not uncommon, | ||
16 | it has been there for a long time and no change in upstream. | ||
17 | |||
18 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
19 | |||
20 | Index: 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 | ||
35 | Index: 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 | -- | ||
73 | 1.7.9.5 | ||
74 | |||
diff --git a/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch b/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch new file mode 100644 index 0000000..70037e4 --- /dev/null +++ b/recipes-bsp/grub/grub-0.97/no-reorder-functions.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Inappropriate [disable feature] | ||
2 | |||
3 | After the commit "tcmode-default: switch to gcc 4.6.0 for x86, x86-64 & arm", | ||
4 | we got bug 1099 (http://bugzilla.yoctoproject.org/show_bug.cgi?id=1099): | ||
5 | |||
6 | Running "install --stage2=/ssd/boot/grub/stage2 /boot/grub/stage1(hd0) | ||
7 | /boot/grub/stage2 p /boot/grub/menu list" failed | ||
8 | Error 6: Mismatched or corrupt version of stage1/stage2 | ||
9 | |||
10 | This turned out to be a gcc's bug. See | ||
11 | https://bugs.gentoo.org/show_bug.cgi?id=360513 | ||
12 | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39333 | ||
13 | |||
14 | Upstream gcc seems uninterested in the bug, so at present we can disable the | ||
15 | option as a workaround. Thanks Ryan Hill for the investigation and the | ||
16 | workaround patch. | ||
17 | |||
18 | Dexuan Cui <dexuan.cui@intel.com> | ||
19 | Wed 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/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch b/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch new file mode 100644 index 0000000..bd8e0a8 --- /dev/null +++ b/recipes-bsp/grub/grub-0.97/objcopy-absolute.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | |||
2 | This patch is from ubuntu: | ||
3 | * objcopy-absolute.diff (update): Remove .note, .comment, and | ||
4 | .note.gnu.build-id sections from images (LP: #444703). | ||
5 | |||
6 | Upstream-Status: Inappropriate [no longer maintained] | ||
7 | |||
8 | Index: 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 | ||
21 | Index: 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 $< $@ | ||
31 | Index: 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 $< $@ | ||
diff --git a/recipes-bsp/grub/grub_0.97.bb b/recipes-bsp/grub/grub_0.97.bb new file mode 100644 index 0000000..997a045 --- /dev/null +++ b/recipes-bsp/grub/grub_0.97.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "GRUB is the GRand Unified Bootloader" | ||
2 | DESCRIPTION = "GRUB is a GPLed bootloader intended to unify bootloading across x86 \ | ||
3 | operating systems. In addition to loading the Linux kernel, it implements the Multiboot \ | ||
4 | standard, which allows for flexible loading of multiple boot images." | ||
5 | HOMEPAGE = "http://www.gnu.org/software/grub/" | ||
6 | SECTION = "bootloaders" | ||
7 | |||
8 | LICENSE = "GPLv2+" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b \ | ||
10 | file://grub/main.c;beginline=3;endline=9;md5=22a5f28d2130fff9f2a17ed54be90ed6" | ||
11 | |||
12 | RDEPENDS_${PN} = "diffutils" | ||
13 | PR = "r6" | ||
14 | |||
15 | SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz; \ | ||
16 | file://no-reorder-functions.patch \ | ||
17 | file://autohell.patch \ | ||
18 | file://grub_fix_for_automake-1.12.patch \ | ||
19 | file://objcopy-absolute.patch \ | ||
20 | file://grub-support-256byte-inode.patch \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[md5sum] = "cd3f3eb54446be6003156158d51f4884" | ||
24 | SRC_URI[sha256sum] = "4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b" | ||
25 | |||
26 | inherit autotools texinfo | ||
27 | |||
28 | COMPATIBLE_HOST = "i.86.*-linux" | ||
29 | |||
30 | EXTRA_OECONF = "--without-curses" | ||
31 | |||
32 | do_install_append_vmware() { | ||
33 | mkdir -p ${D}/boot/ | ||
34 | ln -sf ../usr/lib/grub/{$TARGET_ARCH}{$TARGET_VENDOR}/ ${D}/boot/grub | ||
35 | } | ||