Odroid C2 mainline kernel support

Moderators: mdrjr, odroid

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sun Aug 13, 2017 4:14 am

daggs wrote:
daggs wrote:
brad wrote:
daggs wrote:any ideas?


The hk uboot wont load mainline kernel via an Image format you need to use a uImage format so it can load from the correct entry point by using the mkimage command.
Code: Select all
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux -d arch/arm64/boot/Image uImage

ok, one question, whats the diff between uImage and Image?

found the diff, ignore.
will try your suggestion, thanks.

kudos! it works :) thanks.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sun Aug 13, 2017 4:43 am

a question, any idea why fdt addr ${dtb_loadaddr} doesn't work in kernel 4.12.5 based kernel?
also has anyone been able to boot latest kernel with hdmi output?
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Aug 13, 2017 7:08 am

daggs wrote:a question, any idea why fdt addr ${dtb_loadaddr} doesn't work in kernel 4.12.5 based kernel?
also has anyone been able to boot latest kernel with hdmi output?


It should work fine, that command sets the location of the fdt that is already loaded into memory (You must load it first)

For example consider the following boot.ini section...
Code: Select all
# Command to load the uImage into memory
setenv kernel  "fatload mmc 0:1 0x1080000 uImage"
# Command to load the devicetree into memory
setenv dtb     "fatload mmc 0:1 0x1000000 meson-gxbb-odroidc2.dtb"
# Command to boot into the new kernel once everything is loaded
setenv bootseq "bootm 0x1080000 - 0x1000000"
# Command to modify a devicetree loaded into ram (Firstly sets the location in ram where we have loaded the devicetree and then modifies the device tree to enable cpufreq)
setenv dtbmods "fdt addr 0x1000000; fdt set /scpi/clocks status okay;"
# This is the action command where everything actually happens and we actually run the commands defined above.
# ${kernel} - This runs the command to load the kernel image into ram
# ${dtb} - This runs the command to load the devicetree into ram
# ${dtbmods} - This command modifies the devicetree we just loaded into ram
# ${bootseq} - This command boots the kernel using the kernel and devicetree which are currently in ram
setenv bootcmd "${kernel}; ${dtb}; ${dtbmods}; ${bootseq}"
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sun Aug 13, 2017 5:16 pm

ok so something I'm doing wrong:
Code: Select all
cfgload: setenv dtb_loadaddr "0x1000000"
cfgload: setenv kernel  "fatload mmc 0:1 ${loadaddr} uImage"
cfgload: setenv dtb     "fatload mmc 0:1 ${dtb_loadaddr} meson-gxbb-odroidc2.dtb"
cfgload: setenv bootseq "bootm 0x1080000 - 0x1000000"
cfgload: setenv bootcmd "${kernel}; ${dtb}; ${bootseq}"
cfgload: fdt addr ${dtb_loadaddr}
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sun Aug 13, 2017 5:29 pm

daggs wrote:ok so something I'm doing wrong:
Code: Select all
cfgload: setenv dtb_loadaddr "0x1000000"
cfgload: setenv kernel  "fatload mmc 0:1 ${loadaddr} uImage"
cfgload: setenv dtb     "fatload mmc 0:1 ${dtb_loadaddr} meson-gxbb-odroidc2.dtb"
cfgload: setenv bootseq "bootm 0x1080000 - 0x1000000"
cfgload: setenv bootcmd "${kernel}; ${dtb}; ${bootseq}"
cfgload: fdt addr ${dtb_loadaddr}
libfdt fdt_check_header(): FDT_ERR_BADMAGIC

ignore yet again, found the issue.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sun Aug 13, 2017 10:14 pm

I wonder, what is the level of hdmi support in 4.12.x following the kernel patches?
I do see both
Code: Select all
CONFIG_DRM_MESON=y
CONFIG_DRM_MESON_DW_HDMI=y

in the provided config but somehow I think the support is minimal at best.
also, there is no mali reference, it needs mali out of tree support, am I correct?
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby best_odroidfreak » Sun Aug 13, 2017 10:31 pm

What is needed for Odroid C2 audio is a general purpose I2S driver which can have its parameters set by editing a text file. We would need to be able to choose master/slave and I2S, left-justified or right-justified output format. Can any body modify this driver?
best_odroidfreak
 
Posts: 364
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby mad_ady » Sun Aug 13, 2017 11:14 pm

@best_odroidfreak: I've seen you ask this question again and again. I'm guessing the answer is no - unless you plan on writing it yourself... Just asking it on the forum won't make it magically appear
User avatar
mad_ady
 
Posts: 2595
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Mon Aug 14, 2017 11:10 pm

A number of new I/O schedulers options have been introduced into 4.12 kernel including Budget Fair Queuing (BFQ) which is of particular interest (for me) for a Desktop based machine accessing disk over emmc or sd. I haven't been successful in using this IO scheduler on the c2 as yet due to to some crashes and core dumps when emmc initialises but this is testing with an early version of 4.12. I feel it wont be too far away.

I have also been attempting to test the I2S sound but my setup is too complex for the moment (I can communicate via i2c to control a uda1380 but I need to work out an ALSA machine driver for the board to link the i2S).

I don't have HDMI working on any standard release and haven't played with mali any more but I do have HDMI working with Neil Armstrong's patches on a 4.12.3 stable (https://github.com/superna9999/meta-mes ... son64-4.12). Audio via HDMI I could not make work via Ubuntu but I had no problems at all adding usb sound support in kernel config and using the hardkernel usb sound card with no pops or crackles. I was watching random youtube music video's for approx 2 hours and never came across a pop or click in audio (using alsa only no pulseaudio) and only the occasional really noticeable tear in video in Chromium. (and that was while compiling a kernel with 2 threads (ie make -j2)). IO performance (using standard CFQ scheduler) using Neil's patches and 4.12 was also quiet reasonable and consistent. I haven't done any NFS testing or stressing the network but it streamed YouTube video OK Ive done no IO throughput testing with disk; as yet.

Ive found it to be the most responsive kernel ever to date for web browsing using hardkernel Ubuntu, X11 and multi-tabbed Chromium (or Fiirefox) . The downfalls are I dont have HDMI audio and I have a very thin purple line down the very left side of my screen.
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby Flole » Mon Aug 14, 2017 11:27 pm

Hi brad,

does the kernel you're talking about has NFS Root FS Support and DHCP Support compiled in and does USB work? If yes could you share that one with me? I am using the c2 as a server so HDMI and Audio stuff doesn't bother me, just the not working USB is causing problems as I need to connect a USB RS485 Interface now.

Greets

Flole
Flole
 
Posts: 11
Joined: Thu Apr 13, 2017 10:14 pm
languages_spoken: english, german
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Tue Aug 15, 2017 4:34 am

In general it would be informative to know who in this thread is contributing to what upstream efforts, i.e. when Brad says he has something working, what repos does that effect, does linux-meson.org reflect it, is it in the upstream linux-next &c.
campbell
 
Posts: 189
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby brad » Tue Aug 15, 2017 5:02 pm

Flole wrote:Hi brad,

does the kernel you're talking about has NFS Root FS Support and DHCP Support compiled in and does USB work? If yes could you share that one with me? I am using the c2 as a server so HDMI and Audio stuff doesn't bother me, just the not working USB is causing problems as I need to connect a USB RS485 Interface now.

Greets

Flole


This is the standard 4.13.0-rc4 prebuilt with some additional drivers enabled including NFS, dhcp, GPIO sysfs export, usb audio & usb serial. hdmi is not working in this version for me.
http://repo.builtonline.net/testing/custom/4.13.0-rc4/

The instructions here should work viewtopic.php?f=135&t=22717&start=250#p188335

Replace the file names with these for 4.12.0-rc4

Modules - http://repo.builtonline.net/testing/cus ... les.tar.gz
uImage - http://repo.builtonline.net/testing/cus ... rc4/uImage
devicetree - http://repo.builtonline.net/testing/cus ... roidc2.dtb

You can use the same boot.ini as previous http://repo.builtonline.net/testing/cus ... g/boot.ini


I will upload a version of 4.12 stable with Neil's in development patches for HDMI as soon as I can on my slow net connection.
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Tue Aug 15, 2017 6:24 pm

campbell wrote:In general it would be informative to know who in this thread is contributing to what upstream efforts, i.e. when Brad says he has something working, what repos does that effect, does linux-meson.org reflect it, is it in the upstream linux-next &c.


The only contribution I have really been making is testing and attempting to provide information in these threads of my experiences. When I look back the first standard kernel I got to boot was 4.6 with NFS boot and very minimal support which was over 12 months ago now. Since that time many developers (much work done and maintained by Baylibre) contributed to many aspects of where it is now with the work done across various repositories. I normally try to explain which repo's I am using and what patches are applied. I tend not to use next versions too much at the moment I have been testing with stable 4.12.3 patched for what I need.

I have been mostly testing and playing with audio (usb and attempting I2S) when I have the time, using alsa and the jack sound server. The part I dont have working the way I want is an ALSA platform driver for the I2S interface connected to a uda1380 board via i2c control. Its consumed quiet a bit of my time lately.

best_odroidfreak wrote:What is needed for Odroid C2 audio is a general purpose I2S driver which can have its parameters set by editing a text file. We would need to be able to choose master/slave and I2S, left-justified or right-justified output format. Can any body modify this driver?


I would love to have a driver like this also (especially for testing) but I think any config will have to go into the device tree rather than a plain text file although you could probably add it easily to the dtb in uboot via boot.ini commands. I dont have an oscilloscope to check any pins at the moment (and my hdmi audio is not working for whatever reason) but hdmi audio generates i2s output at the same time so once hdmi is implemented into the kernel fully we should have I2S on the pins also. When this happens it should give a basis for a driver to achieve what you are looking for easily.
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby best_odroidfreak » Wed Aug 16, 2017 5:33 am

brad wrote:
campbell wrote:In general it would be informative to know who in this thread is contributing to what upstream efforts, i.e. when Brad says he has something working, what repos does that effect, does linux-meson.org reflect it, is it in the upstream linux-next &c.


best_odroidfreak wrote:What is needed for Odroid C2 audio is a general purpose I2S driver which can have its parameters set by editing a text file. We would need to be able to choose master/slave and I2S, left-justified or right-justified output format. Can any body modify this driver?


I would love to have a driver like this also (especially for testing) but I think any config will have to go into the device tree rather than a plain text file although you could probably add it easily to the dtb in uboot via boot.ini commands. I dont have an oscilloscope to check any pins at the moment (and my hdmi audio is not working for whatever reason) but hdmi audio generates i2s output at the same time so once hdmi is implemented into the kernel fully we should have I2S on the pins also. When this happens it should give a basis for a driver to achieve what you are looking for easily.

Maybe Botic Linux driver for BeagleBone Black (32-bit Micro Computer) can be modified for Odroid C2 needs? See that links:
http://www.diyaudio.com/forums/twisted- ... river.html
http://bbb.ieero.com/
http://www.diyaudio.com/forums/twisted- ... black.html
Botic repository http://repo.ieero.com/botic/pool/main/l/linux-upstream/
Latest Botic driver sources https://github.com/miero/linux-dev
Latest Botic driver sources https://github.com/miero/botic-dev
best_odroidfreak
 
Posts: 364
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby daggs » Thu Aug 17, 2017 12:14 am

brad wrote:I don't have HDMI working on any standard release and haven't played with mali any more but I do have HDMI working with Neil Armstrong's patches on a 4.12.3 stable (https://github.com/superna9999/meta-mes ... son64-4.12).

tried it, the image doesn't boot even.
serial reports this:
Code: Select all
GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:1;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:;

my version works but for some reason, I think the probe part doesn't works, for example the mali module is loaded but I don't see any detection result.
another example is a usb dongle that gets detected if it is plugged at boot but it doesn't gets detected if I plug it while the system is running.
even if I load all the required modules, it still stays undetected.
the system is sysvinit + eudev based.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby Flole » Thu Aug 17, 2017 6:55 am

For me the image works perfectly, everything I need is working without any issues. My USB Serial converter gets recognized and I can boot from NFS with DHCP. Thanks brad for the awesome work!
Flole
 
Posts: 11
Joined: Thu Apr 13, 2017 10:14 pm
languages_spoken: english, german
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Thu Aug 17, 2017 4:27 pm

daggs wrote:serial reports this:
Code: Select all
GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:1;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:;



This appears to be a problem with your uboot / bootloader rather than the kernel, Its not loading into uboot.
daggs wrote:my version works but for some reason, I think the probe part doesn't works, for example the mali module is loaded but I don't see any detection result.
another example is a usb dongle that gets detected if it is plugged at boot but it doesn't gets detected if I plug it while the system is running.
even if I load all the required modules, it still stays undetected.
the system is sysvinit + eudev based.


There was a bug in some versions where if only 1 usb device is plugged in then it does not get detected. Would be interested to know if plugging in another device (anything just so 2 devices are connected) makes your dongle work?
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby Flole » Thu Aug 17, 2017 8:59 pm

I think I had that USB Device Issue aswell. My USB RS485 Converter does not have any LEDs on it, so when it didn't work I used a different Device that has LEDs on another port to see if the device was getting power. The device did not light up but when I switched ports they both started magicallly working.
Flole
 
Posts: 11
Joined: Thu Apr 13, 2017 10:14 pm
languages_spoken: english, german
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Fri Aug 18, 2017 2:11 am

Flole wrote:For me the image works perfectly, everything I need is working without any issues. My USB Serial converter gets recognized and I can boot from NFS with DHCP. Thanks brad for the awesome work!

I did what the how to said.
used debian 8.9, the only issue I had is sanity check on the kernel failed so I had to match the version of kernel to the one on the scripts
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Fri Aug 18, 2017 2:13 am

brad wrote:
daggs wrote:serial reports this:
Code: Select all
GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:1;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:;


I know, that is what I find weird.

brad wrote:This appears to be a problem with your uboot / bootloader rather than the kernel, Its not loading into uboot.
daggs wrote:my version works but for some reason, I think the probe part doesn't works, for example the mali module is loaded but I don't see any detection result.
another example is a usb dongle that gets detected if it is plugged at boot but it doesn't gets detected if I plug it while the system is running.
even if I load all the required modules, it still stays undetected.
the system is sysvinit + eudev based.


There was a bug in some versions where if only 1 usb device is plugged in then it does not get detected. Would be interested to know if plugging in another device (anything just so 2 devices are connected) makes your dongle work?

but the device does work when I make sure it is connected before boot.
also, as said, there is no mali specific print about the gpu version, only that the module is loaded.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby brad » Fri Aug 18, 2017 4:49 pm

daggs wrote:but the device does work when I make sure it is connected before boot.
also, as said, there is no mali specific print about the gpu version, only that the module is loaded.


For the USB I think yes you a right there is a bug.

In regards to Mali I dont think their are any drivers which will work (user-space is missing), I only had HDMI working with DRM, no mali
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Fri Aug 18, 2017 10:28 pm

brad wrote:
daggs wrote:but the device does work when I make sure it is connected before boot.
also, as said, there is no mali specific print about the gpu version, only that the module is loaded.


For the USB I think yes you a right there is a bug.

:-/ hope it will be fixed soon

brad wrote:In regards to Mali I dont think their are any drivers which will work (user-space is missing), I only had HDMI working with DRM, no mali

I don't need more, I just need the ability to run kodi with hw decoding support.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby Holzhaus » Sat Aug 19, 2017 4:48 am

Mali is the GPU driver and handles 3D acceleration, video decoding is handled by the VPU.
Holzhaus
 
Posts: 162
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sat Aug 19, 2017 6:01 am

Holzhaus wrote:Mali is the GPU driver and handles 3D acceleration, video decoding is handled by the VPU.

ok, so how do I know the vpu is working? I see no hint that is working,
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby rpcameron » Sat Aug 19, 2017 7:08 am

daggs wrote:
Holzhaus wrote:Mali is the GPU driver and handles 3D acceleration, video decoding is handled by the VPU.

ok, so how do I know the vpu is working? I see no hint that is working,

Kodi must be built with amcodec support. To check if it is working while playing a video, bring up the codec screen ('o' on the keyboard by default). It will show you the details of the stream it is playing, including the decoder. Look for something similar to 'hw amcodec' or similar. You'll usually also be able to tell because of the screen going black and taking a bit to return to the Kodi UI as it resets the hardware framebuffer. Remember though, the Linux support for amcodec isn't quite on par with omx, vaapi or other hw accelerated methods, at least in my experience.
rpcameron
 
Posts: 252
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sat Aug 19, 2017 2:48 pm

imho the issue is as follows.
every kernel driver provides a probe func which is called to detect the device.
the prints I've seen above come from the init of the module, digging into the code shows that there are unconditional prints in the probe function.
they as MIA in dmesg => probe isn't called.
there won't be any support until there will be prints from the probe func.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sat Aug 19, 2017 10:08 pm

I've decided to look into the yocto generated images (even if they don't boot), there is no such file in there.
so this yocto image generator doesn't include mali.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Aug 20, 2017 7:57 am

daggs wrote:I've decided to look into the yocto generated images (even if they don't boot), there is no such file in there.
so this yocto image generator doesn't include mali.


For the yocto full image (kernel, uboot and Openembeded rootfs) to work I had to assemble the bootloader together manually for the odroid c2. This was with the Korgoth version of yocto image and it worked fine with HDMI output.

The yocto builf also includes a recipe to download build and install the mali driver for kernel side - https://github.com/superna9999/meta-mes ... el-modules

Mali must also have userspace libraries compatible with the kernel side driver above, these effectively do not exist for the odroid C2 so Mali is incomplete and will not work. (see this thread viewtopic.php?f=135&t=26969)

Neil has a experimental version of Mali userspace drivers but I could not get them working effectively. https://github.com/superna9999/meson_gx_mali_450

These produce userpace libraries (nothing to do with the kernel) and must be incorporated into the libraries on your root filesystem. This is the libMali.so shared library.

I was hoping hardkernel would assist to produce some userspace drivers for testing at least for Mali but there is no new news as far as im aware from hardkernel on this front.
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby crashoverride » Sun Aug 20, 2017 8:18 am

brad wrote:I was hoping hardkernel would assist to produce some userspace drivers for testing at least for Mali but there is no new news as far as im aware from hardkernel on this front.

It may be worthwhile to test this:
https://github.com/rockchip-linux/libmali/tree/rockchip/lib/aarch64-linux-gnu

The "libmali-utgard-2th-r7p0-gbm.so" should be for Mali-450 with DRM/GBM platform integration. The device tree should hopefully abstract the important differences (MP2 vs MP3, etc). Despite the long file name, it is "libmali.so" and should be symlinked as such (libEGL.so, libGLES*, etc).

[edit]
For Mali-450, I think the kernel driver needs to match the user space driver. The kernel driver can be found here:
https://github.com/rockchip-linux/kernel/tree/release-4.4/drivers/gpu/arm
crashoverride
 
Posts: 3078
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 mainline kernel support

Unread postby daggs » Mon Aug 21, 2017 2:55 am

what I need is the ability to run kodi + hw decoding. I don't need nothing else.
I want to do it on latest kernel so I can benefit my dtb-t dongle and the better nfsv4 support.
for that I need the kernel driver and the egl libs which already exists.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby crashoverride » Mon Aug 21, 2017 3:17 am

daggs wrote:what I need is the ability to run kodi + hw decoding. I don't need nothing else.

to run kodi+hw decoding, you need everything! Kodi has many dependencies: GPU and VPU among them.
crashoverride
 
Posts: 3078
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 mainline kernel support

Unread postby daggs » Mon Aug 21, 2017 4:08 am

well, I'm using buildroot, kodi is there, the egl libs are too, kernel 4.12.x boots, whats missing is the gpu driver.
from what I understood from Neil, the driver in his yocto branch should provide that.
daggs
 
Posts: 191
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby asavah » Wed Aug 23, 2017 8:17 am

daggs wrote:well, I'm using buildroot, kodi is there, the egl libs are too, kernel 4.12.x boots, whats missing is the gpu driver.
from what I understood from Neil, the driver in his yocto branch should provide that.


It's not a single driver you need, in arm world you need to a whole bunch of them, for full support it would be drm (kernel) + mali (kernel) + mali (userspace)
It's very well explained here http://forum.khadas.com/t/state-of-linu ... -s905x/497 (see posts by narmstrong)

Currently we do not have working mali for odroid-c2 on 4.12+

Because viewtopic.php?p=192622#p192622
odroid wrote:We've looked into the meson-DRM driver in C2 Kernel 4.12 to activate the Mali GPU on X11/Linux.
But the DRM driver has many missing functions and we can't port our Mali driver.
We can try the FBDEV version only at this moment. But it was already available in BayLibre's Quake 3 Arena demo.
Unfortunately, we have no skill to implement the DRM driver. So we have to wait until someone implements the fully working DRM driver.


For Kodi hw video decoding we would also need the kernel part of vpu driver, which is absolutely missing.

Currently 4.12 and higher kernel's with needed patches make it good for headless use, but in it's current state forget about desktop or Kodi.

[rant]
I don't get why hardkernel even are selling odroid-c2 board if they "have no skill" to support it.
Current hardkernel's 3.14 kernel is an outdated, buggy, vulnerable (unpatched CVEs) piece of something.
While the board is actually very nice poor software support and absolute lack of skill of harkernel's staff is killing it.
[/rant]
asavah
 
Posts: 8
Joined: Sat Jul 16, 2016 7:00 am
languages_spoken: english
ODROIDs: c2

Re: Odroid C2 mainline kernel support

Unread postby crashoverride » Wed Aug 23, 2017 2:44 pm

asavah wrote:I don't get why hardkernel even are selling odroid-c2 board if they "have no skill" to support it.

The statement was "to implement the DRM driver". I don't know of any SBC vendor that has implemented a DRM driver. That is a job done by the SoC vendor (Amlogic in this case).

asavah wrote:Current hardkernel's 3.14 kernel is an outdated, buggy, vulnerable (unpatched CVEs) piece of something.

Red Hat Linux seems to manage a multi-million dollar industry based on an even older 3.10 kernel that they will continue to use for several more years. If running 4.x is of vital importance, the C2 offers that capability today in a VM just like massive datacenters running RH Enterprise Linux do.

asavah wrote:While the board is actually very nice poor software support and absolute lack of skill of harkernel's staff is killing it.

I have yet to see a vendor offering an open hardware board that provides anywhere close to the level of support that HardKernel does. There are a ton of Android S9xx boxes and even other S905 board vendors. What level of support for 4.x are they providing?

TL;DR = There is no 4.x kernel released yet. Its premature to complain about "lack of support" for something that does not exist.

The opinions expressed are my own. I do not work for or have any relation to HardKernel, Amlogic or any other S9xx vendor.
crashoverride
 
Posts: 3078
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 mainline kernel support

Unread postby brad » Wed Aug 23, 2017 5:44 pm

crashoverride wrote:Red Hat Linux seems to manage a multi-million dollar industry based on an even older 3.10 kernel that they will continue to use for several more years. If running 4.x is of vital importance, the C2 offers that capability today in a VM just like massive datacenters running RH Enterprise Linux do.


I think its quiet unfair to compare Redhat with Hardkernel for kernel version. Redhat is a multi-billion dollar industry with a large group of developers providing a very stable fully supported OS with some very large clients. The base kernel release is fully supported upstream, important kernel features & bug fixes upstream are back-ported to Redhat and bugfixes Redhat find are forward-ported upstream. The Linux kernel developers Report for 2017 should be out almost now and I think Redhat will have made some large contributions. It will be interesting to see how much work towards aarch64 Redhat have contributed this year.
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby crashoverride » Thu Aug 24, 2017 2:49 am

As a developer, I can only express that kernel 4.x is unlikely to solve what ever problem you currently have. For any single problem it does solve, it usually adds one or more new problems. For proof of this axiom, look no further than the contents of this thread.

For any type of graphics application, Kernel 4.x is a development nightmare. Development nightmares are always followed by support nightmares. Simply look at "what is missing": DRM/KMS, GPU, VPU. These components are challenging to implement because the Kernel APIs are all poorly designed. Its not an issue of "skill" as much as it is that its simply not possible yet to express certain concepts. A good example of this is the "hidden" feature that makes C2 (S9xx) stand out above the rest: ARM Framebuffer Compresson (AFBC). Without this feature, 4K@60 is not obtainable. Another good example is the hardware bitblit engine (GE2D). The current 3.x kernel internally uses it; however, there is no way to express multi source alpha blended blits in the V4L drivers that kernel 4.x insists on.

TL;DR = For graphics, wait for Kernel 5.x. For "headless", run 4.x in a VM. None of the 4.x issues have anything to do with HardKernel, and HardKernel is not responsible for any of them.
crashoverride
 
Posts: 3078
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 mainline kernel support

Unread postby Holzhaus » Thu Aug 24, 2017 5:42 am

crashoverride wrote:Another good example is the hardware bitblit engine (GE2D). The current 3.x kernel internally uses it; however, there is no way to express multi source alpha blended blits in the V4L drivers that kernel 4.x insists on.


Isn't there a v4l2 driver by endlessm? It's just a wrapper for the Amlogic implementation though:

https://github.com/endlessm/linux-s905x/tree/master/drivers/media/platform/meson

crashoverride wrote:For graphics, wait for Kernel 5.x. For "headless", run 4.x in a VM.


The Kernel doesn't use semantic versioning, so missing features could very well be implemented in a 4.x kernel.
Holzhaus
 
Posts: 162
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)

Re: Odroid C2 mainline kernel support

Unread postby campbell » Thu Aug 24, 2017 6:15 am

I've mentioned this before but it bears repeating: running 3.14.x native and 4.x in a VM does not protect you from all of the security holes in the 3.14.x kernel...
campbell
 
Posts: 189
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby crashoverride » Thu Aug 24, 2017 7:51 am

Holzhaus wrote:Isn't there a v4l2 driver by endlessm? It's just a wrapper for the Amlogic implementation though:

I will elaborate a bit on the subject even though I consider it off-topic.

V4L2 is the Video for Linux API. It was designed for analog TV capture cards and MPEG1 (not a typo) acceleration cards. Over the years various features have been "tacked on". The most recent and relevant of which are 1) video codec (M2M) and 2) video scaler (although not entirely new). The intention is to move away from proprietary libraries such aml_libs to a generic kernel API. This is in contrast to generic user space APIs such as OpenMax. If you compare the specification of V4L2 vs OpenMax it becomes quite apparent the limited support V4L offers. For the purposes of this discussion there two areas of interest: AFBC and 2-in-1-out 2D ROP. Also of interest is that HDMI 2.0 is also "still a work in progress" in kernel 4.x. This brings me to my next point.

Holzhaus wrote:The Kernel doesn't use semantic versioning

My use of the term "Kernel 5.x" is not meant to be taken literally. It is a metaphor for "the next major revision". Whether it is named 4.x, 5.x or 10.x is not relevant. The fact remains that currently mainline 4.x is not capable of expressing features that are currently implemented in 3.x. Since mainline will not accept "not invented here", it is necessary to wait for the "correct" people to have the "correct" discussions and implement the "correct" linux-ism for certain features. The 4.x is very much a moving target (alpha/beta level graphics support) so much so that DRM work from 4.4 is now considered obsolete. I expect there to be one more round of "throw everything away and start over" before the API is ready for production use. (Note that I am sure Linux DRM maintainers feel their API is "production" ready, but developers do not agree.) This is what is meant by "wait for Kernel 5.x".

campbell wrote:running 3.14.x native and 4.x in a VM does not protect you from all of the security holes in the 3.14.x kernel...

While everyone has their own unique constraints making security a very "personal" issue, I can only state that with a host OS that only sees the loopback (lo) adapter, the remote attack surface is quite small. I am uncertain what configuration is assumed that exposes "all of the security holes in the 3.14.x kernel".

Somehow I feel the need to express the follow: I am not preventing or advocating against kernel 4.x. In fact, I am already in preparation for supporting it. The point of the post(s) is to say, if you are going to "throw rocks", then throw them at those actually responsible. With the exception of Niel that posted earlier, I do not believe that anyone else posting has any involvement in the decisions or support of mainline 4.x including HardKernel.
crashoverride
 
Posts: 3078
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 mainline kernel support

Unread postby campbell » Thu Aug 24, 2017 4:02 pm

My main other reason not to do the VM thing: power consumption. And no, I don't mean the extra overhead of the VM itself - rather, that the 4.x kernel draws significantly less power (at least headless) than the 3.14 kernel. Best case scenario, with the VM thing you end up back where you started. My suspicion is that the Hardkernel/Amlogic 3.14 kernel is hardcoded to turn some things on at powerup that the 4.x kernel makes optional (or hasn't implemented yet. I am watching closely to see if power consumption gets better or worse as the 4.x kernel matures...) For example, the 4.x kernel allows you to keep the USB regulator powered off by removing an entry from the device tree, saving 50 mW. I don't think there is any way to turn it off in the 3.14 kernel.
campbell
 
Posts: 189
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby brad » Fri Aug 25, 2017 11:08 am

crashoverride wrote:The point of the post(s) is to say, if you are going to "throw rocks", then throw them at those actually responsible. With the exception of Niel that posted earlier, I do not believe that anyone else posting has any involvement in the decisions or support of mainline 4.x including HardKernel.


I dont have any involvement with the mainline 4.x kernel and I hope im not being accused of throwing rocks with my Redhat comments. I choose 4.x as its capable of things I cannot achieve in 3.10.y including realtime thread performance, steady usb performance and updated ALSA subsystem drivers. Its also well documented (features and changes) which makes development much easier. My requirements differ from many in the fact that I dont require 4k Kodi (or Kodi at all). I do however utilise HDMI and the current mainline DRM from my testing performs better than 3.10.y inside X11. The new kernel is also supported by many other projects including RT kernel (runs out of the box), zfs on linux (3.10.y is forced 32 compat mode limiting pagesize and making virtual memory unusable for ZFS) and arm64 enchanced crypto algorithms using armv8 extensions, NEON and scaler functions. For my purposes 4.x is a clear winner.
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby crashoverride » Fri Aug 25, 2017 12:06 pm

brad wrote:I dont have any involvement with the mainline 4.x kernel and I hope im not being accused of throwing rocks with my Redhat comments.

My intent was not to "call anyone out" or make anyone feel bad. I too have my frustrations with 4.x support just on different hardware and with silicon from different vendors.

I saw this thread "taking a turn" earlier and knew it would end up at this point. Regretfully, I lack the social/communication skill to adequately illustrate or express why this thread is not the appropriate place for complaints. This is a "community helping community" thread. Its for those with advanced skill and knowledge. Its intended for those that understand that kernel 4.x is not currently expected to work and anyone using it should expect multiple issues. Additionally, those experiencing issues are expected to resolve them themselves. When there is a kernel 4.x that is expected to work, it will be "released" by HardKernel and official support will be offered.

Complains, bug-reports, feature requests and all other support requests currently should be directed to the Linux Kernel Mailing List. The reason for this is not arbitrary. As stated in my previous post, the reason is because nobody (except Niel) in this thread has any involvement with the decisions/patches/design/approval.

Specific to my use case is the recognition that 4.x is a disaster for anything touching the graphics pipeline. This should not affect anyone that intends to use it headless. However, for anyone wanting to run Kodi or other graphics based applications, be advised that Kernel 4.x is likely going to make things much worse before it makes them better. Furthermore, understand that Kernel 4.x is not a 'magic bullet' that is going to improve anything for the vast majority. Given the choice, I would wait for "Kernel 5.x".

For those interested, I am not aware of any modern ARM hardware where 4.x is working "great" and "everything is supported". Even on the ancient RPi, you still need the vendor non-mainline code to use the graphics hardware (GPU+Video).
crashoverride
 
Posts: 3078
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Odroid C2 mainline kernel support

Unread postby best_odroidfreak » Tue Aug 29, 2017 2:21 am

It is very disappointing that, despite all efforts by the international community to build new Linux kernel version 4... for Odroid c2 we haven't it yet!
best_odroidfreak
 
Posts: 364
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby mrengles » Wed Aug 30, 2017 3:29 pm

best_odroidfreak wrote:It is very disappointing that, despite all efforts by the international community to build new Linux kernel version 4... for Odroid c2 we haven't it yet!


You just need to look in the right place... The openSUSE Tumbleweed image uses the mainline kernel and u-boot for the Odroid-C2. It's been working great!

https://en.opensuse.org/HCL:OdroidC2
http://download.opensuse.org/repositori ... C2/images/

OpenSUSE Tumbleweed is a rolling release distro so the packages and kernel will always be current.

Regards,

Robert LaRocca
mrengles
 
Posts: 6
Joined: Thu May 04, 2017 11:58 pm
languages_spoken: English [US]
ODROIDs: Odroid C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Wed Aug 30, 2017 9:03 pm

Im actually quiet excited at the moment, we have 2 kernel version which run on the Odroid C2, One supported by hardkernel / amlogic and one still being fully developed into mainline kernel by mainline community. Both have their pros and cons and potentially different use cases. Id like to take this moment to thank Hardkernel (and Odroid community) for all of their hard work producing and supporting this amazing little aarch64 board, it works great and has some very nice features. Id also like to thank mainline kernel developers, particularly http://linux-meson.com guys for for the large amount of work that has gone into supporting S905 SOC, aarch64 architecture and the Odroid C2 in mainline.

I should also thank all the users in this forum who are asking questions, testing, reporting on experiences, providing solutions and engaging in the discussions.
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Thu Aug 31, 2017 8:06 am

Anybody else getting a kernel panic when they set scpi clocks to okay in the 4.13 RC? It was working in 4.12...

edit: it's not working in 4.12 either anymore. This is the Arch linux-aarch64 package.

Code: Select all
[    1.190507] cpu cpu0: bL_cpufreq_init: CPU 0 initialized
[    1.194210] Unable to handle kernel paging request at virtual address 00032808
[    1.199601] pgd = ffff000009584000
[    1.202964] [00032808] *pgd=000000007fffe003, *pud=000000007fffd003, *pmd=0000000000000000
[    1.211161] Internal error: Oops: 86000004 [#1] SMP
campbell
 
Posts: 189
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby umiddelb » Thu Aug 31, 2017 4:10 pm

campbell wrote:Anybody else getting a kernel panic when they set scpi clocks to okay in the 4.13 RC? It was working in 4.12...

edit: it's not working in 4.12 either anymore. This is the Arch linux-aarch64 package.

Code: Select all
[    1.190507] cpu cpu0: bL_cpufreq_init: CPU 0 initialized
[    1.194210] Unable to handle kernel paging request at virtual address 00032808
[    1.199601] pgd = ffff000009584000
[    1.202964] [00032808] *pgd=000000007fffe003, *pud=000000007fffd003, *pmd=0000000000000000
[    1.211161] Internal error: Oops: 86000004 [#1] SMP


Do you have installed the latest u-boot version?
umiddelb
 
Posts: 413
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Odroid C2 mainline kernel support

Unread postby campbell » Thu Aug 31, 2017 5:27 pm

Yes, via the uboot-odroid-c2-mainline Arch package: https://archlinuxarm.org/packages/aarch ... 2-mainline. Without it, the 4.x kernel doesn't boot at all.

Whatever the reason, scpi clocks still work fine on the Armbian mainline image, and do not under Arch.
campbell
 
Posts: 189
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power

Re: Odroid C2 mainline kernel support

Unread postby brad » Thu Aug 31, 2017 6:03 pm

campbell wrote:Yes, via the uboot-odroid-c2-mainline Arch package: https://archlinuxarm.org/packages/aarch ... 2-mainline. Without it, the 4.x kernel doesn't boot at all.

Whatever the reason, scpi clocks still work fine on the Armbian mainline image, and do not under Arch.


Looking at that package its using an old version of the bootloader from February so SCPI will crash the boot process. https://archlinuxarm.org/packages/aarch ... s/PKGBUILD
brad
 
Posts: 599
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby rpcameron » Fri Sep 01, 2017 5:49 am

brad wrote:
campbell wrote:Yes, via the uboot-odroid-c2-mainline Arch package: https://archlinuxarm.org/packages/aarch ... 2-mainline. Without it, the 4.x kernel doesn't boot at all.

Whatever the reason, scpi clocks still work fine on the Armbian mainline image, and do not under Arch.


Looking at that package its using an old version of the bootloader from February so SCPI will crash the boot process. https://archlinuxarm.org/packages/aarch ... s/PKGBUILD

No, the Arch mainline uboot is 2017.07. It uses the bl{20,30,301,31} files from HK's uboot, but the rest of it is the release version of 2017.07.
rpcameron
 
Posts: 252
Joined: Sat Apr 30, 2016 7:24 am
languages_spoken: english
ODROIDs: C2

PreviousNext

Return to General Chat

Who is online

Users browsing this forum: No registered users and 3 guests