diff mbox series

[maintainer-tools] update_kernel.sh: update it to new kernel hash/version file way

Message ID 20220116203532.463-1-ansuelsmth@gmail.com
State Accepted
Delegated to: Rui Salvaterra
Headers show
Series [maintainer-tools] update_kernel.sh: update it to new kernel hash/version file way | expand

Commit Message

Christian Marangi Jan. 16, 2022, 8:35 p.m. UTC
Openwrt changed how the hash/version of the various kernel are declared
and saved.
They are now placed in dedicated files. Fix the update_kernel.sh script
to update the kernel version/hash to the correct file.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 update_kernel.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rui Salvaterra Jan. 16, 2022, 11:52 p.m. UTC | #1
Hi, Ansuel,

On Sun, 16 Jan 2022 at 20:38, Ansuel Smith <ansuelsmth@gmail.com> wrote:
>
> Openwrt changed how the hash/version of the various kernel are declared
> and saved.
> They are now placed in dedicated files. Fix the update_kernel.sh script
> to update the kernel version/hash to the correct file.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  update_kernel.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/update_kernel.sh b/update_kernel.sh
> index 0cbdb1d..2c4bb09 100755
> --- a/update_kernel.sh
> +++ b/update_kernel.sh
> @@ -155,7 +155,7 @@ if [ "$UPDATE" -eq 1 ]; then
>                 CHECKSUM=$(./staging_dir/host/bin/mkhash sha256 dl/linux-$PATCHVER.tar.xz)
>         fi
>
> -       $CMD ./staging_dir/host/bin/sed -i include/kernel-version.mk \
> +       $CMD ./staging_dir/host/bin/sed -i include/kernel-${KERNEL} \
>                 -e "s|LINUX_VERSION-${KERNEL} =.*|LINUX_VERSION-${KERNEL} = ${NEWVER}|" \
>                 -e "s|LINUX_KERNEL_HASH-${KERNEL}.*|LINUX_KERNEL_HASH-${PATCHVER} = ${CHECKSUM}|"
>  fi
> --
> 2.33.1

Looks good to me.

Reviewed-by: Rui Salvaterra <rsalvaterra@gmail.com>

Thanks,
Rui
diff mbox series

Patch

diff --git a/update_kernel.sh b/update_kernel.sh
index 0cbdb1d..2c4bb09 100755
--- a/update_kernel.sh
+++ b/update_kernel.sh
@@ -155,7 +155,7 @@  if [ "$UPDATE" -eq 1 ]; then
 		CHECKSUM=$(./staging_dir/host/bin/mkhash sha256 dl/linux-$PATCHVER.tar.xz)
 	fi
 
-	$CMD ./staging_dir/host/bin/sed -i include/kernel-version.mk \
+	$CMD ./staging_dir/host/bin/sed -i include/kernel-${KERNEL} \
 		-e "s|LINUX_VERSION-${KERNEL} =.*|LINUX_VERSION-${KERNEL} = ${NEWVER}|" \
 		-e "s|LINUX_KERNEL_HASH-${KERNEL}.*|LINUX_KERNEL_HASH-${PATCHVER} = ${CHECKSUM}|"
 fi