Skip to contentSkip to conversation

meta-intel: add a /common dir with grub2/live-install changes

PATCH Applied Tom Zanussi 1 participant 1 message Feb 1, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 meta-intel: add a /common dir with grub2/live-install changes

From: Tom Zanussi <[email protected]>

Add a /common dir to contain code shared by multiple BSPs in the meta-intel repo, along with a couple recipes to live there temporarily.

In this case, there are two BSPs that need to share the common grub2 and associated initramfs-live-install changes (sugarbay and jasperforest).

The grub2 and associated initramfs-live-install changes will soon be submitted to the main poky repo, but for now it makes more sense to keep them here - they're needed for live-install of the two BSPs mentioned, but they contain a couple hacks that need to be addressed and are untested with anything else.

---
 common/recipes-bsp/grub/grub-1.98/40_custom        |    9 +
 .../grub/grub-1.98/grub-install.in.patch           |   13 ++
 .../grub/grub-1.98/uninit-shdr-fix.patch           |   31 ++++
 common/recipes-bsp/grub/grub_1.98.bb               |   45 +++++
 .../initramfs-live-install/init-install.sh         |  188 ++++++++++++++++++++
 .../initramfs-live-install_1.0.bbappend            |    2 +
 6 files changed, 288 insertions(+), 0 deletions(-)
 create mode 100755 common/recipes-bsp/grub/grub-1.98/40_custom
 create mode 100644 common/recipes-bsp/grub/grub-1.98/grub-install.in.patch
 create mode 100644 common/recipes-bsp/grub/grub-1.98/uninit-shdr-fix.patch
 create mode 100644 common/recipes-bsp/grub/grub_1.98.bb
 create mode 100644 common/recipes-core/initrdscripts/initramfs-live-install/init-install.sh
 create mode 100644 common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend
common/recipes-bsp/grub/grub-1.98/40_custom new file +9 -0
new file mode 100755
index 0000000..30dad39
@@ -0,0 +1,9 @@
+#!/bin/sh
+exec tail -n +3 $0
+# This file provides an easy way to add custom menu entries.  Simply type the
+# menu entries you want to add after this comment.  Be careful not to change
+# the 'exec tail' line above.
+menuentry "Yocto Linux" {
+    set root=(hd0,1)
+    linux /boot/vmlinuz root=__ROOTFS__ rw __VIDEO_MODE__ __VGA_MODE__ quiet
+}
common/recipes-bsp/grub/grub-1.98/grub-install.in.patch new file +13 -0
new file mode 100644
index 0000000..ac96419
@@ -0,0 +1,13 @@
+Index: grub-1.98/util/grub-install.in
+===================================================================
+--- grub-1.98.orig/util/grub-install.in	2011-01-25 23:47:05.587521825 -0600
++++ grub-1.98/util/grub-install.in	2011-01-25 23:47:23.867521822 -0600
+@@ -306,7 +306,7 @@
+ 
+ if [ "x${devabstraction_module}" = "x" ] ; then
+     if [ x"${install_device}" != x ]; then
+-      if echo "${install_device}" | grep -qx "(.*)" ; then
++      if echo "${install_device}" | grep -q "(.*)" ; then
+         install_drive="${install_device}"
+       else
+         install_drive="`$grub_probe --target=drive --device ${install_device}`"
common/recipes-bsp/grub/grub-1.98/uninit-shdr-fix.patch new file +31 -0
new file mode 100644
index 0000000..67af594
@@ -0,0 +1,31 @@
+Index: grub-1.98/loader/i386/bsdXX.c
+===================================================================
+--- grub-1.98.orig/loader/i386/bsdXX.c	2011-01-25 00:12:14.967535179 -0600
++++ grub-1.98/loader/i386/bsdXX.c	2011-01-25 00:13:16.387535169 -0600
+@@ -80,7 +80,7 @@
+ {
+   Elf_Ehdr e;
+   Elf_Shdr *s;
+-  char *shdr;
++  char *shdr = NULL;
+   grub_addr_t curload, module;
+   grub_err_t err;
+ 
+@@ -148,7 +148,7 @@
+ {
+   Elf_Ehdr e;
+   Elf_Shdr *s;
+-  char *shdr;
++  char *shdr = NULL;
+   grub_addr_t curload, module;
+   grub_err_t err;
+ 
+@@ -223,7 +223,7 @@
+   grub_err_t err;
+   Elf_Ehdr e;
+   Elf_Shdr *s;
+-  char *shdr;
++  char *shdr = NULL;
+   unsigned symoff, stroff, symsize, strsize;
+   grub_addr_t curload;
+   grub_freebsd_addr_t symstart, symend, symentsize, dynamic;
common/recipes-bsp/grub/grub_1.98.bb new file +45 -0

45 lines not on this page · raw message

common/recipes-core/initrdscripts/initramfs-live-install/init-install.sh new file +188 -0

188 lines not on this page · raw message

common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend new file +2 -0
new file mode 100644
index 0000000..d3420e0
@@ -0,0 +1,2 @@
+THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
+FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
Signature · 1 line
1.7.0.4