Use new official 4.9 kernel build
#!/bin/bash | |
DLPATH=ftp://vserver.obihoernchen.net/ODROID-XU4-KERNEL/LATEST-4.9 | |
if [[ "$1" =~ ^(ftp|https?):// ]]; then | |
DLPATH="$1" | |
fi | |
rm -r /boot/* | |
# for safety | |
rm -r /tmp/kernel-update | |
echo "Download kernel" | |
mkdir /tmp/kernel-update | |
cd /tmp/kernel-update | |
wget $DLPATH -O kernel.tar.xz | |
echo | |
echo "Extract kernel" | |
tar -xf kernel.tar.xz | |
KERNEL_VERSION=$(ls config-* | sed -e 's/^config-//') | |
echo | |
echo "Kernel Version: $KERNEL_VERSION" | |
echo | |
echo "Copy firmware and modules" | |
cp -R lib/* /lib | |
echo | |
echo "Create intramfs and uInitrd" | |
cp config-$KERNEL_VERSION /boot | |
update-initramfs -c -k $KERNEL_VERSION | |
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n "uInitrd-$KERNEL_VERSION" -d /boot/initrd.img-$KERNEL_VERSION /boot/uInitrd-$KERNEL_VERSION | |
echo | |
echo "Install kernel" | |
mount /dev/mmcblk0p1 /media/boot | |
mount /dev/mmcblk1p1 /media/boot | |
cp zImage /media/boot | |
DTB=$(ls *.dtb) | |
cp $DTB /media/boot | |
sed -i -r "s/\S+\.dtb;/${DTB};/" /media/boot/boot.ini | |
echo "Using dtb: $DTB" | |
cp /boot/uInitrd-$KERNEL_VERSION /media/boot/uInitrd | |
sync | |
sleep 3 | |
umount /media/boot | |
rm -r /tmp/kernel-update | |
echo | |
echo "Kernel updated successfully" | |
echo "Reboot to use new kernel" |
This comment has been minimized.
This comment has been minimized.
Second try: I've created /media/boot and run update script:
So this time only these 2 commands failed:
Any help appreciated. |
This comment has been minimized.
This comment has been minimized.
Hi, yes unfortunately OMV3/armbian changed the boot layout so this script is not compatible with OMV3 right now. |
This comment has been minimized.
This comment has been minimized.
Will you update the script for OMV3 in the near future? Just askin. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
I installed Armbian_5.33_Odroidxu4_Debian_jessie_next_4.9.37.img for odroid XU4, then I used this script trying to install latest kernel with mali support. Since the preinstalled one 4.9.37-odroidxu4 didn't have support for it. I run your script and those are the last lines I got:
I wasn't cautious and didn't see about /media/boot does not exists and some failures... only Kernel updates successfully which was false since then I was in a loop and now I have to reinstall it :)
What exactly is "/media/boot"? Do I have to create it manually or is this on openmediavault3 named something else?
Thank you!