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