Linux kernel 4.9 debugging party for ODROID-N2

Post Reply
User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Wed May 15, 2019 5:15 pm

I've worked to pull the recent kernel update from Amlogic's kernel branch and managed them to merge to the ODROID-N2 branch, they are uploaded to the new branch odroidn2-4.9-upstream. The branch has 450+ new commits on top of the branch odroidn2-4.9, it would be appreciated if you try it out to run and let us know if you found defected features. There are more commits which were not able to be merged because of code conflict, we are internally trying to resolve them and would be updated the progress later.
[1] https://github.com/hardkernel/linux/com ... y-upstream

The way of downloading and building the kernel is same, only the branch name is different.
Screenshot from 2019-05-15 17-14-50.png
Screenshot from 2019-05-15 17-14-50.png (282.14 KiB) Viewed 2643 times

Raybuntu
Posts: 1388
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 16 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by Raybuntu » Wed May 15, 2019 5:21 pm

Thanks!

Raybuntu
Posts: 1388
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 16 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by Raybuntu » Wed May 15, 2019 5:37 pm

@tobetter can you please post the commits that didn't apply either as patches of as a bare Amlogic git branch. We will try to apply them.

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Wed May 15, 2019 6:15 pm

Raybuntu wrote:
Wed May 15, 2019 5:37 pm
@tobetter can you please post the commits that didn't apply either as patches of as a bare Amlogic git branch. We will try to apply them.
Hello Raybuntu,

Thank you for your suggestion.
Would you be able to wait for a couple of days, by end of this week? Since we are doing some integrations, some of them are able to be merged or will be ignored. After having some work more, I am thinking of sharing the bare branch from Amlogic with a list and share them...such that...you can create a patch. :mrgreen:

User avatar
rooted
Posts: 6903
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 271 times
Been thanked: 65 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by rooted » Thu May 16, 2019 1:42 am

Subscribing

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by OverSun » Thu May 16, 2019 3:21 am

doesn't compile without
CONFIG_AMLOGIC_VIDEOSYNC=y
and this small patch with default values that debugfs expect for a node to be created

Code: Select all

diff --git a/drivers/amlogic/atv_demod/atvdemod_func.c b/drivers/amlogic/atv_demod/atvdemod_func.c
index 90c953673c89..d31c9f416355 100644
--- a/drivers/amlogic/atv_demod/atvdemod_func.c
+++ b/drivers/amlogic/atv_demod/atvdemod_func.c
@@ -39,6 +39,8 @@
 unsigned int broad_std = AML_ATV_DEMOD_VIDEO_MODE_PROP_NTSC;
 unsigned int aud_std = AUDIO_STANDARD_NICAM_DK;
 unsigned int aud_mode = AUDIO_OUTMODE_STEREO;
+bool aud_reinit = 0;
+bool aud_mono_only = 0;
 bool aud_auto = true;
 unsigned long over_threshold = 0xffff;
 unsigned long input_amplitude = 0xffff;
I don't see any changes to the hardkernel version. same jitter during playback is there, all that worked for me still works...

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Thu May 16, 2019 3:30 pm

OverSun wrote:
Thu May 16, 2019 3:21 am
doesn't compile without
CONFIG_AMLOGIC_VIDEOSYNC=y
and this small patch with default values that debugfs expect for a node to be created

Code: Select all

diff --git a/drivers/amlogic/atv_demod/atvdemod_func.c b/drivers/amlogic/atv_demod/atvdemod_func.c
index 90c953673c89..d31c9f416355 100644
--- a/drivers/amlogic/atv_demod/atvdemod_func.c
+++ b/drivers/amlogic/atv_demod/atvdemod_func.c
@@ -39,6 +39,8 @@
 unsigned int broad_std = AML_ATV_DEMOD_VIDEO_MODE_PROP_NTSC;
 unsigned int aud_std = AUDIO_STANDARD_NICAM_DK;
 unsigned int aud_mode = AUDIO_OUTMODE_STEREO;
+bool aud_reinit = 0;
+bool aud_mono_only = 0;
 bool aud_auto = true;
 unsigned long over_threshold = 0xffff;
 unsigned long input_amplitude = 0xffff;
I don't see any changes to the hardkernel version. same jitter during playback is there, all that worked for me still works...
Thanks, Oversun.
I've updated the branch with CONFIG_AMLOGIC_VIDEOSYNC.
https://github.com/hardkernel/linux/com ... 577eb9d53b

elatllat
Posts: 1585
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by elatllat » Fri May 17, 2019 10:49 pm


User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Fri May 17, 2019 10:53 pm

elatllat wrote:
Fri May 17, 2019 10:49 pm
Is the upstream
https://git.kernel.org/pub/scm/linux/ke ... logic.git/
or something else?
Sorry if it made a confusion due to -upstream. This thread is to debug 4.9 kernel with new BSP update from Amlogic, not the mainline kernel.

elatllat
Posts: 1585
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by elatllat » Fri May 17, 2019 10:59 pm

So upstream is still Linaro, with some cherry picking off Amlogic. Would be nice to have links to all the upstreams.
(Though really a minimal/server 5.2 once the RC is out is my interest)

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Fri May 17, 2019 11:06 pm

elatllat wrote:
Fri May 17, 2019 10:59 pm
So upstream is still Linaro, with some cherry picking off Amlogic. Would be nice to have links to all the upstreams.
(Though really a minimal/server 5.2 once the RC is out is my interest)
Why Linaro?

elatllat
Posts: 1585
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 25 times
Been thanked: 74 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by elatllat » Fri May 17, 2019 11:21 pm

Without links one can only guess based on the many commits (5329 files changed) that are not from kernel.org
Last edited by elatllat on Mon Jul 01, 2019 4:44 pm, edited 1 time in total.

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by OverSun » Sat May 18, 2019 1:48 am

amlogic has it’s own git with kernel, available when you have login and access. this is what they release in their BSP once in few months.
has nothing to do with linaro, it’s amlogic kernel of latest their git.

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Mon May 20, 2019 11:00 am

More patches are updated and uploaded to the branch odroidn2-4.9-upstream
https://github.com/hardkernel/linux/com ... y-upstream

crashoverride
Posts: 4552
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 81 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by crashoverride » Tue May 21, 2019 9:49 pm

I compiled this kernel branch today. However, it will not boot. I get "Starting kernel ..." and then the device reboots. I used 'make odroidn2_defconfig'. Is anyone else having this problem, or is it just me?

[edit]
I solved the issue. The device tree must also be updated on the boot media. The old one is apparently no longer compatible.

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by OverSun » Wed May 22, 2019 12:36 am

You get this problem if you checkout the branch in the directory where you already compiled "odroidn2-4.9.y" (without upstream) branch before. For some reason gcc cannot figure out some part it needs to recompile and it links bad frankenstein kernel with stuff from this and that branch. It doesn't boot exactly as you say - with "Starting kernel ..." and then reboots after few seconds.
"make mrproper" needs to be done when switching branches

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Mon May 27, 2019 1:12 pm

The branch odroidn2-4.9-upstream is updated, the branch consists of Amlogic's new BSP update and patches from CoreElec team.
https://github.com/hardkernel/linux/com ... y-upstream

Special thanks to CoreElec team that they are working on this branch to improve the features and contributed a lot of changes for the existing features plus more.
These users thanked the author tobetter for the post:
DanDroid (Thu Jul 11, 2019 10:06 pm)

crashoverride
Posts: 4552
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 81 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by crashoverride » Mon May 27, 2019 2:03 pm

@tobetter
Can we get a branch that is unchanged from what Amlogic provides? This branch should not have any mainline kernel, hardkernel, coreelec, etc. patches.

Raybuntu
Posts: 1388
Joined: Mon Nov 30, 2015 4:23 pm
languages_spoken: english, german
ODROIDs: C1+, C2
Has thanked: 3 times
Been thanked: 16 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by Raybuntu » Mon May 27, 2019 2:07 pm

These users thanked the author Raybuntu for the post:
tobetter (Mon May 27, 2019 2:19 pm)

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Thu Jun 27, 2019 12:23 pm

New update on the branch odroidn2-4.9.y-upstream with improved many features.
https://github.com/hardkernel/linux/com ... y-upstream
  • Rebased with official branch odroidn2-4.9.y
  • Improved multimedia features contributed by CoreELEC team, THANK YOU!!
This branch would be merged into odroidn2-4.9.y soon and planning to release new Ubuntu image as well, the timeline is not decided yet.

crashoverride
Posts: 4552
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 81 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by crashoverride » Thu Jun 27, 2019 12:53 pm

Just a quick note about some of the patches:

https://github.com/hardkernel/linux/com ... 0fe55b83c7
https://github.com/hardkernel/linux/com ... 8c5ac31171
This is incorrect behavior. Its likely a 'hack' for kodi. When the codec function returns it is critical that the blit has completed and memory is in a consistent state. The patches will likely cause tearing in any program that is not kodi.

There was another patch that I cant find that disabled multiple codec instances. Programs other than kodi may wish to decode more than a single stream at once.

The above information is posted so that anyone encountering issues in the future can easily find a reference for them.

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by tobetter » Thu Jun 27, 2019 1:02 pm

crashoverride wrote:
Thu Jun 27, 2019 12:53 pm
Just a quick note about some of the patches:

https://github.com/hardkernel/linux/com ... 0fe55b83c7
https://github.com/hardkernel/linux/com ... 8c5ac31171
This is incorrect behavior. Its likely a 'hack' for kodi. When the codec function returns it is critical that the blit has completed and memory is in a consistent state. The patches will likely cause tearing in any program that is not kodi.

There was another patch that I cant find that disabled multiple codec instances. Programs other than kodi may wish to decode more than a single stream at once.

The above information is posted so that anyone encountering issues in the future can easily find a reference for them.
Thank you, since this is the debugging branch many options are still open and will see how we can manage the features. Especially the multimedia modules are debugged and improved by CoreELEC team, so its change would be very tied to Kodi features. Personally, I don't prefer to have the multimedia drivers under Linux kernel tree, since mdrjr has fixed DKMS, maybe we could consider to use it as another option?

User avatar
OverSun
Posts: 1491
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 18 times
Contact:

Re: Linux kernel 4.9 debugging party for ODROID-N2

Unread post by OverSun » Thu Jul 11, 2019 4:56 am

i tried latest -upstream branch. good news that stutter is gone, but bad news are that HDR is also gone and not initiated anymore, and i completely lost CEC, it cannot handshake with tv using libcec anymore.
absence of hdr made the picture no different to any other tv box or board...
i think now that the problem with stutter is somewhere in hdr code.

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests