I got a vim3 yesterday, installed krescue into an sdcard and from there, I installed ubuntu focal 20.04 into the MMC.
From there, I tried to upgrade u-boot to mainline u-boot, so I followed the steps in the documentation, setting the board as vim3, mainline kernel, mainline u-boot, SD card (as there was no EMMC option).
I got the .deb package, installed & rebooted, and… the system never got up again. Something about corrupted file system.
Ok – scratch that. I started again, installed the same ubuntu, and decided to only update the kernel. Same story. I was able to reproduce make the .deb image, and after installing it and rebooting, the system wouldn’t boot anymore because of corrupted filesystem (this time I have the uboot console to do something).
I am not sure how to proceed. What is the recommended way of updating the kernel on the eMMC? Well, I don’t really care whether it’s on the emmc or an sd card, but I just want to be able to run a custom kernel
Can anyone point me on the right direction?
Thanks!
You mean that’s not possible to write the mainline kernel onto the emmc and boot from it directly? I need to have an emmc os and boot from the sd card with the new kernel?
If the kernel is 4.9, you need to choose 4.9 linux to build the debian package.
If the kernel is 5.x, you need to choose mainline linux to build the debian package.
I have a few follow up questions.
I installed from krescue the ubuntu 5.7 focal, which says it’s for an SDCARD: VIM3_Ubuntu-gnome-focal_Linux-5.7-rc7_arm64_SD-USB_V0.9-20200530.img.xz… however, I guess it got installed in the eMMC. Is that OK? Should that work?
The other question is that: I have 5.7 focal (installed directly from krescue), should I update via the debian packages then? would that work?
khadas@Khadas:~$ sudo dpkg -i linux-dtb-amlogic-mainline_1.0.2_arm64.deb
(Reading database ... 126200 files and directories currently installed.)
Preparing to unpack linux-dtb-amlogic-mainline_1.0.2_arm64.deb ...
Unpacking linux-dtb-amlogic-mainline (1.0.2) over (0.9) ...
dpkg: error processing archive linux-dtb-amlogic-mainline_1.0.2_arm64.deb (--install):
error setting ownership of '/boot/dtb-5.10.0-rc6.dpkg-new': Operation not permitted
mv: cannot stat '/boot/dtb-5.7.0-rc7': No such file or directory
cp: cannot stat '/boot/dtb/amlogic/meson-g12b-a311d-khadas-vim3.dtb': No such file or directory
Errors were encountered while processing:
linux-dtb-amlogic-mainline_1.0.2_arm64.deb
This is my /boot dir:
khadas@Khadas:~$ ls -l /boot
total 80772
-rwxr-xr-x 1 root root 868 May 30 2020 aml_autoscript
-rwxr-xr-x 1 root root 796 May 30 2020 aml_autoscript.txt
-rwxr-xr-x 1 root root 803 May 30 2020 aml_autoscript.zip
-rwxr-xr-x 1 root root 8282 May 30 2020 boot.ini
-rwxr-xr-x 1 root root 8600 May 30 2020 boot.scr
-rwxr-xr-x 1 root root 182505 May 30 2020 config-5.7.0-rc7
-rwxr-xr-x 1 root root 50997 Feb 19 03:19 dtb.img
-rwxr-xr-x 1 root root 2792 May 30 2020 env.txt
-rwxr-xr-x 1 root root 11947972 May 30 2020 initrd.img-5.7.0-rc7
-rwxr-xr-x 1 root root 8600 May 30 2020 s905_autoscript
-rwxr-xr-x 1 root root 8528 May 30 2020 s905_autoscript.cmd
-rwxr-xr-x 1 root root 4603676 May 30 2020 System.map-5.7.0-rc7
-rwxr-xr-x 1 root root 8192 Jan 1 1980 uboot.env
-rwxr-xr-x 1 root root 11948036 May 30 2020 uInitrd
-rwxr-xr-x 1 root root 11948036 May 30 2020 uInitrd-5.7.0-rc7
-rwxr-xr-x 1 root root 20969480 May 30 2020 vmlinuz-5.7.0-rc7
-rwxr-xr-x 1 root root 20969480 May 30 2020 zImage
Thanks for the help, I updated the code today and was able to upgrade the kernel
The only hiccup is that the headers deb package was having some issues:
khadas@Khadas:~$ sudo dpkg -i linux-headers-amlogic-mainline_1.0.2_arm64.deb
(Reading database ... 126205 files and directories currently installed.)
Preparing to unpack linux-headers-amlogic-mainline_1.0.2_arm64.deb ...
Unpacking linux-headers-amlogic-mainline (1.0.2) over (0.9) ...
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/scripts/mod': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/scripts/kconfig': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/scripts/dtc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/scripts/basic': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/scripts': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/stackprotector': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/have/dynamic': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/have': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/cc/has/asm': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/cc/has': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/cc': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/as/has': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config/as': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include/config': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7/include': Directory not empty
dpkg: warning: unable to delete old directory '/usr/src/linux-headers-5.7.0-rc7': Directory not empty
Setting up linux-headers-amlogic-mainline (1.0.2) ...
Compiling headers - please wait ...