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 wrote: ↑Sun Mar 10, 2019 9:25 pmYou 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.
Odroid C2 mainline kernel support
-
- 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
-
- 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
Yes I know its a pain as it breaks boot

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.
-
- 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
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
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
-
- 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
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.
Lots of changes are still happening in the video decoder department so im not sure exactly where it is at currently.
-
- 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
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:
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)
-
- 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
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:
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 mainline dtb is missing the /gpio_keys section, (for gpiopower). Referring to the wiki page: Power Off and Wake Up using GPIO Key Button
- 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.
-
- 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
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/996campbell wrote: ↑Mon Mar 11, 2019 12:41 amThis again? When are they gonna stop fucking with the clock phase? It breaks things every single time.brad wrote: ↑Sun Mar 10, 2019 9:25 pmYou can maybe try to revert this commit in 5.0 to see if the problem disappears. https://lkml.org/lkml/2018/12/6/746uncarvedblock wrote: ↑Sun Mar 10, 2019 4:19 amWe 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.
I know it can have a big impact on which cards are able to be detected (or tuned) at boot.
-
- 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
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 wrote: ↑Thu Apr 18, 2019 6:38 pmLooks 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
-
- 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
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 arrivescampbell wrote: ↑Sat Apr 20, 2019 5:39 amThanks 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 wrote: ↑Thu Apr 18, 2019 6:38 pmLooks 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
-
- 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
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?
edit: Yes, downgrading the kernel seems to have made the issue go away. Is anyone else experiencing this?
-
- 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
Still doing it in 5.1.0campbell wrote: ↑Sun Apr 28, 2019 8:19 amAnyone 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?
-
- 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
happens to me over the internet. if i'm connected via LAN, it does not disconnect.campbell wrote: ↑Sun Apr 28, 2019 8:19 amAnyone 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?
if you are using putty, enable the keep alive in the connection section.. 30 seconds works ok
-
- 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
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).juanjo1024 wrote: ↑Wed May 15, 2019 9:09 amhappens 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
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?)
-
- 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
I'm using one of Ameridroid's generic eMMC cards:campbell wrote: ↑Sun Mar 10, 2019 7:22 amWhat colour eMMC are you using? rarecoil, you too?uncarvedblock wrote: ↑Sun Mar 10, 2019 4:19 amYes 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:
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.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 ]#
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.
-
- Posts: 244
- Joined: Thu Mar 17, 2016 4:19 am
- languages_spoken: english
- Has thanked: 22 times
- Been thanked: 25 times
- Contact:
Re: Odroid C2 mainline kernel support
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.rarecoil wrote: ↑Sat May 18, 2019 7:16 amI'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.
-
- 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
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.
Not sure if it might have worked on older mainline version (C2) as yet.
-
- 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
Seems you're out of stock on red-box HK 64GB eMMC, which would match my generic one.Ameridroid wrote: ↑Sat May 18, 2019 8:19 amIf 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.rarecoil wrote: ↑Sat May 18, 2019 7:16 amI'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.
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.
-
- 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
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.)
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.)
-
- 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
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 weirdBut 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?)
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
-
- 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
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.
System reboots, but now i cannot login with "user(pw)": root (odroid) or odroid(odroid).
any ideas what pw can be.
-
- 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
Got the Hardkernel eMMC in. Moved my stuff over to it and did . 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.
Code: Select all
pacman -S uboot-odroid-c2-mainline linux-aarch64
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.
-
- 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
I seem to remember having to explicitly pacman -R the hardkernel uboot before executing the above commands.rarecoil wrote: ↑Sun May 26, 2019 3:14 pmGot the Hardkernel eMMC in. Moved my stuff over to it and did. Everything worked fine on 3.16.65, so I installed and fused the new u-boot.Code: Select all
pacman -S uboot-odroid-c2-mainline linux-aarch64
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.
-
- 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
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
https://lkml.org/lkml/2019/5/23/574
-
- 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
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.campbell wrote: ↑Wed May 29, 2019 2:55 amI seem to remember having to explicitly pacman -R the hardkernel uboot before executing the above commands.rarecoil wrote: ↑Sun May 26, 2019 3:14 pmGot the Hardkernel eMMC in. Moved my stuff over to it and did. Everything worked fine on 3.16.65, so I installed and fused the new u-boot.Code: Select all
pacman -S uboot-odroid-c2-mainline linux-aarch64
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.
-
- 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
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
-
- 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
Actually I am not sure if this has anything to do with graphics, but the interesting observation is this:
But boot output is:
and this seems to be caused by:
Why? Where do these 128MB go? And why does the kernel mess with the device tree?
Code: Select all
$ fdtdump meson-gxbb-odroidc2.dtb
[...]
memory@0 {
device_type = "memory";
reg = <0x00000000 0x00000000 0x00000000 0x80000000>;
};
[...]
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)
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
- mad_ady
- Posts: 6888
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4, C1+, C2, N1, H2, N2
- Location: Bucharest, Romania
- Has thanked: 248 times
- Been thanked: 181 times
- Contact:
Re: Odroid C2 mainline kernel support
I hhink the gpu uses cma memory. Might be reserved by a kernel module.
-
- 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
Oh crap, now I know why one would want a new U-Boot
. With this in place, the situation is much more sane:
(apparently cma-reserved still counts as "free"):
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 ...").

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)
Code: Select all
$ free
total used free shared buff/cache available
Mem: 2020924 68656 1818624 944 133644 1929672
-
- 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
How stable is lima kernel driver and lima mesa?
https://gitlab.freedesktop.org/lima/web/wikis/homeLima driver has been upstreamed to linux kernel and mesa, ...
Code: Select all
Linux debian-stretch 5.2.2 #1 SMP PREEMPT Thu Aug 8 15:34:25 EDT 2019 aarch64 GNU/Linux
-
- 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
configuration:
- meson-drm KMS driver + lima Gallium3D driver;
- kmscube application (https://gitlab.freedesktop.org/mesa/kmscube/) with hardware accelerated 3D graphics (on screen rendering);
- 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)
-
- 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
configuration:
- meson-drm KMS driver + lima Gallium3D driver;
- glmark2-es2-drm application (https://github.com/glmark2/glmark2/) with hardware accelerated 3D graphics (on screen rendering);
- 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
-
- 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
configuration:
- meson-drm KMS driver + lima Gallium3D driver;
- glmark2-es2-drm application (https://github.com/glmark2/glmark2/) with hardware accelerated 3D graphics (on screen rendering);
- conditional pass (see 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
=======================================================
-
- 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
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?
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?
-
- 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
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 fbturbodebian-server-fanboy wrote: ↑Fri Aug 09, 2019 11:44 pmHow stable is lima kernel driver and lima mesa?
https://gitlab.freedesktop.org/lima/web/wikis/homeLima driver has been upstreamed to linux kernel and mesa, ...
Code: Select all
Linux debian-stretch 5.2.2 #1 SMP PREEMPT Thu Aug 8 15:34:25 EDT 2019 aarch64 GNU/Linux
-
- 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
@zx64,
I didn't run weston tests yet.
My evaluation project has following priorities:
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;
-
- 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
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 :Lost Dog wrote: ↑Sun Aug 18, 2019 2:54 pmOk.... 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?
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
-
- 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
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?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
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.
-
- 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
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
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
- igorpec
- Posts: 421
- 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
> Don't know about Debian/Ubuntu (maybe Armbian?)
armbian-config -> system -> alternative kernels
armbian-config -> system -> alternative kernels

-
- 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
https://www.kernel.org/category/releases.html says 5.4 is the next LTS candidate.
-
- 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
Hi. I have succesfully installed mainline kernel to my C2 on ArchLinuxARM.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
My question is, what are next steps to get video acceleration and kodi running on the box? I appreciate any help, thanks.
-
- 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
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 XU4zmuss wrote: ↑Wed Oct 02, 2019 8:45 pmHi. I have succesfully installed mainline kernel to my C2 on ArchLinuxARM.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
My question is, what are next steps to get video acceleration and kodi running on the box? I appreciate any help, thanks.

https://baylibre.com/hardware-accelerat ... onitoring/
-
- 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
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.
- 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.
-
- 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
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!
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!
- 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
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:
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
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
-
- 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
Hi mg1102,mg1102 wrote: ↑Wed Nov 06, 2019 4:57 amHi,
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!
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
-
- 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
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";
};
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
-
- 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
Hi Brad,brad wrote: ↑Sun Nov 10, 2019 8:34 amHi mg1102,mg1102 wrote: ↑Wed Nov 06, 2019 4:57 amHi,
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!
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
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... 
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.
-
- 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
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)mg1102 wrote: ↑Thu Nov 14, 2019 4:16 amThanks 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...
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.
-
- 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
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
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?
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>
Who is online
Users browsing this forum: No registered users and 2 guests