Linux 3.16 LTS Kernel for Odroid C2

Moderators: mdrjr, odroid

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby tobetter » Thu Jun 07, 2018 10:42 pm

sebas wrote:Wouldn't the device tree entry + driver be just ignored if related device wasn't available?

On 3.14, the rtc driver was not part of kernel as it shared pin use with GPIO driver, which makes them exclusive. Since here it's already in the kernel, that reason is no longer applicable.

So if above (about ignoring) is true, could be included?

The device tree can enable the RTC driver by default and the driver won't be active when RTC component is not connected. Beside kernel boot would be slow since RTC device driver will encounter the timeout on an I2C bus due to missing RTC component.
tobetter
 
Posts: 2373
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby crashoverride » Fri Jun 08, 2018 2:48 am

sebas wrote:Wouldn't the device tree entry + driver be just ignored if related device wasn't available?

No, the driver would send out I2C data probing for the device. This could potentially conflict with another I2C device or cause boot delays.

sebas wrote:Since here it's already in the kernel, that reason is no longer applicable.

The RTC driver should be included in the kernel whether its used or not. The reason is that its available before any filesystems are mounted. If it is a module, the correct time will not be known until after a filesystem is mounted and the driver can be loaded. This behavior can affect certain use cases.

Traditionally, non-standard hardware is not included in device tree or the kernel.
crashoverride
 
Posts: 3924
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby moon.linux » Fri Jun 08, 2018 3:28 am

RTC module should have been continued from the C1+ to C2 series.
moon.linux
 
Posts: 1159
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby sebas » Sun Jun 10, 2018 2:50 am

Thx for the clarifications.
sebas
 
Posts: 3
Joined: Sun Oct 02, 2016 7:43 pm
languages_spoken: english
ODROIDs: C2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby crashoverride » Fri Jun 22, 2018 9:41 pm

I can still trigger the mmap bug in the Ubuntu 18.04 image:

1) Flash image
2) Log into GUI
3) Run X11 EGL/GLES2 program
4) sudo service lightdm restart
5) Log into GUI
6) Run X11 EGL/GLES2 program and observe mmap failure.
Code: Select all
mmap failed: Operation not permitted
eglGetError failed: 0x3003
crashoverride
 
Posts: 3924
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby meveric » Fri Jun 22, 2018 11:33 pm

I have the same bug as well under Debian Stretch, although not present on the start and although I used the patches earlier discussed in this thread the same issues happens after a while.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 9067
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby moon.linux » Fri Jun 22, 2018 11:52 pm

@meveric Are you referring to the mmap.tar.gz patches.
moon.linux
 
Posts: 1159
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby meveric » Sat Jun 23, 2018 12:21 am

In the past it was this patch:
Code: Select all
diff --git a/drivers/gpu/arm/ump/linux/ump_kernel_linux.c b/drivers/gpu/arm/ump/linux/ump_kernel_linux.c
index e162c85..2bcfaae 100755
--- a/drivers/gpu/arm/ump/linux/ump_kernel_linux.c
+++ b/drivers/gpu/arm/ump/linux/ump_kernel_linux.c
@@ -512,6 +512,17 @@ static int ump_file_mmap(struct file *filp, struct vm_area_struct *vma)
        /* By setting this flag, during a process fork; the child process will not have the parent UMP mappings */
        vma->vm_flags |= VM_DONTCOPY;

+       /* Test if we can make the mapping writable */
+       if (mapping_map_writable(filp->f_mapping)) {
+               /* On error, we need to allow it for forced VM_SHARED */
+               mapping_allow_writable(filp->f_mapping);
+               DBG_MSG(3, ("UMP Map function: Forcing allow writable\n"));
+       }
+       else {
+               /* On success, the counter got incremented, decrement the counter */
+               mapping_unmap_writable(filp->f_mapping);
+       }
+
        DBG_MSG(4, ("UMP vma->flags: %x\n", vma->vm_flags));

        /* Call the common mmap handler */

but for all I know this patch was merged already and is no longer necessary.
It excludes your randomization patch, as several people stated their dislike about it.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 9067
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby moon.linux » Sat Jun 23, 2018 1:00 am

Well I was referring to this code randomization patches in this thread. which did not get merged.
Code: Select all
https://forum.odroid.com/viewtopic.php?f=140&t=29735&start=50#p219942
moon.linux
 
Posts: 1159
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby meveric » Sat Jun 23, 2018 1:33 am

I know this is why I mentioned it in my last sentence ;)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 9067
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Sun Jun 24, 2018 3:42 pm

@moon.linux,
Was the patch solving the "mmap failed: Operation not permitted / eglGetError failed: 0x3003" issue?
Can you please test it?
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby moon.linux » Mon Jun 25, 2018 12:14 pm

Following series randomizes the mmap address for it fixed the issue I tested earlier. This is not as big changes to break any features.
Code: Select all
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-December/395485.html

Opps my bad assessment these changes are mostly valid for arm architecture not for arm64
moon.linux
 
Posts: 1159
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Sebas_Ledesma » Tue Jun 26, 2018 12:34 am

Hi to all

I cant update to Kernel 3.16 / Ubuntu 18.04.
I followed the instructions at: https://wiki.odroid.com/odroid-c2/os_images/ubuntu/v3.0
but when i run sudo apt update and I get:
Hit:1 http://deb.odroid.in/c2 xenial InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports xenial-proposed InRelease
Hit:7 http://ppa.launchpad.net/jean-francois- ... mpd/ubuntu xenial InRelease
Hit:8 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.


When running uname -a i get:
Linux myOdroidC2 3.14.79-117 #1 SMP PREEMPT Tue Jan 2 23:46:30 BRST 2018 aarch64 aarch64 aarch64 GNU/Linux


Any ideas?
Thanks in advance
Sebas
Sebas_Ledesma
 
Posts: 61
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby meveric » Tue Jun 26, 2018 12:56 am

You're using Ubuntu 16.04 not Ubuntu 18.04 therefore this does not work for you.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 9067
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby Sebas_Ledesma » Tue Jun 26, 2018 1:17 am

Thanks!
I've also tried sudo do-release-upgrade but it reported No new release found.
So I'm downloading the ubuntu-18.04-3.16-mate-odroid-c2-20180620.img.xz to write a new SD.

Sebas
Sebas_Ledesma
 
Posts: 61
Joined: Thu Jun 08, 2017 2:49 am
languages_spoken: english
ODROIDs: c2

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby igorpec » Wed Jun 27, 2018 1:38 am

Any options to boot an old kernel with a modern u-boot? (2018.xx) Any hints on where to look for?
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools
User avatar
igorpec
 
Posts: 220
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Wed Jun 27, 2018 10:16 am

igorpec wrote:Any options to boot an old kernel with a modern u-boot? (2018.xx) Any hints on where to look for?


I have no idea. We are still using old one U-Boot 2015.01-00014-g2e4380b-dirty (Jan 16 2018 - 02:09:02) on Ubuntu 18.04 image.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby moon.linux » Wed Jun 27, 2018 5:02 pm

igorpec wrote:Any options to boot an old kernel with a modern u-boot? (2018.xx) Any hints on where to look for?

No mainline u-boot is used to support mainline kernel, amlogic share u-boot might be tightly coupled with 3.14.x kernel features and enhancement.
moon.linux
 
Posts: 1159
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby tobetter » Mon Jul 02, 2018 2:41 pm

Can anyone try this patch to resolve the issue with mmap failed: Operation not permitted on Ubuntu 18.04?
https://github.com/tobetter/linux/commi ... 90d6b56a3f

Basically, the patch is the same way that scpcom made for 3.16 earlier, I put the code to different place and it works for me on Ubuntu 18.04. After this patch, I can run OpenGL apps without the error.
tobetter
 
Posts: 2373
Joined: Mon Feb 25, 2013 10:55 am
Location: Paju, South Korea
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby meveric » Mon Jul 02, 2018 3:50 pm

The current Kernel already seems to have the random mmap patch as well so it's gonna be hard to tell if one or the other does fix anything.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 9067
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby moon.linux » Mon Jul 02, 2018 4:47 pm

Opps: we need to revert these mmap patch and apply @tobetter patch and then test.
moon.linux
 
Posts: 1159
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby odroid » Tue Jul 03, 2018 7:07 am

Everything looks fine with 3.16.57-24 release on Ubuntu 18.04.
I've tested a few different EGL programs and everything worked nicely.
User avatar
odroid
Site Admin
 
Posts: 28610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby broncho » Fri Aug 31, 2018 5:02 pm

Has anybody solved this problem ?

"KVM/ARM doesn't work (Message: Restoring 288 IRQs, but kernel supports max 256)"

when running " qemu-system-aarch64 -enable-kvm .... "
broncho
 
Posts: 1
Joined: Sun Dec 28, 2014 11:25 pm
languages_spoken: english
ODROIDs: xu3 , c1

Re: Linux 3.16 LTS Kernel for Odroid C2

Unread postby igorpec » Fri Aug 31, 2018 6:18 pm

broncho wrote:Has anybody solved this problem ?

"KVM/ARM doesn't work (Message: Restoring 288 IRQs, but kernel supports max 256)"

when running " qemu-system-aarch64 -enable-kvm .... "


Try kernel 4.18.y (boot log) ... there are still some rough edges, but for such things, should/will be a better choice.
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools
User avatar
igorpec
 
Posts: 220
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+

Previous

Return to Projects

Who is online

Users browsing this forum: csucsu and 2 guests