Booting a 4.10 mainline kernel

Thank you, downloaded. Will check at home.

I tried both of Your ready-made cores (the links) and i’m Assembly. But while it is impossible to run. Kernel starts, but stops immediately (without message). The behavior is the same as if use the kernel from 3.14 is not the correct dtb file. I think the reason is not the correct u-boot (new kernel). Question, which version of u-boot You have used for testing on VIM ?

You need to modify the the u-boot environment in order to boot a mainline kernel.

  • The console device is now ttyAML0 instead of ttyS0
  • The dtb is called meson-gxl-s905x-khadas-vim.dtb instead of kvim.dtb
  • The kernel Image is called uImage an has to be started with bootm 0x1000000 0x2000000 0xc00000

I’m using the latest u-boot now, but the mainline kernel should boot with the previous version as well.

You may take a look here, I’ve started to write my own set of u-boot macros which makes it easier to manage different configurations at a time and choose a distinct one for booting.

1 Like

I updated u-boot to the latest version (170304). Dropped env in the default state. But the result is the same - no start kernel. Can you show the output of printenv from u-boot ? I want to compare with his as u-boot.

This is the u-boot statement list to boot the mainline kernel from eMMC (kernel image and root filesystem on 2nd partition(ext4)):

setenv fdt_addr_r    '0x01000000'
setenv fdt_high        '0x20000000'

setenv ramdisk_addr_r    '0x13000000'
setenv initrd_high    '0x60000000'

setenv kernel_addr_r    '0x01080000'

setenv kernel 'uImage'
setenv ramdisk 'uInitrd'
setenv fdt 'meson-gxl-s905x-khadas-vim.dtb'

setenv part '1:2'
setenv dev 'mmc'
setenv prefix '/boot/kernel.d/linux-4.11.0-rc1-gx-gd7bf95a-dirty'

setenv bootargs 'console=tty0 console=ttyAML0,115200 earlyprintk=aml-uart,0xc81004c0 root=/dev/mmcblk0p2 rootwait rw governor=ondemand no_console_suspend elevator=noop';
ext4load ${dev} ${part} ${kernel_addr_r} ${prefix}/${kernel};
ext4load ${dev} ${part} ${ramdisk_addr_r} ${prefix}/${ramdisk};
ext4load ${dev} ${part} ${fdt_addr_r} ${prefix}/${fdt};
bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r};

I’ve updated to kernel version 4.15, you can find the source here und images here. This image also boots on a VIM2 (using a different dtb). At this time USB is still unsupported but the tedious network errors/hangs have gone.


Hi umiddelb,

Long time no see, and thanks for your sharing.:wink:


small update: 4.17-rc3 comes with usb support for kvim and kvim2.
Please disable the internal wifi device first before boot, e.g. add

blacklist brcmfmac




thank you! worth trying soon

Is it possible to have a complete image (ubuntu) with this 4.17 kernel, which an enduser can burn to khadas vim 1?
At the moment I use the kvim only for Coreelec, which is ok. But this wasnt the idea when I bought this thing.

I tried to to build kernel 4.17, but I failed

Go for an Armbian image by balbes150. See the thread here: rc3 images are in the test directory.

I have struggled, and failed, to get umiddelb work to boot, even copying it on top of an existing bootable SDcard.

Thanks, I have only noticed Kernel 4.16 Builds and didnt see the test directory.

The are some issues with the mainline kernel which you should know about.

The plan vanilla kernel doesn’t reduce the clock frequency for eMMC access, so you will experience lots of error messages. I’d recommend to build the mainline kernel from my repository.

The current u-boot loader fails to boot a mainline kernel unless the image is converted to an uImage, so you have to modify the boot environment.

1 Like

If you use two small patches, the main kernel can be easily started with any u-boot without any conversion of the resulting kernel file (Image) with the standard “booti” command. All images Armbian default to this mode and abilities core “4.1 x” on any u-boot.


I have difficulties to identify the right bits and pieces here

Here are the correct links.

1 Like

Thank you.
I’ve decided to make the change more specific for MESON SoC only.


You mean mainline u-boot V2018.05 can’t boot mainline linux 4.17.0 ?

I use distro_bootcmd can boot linux 4.17.

I used this specifically for builds of variants only under Amlogic. With the addition of config, this can already be used as a patch for the core code. :wink: