Debian with Kodi

Hey folks,

I’m the new owner of Khadas VIM2 Pro. I bought it mostly as a replacement for my previous AndroidTV box to play videos from my NAS but I’d like to use it as a personal/home server as well.

Few questions.

  • Is it possible to use VIM2 on an unmodified/mainline kernel or it needs to be patched?
  • If it is possible then which kernel supports the most stuff?
  • Is the armbian the only feasible option for Linux distribution or Debian for aarch64 should work too?
  • Both building image and uploading instructions and scripts are heavily Ubuntu-centric, did someone see Debian based instructions/scripts or should I put it on my TODO list? :slight_smile:

regards
Bartek

there is debian

or collect your own

1 Like

You should be able to take the current upstream 4.20 kernel with no patches and boot a VIM2 but it won’t be that functional for media use and Kodi won’t run as there’s no Linux ARM mali blob to provide GLESv2. It is possible to use ‘panfrost’ which is still early-stage WIP as an alternative to Mali blobs and all the patches needed for Linux/Mesa/FFMpeg/Kodi to get a working system are available; mostly from a development branch that I curate for LibreELEC. @balbes150 and I collaborate on that together and his Armbian images are leveraging the same patch-sets. So it’s not impossible to replicate all the patching on Debian, but some of the patch-sets are large and unless you’ve been tracking our work for a while and are familiar with all the moving parts it’s not going to be a simple task. I’d swallow some distro pride and use the already available Armbian images simply to avoid several weeks of effort trying to figure it all out. Once panfrost matures and more Amlogic mainline kernel support has gone upstream it’ll become easier to create an image, but I’d guesstimate we’re still a few kernel releases away from the patch-sets being down to a manageable size.

https://github.com/chewitt/LibreELEC.tv/tree/amlogic/projects/Amlogic/patches for some (not all) of the bit needed.

3 Likes

Thanks for explanation. Given the number of patches I’ll stick to existing images for now :wink:
Before I’ll dig into that is my assumption correct that images build with https://github.com/khadas/fenix will have all these patches included?

I tried few images and the only one that works for me is LibreELEC. Linux images fail in different ways. I wasn’t able to get prompt/login screen.

I’m testing images on my pendrive since I don’t want to overwrite existing Android on eMMC.
Tried those so far:
Armbian_5.73_Aml-s912_Debian_stretch_default_4.20.2_20190129.img
Armbian_5.75_Aml-s912_Debian_stretch_default_4.20.5_20190211.img
VIMs_Ubuntu-xfce-bionic_Linux-4.19_arm64_SD-USB_V20181030.img

All of them failed in some way. Don’t have output to paste here cause I’m still experimenting. I believe 5.73 was the closest one to actually give me login screen but it also failed.

Anyway is pendrive viable way to test those images or they’re just for SDCARD? I’m intentionally skipping eMMC images for now.

All systems are guaranteed to work on all VIM2 models. What medium do you use ? Did you carefully read the documentation on Armbian’s initial setup on first launch ?

Good to see you Oleg! I find you almost in every thread about VIM2 not only here but also on freaktab and armbian forums. Thanks a lot for being so active :wink:

Speaking about my experience so far. I’m still experimenting so I’m trying to launch Linux from pendrive aka USB stick.

And speaking about initial setup what exactly do you mean? I think I followed all necessary steps. I’m preparing that stick on my Linux desktop and here’s what I’m doing in short:

  • plug in USB stick
  • dd if=some.img of=/dev/sdb bs=8M && sync
  • unplug and plug in again
  • copy BOOT/dtb/vim2 BOOT/dtb.img
  • eject /dev/sdb
  • plug USB stick into Khadas running Android from eMMC
  • update with aml_something.zip to force VIM2 to reboot from external drive

And then VIM reboots few times and depending on image shows just Khadas logo or some weird errors during bootup - I know “weird errors” is stupid answer here but I didn’t write them down to share yet, will do that for sure if I won’t be able to get it working but for now I’m just experimenting as I said.

One question though… should that dtb.img be put in / (root) of /dev/sdb1 which is vfat partition or it should be put on / (root) of ROOTFS partition which is ext4 one? That part is not clear for me.

  1. Use only special programs to write the image (do not use dd to write the image). This has been discussed many times, at the Armbian forum. After burning the image through DD, many get the strangest results or don’t work at all.
  2. If you are using the right image right away (s912 in the name), there are no manual additional steps (after burning the image to SD or USB). Recorded an image and immediately use it on VIM2.

Ok this time I tried to write images with Etcher (with verify option) and the results are the same.

Armbian_5.75_Aml-s912_Debian_stretch_default_4.20.5_20190211.img
https://drive.google.com/file/d/1X3HYGMREIfos8LprnA2jNZvbyZFAEuJV/view?usp=sharing

Armbian_5.73_Aml-s912_Debian_stretch_default_4.20.2_20190129.img
https://drive.google.com/file/d/1qfadurHvaa_mAzBlBUpE1V6u0ygeM2GY/view?usp=sharing

VIMs_Ubuntu-xfce-bionic_Linux-4.19_arm64_SD-USB_V20181030.img
just Khadas logo after one reboot

Does it mean that my USB stick is broken?
I tried to test it with f3 tools and all f3probe/f3write/f3read work fine with it.
Is it too slow?

Forgot to say that it’s not exactly the same as previously. In case of 5.75 I got prompt as you can see on a screenshot. After entering login and password I’m being asked for change of password and when I enter new password I’m getting login prompt again and old/default password works but asks me to change password…

Did you have to enter the new password twice for verification?

Nope. After first one I got prompt again.

Did you have to create a new user as well?
I have not done this in a while, I admit I am a little rusty.
I will try the image tonight. It will be a few hours before I get to the VIM2. Let you know what I find, if you have not found a solution by then.

I made an SD card from the Armbian_5.75_Aml-s912_Debian_stretch_default_4.20.5_desktop_20190222 image using the HDD RAW copy program.
I booted the SD card from a USB card reader. (Assumes aml_autoscript has already been run via Android update).
You will enter root/1234 to login
When asked to create a new root password, you will first have to reenter the original root password 1234(I missed this the first attempt and was back at the original login).
Then you will be required to enter the new password twice.
After that, you will need to enter a new user and password.
Login to desktop with root or the new user you created, using the respective password you created.
After that you should boot to the Armbian desktop where you will greeted by Tux. :slight_smile:

You have all right started and the system waits for the initial settings. Described in the documentation Armbian and there is a thread about Armbian on this forum.

For this version, if I’m not confused, you need to configure the DTB used (the option for VIM1 is enabled by default). I do not remember how this version is configured DTB, perhaps there is a need to replace the file "dtb.img " on version from VIM2. For an accurate hint, it is necessary to look at the contents of the FAT section (what files are there).

You do not pass the test for the rules of creating a new password for ROOT under the security conditions. :slight_smile:

Ok looks like all my problems were related to that USB stick… no idea why as it works with LibreELEC and it works in bunch of different scenarios flawlessly. It just simply doesn’t work with Armbian or any other Linux images and throws weird ext4 related errors and as an effect I wasn’t able to even change password at initial login.

Nevermind. Happily I had 128GB SD CARD from my drone and some card reader around so I flashed that card and now Armbian starts without any error. I was able to easily change password and set up new user.

Now I’m trying to launch WIFI and there are no modules dhd nor wifi_dummy.
Should they be available in Armbian_5.75_Aml-s912_Debian_stretch_default_4.20.5_20190211.img?
Is there any other way to get wifi working? Don’t have access to wired network at current place :confused:

I’ve just found out in other thread that WIFI on VIM2 Pro works only with 3.x kernel :confused:

Try kernel 4.9
https://docs.khadas.com/vim2/FirmwareUbuntu.html

VIMs_Ubuntu-xenial_Linux-4.9_mate_arm64_SD-USB_2018-05-31.img doesn’t boot for me. VIM2 stuck at Khadas logo. Or maybe with this one the magic with dtb is needed?

Now downloading VIMs_Ubuntu-xenial_Linux-3.14_mate_arm64_SD-USB_2018-05-31.img for test.

Just a quick note for others. Both 4.9 and 3.14 images need proper dtb to be copied prior to booting otherwise they just hang at Khadas logo.

3.14 has working WIFI. 4.9 doesn’t.