grubby/0010-cleanup-dtb-handling-t...

57 lines
2.0 KiB
Diff

From 354c873f633db124d214da8a1258e32fe210c7cb Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
Date: Thu, 9 Oct 2014 01:42:03 -0500
Subject: [PATCH 10/10] cleanup dtb handling to work in the supported usecases
add SHIPSDTB variable in the uboot defaults file that needs to be set to yes for
platforms like the calxeda highbank that ship a dtb in u-boot that we want to use.
if the user defines a dtbfile in /etc/sysconfig/uboot update the extlinux.conf
with an fdt entry otherwise update a fdtdir entry unless SHIPSDTB is set to yes.
---
new-kernel-pkg | 12 +++++++-----
uboot | 5 +++++
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/new-kernel-pkg b/new-kernel-pkg
index 31976a7..311deda 100755
--- a/new-kernel-pkg
+++ b/new-kernel-pkg
@@ -752,14 +752,16 @@ fi
[ -n "$verbose" ] && echo "initrdfile is $initrdfile"
if [[ ${ARCH} =~ armv[5|7].*l ]]; then
- if [ -d "$bootPrefix/dtb-$version/" ]; then
- devtreedir="$bootPrefix/dtb-$version/"
- if [ -n "$dtbfile" -a -f "$devtreedir/$dtbfile" ]; then
- devtreefile="$devtreedir/$dtbfile"
+ if [ -z "$SHIPSDTB" -o "$SHIPSDTB" != "yes" ]; then
+ if [ -n "$dtbfile" -a -f "$bootPrefix/dtb-$version/$dtbfile" ]; then
+ devtreefile="$bootPrefix/dtb-$version/$dtbfile"
+ [ -n "$verbose" ] && echo "devtreefile is $devtreefile"
+ elif [ -d "$bootPrefix/dtb-$version/" ]; then
+ devtreedir="$bootPrefix/dtb-$version/"
+ [ -n "$verbose" ] && echo "devtreedir is $devtreedir"
fi
fi
fi
-[ -n "$verbose" ] && echo "devtreedir is $devtreedir"
# add dracut i18n, keyboard and plymouth kernel args if requested
if [ -n "$dracut" -o -n "$adddracutargs" ]; then
diff --git a/uboot b/uboot
index aa663ad..07d8671 100644
--- a/uboot
+++ b/uboot
@@ -36,3 +36,8 @@
# default initrd uInitrd file name
#UBOOT_UINITRD=uInitrd
+# defualt for platform shipping an onboard dtb.
+#SHIPSDTB=no
+
+# option to tell new-kernel-pkg a specific dtb file to load in extlinux.conf
+#dtbfile=foo.dtb
--
1.9.3