Blame SOURCES/0001-remove-the-old-crufty-u-boot-support.patch

3e90b9
From aa4472dbc10f3d669e24ac07293d7ac19e606866 Mon Sep 17 00:00:00 2001
3e90b9
From: Dennis Gilmore <dennis@ausil.us>
3e90b9
Date: Wed, 30 Aug 2017 14:03:45 -0500
3e90b9
Subject: [PATCH 1/8] remove the old crufty u-boot support
3e90b9
3e90b9
Fedora has only supported extlinux.conf for a few releases now
3e90b9
as a result it should be the only way we boot systems. Remove
3e90b9
the no longer needed uboot file
3e90b9
3e90b9
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
3e90b9
---
3e90b9
 new-kernel-pkg | 116 -------------------------------------------------
3e90b9
 uboot          |  43 ------------------
3e90b9
 2 files changed, 159 deletions(-)
3e90b9
 delete mode 100644 uboot
3e90b9
3e90b9
diff --git a/new-kernel-pkg b/new-kernel-pkg
3e90b9
index b634388a83f..962008e3c9d 100755
3e90b9
--- a/new-kernel-pkg
3e90b9
+++ b/new-kernel-pkg
3e90b9
@@ -37,7 +37,6 @@ else
3e90b9
 fi
3e90b9
 
3e90b9
 [ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
3e90b9
-[ -f /etc/sysconfig/uboot ] && . /etc/sysconfig/uboot
3e90b9
 
3e90b9
 cfgGrub2=""
3e90b9
 cfgGrub2Efi=""
3e90b9
@@ -50,7 +49,6 @@ grubConfig=""
3e90b9
 grub2Config=""
3e90b9
 grub2EfiConfig=""
3e90b9
 extlinuxConfig=""
3e90b9
-ubootScript="/boot/boot.scr"
3e90b9
 
3e90b9
 ARCH=$(uname -m)
3e90b9
 
3e90b9
@@ -84,13 +82,6 @@ elif [[ ${ARCH} =~ armv[5|7].*l ]] ; then
3e90b9
     liloConfig=""
3e90b9
     bootPrefix=/boot
3e90b9
     extlinuxConfig=$(readlink -f /etc/extlinux.conf 2>/dev/null)
3e90b9
-    ubootDir=${UBOOT_DIR:-"/boot"}
3e90b9
-    ubootScript=$ubootDir/${UBOOT_SCR:-"boot.scr"}
3e90b9
-    ubootKList=${UBOOT_KLIST:-"klist.txt"}
3e90b9
-    ubootDevice=/dev/${UBOOT_DEVICE:-"mmcblk0p1"}
3e90b9
-    ubootDefaultImage=${UBOOT_UIMAGE:-"uImage"}
3e90b9
-    ubootDefaultInitrd=${UBOOT_UINITRD:-"uInitrd"}
3e90b9
-    ubootAddress=${UBOOT_IMGADDR:-"0x00008000"}
3e90b9
     mounted=""
3e90b9
     liloFlag=""
3e90b9
     isx86=""
3e90b9
@@ -382,53 +373,6 @@ remove() {
3e90b9
 	[ -n "$verbose" ] && echo "$liloConfig does not exist, not running grubby"
3e90b9
     fi
3e90b9
 
3e90b9
-    if [ -n "$cfguBoot" ]; then
3e90b9
-	[ -n "$verbose" ] && echo "removing $version from $ubootDir..."
3e90b9
-
3e90b9
-	if [ -f $ubootDir/$ubootKList ]; then
3e90b9
-	    tmpKList=`mktemp $ubootDir/$ubootKList.XXXX`
3e90b9
-	    curversion=`tail -n1 $ubootDir/$ubootKList`
3e90b9
-	    sed "/$version$/d" $ubootDir/$ubootKList > $tmpKList
3e90b9
-	    newversion=`tail -n1 $tmpKList`
3e90b9
-	    if [ -f $ubootDir/uImage-$newversion ] && [ -f $ubootDir/uInitrd-$newversion ]; then
3e90b9
-		if [ "$curversion" != "$newversion" ]; then
3e90b9
-		    cp -fp $ubootDir/uImage-$newversion $ubootDir/${ubootDefaultImage}
3e90b9
-		    if [ $? -ne 0 ]; then
3e90b9
-			[ -n "$verbose" ] && echo "copy uImage-$newversion error, default kernel not replaced!" && exit
3e90b9
-		    fi
3e90b9
-		    cp -fp $ubootDir/uInitrd-$newversion $ubootDir/${ubootDefaultInitrd}
3e90b9
-		    if [ $? -ne 0 ]; then
3e90b9
-			[ -n "$verbose" ] && echo "copy uInitrd-$newversion error, default Initrd not replaced!" && exit
3e90b9
-		    fi
3e90b9
-		fi
3e90b9
-
3e90b9
-		[ -n "$verbose" ] && echo "removing uImage-$version"
3e90b9
-		if [ -f $ubootDir/uImage-$version ]; then
3e90b9
-		    rm -f $ubootDir/uImage-$version
3e90b9
-		else
3e90b9
-		    [ -n "$verbose" ] && echo "uImage-$version did not exist!"
3e90b9
-		fi
3e90b9
-
3e90b9
-		[ -n "$verbose" ] && echo "removing uInitrd-$version"
3e90b9
-		if [ -f $ubootDir/uInitrd-$version ]; then
3e90b9
-		    rm -f $ubootDir/uInitrd-$version
3e90b9
-		else
3e90b9
-		    [ -n "$verbose" ] && echo "uInitrd-$version did not exist!"
3e90b9
-		fi
3e90b9
-
3e90b9
-		mv $tmpKList $ubootDir/$ubootKList
3e90b9
-		[ -x /sbin/a-b-c ] && /sbin/a-b-c
3e90b9
-	    else
3e90b9
-		[ -n "$verbose" ] && echo "uImage $newversion does not exist!"
3e90b9
-		[ -f $tmpKList ] && rm -f $tmpKList
3e90b9
-	    fi
3e90b9
-        else
3e90b9
-            [ -n "$verbose" ] && echo "No previous kernel version.  U-Boot images not removed!"
3e90b9
-        fi
3e90b9
-    else
3e90b9
-	[ -n "$verbose" ] && echo "$ubootScript does not exist, not modifying $ubootDir"
3e90b9
-    fi
3e90b9
-
3e90b9
     if [ -n "$cfgExtlinux" ]; then
3e90b9
 	[ -n "$verbose" ] && echo "removing $version from $extlinuxConfig"
3e90b9
 	$grubby --extlinux -c $extlinuxConfig \
3e90b9
@@ -530,36 +474,6 @@ update() {
3e90b9
 	[ -n "$verbose" ] && echo "$liloConfig does not exist, not running grubby"
3e90b9
     fi
3e90b9
 
3e90b9
-    if [ -n "$cfguBoot" ]; then
3e90b9
-	[ -n "$verbose" ] && echo "adding $version to $ubootDir..."
3e90b9
-
3e90b9
-	[ -n "$verbose" ] && echo "creating uImage-$version"
3e90b9
-	mkimage -A arm -O linux -T kernel -C none -a $ubootAddress \
3e90b9
-		-e $ubootAddress -n $version \
3e90b9
-		-d $kernelImage $ubootDir/uImage-$version
3e90b9
-
3e90b9
-	[ -n "$verbose" ] && echo "creating uInitrd-$version"
3e90b9
-	mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 \
3e90b9
-		-n initramfs -d $initrdfile $ubootDir/uInitrd-$version
3e90b9
-
3e90b9
-	if [ -f $ubootDir/uImage-$version ] && [ -f $ubootDir/uInitrd-$version ]; then
3e90b9
-	    cp -fp $ubootDir/uImage-$version $ubootDir/${ubootDefaultImage}
3e90b9
-	    if [ $? -ne 0 ]; then
3e90b9
-		[ -n "$verbose" ] && echo "copy uImage-$version error, kernel not installed!" && exit
3e90b9
-	    fi
3e90b9
-	    cp -fp $ubootDir/uInitrd-$version $ubootDir/${ubootDefaultInitrd}
3e90b9
-	    if [ $? -ne 0 ]; then
3e90b9
-		[ -n "$verbose" ] && echo "copy uInitrd-$version error, kernel not installed!" && exit
3e90b9
-	    fi
3e90b9
-	    echo $version >> $ubootDir/$ubootKList
3e90b9
-	    [ -x /sbin/a-b-c ] && /sbin/a-b-c
3e90b9
-	else
3e90b9
-	    [ -n "$verbose" ] && echo "cannot make $version the default"
3e90b9
-	fi
3e90b9
-    else
3e90b9
-	[ -n "$verbose" ] && echo "$ubootScript does not exist, not setting up $ubootDir"
3e90b9
-    fi
3e90b9
-
3e90b9
     if [ -n "$cfgExtlinux" ]; then
3e90b9
 	[ -n "$verbose" ] && echo "updating $version from $extlinuxConfig"
3e90b9
 	ARGS="--extlinux -c $extlinuxConfig --update-kernel=$kernelImage \
3e90b9
@@ -877,33 +791,6 @@ fi
3e90b9
 [ -n "$liloConfig" ] && [ -f "$liloConfig" ] && cfgLilo=1;
3e90b9
 [ -n "$extlinuxConfig" ] && [ -f "$extlinuxConfig" ] && cfgExtlinux=1;
3e90b9
 
3e90b9
-# if we have a U-Boot directory, but no boot script, check if the directory
3e90b9
-# is mounted.  If not, mount it, and then check if a boot script exists.
3e90b9
-if [ -n "$ubootDir" ]; then
3e90b9
-    if [ -f "$ubootScript" ]; then
3e90b9
-        cfguBoot=1
3e90b9
-    else
3e90b9
-	mountEntry=`mount | grep $ubootDir`
3e90b9
-	if [ -z "$mountEntry" ]; then
3e90b9
-	    mount $ubootDevice $ubootDir
3e90b9
-	    mounted=1
3e90b9
-	fi
3e90b9
-	[ -f "$ubootScript" ] && cfguBoot=1;
3e90b9
-    fi
3e90b9
-fi
3e90b9
-
3e90b9
-# if we're using U-Boot, check if the default load address should change
3e90b9
-if [ -n "$cfguBoot" -a -z "$UBOOT_IMGADDR" ]; then
3e90b9
-    [[ $version  =~ .([^.]*)$ ]]
3e90b9
-    platform=${BASH_REMATCH[1]}
3e90b9
-    # A few platforms use an alternate kernel load address
3e90b9
-    if [ "$platform" = "omap" ]; then
3e90b9
-        ubootAddress=0x80008000
3e90b9
-    elif [ "$platform" = "imx" ]; then
3e90b9
-        ubootAddress=0x90008000
3e90b9
-    fi
3e90b9
-fi
3e90b9
-
3e90b9
 # if we have a lilo config on an x86 box, see if the default boot loader
3e90b9
 # is lilo to determine if it should be run
3e90b9
 if [ -n "$cfgLilo" -a -n "$isx86" ]; then
3e90b9
@@ -920,7 +807,4 @@ elif [ "$mode" == "--rpmposttrans" ]; then
3e90b9
     rpmposttrans
3e90b9
 fi
3e90b9
 
3e90b9
-# if we mounted the U-Boot directory, unmount it.
3e90b9
-[ -n "$mounted" ] && umount $ubootDir
3e90b9
-
3e90b9
 exit 0
3e90b9
diff --git a/uboot b/uboot
3e90b9
deleted file mode 100644
3e90b9
index 07d8671822f..00000000000
3e90b9
--- a/uboot
3e90b9
+++ /dev/null
3e90b9
@@ -1,43 +0,0 @@
3e90b9
-# Settings for uBoot setup in /sbin/new-kernel-pkg
3e90b9
-#
3e90b9
-# Default values are provided below (as comments)
3e90b9
-#
3e90b9
-# WARNING: These values affect where grubby installs and removes
3e90b9
-#          uBoot kernel images.  Changing these _after_ kernels have
3e90b9
-#          been installed may cause removing a kernel image to fail.
3e90b9
-
3e90b9
-# directory where uBoot images and scripts are found
3e90b9
-#UBOOT_DIR=/boot
3e90b9
-
3e90b9
-# Override the load address when running mkimage on the kernel.
3e90b9
-# OMAP such as Beagleboard and Pandaboard: Use 0x80008000
3e90b9
-# Tegra such as Trimslice: Use 0x00008000
3e90b9
-# IMX such as Efika mx51 smarttop: Use 0x90008000
3e90b9
-# Kirkwood such as Dreamplug, Guruplug, Sheevaplug: Use 0x00008000
3e90b9
-# If left undefined grubby will use defults for Tegra or OMAP depending
3e90b9
-# upon the contents of /proc/cpuinfo.
3e90b9
-#UBOOT_IMGADDR=0x0x00008000
3e90b9
-
3e90b9
-# name of the text file containing the list of installed kernel versions
3e90b9
-# NOTE: The versions are in order of installation.  The last entry should
3e90b9
-#       always be the default boot kernel version.
3e90b9
-#UBOOT_KLIST=klist.txt
3e90b9
-
3e90b9
-# device partition where uBoot images reside; mounted on $UBOOT_DIR
3e90b9
-#UBOOT_DEVICE=mmcblk0p1
3e90b9
-
3e90b9
-
3e90b9
-# NOTE: Both of the following files are automatically overwritte
3e90b9
-#       when a kernel package is installed or removed.
3e90b9
-
3e90b9
-# default kernel uImage file name
3e90b9
-#UBOOT_UIMAGE=uImage
3e90b9
-
3e90b9
-# default initrd uInitrd file name
3e90b9
-#UBOOT_UINITRD=uInitrd
3e90b9
-
3e90b9
-# defualt for platform shipping an onboard dtb.
3e90b9
-#SHIPSDTB=no
3e90b9
-
3e90b9
-# option to tell new-kernel-pkg a specific dtb file to load in extlinux.conf
3e90b9
-#dtbfile=foo.dtb
3e90b9
-- 
3e90b9
2.17.1
3e90b9