From 87408a542b2626078e69ba019d2c581ebabc104e Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 11 Feb 2014 10:24:48 -0500
Subject: [PATCH 06/41] Support "devicetree" directive in grub2.
Resolves: rhbz#1063534
Signed-off-by: Peter Jones <pjones@redhat.com>
---
new-kernel-pkg | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/new-kernel-pkg b/new-kernel-pkg
index 4fa94b7..7479557 100755
--- a/new-kernel-pkg
+++ b/new-kernel-pkg
@@ -111,6 +111,7 @@ initrd=""
dracut=""
dracuthostonly=""
initrdfile=""
+devtreefile=""
moddep=""
verbose=""
makedefault=""
@@ -127,7 +128,7 @@ usage() {
echo " [--banner=<banner>] [--multiboot=multiboot]" >&2
echo " [--mbargs=mbargs] [--make-default] [--add-dracut-args]" >&2
echo " [--add-plymouth-initrd]" >&2
- echo " [--host-only]" >&2
+ echo " [--host-only] [--devtree=<devicetree.dtb>]" >&2
echo " <--install | --remove | --update | --rpmposttrans> <kernel-version>" >&2
echo " (ex: `basename $0` --mkinitrd --depmod --install 2.4.7-2)" >&2
exit 1
@@ -151,6 +152,12 @@ install() {
fi
fi
+ DEVTREE=""
+ if [ -f $devtreefile ]; then
+ [ -n "$verbose" ] && echo "found $devtreefile and using it with grubby"
+ DEVTREE="--devtree $devtreefile"
+ fi
+
# FIXME: is this a good heuristic to find out if we're on iSeries?
if [ -d /proc/iSeries ]; then
[ -n "$verbose" ] && echo "On an iSeries, just making img file"
@@ -544,6 +551,15 @@ while [ $# -gt 0 ]; do
initrd="remove"
;;
+ --devtree*)
+ if [[ $1 == --devtree\=* ]]; then
+ devtreefile=${1#--devtreefile=}
+ else
+ devtreefile=$2
+ shift
+ fi
+ ;;
+
--dracut)
dracut=--dracut
;;
--
2.4.3