[oe] [PATCH 3/3] grub: split menu.lst into a separate package, grub-config.
Michael Smith
msmith at cbnco.com
Thu May 7 18:27:15 UTC 2009
This makes it easier for overlays to override the configuration.
Signed-off-by: Michael Smith <msmith at cbnco.com>
---
recipes/grub/files/menu.lst | 6 ++++++
recipes/grub/grub-0.97/menu.lst | 6 ------
recipes/grub/grub-config_1.0.bb | 13 +++++++++++++
recipes/grub/grub_0.97.bb | 12 +++++-------
4 files changed, 24 insertions(+), 13 deletions(-)
create mode 100644 recipes/grub/files/menu.lst
delete mode 100644 recipes/grub/grub-0.97/menu.lst
create mode 100644 recipes/grub/grub-config_1.0.bb
diff --git a/recipes/grub/files/menu.lst b/recipes/grub/files/menu.lst
new file mode 100644
index 0000000..510e8f8
--- /dev/null
+++ b/recipes/grub/files/menu.lst
@@ -0,0 +1,6 @@
+# menu.lst
+default 0
+timeout 5
+title OpenEmbedded Linux (hda1)
+root (hd0,0)
+kernel /boot/bzImage root=/dev/hda1 ro
diff --git a/recipes/grub/grub-0.97/menu.lst b/recipes/grub/grub-0.97/menu.lst
deleted file mode 100644
index 510e8f8..0000000
--- a/recipes/grub/grub-0.97/menu.lst
+++ /dev/null
@@ -1,6 +0,0 @@
-# menu.lst
-default 0
-timeout 5
-title OpenEmbedded Linux (hda1)
-root (hd0,0)
-kernel /boot/bzImage root=/dev/hda1 ro
diff --git a/recipes/grub/grub-config_1.0.bb b/recipes/grub/grub-config_1.0.bb
new file mode 100644
index 0000000..f6e82a7
--- /dev/null
+++ b/recipes/grub/grub-config_1.0.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "Configuration file for grub"
+SECTION = "bootloaders"
+PRIORITY = "optional"
+PR = "r0"
+
+SRC_URI = "file://menu.lst"
+
+do_install() {
+ install -D -m 0644 ${WORKDIR}/menu.lst \
+ ${D}${libdir}/grub/i386${TARGET_VENDOR}/menu.lst
+}
+
+FILES_${PN} += "${libdir}"
diff --git a/recipes/grub/grub_0.97.bb b/recipes/grub/grub_0.97.bb
index e1162ef..8822b7e 100644
--- a/recipes/grub/grub_0.97.bb
+++ b/recipes/grub/grub_0.97.bb
@@ -3,11 +3,13 @@ HOMEPAGE = "http://www.gnu.org/software/grub"
SECTION = "bootloaders"
PRIORITY = "optional"
RDEPENDS = "diffutils"
-PR = "r4"
+PR = "r5"
+
+# menu.lst is shipped in a separate package that overlays can override.
+RRECOMMENDS = "grub-config"
SRC_URI = "ftp://alpha.gnu.org/gnu/grub/grub-${PV}.tar.gz \
- file://automake-1.10.patch;patch=1 \
- file://menu.lst"
+ file://automake-1.10.patch;patch=1"
inherit autotools
@@ -21,10 +23,6 @@ python __anonymous () {
do_install_append() {
install -d ${D}/boot/
ln -sf ..${libdir}/grub/i386${TARGET_VENDOR}/ ${D}/boot/grub
-
- # TODO: better use grub-set-default script here?
- install -m 0644 ${WORKDIR}/menu.lst \
- ${D}${libdir}/grub/i386${TARGET_VENDOR}/
}
FILES_${PN}-doc = "${datadir}"
--
1.5.6.5
More information about the Openembedded-devel
mailing list