Linux 3.16 LTS Kernel for Odroid C2

Moderators: odroid, mdrjr

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: 2193
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: 3538
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: 1081
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: 3538
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: 8766
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: 1081
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: 8766
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: 1081
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: 8766
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: 27977
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Previous

Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest