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

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