Kernel upgrade for VIMs

Hello,
does anyone know a seamless method for upgrading the mainline linux kernel of a debian buster distro (installed on the EMMC, if that does matter) ?
I know that a kernel built as a .deb package is a solution, but I never was able to build or find those .deb and use them.
Else a tool like ukuu on x86 would be the best (if can run from command line, an some cloud service can make the updates available not too long after new kernels are released)

thanks in advance !

@chewitt, how could I use your 5.6-rc7 branch to upgrade just the kernel of my EMMC booting debian 10 based on a 5.5-rc2 kernel ?

Sorry, no idea about Debian packaging. I’m a bit monotheistic when it comes to distro’s - I know my own and nobody else’s.

2 Likes

so, in librelec, how would you do such kernel upgrades ? if LE is debian based, then your method could also be applied to other debians… :neutral_face:

@hyphop, please tell us in this thread how to build just an uptodate linux mainline kernel and deploy it on a distro already running on a vim (vim1 in my case, running debian buster)

  1. build kernel on your host machine (i think crosscompilation more easy and fast and not recommended build kernels on same vim device - more slow …) with prefered config
  2. copy new kernel image to /boot same plase as vmlinuz-5.5.0-rc2 copy new kernel to zImage
vmlinuz-5.5.0-rc2
vmlinuz-5.x.x
zImage -> vmlinuz-5.x.x
  1. copy modules to /lib/modules/5.x.x
  2. reboot and start with new kernel

PS: 5.x.x - is just example u must change it to your values
PSS: if u need more detailed manual plz tell me which step (becouse i dont know you skills level )

1 Like

thks ! I just need to remember /figure out how to generate (cross compile) vmlinuz & the debs (and the headers?) from command line…

@chewitt, how to build vim1 kernel simply out of your 5.6 linux branch ?my idea is to get a vim1 config file from khadas fenix 5.5 build scripts… hope that will work

for the record, I’ve seen that today or yseterday, linux 5.6 stable has been released

I’ll get around to rebasing and updating some things in the next couple of days … some work things have priority for me right now. It should be trivial for you to do the same.

1 Like

Sorry to interrupt here. Just to inform everyone.

In manjaro, users get updated kernel once they are released. While users can also try pure mainline and rc releases.
For Vim’s I update kernel from @balbes150 branch.
We have linux-vim package and linux-aarch64' which is pure mainline while linux-aarch64-rc` which is pure mainline rc releases.

If anyone want to try updated kernel regularly then please try it on manjaro, it is always helpful for us to have extra testing users.

Cheers.

so, in manjaro server, how would you know when a new kernel is available ?
and then how to you get your distro’s kernel updated then ?
my experience is only wiht ukuu on x86 (in GUI mode) : you get a popup notifying you automatically, you click in it and after a few other steps, the newest kernel in installed (and also added as an option to grub2), then you reboot you boot by default into the newly installed kernel;

on arm, i’ve never seen such seamless UX…

my current tentative is to compile in docker chewitt’s kernel 5.6rc7 using fenix’s 5.5rc2 defconfig, we’lle see if the resulting kernel and modules and dtbs can make sense …
I hope that all needed patches for VIMs have already been applied in his 5.6 branch :crazy_face:

my 5.5rc2 /boot content looked like this…

khadas@Khadas:/boot$ ls -la
total 59792
drwxr-xr-x  4 root root    16384 Jan  1  1970 .
drwxr-xr-x 20 root root     4096 Mar 28 12:31 ..
-rwxr-xr-x  1 root root      868 Mar 27 19:56 aml_autoscript
-rwxr-xr-x  1 root root      796 Mar 27 19:56 aml_autoscript.txt
-rwxr-xr-x  1 root root      804 Mar 27 19:56 aml_autoscript.zip
-rwxr-xr-x  1 root root     8282 Mar 27 19:56 boot.ini
-rwxr-xr-x  1 root root     8600 Mar 27 19:56 boot.scr
-rwxr-xr-x  1 root root   186867 Mar 27 19:55 config-5.5.0-rc2
drwxr-xr-x  3 root root     4096 Mar 27 20:15 dtb
drwxr-xr-x  3 root root     4096 Mar 27 20:15 dtb-5.5.0-rc2
-rwxr-xr-x  1 root root    29295 Mar 27 20:16 dtb.img
-rwxr-xr-x  1 root root     2792 Mar 28 12:30 env.txt
-rwxr-xr-x  1 root root  7188320 Mar 27 20:16 initrd.img-5.5.0-rc2
-rwxr-xr-x  1 root root        0 Mar 27 20:15 .next
-rwxr-xr-x  1 root root     8600 Mar 27 19:56 s905_autoscript
-rwxr-xr-x  1 root root     8528 Mar 27 19:56 s905_autoscript.cmd
-rwxr-xr-x  1 root root  4274204 Mar 27 19:55 System.map-5.5.0-rc2
-rwxr-xr-x  1 root root    32768 Jan  1  1980 uboot.env
-rwxr-xr-x  1 root root  7188384 Mar 27 20:16 uInitrd
-rwxr-xr-x  1 root root  7188384 Mar 27 20:16 uInitrd-5.5.0-rc2
-rwxr-xr-x  1 root root 17516552 Mar 27 19:55 vmlinuz-5.5.0-rc2
-rwxr-xr-x  1 root root 17516552 Mar 27 19:55 zImage

after

cd fenix/build/linux-mainline-5.6-rc7/
make ARCH=arm64 defconfig
make -j7 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image dtbs modules

my 5.6 directory looks like this…

khadas@d87548753ac3:~/fenix/build/linux-mainline-5.6-rc7$ ls -ltr
total 1063996
-rw-rw-r--   1 khadas khadas     99724 Mar 30 19:35 CREDITS
-rw-rw-r--   1 khadas khadas       496 Mar 30 19:35 COPYING
drwxrwxr-x   6 khadas khadas      4096 Mar 30 19:35 LICENSES
-rw-rw-r--   1 khadas khadas       595 Mar 30 19:35 Kconfig
-rw-rw-r--   1 khadas khadas      1327 Mar 30 19:35 Kbuild
drwxrwxr-x  81 khadas khadas      4096 Mar 30 19:35 Documentation
-rw-rw-r--   1 khadas khadas       727 Mar 30 19:35 README
-rw-rw-r--   1 khadas khadas     60415 Mar 30 19:35 Makefile
-rw-rw-r--   1 khadas khadas    545555 Mar 30 19:35 MAINTAINERS
drwxrwxr-x  27 khadas khadas      4096 Mar 30 19:35 arch
drwxrwxr-x  30 khadas khadas      4096 Mar 30 19:35 samples
drwxrwxr-x  36 khadas khadas      4096 Mar 30 19:35 tools
drwxrwxr-x  30 khadas khadas      4096 Mar 30 19:41 include
drwxrwxr-x  15 khadas khadas      4096 Mar 30 19:54 scripts
drwxrwxr-x   3 khadas khadas      4096 Mar 30 19:54 usr
drwxrwxr-x   2 khadas khadas      4096 Mar 30 19:54 init
drwxrwxr-x   2 khadas khadas      4096 Mar 30 19:55 certs
drwxrwxr-x   2 khadas khadas      4096 Mar 30 19:55 ipc
drwxrwxr-x  12 khadas khadas      4096 Mar 30 19:55 security
drwxrwxr-x   3 khadas khadas      4096 Mar 30 19:55 block
drwxrwxr-x   3 khadas khadas     12288 Mar 30 19:56 mm
drwxrwxr-x  18 khadas khadas     12288 Mar 30 19:56 kernel
drwxrwxr-x  26 khadas khadas      4096 Mar 30 19:57 sound
drwxrwxr-x   4 khadas khadas      4096 Mar 30 19:57 virt
drwxrwxr-x  78 khadas khadas     12288 Mar 30 19:59 fs
drwxrwxr-x  72 khadas khadas      4096 Mar 30 20:00 net
drwxrwxr-x 138 khadas khadas      4096 Mar 30 20:05 drivers
-rw-r--r--   1 khadas khadas     19551 Mar 30 20:05 modules.order
-rw-r--r--   1 khadas khadas 784285192 Mar 30 20:05 vmlinux.o
-rw-r--r--   1 khadas khadas    163620 Mar 30 20:05 modules.builtin.modinfo
-rw-r--r--   1 khadas khadas     27979 Mar 30 20:05 modules.builtin
-rwxr-xr-x   1 khadas khadas 297581640 Mar 30 20:05 vmlinux
-rw-r--r--   1 khadas khadas   5880879 Mar 30 20:05 System.map
-rw-r--r--   1 khadas khadas    903680 Mar 30 20:05 Module.symvers
drwxrwxr-x   4 khadas khadas     20480 Mar 30 20:06 crypto
drwxrwxr-x  20 khadas khadas     20480 Mar 30 20:06 lib

I do not remember which new files need to replace which old files, and how eventually to generate the missing ones if any…

is this https://github.com/150balbes/Amlogic_s905-kernel/tree/5.6 the repo you mean ?

Yes use the master as its the same but stable version.


5.6.0-rc6

In server you can just run sudo pacman -syyu and this will sync to repo and check for updates if there is any then it will show you.

In Ui there is Pamac which will alert automatically when there is any update using the pamac ui you can update. As Manjaro is a rolling release you will always get updates without the need to installing the new release image.

1 Like

usually I also install new built initramfs and dtbs as follows

# export ARCH=arm64
# export LINUX=5.6.0-rc4 <<-- example
... build and install everything
# cp -p arch/$ARCH/boot/dts/amlogic/*.dtb /boot/dtb-$LINUX/amlogic
# update-initramfs -c -k $LINUX -b $PWD
# cp -p initrd.img-$LINUX initrd.img
# mkimage -A $ARCH -O linux -T ramdisk -C none -a 0 -e 0 -n uinitrd -d initrd.img uInitrd
# cp -p uInitrd /boot
... the other files in /boot with -$LINUX appended are just copies of what was built
1 Like