From d3449618fee2e3a9796a14b227d39e047b0ebd24 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Jun 14 2012 16:49:00 +0000 Subject: Support UBOOT_IMGADDR override on ARM (blc) --- diff --git a/0001-Support-UBOOT_IMGADDR-override.patch b/0001-Support-UBOOT_IMGADDR-override.patch new file mode 100644 index 0000000..db97d9c --- /dev/null +++ b/0001-Support-UBOOT_IMGADDR-override.patch @@ -0,0 +1,67 @@ +From 64799e5fa783ce4102aaec9b452c947c304f1817 Mon Sep 17 00:00:00 2001 +From: Brendan Conoboy +Date: Mon, 11 Jun 2012 15:50:04 -0700 +Subject: [PATCH] Support UBOOT_IMGADDR override + +Support UBOOT_IMGADDR override + +Signed-off-by: Brendan +--- + 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 + diff --git a/grubby.spec b/grubby.spec index 0b7ca51..f0f02b2 100644 --- a/grubby.spec +++ b/grubby.spec @@ -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} - 8.12-2 +- Support UBOOT_IMGADDR override on ARM (blc) + * Thu May 31 2012 Peter Jones - 8.12-1 - Update to 8.12 - Preserve trailing indentation when splitting line elements (mads)