Odroid C2 mainline kernel support

uncarvedblock
Posts: 4
Joined: Sun Mar 10, 2019 3:58 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by uncarvedblock » Mon Mar 11, 2019 5:41 am

brad wrote:
Sun Mar 10, 2019 9:25 pm
You can maybe try to revert this commit in 5.0 to see if the problem disappears. https://lkml.org/lkml/2018/12/6/746

I know it can have a big impact on which cards are able to be detected (or tuned) at boot.
Unfortunately I don't have physical access to the affected C2. I seem to remember there was an entry that could be made to boot.txt or boot.ini that could adjust the clock of the emmc? Not sure if this is even an option in mainline uboot (or perhaps my memory is off)

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Mon Mar 11, 2019 10:05 am

campbell wrote:
Mon Mar 11, 2019 12:41 am
This again? When are they gonna stop fucking with the clock phase? It breaks things every single time.
Yes I know its a pain as it breaks boot :( and may even leads to data corruption via io errors which I seen last time I had issue in 4.x

Appears different boards using the emmc driver like to *work* with different clock phases and there is no 1 setting fits all. I will try to test Odroid C2 on 5.0 soon and provide feedback to Jerome on the almlogic mailing list. Other user has reported a similar issue on a S905 TV box.

The problem does not occur on 5.0-rc6 and the Odroid N2 which uses the same driver but I will doing more testing here to confirm as well. Maybe the timing config can be placed into the device tree and be board specific.

fab
Posts: 214
Joined: Mon Apr 28, 2014 3:51 pm
languages_spoken: english French
ODROIDs: Odroid W + Odroid C0 + Odroid C1 + Odroid C2
Location: France Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by fab » Wed Apr 10, 2019 4:23 pm

Hi,

Is there someone who has already used hardware video decoding with ffmpeg, using a C2 with the mainline kernel? (4.19.20-meson64 #5.75 SMP PREEMPT Fri Feb 8 10:08:40 CET 2019 aarch64 aarch64 aarch64 GNU/Linux)

These are the tests I did:

ffmpeg -c:v h264_v4l2m2m -i Sintel.2010.720p.mkv -an -vf fps=1 -f image2 -strftime 1 "/dev/shm/p_%S.jpg" -> Working well

ffmpeg -stimeout 5000000 -c:v h264_v4l2m2m -i rtsp://192.168.1.31/11 -an -vf fps=1 -f image2 -strftime 1 "/dev/shm/p_%S.jpg" -> Not working at all! (hardware decoding through a rtsp stream)
I got theses sort of errors and nothting is recorded:
[Parsed_fps_0 @ 0xaaaadbc668a0] Discarding initial frame(s) with no timestamp.

ffmpeg was installed through apt, and not compiled.

Please note that I already asked this question on the armbian forum too. No awsers yet....

Thx for your help

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Wed Apr 10, 2019 9:18 pm

scpcom's release is probably the easiest and best to get started on ubuntu viewtopic.php?f=135&t=22717&start=950#p241098

Lots of changes are still happening in the video decoder department so im not sure exactly where it is at currently.

fab
Posts: 214
Joined: Mon Apr 28, 2014 3:51 pm
languages_spoken: english French
ODROIDs: Odroid W + Odroid C0 + Odroid C1 + Odroid C2
Location: France Orleans
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by fab » Fri Apr 12, 2019 1:32 am

Hi @Brad, Thx for your help.

I did a try with your suggestion, and revert back to 4.19.8, using all patches from @scpcom. And got the same result!
The hardware video decoder is properly recognized but the output is empty.

This is the output I got with the @spcom image:
root@odroidIA:~# uname -a
Linux odroidIA 4.19.8+c2 #c2 SMP PREEMPT Sun Dec 9 17:46:23 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
root@odroidIA:~# ffmpeg -stimeout 5000000 -c:v h264_v4l2m2m -i rtsp://192.168.1.31/11 -an -vf fps=1 -f image2 -strftime 1 "/dev/shm/p_%S.jpg"
ffmpeg version 4.0.2-9v4l2drmprime4 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=9v4l2drmprime4 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[rtsp @ 0xaaab164cdbb0] max delay reached. need to consume packet
[rtsp @ 0xaaab164cdbb0] RTP: missed 17 packets
[h264 @ 0xaaab164d07d0] corrupted macroblock 59 29 (total_coeff=-1)
[h264 @ 0xaaab164d07d0] error while decoding MB 59 29
[h264 @ 0xaaab164d07d0] concealing 1270 DC, 1270 AC, 1270 MV errors in I frame
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://192.168.1.31/11':
Metadata:
title : 10
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709, progressive), 1280x720, 90k tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
[h264_v4l2m2m @ 0xaaab16530800] driver 'meson-vdec' on card 'Amlogic Video Decoder'
[h264_v4l2m2m @ 0xaaab16530800] Using device /dev/video0
[h264_v4l2m2m @ 0xaaab16530800] driver 'meson-vdec' on card 'Amlogic Video Decoder'
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0xaaab16532a80] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '/dev/shm/p_%S.jpg':
Metadata:
title : 10
encoder : Lavf58.12.100
Stream #0:0: Video: mjpeg, yuvj420p(pc), 1280x720, q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc
Metadata:
encoder : Lavc58.18.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
[Parsed_fps_0 @ 0xaaab16547a10] Discarding initial frame(s) with no timestamp.
Last message repeated 1 times
frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

uncarvedblock
Posts: 4
Joined: Sun Mar 10, 2019 3:58 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by uncarvedblock » Fri Apr 12, 2019 10:30 am

Does anyone have any advice for modifying the device tree or creating device tree overlays?

I would like to connect an LED momentary switch to gpiopower, and the LED on the switch to /gpio_leds/hearbeat. I have two issues with this on the mainline kernel:
  • The heartbeat led had been moved to /leds/blue, but running a ftdget /leds/blue gpios returns: 46 13 1 instead of 37 13 1 according to the wiki page: Alternative Heartbeat LED. The wiki is also a bit unclear as to how to find the correct pin bank number for the gpios, in one place it states most of the J2 pins are on pin bank #19, but further on in the example the led is connected to pin bank #96.
If anyone is able to assist me with how to add gpio_keypad into the device tree, and/or how to determine the correct pin bank to move the heartbeat gpios, it would be greatly appreciated. Thanks!

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Thu Apr 18, 2019 6:38 pm

campbell wrote:
Mon Mar 11, 2019 12:41 am
brad wrote:
Sun Mar 10, 2019 9:25 pm
uncarvedblock wrote:
Sun Mar 10, 2019 4:19 am
We have tried removing and reinstalling uboot-odroid-mainline in a chroot, but the only thing that seems to get the the C2 to boot again is downgrading to linux-aarch64-4.20. I am baffled since my C2 seemed to upgrade without issue, the hardware and software loadout are nearly identical.
You can maybe try to revert this commit in 5.0 to see if the problem disappears. https://lkml.org/lkml/2018/12/6/746

I know it can have a big impact on which cards are able to be detected (or tuned) at boot.
This again? When are they gonna stop fucking with the clock phase? It breaks things every single time.
Looks like a solution for emmc issues has been submitted to sort it out properly on all boards https://lkml.org/lkml/2019/4/17/996
These users thanked the author brad for the post (total 2):
campbell (Sat Apr 20, 2019 5:40 am) • wumpus (Tue Nov 05, 2019 6:08 pm)

campbell
Posts: 387
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Sat Apr 20, 2019 5:39 am

brad wrote:
Thu Apr 18, 2019 6:38 pm
Looks like a solution for emmc issues has been submitted to sort it out properly on all boards https://lkml.org/lkml/2019/4/17/996
Thanks Brad. Can you post again when this change has made it into an rc? I'm not entirely sure how to track that and other readers might not be either.

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Sat Apr 20, 2019 8:59 am

campbell wrote:
Sat Apr 20, 2019 5:39 am
brad wrote:
Thu Apr 18, 2019 6:38 pm
Looks like a solution for emmc issues has been submitted to sort it out properly on all boards https://lkml.org/lkml/2019/4/17/996
Thanks Brad. Can you post again when this change has made it into an rc? I'm not entirely sure how to track that and other readers might not be either.
Yes will do. It is still under some further discussion at the moment in the mailing lists. Looks like it might bring some added performance boosts as a bonus when it arrives
These users thanked the author brad for the post:
mad_ady (Sat Apr 20, 2019 1:36 pm)

campbell
Posts: 387
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Sun Apr 28, 2019 8:19 am

Anyone else having weird issues lately where an ssh connection to an odroid C2 running the mainline kernel just hangs for a while? As long as the connection is fairly active it doesn't happen, but if it's sitting idle for even like 30 seconds it seem to hang. I'm gonna downgrade to 3.16 and see if it's the kernel or not.

edit: Yes, downgrading the kernel seems to have made the issue go away. Is anyone else experiencing this?

campbell
Posts: 387
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Tue May 07, 2019 2:45 pm

campbell wrote:
Sun Apr 28, 2019 8:19 am
Anyone else having weird issues lately where an ssh connection to an odroid C2 running the mainline kernel just hangs for a while? As long as the connection is fairly active it doesn't happen, but if it's sitting idle for even like 30 seconds it seem to hang. I'm gonna downgrade to 3.16 and see if it's the kernel or not.

edit: Yes, downgrading the kernel seems to have made the issue go away. Is anyone else experiencing this?
Still doing it in 5.1.0

juanjo1024
Posts: 15
Joined: Sat Sep 02, 2017 10:07 pm
languages_spoken: english, spanish
ODROIDs: C2 N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by juanjo1024 » Wed May 15, 2019 9:09 am

campbell wrote:
Sun Apr 28, 2019 8:19 am
Anyone else having weird issues lately where an ssh connection to an odroid C2 running the mainline kernel just hangs for a while? As long as the connection is fairly active it doesn't happen, but if it's sitting idle for even like 30 seconds it seem to hang. I'm gonna downgrade to 3.16 and see if it's the kernel or not.

edit: Yes, downgrading the kernel seems to have made the issue go away. Is anyone else experiencing this?
happens to me over the internet. if i'm connected via LAN, it does not disconnect.
if you are using putty, enable the keep alive in the connection section.. 30 seconds works ok

campbell
Posts: 387
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Wed May 15, 2019 11:55 pm

juanjo1024 wrote:
Wed May 15, 2019 9:09 am
happens to me over the internet. if i'm connected via LAN, it does not disconnect.
if you are using putty, enable the keep alive in the connection section.. 30 seconds works ok
Still having problems, and I'm on a LAN. The connection "freezes" if there is no traffic over it for ~30 seconds, but if you press enter a few times it will eventually come back (10+ seconds later). Not connecting from putty - this is the ssh client that comes with macOS (OpenSSH_7.9p1, LibreSSL 2.7.3).

Oddly, if I first ssh into another non-Odroid board and then from there into the C2, I don't have this problem. The intermediate board is running a 4.9.x kernel and has OpenSSH_8.0p1, OpenSSL 1.1.1b. So on the face of it that would suggest there's some ssh keepalive configuration mismatch between the default settings on latest macOS and on Arch Linux. But if that's the case, then why do I only have this problem when using the mainline kernel and not the Hardkernel 3.16.x kernel?

(Also, why use putty, doesn't even Windows come with openssh now?)

rarecoil
Posts: 10
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Sat May 18, 2019 7:16 am

campbell wrote:
Sun Mar 10, 2019 7:22 am
uncarvedblock wrote:
Sun Mar 10, 2019 4:19 am
rarecoil wrote:
Wed Mar 06, 2019 1:56 pm
Has anyone had trouble upgrading to 5.0? I pulled the new Arch mainline package today and my C2 didn't survive a reboot. Haven't dug into what happened yet, since I have to pull the eMMC to find out. I don't get HDMI output on the mainline kernels.
Yes and no, I have a C2, running the Arch Linux mainline kernel, it upgraded from 4.20 > 5.0 without issue. However, my brother is running a nearly identical setup to mine, when he upgraded to 5.0 his C2 failed to boot. looking at the serial console the last few lines read:

Code: Select all

Waiting 10 seconds for device /dev/disk/by-partuuid/06440000-01 ...
ERROR: device 'PARTUUID=06440000-01' not found. Skipping fsck.
:: mounting 'PARTUUID=06440000-01' on real root
mount /new_root: can't find PARTUUID=06440000-01.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#
We have tried removing and reinstalling uboot-odroid-mainline in a chroot, but the only thing that seems to get the the C2 to boot again is downgrading to linux-aarch64-4.20. I am baffled since my C2 seemed to upgrade without issue, the hardware and software loadout are nearly identical.
What colour eMMC are you using? rarecoil, you too?
I'm using one of Ameridroid's generic eMMC cards:

https://ameridroid.com/products/emmc-5-1-module-blank

I bet this is the problem. I haven't attempted this again since my C2 is in use as a home server + haven't had time to mess with it.

Ameridroid
Posts: 244
Joined: Thu Mar 17, 2016 4:19 am
languages_spoken: english
Has thanked: 22 times
Been thanked: 24 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Ameridroid » Sat May 18, 2019 8:19 am

rarecoil wrote:
Sat May 18, 2019 7:16 am
I'm using one of Ameridroid's generic eMMC cards:

https://ameridroid.com/products/emmc-5-1-module-blank

I bet this is the problem. I haven't attempted this again since my C2 is in use as a home server + haven't had time to mess with it.
If you wish to contact our support department at orders@ameridroid.com, we will exchange the eMMC with an official HK one for the cost of shipping and price difference. That will remove the eMMC as a question regarding compatibility.

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Sat May 18, 2019 4:20 pm

I have a working 16Gb black emmc and a non working 64Gb orange emmc. I have been trying some newer patches from Jerome for the orange but no luck as yet, I will do some more testing for this on 5.2-rc when it's out as it has a few more changes. The 64Gb is only new and works on N2 (mainline variant) fine and also c2+n2 hardkernel.

Not sure if it might have worked on older mainline version (C2) as yet.

rarecoil
Posts: 10
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Sat May 18, 2019 6:31 pm

Ameridroid wrote:
Sat May 18, 2019 8:19 am
rarecoil wrote:
Sat May 18, 2019 7:16 am
I'm using one of Ameridroid's generic eMMC cards:

https://ameridroid.com/products/emmc-5-1-module-blank

I bet this is the problem. I haven't attempted this again since my C2 is in use as a home server + haven't had time to mess with it.
If you wish to contact our support department at orders@ameridroid.com, we will exchange the eMMC with an official HK one for the cost of shipping and price difference. That will remove the eMMC as a question regarding compatibility.
Seems you're out of stock on red-box HK 64GB eMMC, which would match my generic one.

I just ordered a 128GB C2 HK eMMC from you guys. No big deal. I'll take the upgrade anyway since I could use more eMMC scratch space; I was doing some analysis on my C2 this week and had to dump everything on a large MicroSD which was... slow, to say the least.

Does anyone know who is the kernel developer working on meson MMC stuff? If the Ameridroid eMMC turns out to be the issue, I will donate it to the kernel developer as test hardware.

pcbass
Posts: 1
Joined: Sun Jun 03, 2018 5:15 pm
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by pcbass » Sun May 19, 2019 7:14 pm

About running HS400 (DDR 8-Bit + 200MHz), my suggestions are....

1. Solid eMMC chip on Odroid-C2 PCB directly to decrease the data path delay of eMMC I/O, and avoid the contact issue of eMMC adapter. It could improve the quality of eMMC I/O signals.
2. eMMC Host should fine turn the input delay (internal clock for sampling RX data, or delay the RX data without fixed clock) during executing turning operation (send CMD21)
In S905 datasheet, you could find some register of like
SD_EMMC_CLOCK 0x0
[23:20] Cfg_rx_delay
[13:12] Cfg_rx_phase
SD_EMMC_DELAY 0x4 (I don't know it's for input data or output data or both)
SD_EMMC_ADJUST 0x8
SD_EMMC_CALOUT 0x10

3. Other more difficult ways are like
--Using high bandwidth oscilloscope to check the interface timing (if you could probe the eMMC I/O on Odroid-C2),
--Ask eMMC chip vendor to configure their output delay for you

About how to switch signaling voltage between 3.3V/1.8V/1.2V, unfortunately, the datasheet of S905 (v1.1.4) doesn't explain it.
(BTW, I didn't buy Odroid-C2.)

juanjo1024
Posts: 15
Joined: Sat Sep 02, 2017 10:07 pm
languages_spoken: english, spanish
ODROIDs: C2 N2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by juanjo1024 » Mon May 20, 2019 7:21 am

But if that's the case, then why do I only have this problem when using the mainline kernel and not the Hardkernel 3.16.x kernel?

(Also, why use putty, doesn't even Windows come with openssh now?)
ye its very odd, i dont remember this happening before.. and the thing that it happens to me over internet but no on lan... geez that weird

win10 ssh messes up the window whenever some app (like midnight commander, which i use a lot) changes background colors.. they never go back to black..
and i have been using putty since i can remember, so... old habits die hard

heel
Posts: 4
Joined: Sat Aug 18, 2018 6:51 pm
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by heel » Tue May 21, 2019 6:34 am

After installing Ubuntu 18.04 LTS i followed the guide: http://seafile.servator.de/sbc/odroid/n ... nstall.txt.
System reboots, but now i cannot login with "user(pw)": root (odroid) or odroid(odroid).
any ideas what pw can be.

rarecoil
Posts: 10
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Sun May 26, 2019 3:14 pm

Got the Hardkernel eMMC in. Moved my stuff over to it and did

Code: Select all

pacman -S uboot-odroid-c2-mainline linux-aarch64
. Everything worked fine on 3.16.65, so I installed and fused the new u-boot.

I get the heartbeat from the C2, but SSH doesn't come up on mainline for me. Clearly I have some issues other than eMMC timings. I don't have any more time to debug this weekend but I'll get my debug cable out and see what I can find next time I have a some time free to continue tinkering.

campbell
Posts: 387
Joined: Thu Sep 03, 2015 1:13 pm
languages_spoken: english
ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by campbell » Wed May 29, 2019 2:55 am

rarecoil wrote:
Sun May 26, 2019 3:14 pm
Got the Hardkernel eMMC in. Moved my stuff over to it and did

Code: Select all

pacman -S uboot-odroid-c2-mainline linux-aarch64
. Everything worked fine on 3.16.65, so I installed and fused the new u-boot.

I get the heartbeat from the C2, but SSH doesn't come up on mainline for me. Clearly I have some issues other than eMMC timings. I don't have any more time to debug this weekend but I'll get my debug cable out and see what I can find next time I have a some time free to continue tinkering.
I seem to remember having to explicitly pacman -R the hardkernel uboot before executing the above commands.

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Thu May 30, 2019 8:05 pm

I haven't tried this on C2 as yet but this patch solves my mmc issues on the N2

https://lkml.org/lkml/2019/5/23/574

rarecoil
Posts: 10
Joined: Sun Feb 17, 2019 1:08 pm
languages_spoken: english
ODROIDs: ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by rarecoil » Thu Jul 18, 2019 3:56 pm

campbell wrote:
Wed May 29, 2019 2:55 am
rarecoil wrote:
Sun May 26, 2019 3:14 pm
Got the Hardkernel eMMC in. Moved my stuff over to it and did

Code: Select all

pacman -S uboot-odroid-c2-mainline linux-aarch64
. Everything worked fine on 3.16.65, so I installed and fused the new u-boot.

I get the heartbeat from the C2, but SSH doesn't come up on mainline for me. Clearly I have some issues other than eMMC timings. I don't have any more time to debug this weekend but I'll get my debug cable out and see what I can find next time I have a some time free to continue tinkering.
I seem to remember having to explicitly pacman -R the hardkernel uboot before executing the above commands.
Finally had some time to try again. Did a clean install on the Hardkernel eMMC, and got mainline to work by removing the odroid-specific uboot package immediately. Everything is working on mainline again. I don't think it's eMMC-specific; I'll try booting from the old eMMC after I get my things off of it.

Ringding
Posts: 3
Joined: Sat Jul 27, 2019 10:50 pm
languages_spoken: english,german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Ringding » Sat Jul 27, 2019 11:48 pm

How do I recover the memory used for the GPU? I built 5.2-rc7 and removed bits and pieces from the configuration as well as from the device tree, to no avail. I want to run the C2 in headless mode, and with Hardkernel's 3.16 kernel, this gave me the full 2GB of RAM, but now I only get MemTotal: 1886104 kB

Ringding
Posts: 3
Joined: Sat Jul 27, 2019 10:50 pm
languages_spoken: english,german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Ringding » Sun Jul 28, 2019 9:08 pm

Actually I am not sure if this has anything to do with graphics, but the interesting observation is this:

Code: Select all

$ fdtdump meson-gxbb-odroidc2.dtb
[...]
    memory@0 {
        device_type = "memory";
        reg = <0x00000000 0x00000000 0x00000000 0x80000000>;
    };
[...]
But boot output is:

Code: Select all

[    0.000000] Memory: 1874464K/1944576K available (11260K kernel code, 1754K rwdata, 5820K rodata, 1408K init, 429K bss, 70112K reserved, 0K cma-reserved)
and this seems to be caused by:

Code: Select all

$ hexdump -C /proc/device-tree/memory\@0/reg 
00000000  00 00 00 00 00 00 00 00  00 00 00 00 78 00 00 00  |............x...|
00000010
Why? Where do these 128MB go? And why does the kernel mess with the device tree?

User avatar
mad_ady
Posts: 6886
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 245 times
Been thanked: 181 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by mad_ady » Sun Jul 28, 2019 11:11 pm

I hhink the gpu uses cma memory. Might be reserved by a kernel module.

Ringding
Posts: 3
Joined: Sat Jul 27, 2019 10:50 pm
languages_spoken: english,german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Ringding » Mon Jul 29, 2019 6:22 am

Oh crap, now I know why one would want a new U-Boot ;). With this in place, the situation is much more sane:

Code: Select all

[    0.000000] Memory: 1750456K/2075648K available (9598K kernel code, 760K rwdata, 3488K rodata, 960K init, 375K bss, 63048K reserved, 262144K cma-reserved)
(apparently cma-reserved still counts as "free"):

Code: Select all

$ free
              total        used        free      shared  buff/cache   available
Mem:        2020924       68656     1818624         944      133644     1929672
Unfortunately, it looks like the new U-Boot (U-Boot 2018.07-R001) is not able to boot the HK kernel anymore (just hangs at "Starting kernel ...").

debian-server-fanboy
Posts: 12
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by debian-server-fanboy » Fri Aug 09, 2019 11:44 pm

How stable is lima kernel driver and lima mesa?
Lima driver has been upstreamed to linux kernel and mesa, ...
https://gitlab.freedesktop.org/lima/web/wikis/home

Code: Select all

Linux debian-stretch 5.2.2 #1 SMP PREEMPT Thu Aug 8 15:34:25 EDT 2019 aarch64 GNU/Linux

debian-server-fanboy
Posts: 12
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by debian-server-fanboy » Thu Aug 15, 2019 11:16 pm

configuration:
  • meson-drm KMS driver + lima Gallium3D driver;
test: result:
  • pass;

Code: Select all

[    6.308076] [drm] Initialized lima 1.0.0 20190217 for d00c0000.gpu on minor 0
[    6.587913] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 1

Code: Select all

root@debian-stretch:~# ls -1 /dev/dri
card0
card1
renderD128
root@debian-stretch:~# ls -1 /dev/fb*
/dev/fb0

Code: Select all

===================================
EGL information:
  version: "1.4"
  vendor: "Mesa Project"
  client extensions: ...
  display extensions: ...
===================================
OpenGL ES 2.x information:
  version: "OpenGL ES 2.0 Mesa 19.1.4"
  shading language version: "OpenGL ES GLSL ES 1.0.16"
  vendor: "lima"
  renderer: "Mali450"
  extensions: ...
===================================
These users thanked the author debian-server-fanboy for the post:
brad (Thu Aug 15, 2019 11:19 pm)

debian-server-fanboy
Posts: 12
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by debian-server-fanboy » Fri Aug 16, 2019 12:10 am

configuration:
  • meson-drm KMS driver + lima Gallium3D driver;
test: result:
  • fail ([shading] shading=phong:Segmentation fault);

Code: Select all

=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     lima
    GL_RENDERER:   Mali450
    GL_VERSION:    OpenGL ES 2.0 Mesa 19.1.4
=======================================================
[build] use-vbo=false: FPS: 59 FrameTime: 16.949 ms
[build] use-vbo=true: FPS: 59 FrameTime: 16.949 ms
[texture] texture-filter=nearest: FPS: 59 FrameTime: 16.949 ms
[texture] texture-filter=linear: FPS: 59 FrameTime: 16.949 ms
[texture] texture-filter=mipmap: FPS: 59 FrameTime: 16.949 ms
[shading] shading=gouraud: FPS: 59 FrameTime: 16.949 ms
[shading] shading=blinn-phong-inf: FPS: 59 FrameTime: 16.949 ms
[shading] shading=phong:Segmentation fault

debian-server-fanboy
Posts: 12
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by debian-server-fanboy » Fri Aug 16, 2019 1:45 am

configuration:
  • meson-drm KMS driver + lima Gallium3D driver;
test: result:
  • conditional pass (see disabled benchmarks);
disabled benchmarks:
  • shading:shading=phong
  • shading:shading=cel
  • bump:bump-render=high-poly
  • ideas:speed=duration
  • terrain
  • refract

Code: Select all

=======================================================
    glmark2 2017.07
=======================================================
    OpenGL Information
    GL_VENDOR:     lima
    GL_RENDERER:   Mali450
    GL_VERSION:    OpenGL ES 2.0 Mesa 19.1.4
=======================================================
[build] use-vbo=false: FPS: 59 FrameTime: 16.949 ms
[build] use-vbo=true: FPS: 59 FrameTime: 16.949 ms
[texture] texture-filter=nearest: FPS: 59 FrameTime: 16.949 ms
[texture] texture-filter=linear: FPS: 59 FrameTime: 16.949 ms
[texture] texture-filter=mipmap: FPS: 59 FrameTime: 16.949 ms
[shading] shading=gouraud: FPS: 59 FrameTime: 16.949 ms
[shading] shading=blinn-phong-inf: FPS: 59 FrameTime: 16.949 ms
[bump] bump-render=normals: FPS: 60 FrameTime: 16.667 ms
[bump] bump-render=height: FPS: 59 FrameTime: 16.949 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 30 FrameTime: 33.333 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 20 FrameTime: 50.000 ms
[pulsar] light=false:quads=5:texture=false: FPS: 60 FrameTime: 16.667 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 15 FrameTime: 66.667 ms
[desktop] effect=shadow:windows=4: FPS: 59 FrameTime: 16.949 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 59 FrameTime: 16.949 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 59 FrameTime: 16.949 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 59 FrameTime: 16.949 ms
[jellyfish] <default>:gpir: unsupported nir_op: fsin
 FPS: 59 FrameTime: 16.949 ms
[shadow] <default>: FPS: 29 FrameTime: 34.483 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 59 FrameTime: 16.949 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 59 FrameTime: 16.949 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 59 FrameTime: 16.949 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 59 FrameTime: 16.949 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 59 FrameTime: 16.949 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5:gpir: unsupported nir_op: imov
 FPS: 60 FrameTime: 16.667 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5:ppir: loop nir_cf_node not support
gpir: unsupported nir_op: imov
 FPS: 59 FrameTime: 16.949 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5:ppir: loop nir_cf_node not support
gpir: unsupported nir_op: imov
 FPS: 59 FrameTime: 16.949 ms
=======================================================
                                  glmark2 Score: 53
=======================================================

Lost Dog
Posts: 5
Joined: Thu Jan 03, 2019 9:09 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Lost Dog » Sun Aug 18, 2019 2:54 pm

Ok.... I feel slightly dim for having to ask this....

How do we actually get the mainline kernel and headers installed and used? Is it still like post #1 compiling and installing manually? Is there a repo with the C2 mainline kernel build for an apt install?

Secondly, how do we remove old kernels? I'm used to "apt remove linux-image...." on my main system but the C2 kernels don't seem to be installed from a package.

What am I missing here?

zx64
Posts: 4
Joined: Sun Aug 18, 2019 6:19 pm
languages_spoken: english
ODROIDs: C2, XU4Q, CS2, GO
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by zx64 » Sun Aug 18, 2019 6:34 pm

debian-server-fanboy wrote:
Fri Aug 09, 2019 11:44 pm
How stable is lima kernel driver and lima mesa?
Lima driver has been upstreamed to linux kernel and mesa, ...
https://gitlab.freedesktop.org/lima/web/wikis/home

Code: Select all

Linux debian-stretch 5.2.2 #1 SMP PREEMPT Thu Aug 8 15:34:25 EDT 2019 aarch64 GNU/Linux
I get the same results as you posted. Have you been able to launch weston on lima? Weston gives me a black screen, sway launches OK but windows start to flicker more and more and it becomes unusable. I'm using the C2 on mainline as my main desktop so I am really looking forward to more progress on lima/gallium + video decoding. For the moment I stay on fbturbo

debian-server-fanboy
Posts: 12
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by debian-server-fanboy » Tue Aug 20, 2019 1:16 am

@zx64,
I didn't run weston tests yet.
My evaluation project has following priorities:
  • applications with mesa-gbm backend (PASS);
  • content_shell with ozone-chromeos-minigbm backend (FAIL);
  • content_shell with ozone-mesa-gbm backend (WIP);
  • content_shell with ozone-wayland backend;

zx64
Posts: 4
Joined: Sun Aug 18, 2019 6:19 pm
languages_spoken: english
ODROIDs: C2, XU4Q, CS2, GO
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by zx64 » Wed Aug 21, 2019 4:56 am

Lost Dog wrote:
Sun Aug 18, 2019 2:54 pm
Ok.... I feel slightly dim for having to ask this....

How do we actually get the mainline kernel and headers installed and used? Is it still like post #1 compiling and installing manually? Is there a repo with the C2 mainline kernel build for an apt install?

Secondly, how do we remove old kernels? I'm used to "apt remove linux-image...." on my main system but the C2 kernels don't seem to be installed from a package.

What am I missing here?
Don't know about Debian/Ubuntu (maybe Armbian?) but I found it easy to switch to mainline on Arch Linux Arm. First follow the instructions here :
https://archlinuxarm.org/platforms/armv ... /odroid-c2

you will first get the hardkernel uboot and kernel in the image. You can then install mainline uboot and vanilla mainline kernel (linux-aarch64) using the Arch package manager pacman, and then remove the hardkernel packages. The only c2 dedicated packages i have left are these two :

~$ pacman -Qq |grep odroid
uboot-odroid-c2-mainline
xf86-video-fbturbo-odroid-c2-git


And I just follow the mainline kernel updates using pacman -Syu

Lost Dog
Posts: 5
Joined: Thu Jan 03, 2019 9:09 am
languages_spoken: english
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Lost Dog » Wed Aug 21, 2019 9:15 am

zx64 wrote:
Wed Aug 21, 2019 4:56 am

Don't know about Debian/Ubuntu (maybe Armbian?) but I found it easy to switch to mainline on Arch Linux Arm. First follow the instructions here :
https://archlinuxarm.org/platforms/armv ... /odroid-c2

you will first get the hardkernel uboot and kernel in the image. You can then install mainline uboot and vanilla mainline kernel (linux-aarch64) using the Arch package manager pacman, and then remove the hardkernel packages. The only c2 dedicated packages i have left are these two :

~$ pacman -Qq |grep odroid
uboot-odroid-c2-mainline
xf86-video-fbturbo-odroid-c2-git


And I just follow the mainline kernel updates using pacman -Syu
Thanks for the help! I'd like to stick with my current ubuntu setup as that's what I'm familiar with. I've been playing around with the info on the first few pages in this thread and I think I was able to compile the latest mainstream kernel (5.2.9). If I've ready this thread correctly everything we need is now built in to the kernel with no patching needed.... Correct?

I built the kernel but where I am lost is installing the new kernel, generating what's needed to boot. I'm so used to a .deb installation and grub....

I'll keep trying.

badubo
Posts: 2
Joined: Tue Aug 23, 2016 6:41 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by badubo » Wed Aug 21, 2019 6:57 pm

Hi,
I have a armbian 4.18 running on my ODROIDC2, I have a ups3 but unable to use it as I don't have the right GPIO#.
Can someone point me to the offset to apply to a 4.18 (I saw in this thread it was -111 for 4.12, but that doesn't seems to work on 4.18, my sys/class/gpio is populated with gpiochip378 gpiochip497)
Thanks

User avatar
igorpec
Posts: 420
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 11 times
Been thanked: 32 times
Contact:

Re: Odroid C2 mainline kernel support

Unread post by igorpec » Tue Aug 27, 2019 7:03 am

> Don't know about Debian/Ubuntu (maybe Armbian?)

armbian-config -> system -> alternative kernels :)
ARMBIAN - follow on Twitter
linux for ARM development boards with user friendly development tools

MimCom
Posts: 49
Joined: Sun Mar 12, 2017 3:24 am
languages_spoken: english
ODROIDs: C2, XU4Q
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by MimCom » Sun Sep 08, 2019 4:07 am

https://www.kernel.org/category/releases.html says 5.4 is the next LTS candidate.

zmuss
Posts: 1
Joined: Wed Oct 02, 2019 5:52 pm
languages_spoken: english
ODROIDs: U3, XU4, C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by zmuss » Wed Oct 02, 2019 8:45 pm

zx64 wrote:
Wed Aug 21, 2019 4:56 am


Don't know about Debian/Ubuntu (maybe Armbian?) but I found it easy to switch to mainline on Arch Linux Arm. First follow the instructions here :
https://archlinuxarm.org/platforms/armv ... /odroid-c2

you will first get the hardkernel uboot and kernel in the image. You can then install mainline uboot and vanilla mainline kernel (linux-aarch64) using the Arch package manager pacman, and then remove the hardkernel packages. The only c2 dedicated packages i have left are these two :

~$ pacman -Qq |grep odroid
uboot-odroid-c2-mainline
xf86-video-fbturbo-odroid-c2-git


And I just follow the mainline kernel updates using pacman -Syu
Hi. I have succesfully installed mainline kernel to my C2 on ArchLinuxARM.
My question is, what are next steps to get video acceleration and kodi running on the box? I appreciate any help, thanks.

zx64
Posts: 4
Joined: Sun Aug 18, 2019 6:19 pm
languages_spoken: english
ODROIDs: C2, XU4Q, CS2, GO
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by zx64 » Fri Nov 01, 2019 8:00 am

zmuss wrote:
Wed Oct 02, 2019 8:45 pm
zx64 wrote:
Wed Aug 21, 2019 4:56 am


Don't know about Debian/Ubuntu (maybe Armbian?) but I found it easy to switch to mainline on Arch Linux Arm. First follow the instructions here :
https://archlinuxarm.org/platforms/armv ... /odroid-c2

you will first get the hardkernel uboot and kernel in the image. You can then install mainline uboot and vanilla mainline kernel (linux-aarch64) using the Arch package manager pacman, and then remove the hardkernel packages. The only c2 dedicated packages i have left are these two :

~$ pacman -Qq |grep odroid
uboot-odroid-c2-mainline
xf86-video-fbturbo-odroid-c2-git


And I just follow the mainline kernel updates using pacman -Syu
Hi. I have succesfully installed mainline kernel to my C2 on ArchLinuxARM.
My question is, what are next steps to get video acceleration and kodi running on the box? I appreciate any help, thanks.
I tried to follow earlier posts in this thread without success. Could not make libMali.so work and get normal video playback speed (jittery). I think the lima project will help and video decode is being merged in mainline but I stopped following after getting the XU4 :-)
https://baylibre.com/hardware-accelerat ... onitoring/

wumpus
Posts: 10
Joined: Fri Apr 01, 2016 11:16 pm
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by wumpus » Tue Nov 05, 2019 6:03 pm

FWIW I did some testing with 5.4rc5, which includes all the the aforementioned MMC patches by Jerome Brunet, but had many problems
- MMC (not eMMC) seemed to be corrupting reads: resulting in boot but with confused systemd (worked on 4.21, but never on 5.x)
- USB problems: no detection of devices plugged in after boot (similar problem on 4.21, works with 3.14), I tried applying https://lore.kernel.org/patchwork/patch/1031243/, which removed the warning but not the problem.
- no HDMI (worked on 4.21), the drm driver doesn't detect any displays
Will try 5.4rc6 next.

mg1102
Posts: 2
Joined: Wed Nov 06, 2019 4:38 am
languages_spoken: english german
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by mg1102 » Wed Nov 06, 2019 4:57 am

Hi,
As far as I know, DVFS is still disabled in mainline via the device tree, though it can be enabled by patching the FDT from u-boot when using a "reasonably new" BL1 firmware. However, I don't see any trip points defined in the device tree sources. Does that mean that thermal throttling is actually not (yet) in effect when using a mainline kernel? Or is there some magic already included in the firmware?
Thanks!

User avatar
graysky
Posts: 143
Joined: Wed Jul 13, 2016 9:11 am
languages_spoken: english
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by graysky » Sat Nov 09, 2019 5:02 pm

Is the current CPU frequency and scaling governor available under 5.3.x? I cannot find either. Arch ARM aarch64/Odroid-C2

I did find the CPU temp at least:

Code: Select all

% awk '{printf "%3.1f°C\n", $1/1000}' /sys/class/hwmon/hwmon0/temp1_input
Under 3.16.x, the current freq was /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq and the scaling governor was /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Sun Nov 10, 2019 8:34 am

mg1102 wrote:
Wed Nov 06, 2019 4:57 am
Hi,
As far as I know, DVFS is still disabled in mainline via the device tree, though it can be enabled by patching the FDT from u-boot when using a "reasonably new" BL1 firmware. However, I don't see any trip points defined in the device tree sources. Does that mean that thermal throttling is actually not (yet) in effect when using a mainline kernel? Or is there some magic already included in the firmware?
Thanks!
Hi mg1102,
DVFS tables are configured in arm trusted firmware blobs which includes frequency steps, cpu core voltage and temperature trip values.

By default DVFS table with max frequency of 1.536MHz is configured in the live table and passed to mainline kernel as this is the standard supported max CPU frequency. In this configuration there is a secret bit that is set that hides unsupported frequencies above 1.536 MHz which can cause the kernel to crash during boot (it very rarely boot at 2.016MHz for example). There is also no driver in mainline that allows this to be modified as far as I am aware at the moment but it should be possible for one to be developed. Driver would need to make SCPI calls to the firmware to to make changes.

joy explained the solution here in some more details for how it works with the hardkernel kernel viewtopic.php?f=141&t=23044&hilit=DVFS& ... 50#p181017

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Sun Nov 10, 2019 8:45 am

graysky wrote:
Sat Nov 09, 2019 5:02 pm
Is the current CPU frequency and scaling governor available under 5.3.x? I cannot find either. Arch ARM aarch64/Odroid-C2
These 3 lines need to be removed from the device tree to prevent it from being disabled - - or you can set it to "okay" rather than "disabled"

Code: Select all

&scpi_clocks {
	status = "disabled";
};
https://git.kernel.org/pub/scm/linux/ke ... 5.3.9#n246

Here is the boot.ini mod I was able to add to remove on booting using the hardkernel uboot (well it does not remove it but it enables it)

viewtopic.php?f=135&t=22717&hilit=dvfs& ... 00#p197638

mg1102
Posts: 2
Joined: Wed Nov 06, 2019 4:38 am
languages_spoken: english german
ODROIDs: C2
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by mg1102 » Thu Nov 14, 2019 4:16 am

brad wrote:
Sun Nov 10, 2019 8:34 am
mg1102 wrote:
Wed Nov 06, 2019 4:57 am
Hi,
As far as I know, DVFS is still disabled in mainline via the device tree, though it can be enabled by patching the FDT from u-boot when using a "reasonably new" BL1 firmware. However, I don't see any trip points defined in the device tree sources. Does that mean that thermal throttling is actually not (yet) in effect when using a mainline kernel? Or is there some magic already included in the firmware?
Thanks!
Hi mg1102,
DVFS tables are configured in arm trusted firmware blobs which includes frequency steps, cpu core voltage and temperature trip values.

By default DVFS table with max frequency of 1.536MHz is configured in the live table and passed to mainline kernel as this is the standard supported max CPU frequency. In this configuration there is a secret bit that is set that hides unsupported frequencies above 1.536 MHz which can cause the kernel to crash during boot (it very rarely boot at 2.016MHz for example). There is also no driver in mainline that allows this to be modified as far as I am aware at the moment but it should be possible for one to be developed. Driver would need to make SCPI calls to the firmware to to make changes.

joy explained the solution here in some more details for how it works with the hardkernel kernel viewtopic.php?f=141&t=23044&hilit=DVFS& ... 50#p181017
Hi Brad,
Thanks for the explanation. If I understand it correctly, thermal throttling will work even if the kernel has DVFS (i.e., scpi_clocks) disabled since it is handled by the trusted firmware. This would be good! I'd really like to avoid burning my C2 under heavy load when using mainline... :D

What confused me was the fact that the device tree of HK's kernel includes a thermal zone with sensors, trip points, cooling maps, etc. (see https://github.com/hardkernel/linux/blo ... 2.dts#L698), while the device tree in mainline does not. This suggested to me that all of this could have an impact.

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

Re: Odroid C2 mainline kernel support

Unread post by brad » Thu Nov 14, 2019 5:24 pm

mg1102 wrote:
Thu Nov 14, 2019 4:16 am
Thanks for the explanation. If I understand it correctly, thermal throttling will work even if the kernel has DVFS (i.e., scpi_clocks) disabled since it is handled by the trusted firmware. This would be good! I'd really like to avoid burning my C2 under heavy load when using mainline... :D

What confused me was the fact that the device tree of HK's kernel includes a thermal zone with sensors, trip points, cooling maps, etc. (see https://github.com/hardkernel/linux/blo ... 2.dts#L698), while the device tree in mainline does not. This suggested to me that all of this could have an impact.
Yes I believe this is correct, the defaults provided by the firware would be correct. it appears that the defaults can be overridden by the kernel talking to the firmware via scpi calls (well hardkernel kernel)
These users thanked the author brad for the post:
mg1102 (Fri Nov 15, 2019 4:39 am)

Flole
Posts: 32
Joined: Thu Apr 13, 2017 10:14 pm
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Unread post by Flole » Wed Nov 20, 2019 10:35 am

Hi everyone,

I am trying to upgrade my kernel again. Previously I used the builds from tobetter and now I thought it's a good time to upgrade the kernel. I first tried to upgrade uboot as I am still running U-Boot 2015.01-00070-g5785ef8. The "new" versions all use ext4 with /boot/ while I am using a boot.ini file to run whatever I need to run (I would like it to load my kernel and dtb from a tftp if possible), unfortunately I have no clue what files I need to run my own uboot script in these new versions, maybe someone could give me a hint?

This issue might be related to the old uboot, but I tried to install http://seafile.servator.de/sbc/odroid/n ... -arm64.zip and then boot it using nfsroot, but Ethernet never really came up. The LEDs on the Odroid were indicating a Gigabit Link but the Kernel just said

Code: Select all

....
[    1.049021] UMP: <\r><\n>
[    1.049027] UMP device driver -v4.19.8 loaded<\r><\n>
[    1.059850] loop: module loaded<\r><\n>
[    1.061264] libphy: Fixed MDIO Bus: probed<\r><\n>
[    1.061956] tun: Universal TUN/TAP device driver, 1.6<\r><\n>
[    1.067146] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k<\r><\n>
[    1.072225] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.<\r><\n>
[    1.078111] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k<\r><\n>
[    1.084979] igb: Copyright (c) 2007-2014 Intel Corporation.<\r><\n>
[    1.090530] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k<\r><\n>
[    1.098263] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.<\r><\n>
[    1.104155] sky2: driver version 1.30<\r><\n>
[    1.108337] meson8b-dwmac c9410000.ethernet: Cannot get CSR clock<\r><\n>
[    1.113795] meson8b-dwmac c9410000.ethernet: PTP uses main clock<\r><\n>
[    1.119741] meson8b-dwmac c9410000.ethernet: no reset control found<\r><\n>
[    1.126356] stmmaceth c9410000.ethernet: Cannot get CSR clock<\r><\n>
[    1.131649] stmmaceth c9410000.ethernet: PTP uses main clock<\r><\n>
[    1.137245] stmmaceth c9410000.ethernet: no reset control found<\r><\n>
[    1.143316] stmmaceth c9410000.ethernet: Version ID not available<\r><\n>
[    1.149151] stmmaceth c9410000.ethernet: <9>DWMAC1000<\r><\n>
[    1.153981] stmmaceth c9410000.ethernet: DMA HW capability register supported<\r><\n>
[    1.161050] stmmaceth c9410000.ethernet: Normal descriptors<\r><\n>
[    1.166570] stmmaceth c9410000.ethernet: Ring mode enabled<\r><\n>
[    2.209860] libphy: stmmac: probed<\r><\n>
[    2.210626] VFIO - User Level meta-driver version: 0.3<\r><\n>
[    2.213714] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver<\r><\n>
[    2.219214] ehci-pci: EHCI PCI platform driver<\r><\n>
[    2.223634] ehci-platform: EHCI generic platform driver<\r><\n>
....
[    2.769709] console [netcon0] enabled<\r><\n>
[    2.773202] netconsole: network logging started<\r><\n>
[    2.777835] hctosys: unable to open rtc device (rtc0)<\r><\n>
[    2.782958] stmmaceth c9410000.ethernet eth0: device MAC address xx:xx:xx:xx:xx:xx<\r><\n>
[    2.790677] meson-saradc c1108680.adc: failed to get core clk<\r><\n>
[    2.797029] meson-i2c c1108500.i2c: can't get device clock<\r><\n>
[    2.797998] Generic PHY stmmac-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)<\r><\n>
[    2.801850] meson-gx-mmc d0072000.mmc: Linked as a consumer to regulator.4<\r><\n>
[    2.818188] meson-gx-mmc d0072000.mmc: Linked as a consumer to regulator.5<\r><\n>
[    2.824994] meson-gx-mmc d0072000.mmc: Got CD GPIO<\r><\n>
[    2.829898] meson-gx-mmc d0072000.mmc: can't get clk-gate pinctrl, using clk_stop bit<\r><\n>
[    2.837515] meson-gx-mmc d0072000.mmc: Dropping the link to regulator.5<\r><\n>
[    2.844048] meson-gx-mmc d0072000.mmc: Dropping the link to regulator.4<\r><\n>
[    2.851012] meson-gx-mmc d0074000.mmc: Linked as a consumer to regulator.2<\r><\n>
[    2.857442] meson-gx-mmc d0074000.mmc: Linked as a consumer to regulator.1<\r><\n>
[    2.864236] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq<\r><\n>
[    2.869742] meson-gx-mmc d0074000.mmc: can't get clk-gate pinctrl, using clk_stop bit<\r><\n>
[    2.877509] meson-gx-mmc d0074000.mmc: Dropping the link to regulator.1<\r><\n>
[    2.884055] meson-gx-mmc d0074000.mmc: Dropping the link to regulator.2<\r><\n>
[    2.891697] stmmaceth c9410000.ethernet eth0: No Safety Features support found<\r><\n>
[    2.897760] stmmaceth c9410000.ethernet eth0: RX IPC Checksum Offload disabled<\r><\n>
[    2.904912] stmmaceth c9410000.ethernet eth0: No MAC Management Counters available<\r><\n>
[    2.912410] stmmaceth c9410000.ethernet eth0: PTP not supported by HW<\r><\n>
[   12.925833] Waiting up to 110 more seconds for network.<\r><\n>
[   22.933832] Waiting up to 100 more seconds for network.<\r><\n>
[   32.941834] Waiting up to 90 more seconds for network.<\r><\n>
[   42.949833] Waiting up to 80 more seconds for network.<\r><\n>
[   52.957832] Waiting up to 70 more seconds for network.<\r><\n>
[   62.965832] Waiting up to 60 more seconds for network.<\r><\n>
[   72.973832] Waiting up to 50 more seconds for network.<\r><\n>
[   82.981832] Waiting up to 40 more seconds for network.<\r><\n>
[   92.989832] Waiting up to 30 more seconds for network.<\r><\n>
[  102.997832] Waiting up to 20 more seconds for network.<\r><\n>
[  113.005832] Waiting up to 10 more seconds for network.<\r><\n>
and then stalled. I would have expected the network to come up and the kernel to mount my rootfs and then continue booting. Anybody knows what might cause this? Is this related to my old uboot?

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: Google [Bot] and 2 guests