diff --git a/0001-riscv-uboot.patch b/0001-riscv-uboot.patch index 991288d..33d4072 100644 --- a/0001-riscv-uboot.patch +++ b/0001-riscv-uboot.patch @@ -1,15 +1,15 @@ -From 3242d46a8e4badb1b7a804ce656db3a029808ef7 Mon Sep 17 00:00:00 2001 +From 1172e7b953f3682cf7b75beeab805d7538c66827 Mon Sep 17 00:00:00 2001 From: Your Name -Date: Sat, 30 Mar 2019 06:11:45 -0400 +Date: Wed, 3 Apr 2019 19:00:57 +0000 Subject: [PATCH] riscv uboot --- - new-kernel-pkg | 63 ++++++++++++++++++-------------------------------- - uboot | 39 ++++++++++++------------------- - 2 files changed, 37 insertions(+), 65 deletions(-) + new-kernel-pkg | 76 +++++++++++++++++++++++--------------------------- + uboot | 39 ++++++++++---------------- + 2 files changed, 50 insertions(+), 65 deletions(-) diff --git a/new-kernel-pkg b/new-kernel-pkg -index b634388..64a36ce 100755 +index b634388..245b5e3 100755 --- a/new-kernel-pkg +++ b/new-kernel-pkg @@ -50,7 +50,6 @@ grubConfig="" @@ -52,7 +52,18 @@ index b634388..64a36ce 100755 liloFlag="" isx86="" else -@@ -417,7 +429,6 @@ remove() { +@@ -299,6 +311,10 @@ install() { + fi + + if [ -n "$cfgExtlinux" ]; then ++ if [ -n "$cfguBoot" ]; then ++ kernelImage=$ubootDir/uImage-$version ++ INITRD=$(echo $INITRD | sed "s|$initrdfile|$ubootDir/uInitrd-$version|") ++ fi + [ -n "$verbose" ] && echo "adding $version to $extlinuxConfig" + + ARGS="--extlinux -c $extlinuxConfig --add-kernel=$kernelImage \ +@@ -417,7 +433,6 @@ remove() { fi mv $tmpKList $ubootDir/$ubootKList @@ -60,7 +71,7 @@ index b634388..64a36ce 100755 else [ -n "$verbose" ] && echo "uImage $newversion does not exist!" [ -f $tmpKList ] && rm -f $tmpKList -@@ -426,7 +437,7 @@ remove() { +@@ -426,10 +441,13 @@ remove() { [ -n "$verbose" ] && echo "No previous kernel version. U-Boot images not removed!" fi else @@ -69,7 +80,13 @@ index b634388..64a36ce 100755 fi if [ -n "$cfgExtlinux" ]; then -@@ -534,12 +545,12 @@ update() { ++ if [ -n "$cfguBoot" ]; then ++ kernelImage=$ubootDir/uImage-$version ++ fi + [ -n "$verbose" ] && echo "removing $version from $extlinuxConfig" + $grubby --extlinux -c $extlinuxConfig \ + --remove-kernel=$kernelImage +@@ -534,12 +552,12 @@ update() { [ -n "$verbose" ] && echo "adding $version to $ubootDir..." [ -n "$verbose" ] && echo "creating uImage-$version" @@ -84,7 +101,7 @@ index b634388..64a36ce 100755 -n initramfs -d $initrdfile $ubootDir/uInitrd-$version if [ -f $ubootDir/uImage-$version ] && [ -f $ubootDir/uInitrd-$version ]; then -@@ -552,12 +563,11 @@ update() { +@@ -552,15 +570,18 @@ update() { [ -n "$verbose" ] && echo "copy uInitrd-$version error, kernel not installed!" && exit fi echo $version >> $ubootDir/$ubootKList @@ -98,7 +115,23 @@ index b634388..64a36ce 100755 fi if [ -n "$cfgExtlinux" ]; then -@@ -876,33 +886,7 @@ fi ++ if [ -n "$cfguBoot" ]; then ++ kernelImage=$ubootDir/uImage-$version ++ INITRD=$(echo $INITRD | sed "s|$initrdfile|$ubootDir/uInitrd-$version|") ++ fi + [ -n "$verbose" ] && echo "updating $version from $extlinuxConfig" + ARGS="--extlinux -c $extlinuxConfig --update-kernel=$kernelImage \ + $DEVTREE $DEVTREEDIR $INITRD ${kernargs:+--args=\"$kernargs\"} \ +@@ -592,6 +613,8 @@ doMkinitrd() { + rminitrd() { + [ -n "$verbose" ] && echo "removing initrd $initrdfile" + [ -f $initrdfile ] && rm -f $initrdfile ++ [ -n "$verbose" -a -n "$cfguBoot" ] && "removing U-Boot wrapped initrd $ubootDir/uInitrd-$version" ++ [ -n "$cfguBoot" -a -f $ubootDir/uInitrd-$version ] && rm -f $ubootDir/uInitrd-$version + } + + doDepmod() { +@@ -876,33 +899,7 @@ fi [ -n "$grub2EfiConfig" ] && [ -f "$grub2EfiConfig" ] && cfgGrub2Efi=1; [ -n "$liloConfig" ] && [ -f "$liloConfig" ] && cfgLilo=1; [ -n "$extlinuxConfig" ] && [ -f "$extlinuxConfig" ] && cfgExtlinux=1; @@ -133,7 +166,7 @@ index b634388..64a36ce 100755 # 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 -@@ -920,7 +904,4 @@ elif [ "$mode" == "--rpmposttrans" ]; then +@@ -920,7 +917,4 @@ elif [ "$mode" == "--rpmposttrans" ]; then rpmposttrans fi @@ -205,5 +238,5 @@ index 07d8671..3db046a 100644 +# Default uInitrd compression +#UBOOT_UINITRD_COMPRESSION=gzip -- -2.20.1 +2.21.0 diff --git a/a.patch b/a.patch new file mode 100644 index 0000000..6217318 --- /dev/null +++ b/a.patch @@ -0,0 +1,44 @@ +--- /usr/sbin/new-kernel-pkg 2019-04-03 12:19:29.969231795 -0400 ++++ /usr/sbin/new-kernel-pkg 2019-04-03 13:02:36.022107582 -0400 +@@ -313,6 +313,10 @@ + fi + + if [ -n "$cfgExtlinux" ]; then ++ if [ -n "$cfguBoot" ]; then ++ kernelImage=$ubootDir/uImage-$version ++ INITRD=$(echo $INITRD | sed "s|$initrdfile|$ubootDir/uInitrd-$version|") ++ fi + [ -n "$verbose" ] && echo "adding $version to $extlinuxConfig" + + ARGS="--extlinux -c $extlinuxConfig --add-kernel=$kernelImage \ +@@ -443,6 +447,9 @@ + fi + + if [ -n "$cfgExtlinux" ]; then ++ if [ -n "$cfguBoot" ]; then ++ kernelImage=$ubootDir/uImage-$version ++ fi + [ -n "$verbose" ] && echo "removing $version from $extlinuxConfig" + $grubby --extlinux -c $extlinuxConfig \ + --remove-kernel=$kernelImage +@@ -573,6 +580,10 @@ + fi + + if [ -n "$cfgExtlinux" ]; then ++ if [ -n "$cfguBoot" ]; then ++ kernelImage=$ubootDir/uImage-$version ++ INITRD=$(echo $INITRD | sed "s|$initrdfile|$ubootDir/uInitrd-$version|") ++ fi + [ -n "$verbose" ] && echo "updating $version from $extlinuxConfig" + ARGS="--extlinux -c $extlinuxConfig --update-kernel=$kernelImage \ + $DEVTREE $DEVTREEDIR $INITRD ${kernargs:+--args=\"$kernargs\"} \ +@@ -604,6 +615,8 @@ + rminitrd() { + [ -n "$verbose" ] && echo "removing initrd $initrdfile" + [ -f $initrdfile ] && rm -f $initrdfile ++ [ -n "$verbose" -a -n "$cfguBoot" ] && "removing U-Boot wrapped initrd $ubootDir/uInitrd-$version" ++ [ -n "$cfguBoot" -a -f $ubootDir/uInitrd-$version ] && rm -f $ubootDir/uInitrd-$version + } + + doDepmod() { +