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

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