Any plan for basic mainline linux support?

Post Reply
brad
Posts: 1176
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 60 times
Been thanked: 108 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

tobetter wrote:
Fri May 01, 2020 2:50 pm
20200501 - Korean Labour day Edition

I've worked to upgrade the image with Linux kernel 5.7-rc3 from 5.4 as per the request of many users and more features are supported for regular users. Please download the image, Ubuntu 20.04 (Focal Fossa), and flash with the Etcher.
Well done @tobetter tested and working here :)
These users thanked the author brad for the post:
tobetter (Fri May 01, 2020 7:56 pm)

elatllat
Posts: 1779
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+
Has thanked: 47 times
Been thanked: 114 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

5.4.37 (LKML) died with a "kernel NULL pointer dereference", hope it won't be in 5.7-rc4;

Code: Select all

[    3.761990] Call trace:
[    3.764406]  snd_soc_dapm_new_dai+0x2c/0x1a8
[    3.768631]  snd_soc_dapm_connect_dai_link_widgets+0x110/0x268
[    3.774412]  snd_soc_instantiate_card+0x840/0xb80
[    3.779068]  snd_soc_register_card+0xfc/0x140
[    3.783382]  devm_snd_soc_register_card+0x44/0xa0
[    3.788040]  axg_card_probe+0x58c/0xb94 [snd_soc_meson_axg_sound_card]
[    3.794507]  platform_drv_probe+0x50/0xa0
[    3.798474]  really_probe+0x100/0x350
[    3.802097]  driver_probe_device+0x58/0x100
[    3.806237]  __device_attach_driver+0x90/0xb0
[    3.810549]  bus_for_each_drv+0x64/0xc8
[    3.814344]  __device_attach+0xd8/0x138
[    3.818139]  device_initial_probe+0x10/0x18
[    3.822279]  bus_probe_device+0x90/0x98
[    3.826074]  deferred_probe_work_func+0x74/0xb0
[    3.830560]  process_one_work+0x1e0/0x358
[    3.834526]  worker_thread+0x40/0x488
[    3.838150]  kthread+0x118/0x120
[    3.841341]  ret_from_fork+0x10/0x18
Anyone able to reproduce/verify ?


[EDIT]
Nevermind, it's reverted for 5.4.38.
[/EDIT]
Last edited by elatllat on Sun May 03, 2020 12:32 am, edited 1 time in total.

brad
Posts: 1176
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 60 times
Been thanked: 108 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

elatllat wrote:
Sun May 03, 2020 12:19 am
5.4.37 (LKML) died with a "kernel NULL pointer dereference", hope it won't be in 5.7-rc4;

Code: Select all

[    3.761990] Call trace:
[    3.764406]  snd_soc_dapm_new_dai+0x2c/0x1a8
[    3.768631]  snd_soc_dapm_connect_dai_link_widgets+0x110/0x268
[    3.774412]  snd_soc_instantiate_card+0x840/0xb80
[    3.779068]  snd_soc_register_card+0xfc/0x140
[    3.783382]  devm_snd_soc_register_card+0x44/0xa0
[    3.788040]  axg_card_probe+0x58c/0xb94 [snd_soc_meson_axg_sound_card]
[    3.794507]  platform_drv_probe+0x50/0xa0
[    3.798474]  really_probe+0x100/0x350
[    3.802097]  driver_probe_device+0x58/0x100
[    3.806237]  __device_attach_driver+0x90/0xb0
[    3.810549]  bus_for_each_drv+0x64/0xc8
[    3.814344]  __device_attach+0xd8/0x138
[    3.818139]  device_initial_probe+0x10/0x18
[    3.822279]  bus_probe_device+0x90/0x98
[    3.826074]  deferred_probe_work_func+0x74/0xb0
[    3.830560]  process_one_work+0x1e0/0x358
[    3.834526]  worker_thread+0x40/0x488
[    3.838150]  kthread+0x118/0x120
[    3.841341]  ret_from_fork+0x10/0x18
Anyone able to reproduce/verify ?
I seen it discussed on the mailing list, a patch that incorrectly made it into stable - http://lists.infradead.org/pipermail/li ... 16588.html

elatllat
Posts: 1779
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+
Has thanked: 47 times
Been thanked: 114 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

brad wrote:
Sun May 03, 2020 12:31 am
...
I seen it discussed on the mailing list, a patch that incorrectly made it into stable - http://lists.infradead.org/pipermail/li ... 16588.html
Thanks I just found it's already fixed for 5.4.38, so I'm building again...

[EDIT]
Yep, it's fixed.
[/EDIT]

elatllat
Posts: 1779
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+
Has thanked: 47 times
Been thanked: 114 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

Attached is a patch for
elatllat wrote:
Tue Nov 12, 2019 10:23 pm
...gpioinfo...
@tobetter or anyone have anything to correct or add to that?
Attachments
patch_gpio.txt
(1.53 KiB) Downloaded 47 times

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

elatllat wrote:
Wed May 20, 2020 3:08 am
Attached is a patch for
elatllat wrote:
Tue Nov 12, 2019 10:23 pm
...gpioinfo...
@tobetter or anyone have anything to correct or add to that?
We already have gpio-line-namges for ODROID-N2 with Linux kernel 5.4?
https://github.com/hardkernel/linux/blo ... 2.dts#L465

brad
Posts: 1176
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 60 times
Been thanked: 108 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

I don't think that one is upstream but to make it upstream ready maybe should be trying to keep existing format used like for the C2 https://git.kernel.org/pub/scm/linux/ke ... 7-rc6#n264

Technically the 7 pin audio is exposed so would like to see it included if defining SOC gpios :)

@tobetter reviewing the N2 schematics I think there is a mistake - https://dn.odroid.com/S922X/ODROID-N2/S ... 190307.pdf
Page 1 - the J7 header is specified as having the GPIOA pins exposed and the heartbeat LED as a GPIOA pin. Are you able to confirm that these are actually GPIOAO pins (ie with the I2S interface)?


Edit: actually maybe not, looks like it is GPIOA sorry

elatllat
Posts: 1779
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+
Has thanked: 47 times
Been thanked: 114 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

tobetter wrote:
Wed May 20, 2020 1:53 pm
...
We already have gpio-line-names for ODROID-N2 with Linux kernel 5.4...
I was looking at https://github.com/hardkernel/linux/blo ... roidn2.dts.
Anyway do you want to send gpio-line-names upstream? ( with something like "git format-patch --signoff HEAD^", "scripts/get_maintainer.pl --separator=, --norolestats *.patch", "scripts/checkpatch.pl *.patch", "mutt -H *.patch" )

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

elatllat wrote:
Wed May 20, 2020 11:35 pm
tobetter wrote:
Wed May 20, 2020 1:53 pm
...
We already have gpio-line-names for ODROID-N2 with Linux kernel 5.4...
I was looking at https://github.com/hardkernel/linux/blo ... roidn2.dts.
Anyway do you want to send gpio-line-names upstream? ( with something like "git format-patch --signoff HEAD^", "scripts/get_maintainer.pl --separator=, --norolestats *.patch", "scripts/checkpatch.pl *.patch", "mutt -H *.patch" )
Ah...I see...I am not thinking of sending the patch yet since I am sorting out GPIO and peripherals in the device tree. Once it's done, I will send it.

odroidn2user
Posts: 307
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2, C4
Has thanked: 80 times
Been thanked: 79 times
Contact:

Re: Any plan for basic mainline linux support?

Post by odroidn2user »

brad wrote:
Mon Mar 16, 2020 10:19 am
Plan to start testing onboard audio again for N2 shortly to work out what is missing now.
Any news or insights about the mainline onboard audio status?

chewitt
Posts: 41
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 0
Been thanked: 47 times
Contact:

Re: Any plan for basic mainline linux support?

Post by chewitt »

N2 has upstream PCM audio support in the vanilla 5.7+ kernel, C2 and C4 are easily supported with simple device-tree patches. Some alsa mixer settings are needed in a userspace startup script, but otherwise it's all present and working. I am currently lobbying the folks at LibreComputer to fund further work to bring pass-through audio support.
These users thanked the author chewitt for the post (total 6):
rooted (Mon Jun 15, 2020 4:39 pm) • istanbulls (Mon Jun 15, 2020 5:42 pm) • tobetter (Mon Jun 15, 2020 6:06 pm) • odroidn2user (Mon Jun 15, 2020 8:12 pm) • jgmdev (Tue Jun 16, 2020 8:59 am) • Sav (Wed Jun 17, 2020 3:14 pm)

odroidn2user
Posts: 307
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2, C4
Has thanked: 80 times
Been thanked: 79 times
Contact:

Re: Any plan for basic mainline linux support?

Post by odroidn2user »

chewitt wrote:
Mon Jun 15, 2020 4:27 pm
N2 has upstream PCM audio support in the vanilla 5.7+ kernel, C2 and C4 are easily supported with simple device-tree patches. Some alsa mixer settings are needed in a userspace startup script, but otherwise it's all present and working. I am currently lobbying the folks at LibreComputer to fund further work to bring pass-through audio support.
Thanks for the info.
The alsa-mixer settings comment mean you can't yet user switch between audio over HDMI and/or audio over the 3.5mm audio jack right?
(Like you could with the old hardkernel kernel, you could easily switch using the normal KDE/Mate/Gnome software between output devices like audio over hdmi and the audio jack. That was using pulse audio configuration, I'm guessing.)

chewitt
Posts: 41
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 0
Been thanked: 47 times
Contact:

Re: Any plan for basic mainline linux support?

Post by chewitt »

Patches submitted with Linux 5.8 add support for the headphone amp on G12/SM1 devices. The next step is to add the capabilities to existing device-trees. Once that's done userspace tools should be able to see the device and route to it.

I should caveat the simplicity of the task with the comment that anything involving alsa is particulary obtuse/dense to research and figure out, so don't expect it to happen quickly.
These users thanked the author chewitt for the post (total 2):
neighbour (Mon Jun 15, 2020 11:23 pm) • odroidn2user (Tue Jun 16, 2020 5:18 am)

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

As you may already know, Linux kernel 5.8-rc1 is already out and started to set up the kernel package release and minimal test. The number one issue of my kernel 5.8-rc1 for ODROID-N2/C4 is that Mali Wayland driver needs to be fixed due to kernel change. Also as @chewitt mentioned, it looks like the audio support is improved and some of them could be possible to be merged into 5.7 as well. Thank you all Amlogic kernel maintainers for the great contributions. :)
These users thanked the author tobetter for the post:
istanbulls (Tue Jun 16, 2020 7:37 pm)

chewitt
Posts: 41
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 0
Been thanked: 47 times
Contact:

Re: Any plan for basic mainline linux support?

Post by chewitt »

https://github.com/LibreELEC/mali-bifro ... 6p0-01rel0 <= working on 5.7.2 so prob. works on 5.8-rc1 as well, there was a breaking change in 5.6

You also need https://github.com/chewitt/linux/commit ... df34553104 .. I didn't manage to figure out the mali_kbase fix for this yet, but a simple revert seems to work.

NB: https://twitter.com/LibreELEC/status/12 ... 5900915712 should hopefully make this completely irrelevant very soon! :D
These users thanked the author chewitt for the post (total 5):
istanbulls (Tue Jun 16, 2020 7:36 pm) • rooted (Wed Jun 17, 2020 12:25 pm) • Sav (Wed Jun 17, 2020 3:16 pm) • odroidn2user (Thu Jun 18, 2020 3:34 pm) • sputnik (Sat Jun 20, 2020 8:11 pm)

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

20200716

The new image with Linux kernel 5.7.5 is ready.
Ubuntu 20.04 (Focal Fossa) for ODROID-N2
Ubuntu 20.04 (Focal Fossa) for ODROID-N2Plus

Note:
  • The default user account and its password is odroid and odroid
For Ubuntu Gnome Desktop users:
Gnome Desktop with ARM Wayland GPU acceleration can be installed on top of this server image.

Code: Select all

$ sudo apt update
$ sudo apt install ubuntu-desktop mali-bifrost-wayland-driver
$ sudo reboot
These users thanked the author tobetter for the post (total 5):
sjuut (Tue Jul 21, 2020 1:17 am) • odroidn2user (Tue Jul 21, 2020 2:29 am) • superpowter77 (Sat Jul 25, 2020 9:50 am) • BadPritt (Sun Aug 02, 2020 11:29 pm) • m_ueberall (Sat Aug 08, 2020 9:36 pm)

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

Re: Any plan for basic mainline linux support?

Post by rooted »

So you can't run a N2+ image on the N2 yet? Only the DTB needs to be changed to be compatible?

chewitt
Posts: 41
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 0
Been thanked: 47 times
Contact:

Re: Any plan for basic mainline linux support?

Post by chewitt »

N2 and N2+ share common u-boot if using current/latest sources. Original N2 u-boot files will not boot N2+

In my testing the N2 device-tree will boot N2+ but not the other way around (N2+ will not boot on N2).

So for freshly baked OS images, the only difference should be the device-tree.

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

rooted wrote:
Tue Jul 21, 2020 1:39 am
So you can't run a N2+ image on the N2 yet? Only the DTB needs to be changed to be compatible?
HK stock Ubuntu image with 4.9 kernel for N2/N2+ can be compatible, it will contain the both DTB files in the BOOT partition as 'meson64_odroidn2.dtb' and 'meson64_odroidn2_plus.dtb', U-boot and boot.ini will pick up one of them to boot for ODROID-N2/N2+ respectively. Unfortunately, this won't work on my image with 5.x yet since my image is using a package 'flash-kernel' which manages kernel and .dtb to install, I have not made a change yet since I am lazy. :( The difference between two images are only .dtb at the moment, everything else is same.

mad_ady
Posts: 8338
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 574 times
Been thanked: 439 times
Contact:

Re: Any plan for basic mainline linux support?

Post by mad_ady »

I understand the lazyness, but isn't it more work to build and maintain two images than to transplant the code that detects which board it is and loads the correct dtb? This would allow moving an emmc from one board to the other (if uboot permits).

Regarding uboot - can't the n2 uboot be used on both boards? I mean, there's no reason for uboot to run at 2.4GHz as long as it loads the correct kernel/dtb combo, right? Or is it initializing stuff that the kernel doesn't touch later?

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

mad_ady wrote:
Tue Jul 21, 2020 2:05 am
I understand the lazyness, but isn't it more work to build and maintain two images than to transplant the code that detects which board it is and loads the correct dtb? This would allow moving an emmc from one board to the other (if uboot permits).
Well...Since U-boot and boot.ini are already changed to detect the board and load the .dtb. I am sure it works. As I mentioned, for my image why it's two different image for ODROID-N2 and ODROID-N2PLUS is not about the U-boot or boot script, but 'flash-kernel' which has its own method to install kernel and .dtb. I don't want to maintain the two different images for N2 and N2PLUS, only for this image before having changes on the 'flash-kernel' package.
Regarding uboot - can't the n2 uboot be used on both boards? I mean, there's no reason for uboot to run at 2.4GHz as long as it loads the correct kernel/dtb combo, right? Or is it initializing stuff that the kernel doesn't touch later?
U-boot (odroidg12-v2015.01) in the Hardkernel Github will share the code for ODROID-N2/N2PLUS as well as ODROID-C4. If you memory card works for ODROID-N2 has updated U-boot with the latest one, it will boot from N2 and N2PLUS since the prior U-boot did not have S922X (Rev.C) features.

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

Re: Any plan for basic mainline linux support?

Post by rooted »

Thanks @chewitt and @tobetter, my N2+ just arrived. Looking forward to testing that nice increase in performance.

brad
Posts: 1176
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 60 times
Been thanked: 108 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

I swapped out the emmc from N2 into N2+ and noticed ethernet not working. This is using tobetter's netboot image and currently kernel "Linux N2 5.7.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.7.2-202006172010~focal (2020-06-17)"

Crash reported as whenever I try to bring the link up:

Code: Select all

Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9166] manager: NetworkManager state is now CONNECTING
Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9176] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 21 17:22:01 N2 systemd[1]: Starting Network Manager Script Dispatcher Service...
Jul 21 17:22:01 N2 kernel: [66672.034810] ------------[ cut here ]------------
Jul 21 17:22:01 N2 kernel: [66672.034820] Unbalanced IRQ 6 wake disable
Jul 21 17:22:01 N2 kernel: [66672.034846] WARNING: CPU: 1 PID: 2033 at kernel/irq/manage.c:763 irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.034848] Modules linked in: fuse cpufreq_conservative cpufreq_powersave rfkill dm_multipath dm_mod dax meson_vdec(C) v4l2_mem2mem snd_soc_meson_axg_spdifout videobuf2_dma_contig reset_meson_audio_arb snd_soc_meson_axg_frddr videobuf2_v4l2 meson_rng rng_core ir_nec_decoder videobuf2_memops videobuf2_common snd_soc_meson_axg_fifo snd_soc_meson_g12a_toacodec snd_soc_meson_axg_tdmout snd_soc_meson_g12a_tohdmitx snd_soc_hdmi_codec snd_soc_meson_codec_glue ao_cec_g12a meson_ir mali_kbase(O) videodev snd_soc_meson_t9015 mc snd_soc_meson_axg_sound_card snd_soc_meson_card_utils snd_soc_spdif_tx snd_soc_meson_axg_tdm_interface snd_soc_simple_amplifier snd_soc_meson_axg_tdm_formatter sch_fq_codel ip_tables x_tables raid10 raid456 async_memcpy async_raid6_recov async_pq async_xor async_tx raid1 raid0 multipath linear md_mod dw_hdmi_i2s_audio meson_gxl axg_audio sclk_div clk_phase realtek dwmac_generic meson_dw_hdmi dw_hdmi meson_drm rtc_meson_vrtc meson_canvas dwmac_meson8b
Jul 21 17:22:01 N2 kernel: [66672.034928] CPU: 1 PID: 2033 Comm: NetworkManager Tainted: G        WC O      5.7.0-odroid-arm64 #1 Ubuntu 5.7.2-202006172010~focal
Jul 21 17:22:01 N2 kernel: [66672.034930] Hardware name: Hardkernel ODROID-N2 (DT)
Jul 21 17:22:01 N2 kernel: [66672.034934] pstate: 20000085 (nzCv daIf -PAN -UAO)
Jul 21 17:22:01 N2 kernel: [66672.034938] pc : irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.034941] lr : irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.034942] sp : ffff8000122abb30
Jul 21 17:22:01 N2 kernel: [66672.034944] x29: ffff8000122abb30 x28: ffff0000b58063c0
Jul 21 17:22:01 N2 kernel: [66672.034947] x27: 0000000000000000 x26: 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034949] x25: 0000000000000000 x24: 0000410000004933
Jul 21 17:22:01 N2 kernel: [66672.034952] x23: 0000000000000000 x22: 00000000ffffffea
Jul 21 17:22:01 N2 kernel: [66672.034955] x21: 0000000000000006 x20: ffff0000b58063c0
Jul 21 17:22:01 N2 kernel: [66672.034958] x19: ffff0000b5c56200 x18: 0000000000000001
Jul 21 17:22:01 N2 kernel: [66672.034962] x17: 0000000000000000 x16: 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034964] x15: ffff80001197c000 x14: ffff800011aae1e0
Jul 21 17:22:01 N2 kernel: [66672.034967] x13: 000000000000baf0 x12: ffff800011aad000
Jul 21 17:22:01 N2 kernel: [66672.034970] x11: ffff80001197c000 x10: ffff800011aad830
Jul 21 17:22:01 N2 kernel: [66672.034973] x9 : 0000000000000001 x8 : 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034976] x7 : 0000000000000004 x6 : 0000000000005675
Jul 21 17:22:01 N2 kernel: [66672.034979] x5 : 0000000000000001 x4 : 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034981] x3 : 0000000000000000 x2 : 0000000000000007
Jul 21 17:22:01 N2 kernel: [66672.034984] x1 : 39309508bb06dc00 x0 : 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034988] Call trace:
Jul 21 17:22:01 N2 kernel: [66672.034993]  irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.035000]  stmmac_set_wol+0x64/0xd8
Jul 21 17:22:01 N2 kernel: [66672.035006]  dev_ethtool+0xaf4/0x1de8
Jul 21 17:22:01 N2 kernel: [66672.035011]  dev_ioctl+0x24c/0x3a8
Jul 21 17:22:01 N2 kernel: [66672.035017]  sock_do_ioctl+0x104/0x2b8
Jul 21 17:22:01 N2 kernel: [66672.035021]  sock_ioctl+0x268/0x530
Jul 21 17:22:01 N2 kernel: [66672.035026]  ksys_ioctl+0xa8/0xe8
Jul 21 17:22:01 N2 kernel: [66672.035029]  __arm64_sys_ioctl+0x20/0x30
Jul 21 17:22:01 N2 kernel: [66672.035036]  el0_svc_common.constprop.0+0x6c/0x168
Jul 21 17:22:01 N2 kernel: [66672.035038]  do_el0_svc+0x24/0x90
Jul 21 17:22:01 N2 kernel: [66672.035044]  el0_sync_handler+0x114/0x180
Jul 21 17:22:01 N2 kernel: [66672.035047]  el0_sync+0x158/0x180
Jul 21 17:22:01 N2 kernel: [66672.035049] ---[ end trace 0f85c9bc4ec5edca ]---
Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9207] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9220] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 21 17:22:01 N2 dbus-daemon[2032]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 21 17:22:01 N2 systemd[1]: Started Network Manager Script Dispatcher Service.
Im using petitboot for each board so it is possible they are using different versions of uboot. Also running the irqbalance service which might somehow be related so I will try to disable it to see if it helps. I havent changed dtb's and im using usb ethernet adaptor for the moment at as workaround. Everything else ive tested so far seems nice and stable but assume I will need dtb updates for new frequencies on N2+

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

brad wrote:
Tue Jul 21, 2020 5:19 pm
I swapped out the emmc from N2 into N2+ and noticed ethernet not working. This is using tobetter's netboot image and currently kernel "Linux N2 5.7.0-odroid-arm64 #1 SMP PREEMPT Ubuntu 5.7.2-202006172010~focal (2020-06-17)"

Crash reported as whenever I try to bring the link up:

Code: Select all

Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9166] manager: NetworkManager state is now CONNECTING
Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9176] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 21 17:22:01 N2 systemd[1]: Starting Network Manager Script Dispatcher Service...
Jul 21 17:22:01 N2 kernel: [66672.034810] ------------[ cut here ]------------
Jul 21 17:22:01 N2 kernel: [66672.034820] Unbalanced IRQ 6 wake disable
Jul 21 17:22:01 N2 kernel: [66672.034846] WARNING: CPU: 1 PID: 2033 at kernel/irq/manage.c:763 irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.034848] Modules linked in: fuse cpufreq_conservative cpufreq_powersave rfkill dm_multipath dm_mod dax meson_vdec(C) v4l2_mem2mem snd_soc_meson_axg_spdifout videobuf2_dma_contig reset_meson_audio_arb snd_soc_meson_axg_frddr videobuf2_v4l2 meson_rng rng_core ir_nec_decoder videobuf2_memops videobuf2_common snd_soc_meson_axg_fifo snd_soc_meson_g12a_toacodec snd_soc_meson_axg_tdmout snd_soc_meson_g12a_tohdmitx snd_soc_hdmi_codec snd_soc_meson_codec_glue ao_cec_g12a meson_ir mali_kbase(O) videodev snd_soc_meson_t9015 mc snd_soc_meson_axg_sound_card snd_soc_meson_card_utils snd_soc_spdif_tx snd_soc_meson_axg_tdm_interface snd_soc_simple_amplifier snd_soc_meson_axg_tdm_formatter sch_fq_codel ip_tables x_tables raid10 raid456 async_memcpy async_raid6_recov async_pq async_xor async_tx raid1 raid0 multipath linear md_mod dw_hdmi_i2s_audio meson_gxl axg_audio sclk_div clk_phase realtek dwmac_generic meson_dw_hdmi dw_hdmi meson_drm rtc_meson_vrtc meson_canvas dwmac_meson8b
Jul 21 17:22:01 N2 kernel: [66672.034928] CPU: 1 PID: 2033 Comm: NetworkManager Tainted: G        WC O      5.7.0-odroid-arm64 #1 Ubuntu 5.7.2-202006172010~focal
Jul 21 17:22:01 N2 kernel: [66672.034930] Hardware name: Hardkernel ODROID-N2 (DT)
Jul 21 17:22:01 N2 kernel: [66672.034934] pstate: 20000085 (nzCv daIf -PAN -UAO)
Jul 21 17:22:01 N2 kernel: [66672.034938] pc : irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.034941] lr : irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.034942] sp : ffff8000122abb30
Jul 21 17:22:01 N2 kernel: [66672.034944] x29: ffff8000122abb30 x28: ffff0000b58063c0
Jul 21 17:22:01 N2 kernel: [66672.034947] x27: 0000000000000000 x26: 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034949] x25: 0000000000000000 x24: 0000410000004933
Jul 21 17:22:01 N2 kernel: [66672.034952] x23: 0000000000000000 x22: 00000000ffffffea
Jul 21 17:22:01 N2 kernel: [66672.034955] x21: 0000000000000006 x20: ffff0000b58063c0
Jul 21 17:22:01 N2 kernel: [66672.034958] x19: ffff0000b5c56200 x18: 0000000000000001
Jul 21 17:22:01 N2 kernel: [66672.034962] x17: 0000000000000000 x16: 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034964] x15: ffff80001197c000 x14: ffff800011aae1e0
Jul 21 17:22:01 N2 kernel: [66672.034967] x13: 000000000000baf0 x12: ffff800011aad000
Jul 21 17:22:01 N2 kernel: [66672.034970] x11: ffff80001197c000 x10: ffff800011aad830
Jul 21 17:22:01 N2 kernel: [66672.034973] x9 : 0000000000000001 x8 : 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034976] x7 : 0000000000000004 x6 : 0000000000005675
Jul 21 17:22:01 N2 kernel: [66672.034979] x5 : 0000000000000001 x4 : 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034981] x3 : 0000000000000000 x2 : 0000000000000007
Jul 21 17:22:01 N2 kernel: [66672.034984] x1 : 39309508bb06dc00 x0 : 0000000000000000
Jul 21 17:22:01 N2 kernel: [66672.034988] Call trace:
Jul 21 17:22:01 N2 kernel: [66672.034993]  irq_set_irq_wake+0x108/0x148
Jul 21 17:22:01 N2 kernel: [66672.035000]  stmmac_set_wol+0x64/0xd8
Jul 21 17:22:01 N2 kernel: [66672.035006]  dev_ethtool+0xaf4/0x1de8
Jul 21 17:22:01 N2 kernel: [66672.035011]  dev_ioctl+0x24c/0x3a8
Jul 21 17:22:01 N2 kernel: [66672.035017]  sock_do_ioctl+0x104/0x2b8
Jul 21 17:22:01 N2 kernel: [66672.035021]  sock_ioctl+0x268/0x530
Jul 21 17:22:01 N2 kernel: [66672.035026]  ksys_ioctl+0xa8/0xe8
Jul 21 17:22:01 N2 kernel: [66672.035029]  __arm64_sys_ioctl+0x20/0x30
Jul 21 17:22:01 N2 kernel: [66672.035036]  el0_svc_common.constprop.0+0x6c/0x168
Jul 21 17:22:01 N2 kernel: [66672.035038]  do_el0_svc+0x24/0x90
Jul 21 17:22:01 N2 kernel: [66672.035044]  el0_sync_handler+0x114/0x180
Jul 21 17:22:01 N2 kernel: [66672.035047]  el0_sync+0x158/0x180
Jul 21 17:22:01 N2 kernel: [66672.035049] ---[ end trace 0f85c9bc4ec5edca ]---
Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9207] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jul 21 17:22:01 N2 NetworkManager[2033]: <info>  [1595316121.9220] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 21 17:22:01 N2 dbus-daemon[2032]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jul 21 17:22:01 N2 systemd[1]: Started Network Manager Script Dispatcher Service.
Im using petitboot for each board so it is possible they are using different versions of uboot. Also running the irqbalance service which might somehow be related so I will try to disable it to see if it helps. I havent changed dtb's and im using usb ethernet adaptor for the moment at as workaround. Everything else ive tested so far seems nice and stable but assume I will need dtb updates for new frequencies on N2+
The DTB for N2Plus has been merged since 5.7.5, so you will need to update it with the recent version of the kernel package. If you are able to boot the eMMC from N2, not N2Plus, can you try this trick?

Code: Select all

$ echo "Hardkernel ODROID-N2Plus | sudo tee -a /etc/flash-kernel/machine
$ sudo apt update
$ sudo apt upgrade
These users thanked the author tobetter for the post:
brad (Tue Jul 21, 2020 6:55 pm)

brad
Posts: 1176
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 60 times
Been thanked: 108 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

tobetter wrote:
Tue Jul 21, 2020 5:28 pm
The DTB for N2Plus has been merged since 5.7.5, so you will need to update it with the recent version of the kernel package. If you are able to boot the eMMC from N2, not N2Plus, can you try this trick?

Code: Select all

$ echo "Hardkernel ODROID-N2Plus | sudo tee -a /etc/flash-kernel/machine
$ sudo apt update
$ sudo apt upgrade
Thanks, I did the upgrade and it went well but still the same behaviour with the ethernet although nothing reported in the logs this time. I can get network sometimes but it is very slow (5Kb sec) and then drops out. Here is the status

Code: Select all

$ sudo ethtool eth0
[sudo] password for brad: 
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	                                     1000baseT/Full 
	Link partner advertised pause frame use: Symmetric
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: ug
	Wake-on: d
	Current message level: 0x0000003f (63)
			       drv probe link timer ifdown ifup
	Link detected: yes
	
brad@N2:~$ ethtool --show-eee eth0
EEE Settings for eth0:
	EEE status: enabled - active
	Tx LPI: disabled
	Supported EEE link modes:  100baseT/Full 
	                           1000baseT/Full 
	Advertised EEE link modes:  100baseT/Full 
	                            1000baseT/Full 
	Link partner advertised EEE link modes:  100baseT/Full 
	                                         1000baseT/Full 
brad@N2:~$ sudo ethtool --set-eee eth0 eee off 
brad@N2:~$ ethtool --show-eee eth0
EEE Settings for eth0:
	EEE status: disabled
	Tx LPI: disabled
	Supported EEE link modes:  100baseT/Full 
	                           1000baseT/Full 
	Advertised EEE link modes:  Not reported
	Link partner advertised EEE link modes:  100baseT/Full 
	                                         1000baseT/Full 

I tried disabling eee as above also but did not resolve. Will try with the standard image to see if I have any issues.

Edit: Standard Mate image with 4.9.230-89 Ethernet is working fine

n2qcn
Posts: 40
Joined: Sat Dec 01, 2018 12:38 pm
languages_spoken: english
ODROIDs: H2 N2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Any plan for basic mainline linux support?

Post by n2qcn »

This is the error If one gets if they type `ip link set eth0 down ; ip link set eth0 up`
meson8b-dwmac ff3f0000.ethernet: Failed to reset the dma
meson8b-dwmac ff3f0000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
meson8b-dwmac ff3f0000.ethernet eth0: stmmac_open: Hw setup failed

and one can't return eth0 up without a reboot.

https://github.com/khadas/fenix/blob/ma ... down.patch

might fix it.

elatllat
Posts: 1779
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+
Has thanked: 47 times
Been thanked: 114 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

5.4.53 from kernel.org seems fine on the N2+...

brad
Posts: 1176
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 N2+ H2 H2+ (64 bit ftw)
Location: Australia
Has thanked: 60 times
Been thanked: 108 times
Contact:

Re: Any plan for basic mainline linux support?

Post by brad »

My network issue with N2+ was related to an old version of petitboot. Update fixed it.

squidd
Posts: 22
Joined: Thu Jul 30, 2020 11:41 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 15 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by squidd »

My current WiFi adapter is not working with this kernel. It did work with the official N2 Ubuntu image from odroid's wiki. I was able to get it working by manually compiling the driver. I can now connect to my wifi, but can't actually get a connection. I think this is because I can't get actual root access as I don't have the su account password. What is that password?

User avatar
CoolGames
Posts: 99
Joined: Sun Nov 24, 2019 3:07 am
languages_spoken: english
ODROIDs: Dec 25 N2
Has thanked: 14 times
Been thanked: 14 times
Contact:

Re: Any plan for basic mainline linux support?

Post by CoolGames »

squidd wrote:
Tue Aug 04, 2020 12:25 am
My current WiFi adapter is not working with this kernel. It did work with the official N2 Ubuntu image from odroid's wiki. I was able to get it working by manually compiling the driver. I can now connect to my wifi, but can't actually get a connection. I think this is because I can't get actual root access as I don't have the su account password. What is that password?
You can set the password with your administrator (odroid) privileges so none is set at distribution

Code: Select all

$ sudo passwd root
[sudo] password for odroid: 
New password: 
Retype new password: 
passwd: password updated successfully
These users thanked the author CoolGames for the post:
squidd (Tue Aug 04, 2020 3:08 am)

squidd
Posts: 22
Joined: Thu Jul 30, 2020 11:41 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 15 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by squidd »

Thank you

elatllat
Posts: 1779
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+
Has thanked: 47 times
Been thanked: 114 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat »

https://lkml.org/lkml/2020/7/30/58

Is that going to effect any non-bifrost gpu/vpu/ip bits used in the HK branches?

odroidn2user
Posts: 307
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2, C4
Has thanked: 80 times
Been thanked: 79 times
Contact:

Re: Any plan for basic mainline linux support?

Post by odroidn2user »

I've just updated my N2 running on Manjaro ARM to their mainline kernel 5.8.1.
Both the green-line on the left, and color saturation/compression (whatever it is) issues, still happen on mainline kernels for the N2.
So, perhaps if any kernel/drm/meson developers are reading here, there still is an issue in the video drivers.
And as it is in the kernel drivers, no Panfrost driver is going to solve that issue, it is in the kernel.
And it most certainly is not just Manjaro, it is a kernel driver issue. Also: not a hdmi cable issue. It is the driver.

To tell it like it is: the picture output is currently ugly. And that is not necessary, it is a broken driver.
I am using a very standard Dell P2319 FullHD monitor it happens there. Strange enough, it doesn't happen on my oldy Samsung Syncmaster 1500x1040 monitor.
So, this is a bug... And it is persistent over several kernel versions and not solved.
Perhaps all the above goes without saying, but ... yeah... So, as an FYI.

Just letting you know I really do appreciate all the work done, tremendously.
I would consider this one of the bigger (if not show-stopper) issues remaining. It basically makes the mainline kernels unusable for me.
So, I am eagerly awaiting the resolution of this bug.
I could make a paypall donation to help the cause as a bug bounty kinda thing, if that helps. Not sure how that works.
Many thanks! :)

User avatar
tobetter
Posts: 5559
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 225 times
Been thanked: 652 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter »

odroidn2user wrote:
Sat Aug 15, 2020 2:50 am
I've just updated my N2 running on Manjaro ARM to their mainline kernel 5.8.1.
Both the green-line on the left, and color saturation/compression (whatever it is) issues, still happen on mainline kernels for the N2.
So, perhaps if any kernel/drm/meson developers are reading here, there still is an issue in the video drivers.
And as it is in the kernel drivers, no Panfrost driver is going to solve that issue, it is in the kernel.
And it most certainly is not just Manjaro, it is a kernel driver issue. Also: not a hdmi cable issue. It is the driver.

To tell it like it is: the picture output is currently ugly. And that is not necessary, it is a broken driver.
I am using a very standard Dell P2319 FullHD monitor it happens there. Strange enough, it doesn't happen on my oldy Samsung Syncmaster 1500x1040 monitor.
So, this is a bug... And it is persistent over several kernel versions and not solved.
Perhaps all the above goes without saying, but ... yeah... So, as an FYI.

Just letting you know I really do appreciate all the work done, tremendously.
I would consider this one of the bigger (if not show-stopper) issues remaining. It basically makes the mainline kernels unusable for me.
So, I am eagerly awaiting the resolution of this bug.
I could make a paypall donation to help the cause as a bug bounty kinda thing, if that helps. Not sure how that works.
Many thanks! :)
The green line issue is disappeared with my Ubuntu updates but happens to Manjaro...right?

odroidn2user
Posts: 307
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2, C4
Has thanked: 80 times
Been thanked: 79 times
Contact:

Re: Any plan for basic mainline linux support?

Post by odroidn2user »

tobetter wrote:
Sat Aug 15, 2020 3:07 am
The green line issue is disappeared with my Ubuntu updates but happens to Manjaro...right?
Yes, the green line issue disappeared on the tobetter minimal image / kernels. (Many thanks for that one, big improvement!!)
But the green line is still very much present on the mainline(ish?) 5.8.1 kernel with Manjaro ARM.

The color saturation / image compression / image sharpening / image quality kinda thing still there though. Both on the tobetter kernel/image and with Manjaro. And I see this on the N2, N2+ and C4, have not tested other Odroid devices.
I see a somewhat comparable kinda thing at work, where we use a Citrix connection to a Windows server. The processing used corrupts the quality of the image on the screen.

You see the problem with the graphics drivers most with brightly colored things, like the blue line around the message edit window here on the forum. Or on saturated red/oranges, like the 'submit' button beneath the message edit window. It lights up red, and ugly. You see a white-ish / bright red line right next to the red border line on the button. Same with the bright red post-reply button, beneath the thread on the forum, you see clear artifacts there. Also with the blue line around the edit window, it has a bright blue line right next to it. That should not be there. But, really, it is everywhere you look. The normal blue letters on screen are also off / not right. A sharpness that is just off, it's uhm, yeah... noticeable.
To me, it looks a little like image compression (or processing of some kind) issues, but who know what that is. It is there though, and you can't not see it.

Also, when I take a software screenshot from the N2/N2+, the screenshot picture is clear when viewed on another computer. So, internally things seem alright. But when the internally clear picture then gets outputted to my monitor on the N2/N2+/C4, with the mainline kernels, it gets distorted. So that might help pinpoint the driver affected, perhaps, for the developers. Possibly a coding error somewhere in monitor handling, HDMI protocol stuff, or in a color handling kinda thing.

And tobetter has 50% of the problem described here solved, so...

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest