Support UBOOT_IMGADDR override on ARM (blc)

This commit is contained in:
Peter Jones 2012-06-12 13:24:51 -04:00
parent 94529bf3fb
commit d3449618fe
2 changed files with 81 additions and 2 deletions

View File

@ -0,0 +1,67 @@
From 64799e5fa783ce4102aaec9b452c947c304f1817 Mon Sep 17 00:00:00 2001
From: Brendan Conoboy <blc@redhat.com>
Date: Mon, 11 Jun 2012 15:50:04 -0700
Subject: [PATCH] Support UBOOT_IMGADDR override
Support UBOOT_IMGADDR override
Signed-off-by: Brendan <blc@redhat.com>
---
new-kernel-pkg | 12 ++++++++----
uboot | 9 +++++++++
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/new-kernel-pkg b/new-kernel-pkg
index 96382d7..9902586 100755
--- a/new-kernel-pkg
+++ b/new-kernel-pkg
@@ -80,7 +80,6 @@ elif [ $ARCH = 's390' -o $ARCH = 's390x' ]; then
runLilo="yes"
isx86=""
elif [ $ARCH = 'armv7hl' -o $ARCH = 'armv7l' -o $ARCH = 'armv5tel' ]; then
- machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')
liloConfig=""
bootPrefix=/boot
ubootDir=${UBOOT_DIR:-"/boot/uboot"}
@@ -92,10 +91,15 @@ elif [ $ARCH = 'armv7hl' -o $ARCH = 'armv7l' -o $ARCH = 'armv5tel' ]; then
mounted=""
liloFlag=""
isx86=""
- if [ "$machine" == "OMAP3 Beagle Board" -o "$machine" == "OMAP4 Panda board" ]; then
- ubootAddress=0x80008000
+ if [ -z "$UBOOT_IMGADDR" ]; then
+ machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//')
+ if [ "$machine" == "OMAP3 Beagle Board" -o "$machine" == "OMAP4 Panda board" ]; then
+ ubootAddress=0x80008000
+ else
+ ubootAddress=0x00008000
+ fi
else
- ubootAddress=0x00008000
+ ubootAddress="$UBOOT_IMGADDR"
fi
else
# this leaves i?86 and x86_64
diff --git a/uboot b/uboot
index 46c0801..0c3b887 100644
--- a/uboot
+++ b/uboot
@@ -9,6 +9,15 @@
# directory where uBoot images and scripts are found
#UBOOT_DIR=/boot/uboot
+# Override the load address when running mkimage on the kernel.
+# OMAP such as Beagleboard and Pandaboard: Use 0x80008000
+# Tegra such as Trimslice: Use 0x00008000
+# IMX such as Efika mx51 smarttop: Use 0x90008000
+# Kirkwood such as Dreamplug, Guruplug, Sheevaplug: Use 0x00008000
+# If left undefined grubby will use defults for Tegra or OMAP depending
+# upon the contents of /proc/cpuinfo.
+#UBOOT_IMGADDR=0x0x00008000
+
# name of the text file containing the list of installed kernel versions
# NOTE: The versions are in order of installation. The last entry should
# always be the default boot kernel version.
--
1.7.10.1

View File

@ -1,6 +1,6 @@
Name: grubby
Version: 8.12
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Command line tool for updating bootloader configs
Group: System Environment/Base
License: GPLv2+
@ -11,7 +11,7 @@ URL: http://git.fedorahosted.org/git/grubby.git
Source0: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig glib2-devel popt-devel
BuildRequires: libblkid-devel
BuildRequires: libblkid-devel git
# for make test / getopt:
BuildRequires: util-linux-ng
%ifarch s390 s390x
@ -21,6 +21,8 @@ Requires: s390utils-base
Requires: uboot-tools
%endif
Patch0: 0001-Support-UBOOT_IMGADDR-override.patch
%description
grubby is a command line tool for updating and displaying information about
the configuration files for the grub, lilo, elilo (ia64), yaboot (powerpc)
@ -31,6 +33,13 @@ environment.
%prep
%setup -q
git init
git config user.email "noone@example.com"
git config user.name "no one"
git add .
git commit -a -q -m "%{version} baseline"
git am %{patches} </dev/null
%build
make %{?_smp_mflags}
@ -61,6 +70,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Tue Jun 12 2012 Peter Jones <pjones@redhat.com> - 8.12-2
- Support UBOOT_IMGADDR override on ARM (blc)
* Thu May 31 2012 Peter Jones <pjones@redhat.com> - 8.12-1
- Update to 8.12
- Preserve trailing indentation when splitting line elements (mads)