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

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