Odroid C2 mainline kernel support

Moderators: odroid, mdrjr

Re: Odroid C2 mainline kernel support

Unread postby memeka » Tue Nov 27, 2018 8:13 am

@Eric, I would try DRM/KMS
User avatar
memeka
 
Posts: 4066
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid C2 mainline kernel support

Unread postby erich » Wed Nov 28, 2018 2:32 pm

memeka,
I've built kmscube to get a handle on how it should be done. It doesn't run. It's looking for meson_dri.so which won't exist on a non-X system :-(
I've got these packages installed:
mesa 18.2.5-1
dkms-mali-utgard-meson r6p1-2
mali-utgard-meson-libgl-fb r6p1-1

In my kernel (amlogic-4.19.4) I've got enabled:
CONFIG_DRM
CONFIG_DRM_FBDEV_EMULATION

It feels like I'm missing something simple, like I've got the wrong options/packages.
Any ideas?
erich
 
Posts: 8
Joined: Tue Nov 27, 2018 5:01 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Wed Nov 28, 2018 3:51 pm

erich wrote:memeka,
I've built kmscube to get a handle on how it should be done. It doesn't run. It's looking for meson_dri.so which won't exist on a non-X system :-(
I've got these packages installed:
mesa 18.2.5-1
dkms-mali-utgard-meson r6p1-2
mali-utgard-meson-libgl-fb r6p1-1

In my kernel (amlogic-4.19.4) I've got enabled:
CONFIG_DRM
CONFIG_DRM_FBDEV_EMULATION

It feels like I'm missing something simple, like I've got the wrong options/packages.
Any ideas?


Hi Eric,
Userspace mali requires the mainline mali kernel driver which can be found here and compiled against your kernel https://github.com/superna9999/meson_gx ... 1_meson_gx - I am not sure if the arch guys have an easier option for install as yet.

meson_dri.so is not required (and does not exist) so you can probably safely ignore that error. Do you know which libMali.so userspace drivers you have installed in arch? Following should show you if the libMali.so can use libdrm.so.....

$ readelf -d /usr/lib/aarch64-linux-gnu/libMali.so

I like your project and would like to see you succeed! I can try to get arch mali working in FB / drm mode on the weekend to see if there is anything odd in the setup.
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby erich » Wed Nov 28, 2018 4:06 pm

Brad,
Here's the output:
Code: Select all
$ readelf -d /usr/lib/mali/libMali.so

Dynamic section at offset 0x168f10 contains 29 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000010 (SYMBOLIC)           0x0
 0x000000000000000c (INIT)               0x33490
 0x000000000000000d (FINI)               0x14a724
 0x0000000000000019 (INIT_ARRAY)         0x175078
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x175080
 0x000000000000001c (FINI_ARRAYSZ)       16 (bytes)
 0x0000000000000004 (HASH)               0x180
 0x0000000000000005 (STRTAB)             0x15958
 0x0000000000000006 (SYMTAB)             0x4e28
 0x000000000000000a (STRSZ)              76217 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x1796d0
 0x0000000000000002 (PLTRELSZ)           2424 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x32b18
 0x0000000000000007 (RELA)               0x299f8
 0x0000000000000008 (RELASZ)             37152 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x29958
 0x000000006fffffff (VERNEEDNUM)         5
 0x000000006ffffff0 (VERSYM)             0x28312
 0x000000006ffffff9 (RELACOUNT)          1542
 0x0000000000000000 (NULL)               0x0

Between posts I did add the Mali450 driver to the kernel build and tried it again with the same results:
Code: Select all
$ ./kmscube
gbm: failed to open any driver (search paths /usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/meson_dri.so: cannot open shared object file: No such file or directory
failed to load driver: meson
failed to initialize
failed to initialize EGL


Is the source around for an amlogic libMali and gbm?

Thanks,
Eric
erich
 
Posts: 8
Joined: Tue Nov 27, 2018 5:01 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby erich » Thu Nov 29, 2018 4:36 pm

I spent the evening trying to build Mesa 18.2.6, but it requires DRI for EGL/gbm even with X11 support turned off.
erich
 
Posts: 8
Joined: Tue Nov 27, 2018 5:01 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Thu Nov 29, 2018 5:28 pm

erich wrote:Between posts I did add the Mali450 driver to the kernel build and tried it again with the same results:
Code: Select all
$ ./kmscube
gbm: failed to open any driver (search paths /usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/meson_dri.so: cannot open shared object file: No such file or directory
failed to load driver: meson
failed to initialize
failed to initialize EGL


Is the source around for an amlogic libMali and gbm?

Thanks,
Eric


Your userspace libMali.so is designed for original kernel so not really compatible. They only come as binaries, Amlogic do have a 4.9 version which supports DRM and arm released a version for hikey which works on C2

Amlogic version can be found buried in the buildroot - http://openlinux.amlogic.com:8000/downl ... ilesystem/
(Buildroot_Openlinux_Release_20180211_dl.tar.gz)

userspace driver for hikey board which works on C2 - https://developer.arm.com/products/soft ... user-space
(mali-450_r7p0-01rel0_linux_1arm64.tar.gz)

They are both releases of the shared libraries which include a file named libMali.so and some symlinks alias's back to it in a directory. There are some variants in the amlogic buildroot, eg wayland, X11 (and DRM) or framebuffer but I found the hikey version was the most compatible (with later kernels at least).

If the kernel module you tried loaded correctly then it should show up in modules

Code: Select all
$ lsmod | grep mali
mali                  245760  0
Last edited by brad on Thu Nov 29, 2018 8:24 pm, edited 1 time in total.
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby brad » Thu Nov 29, 2018 8:23 pm

brad wrote:Amlogic version can be found buried in the buildroot - http://openlinux.amlogic.com:8000/downl ... Linux_BSP/
(buildroot_openlinux_kernel_4.9_wayland_20180316.tar.gz)


Ooops, sorry it should be this one http://openlinux.amlogic.com:8000/downl ... _dl.tar.gz

located here http://openlinux.amlogic.com:8000/downl ... ilesystem/

Ill edit my other post I would hate someone to have to download the first link for nothing its huge (been there done that :oops: )
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby vbd » Fri Nov 30, 2018 2:18 am

Hi there,

For those of you building 4.x kernel for arch arm, would you mind sharing any special steps you might have done ? I run a little cluster of odroid c2 as a kubernetes / faas platform, I'm also hosting my own archlinux packages repository that gets populated by a build pipeline bound to my gitolite for continuous build delivery (might be "common" but I'm still proud) and I would like to add 4.x kernel to it so I can deploy it to my cluster's node with a bit more ease and automation.

I'll be home soon and try anyway but I thought: if asking would prevent me to run into some known issues, why not.

Thank you for the wonderful work you're all doing :).

edit: nevermind, I should have looked in the repositories for the mainline kernel and uboot before I wrote.
Last edited by vbd on Mon Dec 03, 2018 9:48 pm, edited 1 time in total.
vbd
 
Posts: 2
Joined: Thu Nov 29, 2018 8:58 pm
Location: France
languages_spoken: english, french
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby erich » Sun Dec 02, 2018 5:19 am

@brad:
I built the kernel module, the insmod reports success.
I installed the mali-450_r7p0-01rel0_linux_1+arm64 userspace and now kmscube runs but is running software rendering.
Code: Select all
./kmscube
gbm: failed to open any driver (search paths /usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/meson_dri.so: cannot open shared object file: No such file or directory
failed to load driver: meson
Using display 0xaaaac282d170 with EGL version 1.4
===================================
EGL information:
  version: "1.4 (DRI2)"
  vendor: "Mesa Project"
  client extensions: <SNIP>
===================================
OpenGL ES 2.x information:
  version: "OpenGL ES 3.0 Mesa 18.2.5"
  shading language version: "OpenGL ES GLSL ES 3.00"
  vendor: "VMware, Inc."
  renderer: "llvmpipe (LLVM 7.0, 128 bits)"


Still says it needs dri.
erich
 
Posts: 8
Joined: Tue Nov 27, 2018 5:01 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby erich » Sun Dec 02, 2018 8:52 am

@brad:
After starting over with the aarch64 defconfig and not paring down the kernel so much, IT WORKS!
I must have removed something essential that the kernelspace driver needed.

Thanks for all the help.
Eric
erich
 
Posts: 8
Joined: Tue Nov 27, 2018 5:01 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby erich » Sun Dec 02, 2018 9:02 am

DOH! I spoke too soon. Textures don't work.
Something is still broken with gbm.
Code: Select all
./kmscube -M rgba
Using display 0x1 with EGL version 1.4
===================================
EGL information:
  version: "1.4 Linux-r7p0-01rel0"
  vendor: "ARM"
  client extensions: "EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_platform_gbm EGL_KHR_platform_wayland "
  display extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_KHR_partial_update EGL_KHR_create_context_no_error "
===================================
OpenGL ES 2.x information:
  version: "OpenGL ES 2.0"
  shading language version: "OpenGL ES GLSL ES 1.00"
  vendor: "ARM"
  renderer: "Mali-450 MP"
  extensions: "GL_OES_texture_npot GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map GL_KHR_debug GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_mapbuffer GL_KHR_no_error"
===================================
./kmscube: symbol lookup error: ./kmscube: undefined symbol: gbm_bo_map
erich
 
Posts: 8
Joined: Tue Nov 27, 2018 5:01 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Mon Dec 03, 2018 6:40 pm

erich wrote:DOH! I spoke too soon. Textures don't work.
Something is still broken with gbm.
Code: Select all
./kmscube -M rgba
Using display 0x1 with EGL version 1.4
===================================
EGL information:
  version: "1.4 Linux-r7p0-01rel0"
  vendor: "ARM"
  client extensions: "EGL_EXT_client_extensions EGL_EXT_platform_base EGL_KHR_platform_gbm EGL_KHR_platform_wayland "
  display extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_KHR_partial_update EGL_KHR_create_context_no_error "
===================================
OpenGL ES 2.x information:
  version: "OpenGL ES 2.0"
  shading language version: "OpenGL ES GLSL ES 1.00"
  vendor: "ARM"
  renderer: "Mali-450 MP"
  extensions: "GL_OES_texture_npot GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map GL_KHR_debug GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_mapbuffer GL_KHR_no_error"
===================================
./kmscube: symbol lookup error: ./kmscube: undefined symbol: gbm_bo_map


It looks like more missing extensions in the libMali.so. I found an openembedded patch for kmscube which appears to work around the issue https://patchwork.openembedded.org/patch/148777/

Also upstream patch - https://patchwork.freedesktop.org/patch/167043/

Which version of kmscube is archlinux running?

@memeka could another solution be comparability library also?
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby memeka » Mon Dec 03, 2018 8:56 pm

I would try something else, like glmark2-es-drm.
User avatar
memeka
 
Posts: 4066
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid C2 mainline kernel support

Unread postby erich » Wed Dec 05, 2018 8:07 am

As a followup, the issue with the gbm_bo_map/gbm_bo_unmap is an older Mesa than the drivers were built with.
The good side is that it's not necessary for those functions to be present for GL to work properly, it's only an issue with the way kmscube was allocating textures.
In short, everything I need works fine. I've ported my app to KMS/DRM and it's working very well.

Thanks for your help everyone!

Eric
erich
 
Posts: 8
Joined: Tue Nov 27, 2018 5:01 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby memeka » Wed Dec 05, 2018 8:34 am

Great to hear.
I suspecting this to be the case :D
User avatar
memeka
 
Posts: 4066
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid C2 mainline kernel support

Unread postby tonymac32 » Sun Dec 09, 2018 1:55 pm

Hi guys,

I'm the individual working on the Armbian mainline support for Meson64, using primarily Neil's work. I've come across a snag on 4.19 where powering a board with nothing in the USB ports results in "dead ports". This looked a lot like the issue I saw with the Rockchip dwc2 hardware, however that fix did not rectify the issue with the Amlogic devices. Have any of you seen the same thing?

[EDIT] OK, I had applied the fix wrong, I stuck in the wrong routine (I'll blame lack of coffee, but...) I'm still getting strange behavior, it seems picky about what port and what device it likes to see as the first thing plugged in...

https://github.com/armbian/build/blob/m ... -fix.patch
tonymac32
 
Posts: 5
Joined: Sun Dec 09, 2018 1:50 pm
languages_spoken: english
ODROIDs: XU4 (liquid-cooled)
XU4-Q
C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Dec 09, 2018 5:41 pm

tonymac32 wrote:Hi guys,

I'm the individual working on the Armbian mainline support for Meson64, using primarily Neil's work. I've come across a snag on 4.19 where powering a board with nothing in the USB ports results in "dead ports". This looked a lot like the issue I saw with the Rockchip dwc2 hardware, however that fix did not rectify the issue with the Amlogic devices. Have any of you seen the same thing?

[EDIT] OK, I had applied the fix wrong, I stuck in the wrong routine (I'll blame lack of coffee, but...) I'm still getting strange behavior, it seems picky about what port and what device it likes to see as the first thing plugged in...

https://github.com/armbian/build/blob/m ... -fix.patch


Does a lsusb -v fix the problem? Believe their was some regression in 4.19 usb to be fixed in 4.20 and the workaround was the patch you listed above or a "lsusb -v".
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby tonymac32 » Mon Dec 10, 2018 12:06 am

lsusb -v? I have no idea, I really want to hear how setting the "verbose" switch wakes up the driver, that has to be interesting.

The description I got from the Rockchip fix:

Code: Select all
From: Hal Emmerich <hal@halemmerich.com>
Date: Thu, 19 Jul 2018 21:48:08 -0500
Subject: [PATCH] usb: dwc2: disable power_down on rockchip devices

 The bug would let the usb controller enter partial power down,
 which was formally known as hibernate, upon boot if nothing was plugged
 in to the port. Partial power down couldn't be exited properly, so any
 usb devices plugged in after boot would not be usable.

 Before the name change, params.hibernation was false by default, so
 _dwc2_hcd_suspend() would skip entering hibernation. With the
 rename, _dwc2_hcd_suspend() was changed to use  params.power_down
 to decide whether or not to enter partial power down.

 Since params.power_down is non-zero by default, it needs to be set
 to 0 for rockchip devices to restore functionality.

 This bug was reported in the linux-usb thread:
 REGRESSION: usb: dwc2: USB device not seen after boot


I've apparently spent the last several months (and everyone else testing my images) powering up with USB plugged in.
tonymac32
 
Posts: 5
Joined: Sun Dec 09, 2018 1:50 pm
languages_spoken: english
ODROIDs: XU4 (liquid-cooled)
XU4-Q
C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Mon Dec 10, 2018 5:38 am

tonymac32 wrote:lsusb -v? I have no idea, I really want to hear how setting the "verbose" switch wakes up the driver, that has to be interesting.


It was mentioned as a work around in #linux-amlogic channel and a fix would be coming 4.20 maybe? My understanding was that the dwc2 device is initialised ok but breaks when the controller is reset and put 4 port host only mode. lsusb- v integrates the controller and users were reporting it as a possible workaround. I never bothered as I always had a device plugged in on boot.
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby campbell » Mon Dec 10, 2018 2:52 pm

tonymac32 wrote:I've come across a snag on 4.19 where powering a board with nothing in the USB ports results in "dead ports". This looked a lot like the issue I saw with the Rockchip dwc2 hardware, however that fix did not rectify the issue with the Amlogic devices. Have any of you seen the same thing?

This sounds an awful lot like what I've been observing since at least 4.18. Go back a couple pages in this thread (viewtopic.php?f=135&t=22717&start=850#p231545) and you'll see a detailed summary.
campbell
 
Posts: 309
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 tonymac32 » Mon Dec 10, 2018 3:27 pm

campbell wrote:This sounds an awful lot like what I've been observing since at least 4.18. Go back a couple pages in this thread (viewtopic.php?f=135&t=22717&start=850#p231545) and you'll see a detailed summary.


Right, it seems to have appeared in 4.17. I've been testing with stuff plugged in it would seem, not testing a cold boot with no peripherals.

https://patchwork.kernel.org/patch/10720173/
tonymac32
 
Posts: 5
Joined: Sun Dec 09, 2018 1:50 pm
languages_spoken: english
ODROIDs: XU4 (liquid-cooled)
XU4-Q
C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Mon Dec 10, 2018 3:46 pm

tonymac32 wrote:
campbell wrote:This sounds an awful lot like what I've been observing since at least 4.18. Go back a couple pages in this thread (viewtopic.php?f=135&t=22717&start=850#p231545) and you'll see a detailed summary.


Right, it seems to have appeared in 4.17. I've been testing with stuff plugged in it would seem, not testing a cold boot with no peripherals.

https://patchwork.kernel.org/patch/10720173/


It appears some fixes for dwc2 reset issues are in 4.20-rc, can anyone confirm the issue with 4.20 ?

4.20 dwc2 driver history (rockchip board is added to mainline also in 4.20)
https://git.kernel.org/pub/scm/linux/ke ... rep&q=dwc2

Thanks,
Brad
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby brad » Mon Dec 10, 2018 5:30 pm

I asked developers and Neil mentioned the fix was pushed yesterday :)

I tested 4.20-rc6 with this patch successfully https://lore.kernel.org/linux-amlogic/2 ... l.com/T/#t

I now boot with no devices attached and they are detected when I plugin after boot (or disconnect / reconnect)
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby tonymac32 » Tue Dec 11, 2018 9:12 am

brad wrote:I asked developers and Neil mentioned the fix was pushed yesterday :)

I tested 4.20-rc6 with this patch successfully https://lore.kernel.org/linux-amlogic/2 ... l.com/T/#t

I now boot with no devices attached and they are detected when I plugin after boot (or disconnect / reconnect)


Right, that's the patch I linked to above, I'll adjust mine in case DWC2_POWER_DOWN_PARAM_NONE is something other than "0". I had shown Neil the fix I used the morning of the 9th, so everyone must have been coming up on it together. ;)

4.19 is set to be the next "default" Armbian image, with 4.20 + being "next" and "dev" as they appear and mature. I'm still having some ugly HDMI problems, so 4.19 might still be a little while before it hits users... (currently available as a nightly download from dl.armbian.com if anyone wants to make tests)
tonymac32
 
Posts: 5
Joined: Sun Dec 09, 2018 1:50 pm
languages_spoken: english
ODROIDs: XU4 (liquid-cooled)
XU4-Q
C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Tue Dec 11, 2018 12:17 pm

Patch will only work on 4.20-rc6 or greater as this is when dwc2 updates were pushed
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby tonymac32 » Tue Dec 11, 2018 2:39 pm

brad wrote:Patch will only work on 4.20-rc6 or greater as this is when dwc2 updates were pushed


Mine works on 4.19, tested across all of my S905 devices, so no worries.
tonymac32
 
Posts: 5
Joined: Sun Dec 09, 2018 1:50 pm
languages_spoken: english
ODROIDs: XU4 (liquid-cooled)
XU4-Q
C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Tue Dec 11, 2018 3:04 pm

tonymac32 wrote:Mine works on 4.19, tested across all of my S905 devices, so no worries.


That's great, was thinking it would only work after 4.20 updates to dwc2 but 4.19 has what is needed
brad
 
Posts: 734
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2 N1

Re: Odroid C2 mainline kernel support

Unread postby scpcom » Fri Dec 14, 2018 7:54 am

Update 20181208
- Kernel 4.19.8
- Added support for UMP in compat mode (mali-r6p2-2001-ump_hybrid.patch)
- Added support for Mali r5p1 (mali-r6p2-2002-mali_hybrid_v800.patch)
linux-4.19-odroidc2-build.tar.gz linux-image-4.19.8-20181208-c2-arm64.zip

Mali UMP now also works in compatiblity mode (64 bit arm64 kernel, 32 bit armhf linux/userland).
Additionally you can use r5p1 libs found in Amlogic buildroot.

The mali driver now works with r5p1, r6p2 and r7p0 Amlogic and Hardkernel builds armhf/arm64.
scpcom
 
Posts: 77
Joined: Thu Jun 23, 2016 8:07 am
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby fvolk » Fri Dec 14, 2018 7:53 pm

brad wrote:I now boot with no devices attached and they are detected when I plugin after boot (or disconnect / reconnect)


This is awesome! Finally! :-)

This was the missing piece to run a current kernel on a C2 in headless server mode, where one can attach/detach USB disks later as needed.

When will this land in a new server minimal install image - or is the only option "roll your own kernel" for now?
fvolk
 
Posts: 191
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1

Re: Odroid C2 mainline kernel support

Unread postby MrGlasspoole » Mon Dec 17, 2018 4:04 am

Sorry, but what image do i need to implement that: http://seafile.servator.de/sbc/odroid/n ... nstall.txt
And does it work with lite versions (no desktop)?

Because normally i use DietPi or Armbian.
MrGlasspoole
 
Posts: 24
Joined: Sat Dec 31, 2016 6:04 pm
languages_spoken: english, german

Previous

Return to General Chat

Who is online

Users browsing this forum: No registered users and 3 guests