Odroid C2 mainline kernel support
- cdu13a
- Posts: 140
- Joined: Tue Jan 20, 2015 3:33 pm
- languages_spoken: english
- ODROIDs: C1, C2, XU4, HC1
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 775
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Hi tux, I too have an emmc card which produces errors with all the latest fixes (im using 4.14.5). My card that has issues is a 16Gb (its from the first orig batch) but I can get it working with some hacks to the current driver. Now that I know it might be related to specific card versions I will look into it some more.tuxx wrote:Ok, I really apologize, but I wrote a post full of mistakes. Just to clarify:
- My board is odroid C2
- My kernel is 4.14.8
I did my tests and I noticed something very strange. I have two emmc cards: one bought with my C2 and one bought years ago with my C1+.
- The C2 card is fully functional with hardkernel kernel but when I upgrade to mainline, I get all the above errors.
- I do the same procedure with the old C1+ emmc card (using Odroid C2 of course) and everything is perfect.
So either the cards are different and C2 card has issues with mainline, or the C2 emmc card is dying.
Edit: for completeness and so I dont forget, 2 possible methods for a fix
2nd Edit: Option 1 below had some issues on 2 occasions for me (so I made it hard to read)
1) Edit "drivers/mmc/host/meson-gx-mmc.c" change the initialisation tx phase to 0 and recompile (sequential reads of 142Mb/s)....
clk_set_phase(host->tx_clk, 270);
should become
clk_set_phase(host->tx_clk, 0);
2) teknoid's fix, edit your device tree as per this post viewtopic.php?f=135&t=22717&start=600#p203209
The "max-frequency = <100000000>;" is the key line, I had success with a value of 150,000,000 (approx 115Mb/s sequential read, 100,000,000 is about 95Mb/s read.
-
- Posts: 775
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Hi gügü, I don't have an Odroid C1 and im not sure of the current status but the work has begun and it is possible to boot.gügü wrote:What? Are you saying that Odroid C1 can boot mainline kernel 4.18?
If it is so then create a new Thread for Odroid C1 mainline kernel support and we can follow in parallel.
Thanx for your input.
- tuxx
- Posts: 48
- Joined: Fri Mar 11, 2016 6:42 am
- languages_spoken: english
- ODROIDs: C1+, C2
- Contact:
Re: Odroid C2 mainline kernel support
@brad
thanks for your feedback!
-
- Posts: 775
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
I edited my post above, I think option 2 is only suitable now for emmc fix (my clock at 150000000). I had some issues today on 2 restarts which resulted in CRC errors on boot with option 1.tuxx wrote:@cdu13a
@brad
thanks for your feedback!
-
- Posts: 68
- Joined: Sun Dec 20, 2015 6:35 am
- languages_spoken: english
- ODROIDs: C1 - C2
- Contact:
Re: Odroid C2 mainline kernel support
Please let me know because I want to test mainline kernel for Odroid C1. I have 2 boards and I'm looking for a compiled kernel I could test.brad wrote:Hi gügü, I don't have an Odroid C1 and im not sure of the current status but the work has begun and it is possible to boot.gügü wrote:What? Are you saying that Odroid C1 can boot mainline kernel 4.18?
If it is so then create a new Thread for Odroid C1 mainline kernel support and we can follow in parallel.
Thanx for your input.
Thanx for the feedback!
-
- Posts: 6
- Joined: Wed Dec 27, 2017 8:20 pm
- languages_spoken: english; german
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
To make the eMMC module (black Hardkernel version) work, I reduced the max-frequency to 150000000 in meson-gxbb-odroidc2.dts to avoid CRC errors.
However, I don't have trim support under the mainline kernel anymore. "lsblk --discard" indicates a "0." With the Hardkernel kernel I could still use trim for the eMMC module. Does trim work for you under the mainline kernel?
-
- Posts: 9
- Joined: Wed Jun 08, 2016 11:57 pm
- languages_spoken: english
- ODROIDs: odroid-c2
- Contact:
Re: Odroid C2 mainline kernel support
Code: Select all
pacman -R uboot-odroid-c2
pacman -S uboot-odroid-c2-mainline linux-aarch64
reboot
1) haveged systemd service fails:
Code: Select all
[root@odroid-c2 ~]# systemctl status haveged
* haveged.service - Entropy Harvesting Daemon
Loaded: loaded (/usr/lib/systemd/system/haveged.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2018-01-05 20:29:59 UTC; 10min ago
Docs: man:haveged(8)
Process: 303 ExecStart=/usr/bin/haveged -F -w 1024 -v 1 (code=exited, status=1/FAILURE)
Main PID: 303 (code=exited, status=1/FAILURE)
Jan 05 20:29:58 odroid-c2 systemd[1]: Started Entropy Harvesting Daemon.
Jan 05 20:29:58 odroid-c2 haveged[303]: haveged: Couldn't initialize HAVEGE rng 5
Jan 05 20:29:58 odroid-c2 haveged[303]: haveged starting up
Jan 05 20:29:59 odroid-c2 systemd[1]: haveged.service: Main process exited, code=exited, status=1/FAILURE
Jan 05 20:29:59 odroid-c2 systemd[1]: haveged.service: Failed with result 'exit-code'.
2) systemd-modules-load also fails:
Code: Select all
[root@odroid-c2 ~]# systemctl status systemd-modules-load
* systemd-modules-load.service - Load Kernel Modules
Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-12-21 13:33:56 UTC; 2 weeks 1 days ago
Docs: man:systemd-modules-load.service(8)
man:modules-load.d(5)
Process: 254 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
Main PID: 254 (code=exited, status=1/FAILURE)
Dec 21 13:33:55 odroid-c2 systemd-modules-load[254]: Failed to find module 'aml_i2c'
Dec 21 13:33:56 odroid-c2 systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAIL
Dec 21 13:33:56 odroid-c2 systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Dec 21 13:33:56 odroid-c2 systemd[1]: Failed to start Load Kernel Modules.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
3) The RTC shield hardware clock is not working:
Code: Select all
[root@odroid-c2 ~]# hwclock -r
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
[root@odroid-c2 ~]# timedatectl
Local time: Fri 2018-01-05 20:31:46 UTC
Universal time: Fri 2018-01-05 20:31:46 UTC
RTC time: n/a
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
[root@odroid-c2 ~]# ./timeupd
Couldn't open blob from '/boot/dtbs/meson64_odroidc2.dtb': No such file or directory
modprobe: FATAL: Module aml_i2c not found in directory /lib/modules/4.14.11-1-ARCH
Code: Select all
#!/bin/bash
fdtput -t s /boot/dtbs/meson64_odroidc2.dtb /i2c@c1108500/pcf8563@51 status "okay"
modprobe aml_i2c
#hwclock --systohc --utc
exit
It is now running 4.14.11-1-ARCH
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
So instead of doing this, you have to do (in the /boot/dtbs/amlogic/ dir):mcloaked wrote:fdtput -t s /boot/dtbs/meson64_odroidc2.dtb /i2c@c1108500/pcf8563@51 status "okay"
Code: Select all
dtc -I dtb -O dts meson-gxbb-odroidc2.dtb > meson-gxbb-odroidc2.dts
Code: Select all
pcf8563@51 {
status = "okay";
compatible = "nxp,pcf8563";
reg = <0x51>;
#clock-cells = <0x0>;
};
Code: Select all
dtc -I dts -O dtb meson-gxbb-odroidc2.dts > meson-gxbb-odroidc2.dtb
-
- Posts: 9
- Joined: Wed Jun 08, 2016 11:57 pm
- languages_spoken: english
- ODROIDs: odroid-c2
- Contact:
Re: Odroid C2 mainline kernel support
I changed timeupd
Code: Select all
#!/bin/bash
fdtput -t s /boot/dtbs/amlogic/meson-gxbb-odroidc2.dtb /i2c@c1108500/pcf8563@51 status "okay"
modprobe aml_i2c
#hwclock --systohc --utc
exit
Code: Select all
[root@odroid-c2 ~]# ./timeupd
Error at '/i2c@c1108500/pcf8563@51': FDT_ERR_NOTFOUND
modprobe: FATAL: Module aml_i2c not found in directory /lib/modules/4.14.11-1-ARCH
-
- Posts: 775
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Hi mcloaked,mcloaked wrote: So I guess I need to get the aml_i2c module loaded?
mainline kernel has i2c drivers built into the kernel with default settings so there is no need to load any aml_i2c driver. What you are likely missing is the driver for the actual RTC chip which is not enabled by default. The guys from archlinux might be able to add this as an option for you to their kernel release or alternatively you can compile a new kernel with this module. Module would be named rtc-pcf8563 and it would somehow need to be added into the device tree similar to what campbell has suggested (or it might possibly be automatically detected). I haven't used RTC and not sure exactly what might be required int he devicetree.
Device Drivers > Real Time Clock ->
CONFIG_RTC_DRV_PCF8563: │
│ │
│ If you say yes here you get support for the │
│ Philips PCF8563 RTC chip. The Epson RTC8564 │
│ should work as well. │
│ │
│ This driver can also be built as a module. If so, the module │
│ will be called rtc-pcf8563. │
│ │
│ Symbol: RTC_DRV_PCF8563 [=n] │
│ Type : tristate │
│ Prompt: Philips PCF8563/Epson RTC8564 │
│ Location: │
│ -> Device Drivers │
│ -> Real Time Clock (RTC_CLASS [=y]) │
│ Defined at drivers/rtc/Kconfig:449 │
│ Depends on: RTC_CLASS [=y] && I2C [=y]
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
Code: Select all
i2c_dev
rtc_pcf8563
- tobetter
- Posts: 2622
- Joined: Mon Feb 25, 2013 10:55 am
- languages_spoken: Korean, English
- ODROIDs: X, X2, U2, U3, XU3, C1
- Location: Paju, South Korea
- Contact:
Re: Odroid C2 mainline kernel support
I've observed that 'eth0' is not present in the mainline kernel 4.13.x and have tried 4.15.x recently. After fixing kernel configuration, finally I am able to make the on-board ethernet run on ODROID-C2.maxvirrozeito wrote:With mainline u-boot (2017.09), mainline kernel (4.13.9) and Ubuntu minimal rootfs (17.10), I cannot connect over Ethernet.
The interface eth0 is missing altogether (only lo is present when invoking ifconfig). Has anyone faced this problem? If so, how could I resolve it?
I already tried to set something in /etc/network/interfaces but to no avail.
Code: Select all
root@odroidc2:/home/tobetter# uname -a
Linux odroidc2 4.15.0-rc6 #2 SMP PREEMPT Sat Jan 6 04:53:52 EST 2018 aarch64 GNU/Linux
root@odroidc2:/home/tobetter# ifconfig
eth0 Link encap:Ethernet HWaddr 00:1e:06:33:0d:3f
inet addr:192.168.0.14 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21e:6ff:fe33:d3f/64 Scope:Link
inet6 addr: fd00:ac20:2e25:7682:21e:6ff:fe33:d3f/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2745 (2.6 KiB) TX bytes:2174 (2.1 KiB)
Interrupt:18
-
- Posts: 6
- Joined: Wed Dec 27, 2017 8:20 pm
- languages_spoken: english; german
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
I use rng-tools instead of haveged with mainline kernel and i got an entropy value > 3400 with the hardware TRNG.mcloaked wrote: 1) haveged systemd service fails:
Is there a workaround?Code: Select all
[root@odroid-c2 ~]# systemctl status haveged * haveged.service - Entropy Harvesting Daemon Loaded: loaded (/usr/lib/systemd/system/haveged.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2018-01-05 20:29:59 UTC; 10min ago Docs: man:haveged(8) Process: 303 ExecStart=/usr/bin/haveged -F -w 1024 -v 1 (code=exited, status=1/FAILURE) Main PID: 303 (code=exited, status=1/FAILURE) Jan 05 20:29:58 odroid-c2 systemd[1]: Started Entropy Harvesting Daemon. Jan 05 20:29:58 odroid-c2 haveged[303]: haveged: Couldn't initialize HAVEGE rng 5 Jan 05 20:29:58 odroid-c2 haveged[303]: haveged starting up Jan 05 20:29:59 odroid-c2 systemd[1]: haveged.service: Main process exited, code=exited, status=1/FAILURE Jan 05 20:29:59 odroid-c2 systemd[1]: haveged.service: Failed with result 'exit-code'.
-
- Posts: 9
- Joined: Wed Jun 08, 2016 11:57 pm
- languages_spoken: english
- ODROIDs: odroid-c2
- Contact:
Re: Odroid C2 mainline kernel support
Thank you Michi - I installed rng-tools, disabled and stopped the haveged systemd service, and then started and enabled the rngd service. Now this passes the test doingMichi wrote:I use rng-tools instead of haveged with mainline kernel and i got an entropy value > 3400 with the hardware TRNG.mcloaked wrote: 1) haveged systemd service fails:
Is there a workaround?Code: Select all
[root@odroid-c2 ~]# systemctl status haveged * haveged.service - Entropy Harvesting Daemon Loaded: loaded (/usr/lib/systemd/system/haveged.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2018-01-05 20:29:59 UTC; 10min ago Docs: man:haveged(8) Process: 303 ExecStart=/usr/bin/haveged -F -w 1024 -v 1 (code=exited, status=1/FAILURE) Main PID: 303 (code=exited, status=1/FAILURE) Jan 05 20:29:58 odroid-c2 systemd[1]: Started Entropy Harvesting Daemon. Jan 05 20:29:58 odroid-c2 haveged[303]: haveged: Couldn't initialize HAVEGE rng 5 Jan 05 20:29:58 odroid-c2 haveged[303]: haveged starting up Jan 05 20:29:59 odroid-c2 systemd[1]: haveged.service: Main process exited, code=exited, status=1/FAILURE Jan 05 20:29:59 odroid-c2 systemd[1]: haveged.service: Failed with result 'exit-code'.
Code: Select all
[root@odroid-c2 ~]# dd if=/dev/random of=/dev/null bs=1024 count=1 iflag=fullblock
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.0013131 s, 780 kB/s
Edit: after rebooting the rngd service started fine, and there is no longer a failed haveged service so the problem with haveged is resolved (by switching to rngd).
Also
Code: Select all
[root@odroid-c2 ~]# cat /proc/sys/kernel/random/entropy_avail
3101
-
- Posts: 9
- Joined: Wed Jun 08, 2016 11:57 pm
- languages_spoken: english
- ODROIDs: odroid-c2
- Contact:
Re: Odroid C2 mainline kernel support
This morning I did a system update which brought in kernel 4.14.12-1-ARCH - with the same issues as previously. I presume that the changes to the file you suggested ( rebuilding meson-gxbb-odroidc2.dtb ) don't need to be repeated?campbell wrote:Try creating /etc/modules-load.d/rtc.conf with:"hwclock -r" is working for me even with those commented out, though. I'm using Arch Linux with the same kernel version you've got, although there may have been other hoops I had to jump through to get it working.Code: Select all
i2c_dev rtc_pcf8563
However the hwclock -r command still fails - and the modules load service also still fails for aml_i2c (presume that can be switched to not attempt to load if it doesn't need to do so? What needs to be changed to do that?).
Code: Select all
[root@odroid-c2 ~]# hwclock -r
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
[root@odroid-c2 ~]# systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
* systemd-modules-load.service loaded failed failed Load Kernel Modules
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
[root@odroid-c2 ~]# systemctl status systemd-modules-load
* systemd-modules-load.service - Load Kernel Modules
Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor
Active: failed (Result: exit-code) since Thu 2017-12-21 13:34:08 UTC; 2 weeks 1 days
Docs: man:systemd-modules-load.service(8)
man:modules-load.d(5)
Process: 252 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FA
Main PID: 252 (code=exited, status=1/FAILURE)
Dec 21 13:34:07 odroid-c2 systemd-modules-load[252]: Failed to find module 'aml_i2c'
Dec 21 13:34:08 odroid-c2 systemd-modules-load[252]: Inserted module 'i2c_dev'
Dec 21 13:34:08 odroid-c2 systemd-modules-load[252]: Inserted module 'rtc_pcf8563'
Dec 21 13:34:08 odroid-c2 systemd[1]: systemd-modules-load.service: Main process exited,
Dec 21 13:34:08 odroid-c2 systemd[1]: systemd-modules-load.service: Failed with result '
Dec 21 13:34:08 odroid-c2 systemd[1]: Failed to start Load Kernel Modules.
Warning: Journal has been rotated since unit was started. Log output is incomplete or un
I found that the changes I made to meson-gxbb-odroidc2.dtb were overwridden since the time stamp on that file was from today at the time the new kernel was installed, so I re-did the changes you suggested last night, and then rebooted. Now the system-modules-load service still fails but without the aml_i2c module error:
Code: Select all
[root@odroid-c2 ~]# systemctl status systemd-modules-load
* systemd-modules-load.service - Load Kernel Modules
Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor
Active: failed (Result: exit-code) since Thu 2017-12-21 13:34:07 UTC; 2 weeks 1 days
Docs: man:systemd-modules-load.service(8)
man:modules-load.d(5)
Process: 250 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FA
Main PID: 250 (code=exited, status=1/FAILURE)
Warning: Journal has been rotated since unit was started. Log output is incomplete or un
[root@odroid-c2 ~]# hwclock -r
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
[root@odroid-c2 ~]# timedatectl
Local time: Sat 2018-01-06 12:39:40 UTC
Universal time: Sat 2018-01-06 12:39:40 UTC
RTC time: n/a
Time zone: UTC (UTC, +0000)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
If it is useful here is the hwdetect output:
Code: Select all
[root@odroid-c2 ~]# hwdetect --kernel_version=4.14.12-1-ARCH --show-modules
DRM : drm drm_kms_helper meson-drm
MEDIA : meson-ir rc-core
NET : dwmac-generic dwmac-meson8b stmmac-platform stmmac
WATCHDOG : meson_gxbb_wdt
OTHER : nvmem_meson_efuse pps_core ptp rtc-pcf8563 fb_sys_fops syscopyarea sysfillrect sysimgblt
-
- Posts: 775
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Looks like you have the rtc driver included so try to modify your device tree file like below for the i2c_A entry. I don't have a RTC to test sorry.mcloaked wrote: So presumably there is another step missing? So it would be nice to find the steps needed to get this working again, but also as you said in your post yesterday that it would be good to know how to automate it once it is working.
Code: Select all
&i2c_A {
status = "okay";
pinctrl-0 = <&i2c_a_pins>;
pinctrl-names = "default";
pcf8563: pcf8563@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
It's entirely possible for pacman to replace your modified dtb file with a newer version without the mods in it, so in general you may have to repeat that step after updating.
-
- Posts: 9
- Joined: Wed Jun 08, 2016 11:57 pm
- languages_spoken: english
- ODROIDs: odroid-c2
- Contact:
Re: Odroid C2 mainline kernel support
If adding this entry does it have to go in a specific place in the dts file, and then processing to create the new dtc file, as Cambell suggested previously? I am not an expert with device tree changes so I am reliant on more expert knowledge that others have. Once this change has been made does the system need to be rebooted to bring the change in - and once that has been done should the RTC access then just work without any further action? Thanks for any additional input.brad wrote:Looks like you have the rtc driver included so try to modify your device tree file like below for the i2c_A entry. I don't have a RTC to test sorry.mcloaked wrote: So presumably there is another step missing? So it would be nice to find the steps needed to get this working again, but also as you said in your post yesterday that it would be good to know how to automate it once it is working.
Code: Select all
&i2c_A { status = "okay"; pinctrl-0 = <&i2c_a_pins>; pinctrl-names = "default"; pcf8563: pcf8563@51 { compatible = "nxp,pcf8563"; reg = <0x51>; }; };
-
- Posts: 68
- Joined: Sun Dec 20, 2015 6:35 am
- languages_spoken: english
- ODROIDs: C1 - C2
- Contact:
Re: Odroid C2 mainline kernel support
I found this link and it shows that it pass all tests.
https://kernelci.org/boot/meson8b-odroidc1/
Thank you!
-
- Posts: 775
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
I recall the developers debugging some ethernet issues on the C1 around 3 months ago with the board booting mainline. I'm sure the dev's would be happy to give you an update, try IRC channel #linux-amlogic on Freenodegügü wrote:Can someone confirm my thoughts about Odroid C1 running mainline kernel?
I found this link and it shows that it pass all tests.
https://kernelci.org/boot/meson8b-odroidc1/
Thank you!
-
- Posts: 68
- Joined: Sun Dec 20, 2015 6:35 am
- languages_spoken: english
- ODROIDs: C1 - C2
- Contact:
Re: Odroid C2 mainline kernel support
Thanx I'm just going to do thatbrad wrote:I recall the developers debugging some ethernet issues on the C1 around 3 months ago with the board booting mainline. I'm sure the dev's would be happy to give you an update, try IRC channel #linux-amlogic on Freenodegügü wrote:Can someone confirm my thoughts about Odroid C1 running mainline kernel?
I found this link and it shows that it pass all tests.
https://kernelci.org/boot/meson8b-odroidc1/
Thank you!

-
- Posts: 9
- Joined: Wed Jun 08, 2016 11:57 pm
- languages_spoken: english
- ODROIDs: odroid-c2
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
I've got exactly this on my todo list, I'll post it here when it's done. It's possible, I assure you, I just don't remember exactly everything I did and need to redo it on a clean SD card.mcloaked wrote:until a time when there is a more risk free method of upgrading the kernel to mainline that has no RTC issues
- mad_ady
- Posts: 5226
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4, C1+, C2, N1
- Location: Bucharest, Romania
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
- Follow the instructions at https://archlinuxarm.org/platforms/armv ... /odroid-c2 for deploying a vanilla Arch Linux installation with the Hardkernel 3.14.79 kernel
- Boot the board with the new SD/eMMC and log in as root
- Update the package manager and all packages with:
Code: Select all
pacman -Syu
reboot
Code: Select all
pacman -R uboot-odroid-c2
pacman -S uboot-odroid-c2-mainline linux-aarch64
reboot
Code: Select all
pacman -S dtc
cd /boot/dtbs/amlogic/
cp -p meson-gxbb-odroidc2{,_backup}.dtb
dtc -I dtb -O dts meson-gxbb-odroidc2.dtb > meson-gxbb-odroidc2.dts
nano meson-gxbb-odroidc2.dts
Code: Select all
pcf8563@51 {
status = "okay";
compatible = "nxp,pcf8563";
reg = <0x51>;
#clock-cells = <0x0>;
};
Code: Select all
dtc -I dts -O dtb meson-gxbb-odroidc2.dts > meson-gxbb-odroidc2.dtb
reboot
Code: Select all
hwclock -r
- mad_ady
- Posts: 5226
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4, C1+, C2, N1
- Location: Bucharest, Romania
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
There SHOULD be a way to make it happen with fdt commands inside the uboot script. I haven't figured it out yet and I keep rendering it non bootable while trying, so I gave up. That file (boot.txt/boot.scr) is generally NOT replaced when upgrading the kernel.mad_ady wrote:You can automate the dtb edits further and place a script that does it in /etc/kernel/post-install.d/
- mad_ady
- Posts: 5226
- Joined: Wed Jul 15, 2015 5:00 pm
- languages_spoken: english
- ODROIDs: XU4, C1+, C2, N1
- Location: Bucharest, Romania
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 775
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Good work campbell this does raise some interesting questions on the best path forward for device tree customisation's. From my understanding we have a few possible optionscampbell wrote:There SHOULD be a way to make it happen with fdt commands inside the uboot script. I haven't figured it out yet and I keep rendering it non bootable while trying, so I gave up. That file (boot.txt/boot.scr) is generally NOT replaced when upgrading the kernel.mad_ady wrote:You can automate the dtb edits further and place a script that does it in /etc/kernel/post-install.d/
1) as per mad_ady drop in the mod to /etc/kernel/post-install.d/ and reinstall kernel package (persistant change)
2) Manually edit the device tree with dtc tool (not persistant)
3) Edit the device tree by uboot device tree commands in boot.[scr|txt|ini] (Persistant)
4) Utilise device tree overlays in uboot to make the changes (persistent)
5) Utilise device tree overlays in uboot a modify boot.ini/ boot.src to be able to detect certain hardware automatically and apply the appropriate overlay file (persistant)
I can now think of a few common use cases where it would be beneficial
- MMC frequency mods to allow my old emmc to boot without errors
- Add support for I2S audio via detection of common codecs on the I2C bus (ie hifi shield)
- Add RTC's detected on I2C bus's
- Automatically re-enable frequency scaling for users with up to date firmware limited to 1.5GHz
I will look into feasibility in both hardkernel u boot and mainline uboot for the overlay option.
Edit: crap linux machine I use for serial console has died with a dead fan detected on boot. I've temporarily secondment my windows gaming machine to the task but this means the games are distracting me and no Linux for debug of boot. Wish me luck I never wanted linux so bad

- rooted
- Posts: 6252
- Joined: Fri Dec 19, 2014 9:12 am
- languages_spoken: english
- Location: Gulf of Mexico, US
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 6
- Joined: Wed Dec 27, 2017 8:20 pm
- languages_spoken: english; german
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
The hook is placed in "/etc/pacman.d/hooks/" and the content is:
Code: Select all
[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = linux-aarch64
[Action]
Description = Modify Orodid C2 Device Tree for eMMC...
When = PostTransaction
Exec = /usr/local/bin/modify_odroid_c2_dtb.sh
-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
Off topic but I don't have a dedicated Windows machine - instead I have Windows installed on an mSATA drive mounted on a USB3 carrier card...plug it in and reboot my machine (a Mac in my case) and I'm in Windows, unplug it and it was never therebrad wrote:Edit: crap linux machine I use for serial console has died with a dead fan detected on boot. I've temporarily secondment my windows gaming machine to the task but this means the games are distracting me and no Linux for debug of boot. Wish me luck I never wanted linux so badI hope I can spin up an linux VM and connect to the serial port on the C2

-
- Posts: 326
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: XU3, XU4, C2, C1+, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
I think you probably CAN do this with a script and a (maybe inline) patch file, but I think the better solution is one of the others, like modifying boot.txt. I already have other dtb mods in my boot.txt that are persistent across updates, but they're all only removals or status switches, not insertions of a branch.mad_ady wrote:By the looks of it you need to make bigger changes that require decompiling the dtb, making edits with tools like patch or sed and rebuilding it. You can do this with a more complicated post-install script (even if that script means rewriting the dtb file with a known good one (quick and dirty).
-
- Posts: 168
- Joined: Sat Feb 06, 2016 7:08 pm
- languages_spoken: english
- ODROIDs: C2 + eMMC 64Gb
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 146
- Joined: Wed Jan 15, 2014 2:58 am
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
try armbianotec wrote:Sorry for a newb question, but does anyone have a guide how to compile/install 4.14* kernel on odroid c2/ubuntu ?
Download some version with 4.14 kernel or build your own image.
armbian support Debian 9
-
- Posts: 68
- Joined: Sun Dec 20, 2015 6:35 am
- languages_spoken: english
- ODROIDs: C1 - C2
- Contact:
Re: Odroid C2 mainline kernel support
Right now when I compile on the board I get this error :
Code: Select all
In file included from /usr/include/features.h:398:0,
from /usr/include/string.h:25,
from ../other-licenses/zlib/zutil.h:23,
from ../other-licenses/zlib/crc32.c:29:
/usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory
# include <gnu/stubs-soft.h>
Code: Select all
FLOAT_ABI = None;
EXTRA_CFLAGS = "";
print("ARM FPU : %s" % arm_fpu)
if arm_fpu:
print("Hardware FPU : %s" % arm_fpu)
FLOAT_ABI = "-mfloat-abi=softfp "
EXTRA_CFLAGS = "-mfpu=vfp -march=%s " % arm_arch # compile to use hardware fpu
else:
print("Software FPU : %s" % arm_fpu)
FLOAT_ABI = "-mfloat-abi=soft "
EXTRA_CFLAGS = "-mfpu=vfp -march=%s " % arm_arch # compile to use soft fpu
#BASE_CXX_FLAGS = "%s -march=armv7-a -mtune=cortex-a8 -mfloat-abi=softfp -mno-thumb -fno-section-anchors -D__ARM_ARCH__=7 " \
# "-DARMV6_ASSEMBLY " % BASE_M_FLAGS
#APP_CXXFLAGS += BASE_CXX_FLAGS
print("ARM HARD FLOAT : %s" % arm_hard_float)
if arm_hard_float:
FLOAT_ABI = "-mfloat-abi=hard -march=%s " % arm_arch # compile to use neon vfp
AVMSHELL_LDFLAGS += "-static "
print("ARM NEON : %s" % arm_neon)
if arm_neon:
if FLOAT_ABI == None:
FLOAT_ABI = "-mfloat-abi=softfp "
EXTRA_CFLAGS = "-mfpu=neon -march=%s -DTARGET_NEON " % arm_arch # compile to use neon vfp
print("ARM THUMB : %s" % arm_thumb)
if arm_thumb:
EXTRA_CFLAGS += "-mthumb -DTARGET_THUMB2 "
if arm_thumb != False and arm_arch == "armv7-a":
print("CORTEX-A : %s" % arm_thumb)
EXTRA_CFLAGS += "-mtune=cortex-a8 "
if arm_arch:
print("ARM ARCH: %s" % arm_thumb)
OPT_CXXFLAGS += "-march=%s " % arm_arch
DEBUG_CXXFLAGS += "-march=%s " % arm_arch
if EXTRA_CFLAGS != None:
APP_CXXFLAGS += EXTRA_CFLAGS
APP_CFLAGS += EXTRA_CFLAGS
if FLOAT_ABI != None:
APP_CXXFLAGS += FLOAT_ABI
APP_CFLAGS += FLOAT_ABI
AVMSHELL_LDFLAGS += FLOAT_ABI
-
- Posts: 277
- Joined: Wed Jan 28, 2015 8:12 pm
- languages_spoken: english,german
- ODROIDs: XU3,C1
- Contact:
Re: Odroid C2 mainline kernel support
Thanx for that!tobetter wrote: You can find my working kernel source tree at https://github.com/tobetter/linux/tree/odroidc2-v4.15, I am running U-boot (2017.11) plus Linux mainline (4.15-rc6) on Debian Jessie.
I tried the kernel but unfortunately kernel boot stopps with: random: crng init done
and no login prompt.
I'm on u-boot with u-boot_20180116-491e9bb-12_arm64
boot.ini options below in log.
I use the minimal ubuntu OS with ubuntu 16.04
Anyone an idea what is the missing piece to continue the boot sequence?
Complete log output:
Code: Select all
[Image: unknown, amlogic_v1.1.3046-00db630-dirty 2016-08-31 09:24:14 tao.zeng@droid04]
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: Load bl33 from SD, src: 0x00034200, des: 0x01000000, size: 0x000769f0
ef be ad de d f0 ad ba ef be ad de not ES chip
[0.414299 Inits done]
secure task start!
high task start!
low task start!
NOTICE: BL3-1: v1.0(debug):4d2e34d
NOTICE: BL3-1: Built : 17:08:35, Oct 29 2015
INFO: BL3-1: Initializing runtime services
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x1000000
INFO: BL3-1: Next image spsr = 0x3c9
U-Boot 2015.01-00014-g2e4380b-dirty (Jan 16 2018 - 02:09:02)
DRAM: 2 GiB
Relocation Offset is: 76f2f000
-------------------------------------------------
* Welcome to Hardkernel's ODROID-C2
-------------------------------------------------
CPU : AMLogic S905
S/N : HKC213254DFD076B
MAC : 00:1e:06:33:53:eb
BID : HKC2211605
-------------------------------------------------
register usb cfg[1][0] = 0000000077f95010
register usb cfg[0][1] = 0000000077f95030
vpu detect type: 5
vpu clk_level = 7
set vpu clk: 666667000Hz, readback: 666660000Hz(0x300)
MMC: aml_priv->desc_buf = 0x0000000073f27d30
aml_priv->desc_buf = 0x0000000073f29ec0
SDIO Port B: 0, SDIO Port C: 1
ret = 1 .[mmc_init] mmc init success
In: serial
Out: serial
Err: serial
----------------------------------
MMC Size : 16 GB
----------------------------------
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: the partiton 'logo' is reading...
MMC read: dev # 0, block # 61024, count 2048 ... 2048 blocks read: OK
hpd_state=1
[CANVAS]addr=0x3f800000 width=3840, height=1440
set hdmitx VIC = 16
hdmitx phy setting done
set hdmitx VIC = 16
hdmitx phy setting done
Error: Bad gzipped data
There is no valid bmp file at the given address
Saving Environment to MMC...
Writing to MMC(0)... done
Net: Meson_Ethernet
Hit [Enter] key twice to stop autoboot: 0
reading boot.ini
2597 bytes read in 3 ms (844.7 KiB/s)
cfgload: applying boot.ini...
cfgload: setenv console "console=ttyAML0,115200n8"
cfgload: setenv odroid "earlyprintk debug root=/dev/mmcblk0p2 rootwait ro fsck.fix=no net.ifnames=0 no_console_suspend consoleblank=0"
cfgload: setenv kernel "fatload mmc 0:1 0x1080000 uImage"
cfgload: setenv dtb "fatload mmc 0:1 0x1000000 meson-gxbb-odroidc2.dtb"
cfgload: setenv bootseq "bootm 0x1080000 - 0x1000000"
cfgload: setenv bootcmd "${kernel}; ${dtb}; ${bootseq}"
cfgload: setenv bootargs "${console} ${bootrootfs} ${odroid} ${libreelec}"
cfgload: run bootcmd
reading uImage
13832768 bytes read in 615 ms (21.5 MiB/s)
reading meson-gxbb-odroidc2.dtb
22127 bytes read in 6 ms (3.5 MiB/s)
ee_gate_off ...
## Booting kernel from Legacy Image at 01080000 ...
Image Name: linux-next
Image Type: AArch64 Linux Kernel Image (uncompressed)
Data Size: 13832704 Bytes = 13.2 MiB
Load Address: 01080000
Entry Point: 01080000
Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
Booting using the fdt blob at 0x1000000
Loading Kernel Image ... OK
kernel loaded at 0x01080000, end = 0x01db1200
Loading Device Tree to 000000001fff7000, end 000000001ffff66e ... OK
Starting kernel ...
uboot time: 4322630 us
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.15.0-rc8-dirty (pfau@ubuntu) (gcc version 4.9.4 (Linaro GCC 4.9-2017.01)) #3 SMP PREEMPT Wed Feb 7 16:30:12 CET 2018
[ 0.000000] Machine model: Hardkernel ODROID-C2
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006c400000, size 188 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x0000000077ffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x6c3d6500-0x6c3d7fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000001000000-0x0000000077ffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000001000000-0x000000000fffffff]
[ 0.000000] node 0: [mem 0x0000000010200000-0x0000000077ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000001000000-0x0000000077ffffff]
[ 0.000000] On node 0 totalpages: 486912
[ 0.000000] DMA zone: 7616 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 486912 pages, LIFO batch:31
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] random: fast init done
[ 0.000000] percpu: Embedded 23 pages/cpu @ (ptrval) s55168 r8192 d30848 u94208
[ 0.000000] pcpu-alloc: s55168 r8192 d30848 u94208 alloc=23*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 845719
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 479296
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: console=ttyAML0,115200n8 earlyprintk debug root=/dev/mmcblk0p2 rootwait ro fsck.fix=no net.ifnames=0 no_console_suspend consoleblank=0
[ 0.000000] Memory: 1707868K/1947648K available (8828K kernel code, 644K rwdata, 3332K rodata, 640K init, 387K bss, 47268K reserved, 192512K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffff000000000000 - 0xffff000008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000 (129022 GB)
[ 0.000000] .text : 0x (ptrval) - 0x (ptrval) ( 8832 KB)
[ 0.000000] .rodata : 0x (ptrval) - 0x (ptrval) ( 3392 KB)
[ 0.000000] .init : 0x (ptrval) - 0x (ptrval) ( 640 KB)
[ 0.000000] .data : 0x (ptrval) - 0x (ptrval) ( 645 KB)
[ 0.000000] .bss : 0x (ptrval) - 0x (ptrval) ( 388 KB)
[ 0.000000] fixed : 0xffff7dfffe7fb000 - 0xffff7dfffec00000 ( 4116 KB)
[ 0.000000] PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffff7e0000000000 - 0xffff800000000000 ( 2048 GB maximum)
[ 0.000000] 0xffff7e0000040000 - 0xffff7e0001e00000 ( 29 MB actual)
[ 0.000000] memory : 0xffff800001000000 - 0xffff800078000000 ( 1904 MB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] irq_meson_gpio: 133 to 8 gpio interrupt mux initialized
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000003] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000269] Console: colour dummy device 80x25
[ 0.000307] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.000314] pid_max: default: 32768 minimum: 301
[ 0.000365] Security Framework initialized
[ 0.001078] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.001437] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.001464] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.001480] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.016013] ASID allocator initialised with 65536 entries
[ 0.024004] Hierarchical SRCU implementation.
[ 0.032211] EFI services will not be available.
[ 0.040025] smp: Bringing up secondary CPUs ...
[ 0.068706] Detected VIPT I-cache on CPU1
[ 0.068748] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[ 0.096723] Detected VIPT I-cache on CPU2
[ 0.096744] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[ 0.124754] Detected VIPT I-cache on CPU3
[ 0.124772] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[ 0.124813] smp: Brought up 1 node, 4 CPUs
[ 0.124826] SMP: Total of 4 processors activated.
[ 0.124831] CPU features: detected feature: 32-bit EL0 Support
[ 0.124993] CPU: All CPU(s) started at EL2
[ 0.125008] alternatives: patching kernel code
[ 0.125472] devtmpfs: initialized
[ 0.128379] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.128417] futex hash table entries: 1024 (order: 5, 131072 bytes)
[ 0.131662] pinctrl core: initialized pinctrl subsystem
[ 0.132300] DMI not present or invalid.
[ 0.132497] NET: Registered protocol family 16
[ 0.132810] audit: initializing netlink subsys (disabled)
[ 0.132883] audit: type=2000 audit(0.132:1): state=initialized audit_enabled=0 res=1
[ 0.133463] cpuidle: using governor menu
[ 0.133941] vdso: 2 pages (1 code @ 00000000d6209fee, 1 data @ 00000000e3ea0414)
[ 0.133956] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.134663] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.135088] Serial: AMBA PL011 UART driver
[ 0.145386] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.146084] ACPI: Interpreter disabled.
[ 0.146809] vgaarb: loaded
[ 0.146997] SCSI subsystem initialized
[ 0.147120] libata version 3.00 loaded.
[ 0.147300] usbcore: registered new interface driver usbfs
[ 0.147328] usbcore: registered new interface driver hub
[ 0.147370] usbcore: registered new device driver usb
[ 0.147637] pps_core: LinuxPPS API ver. 1 registered
[ 0.147642] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.147656] PTP clock support registered
[ 0.147752] EDAC MC: Ver: 3.0.0
[ 0.147965] dmi: Firmware registration failed.
[ 0.148077] Advanced Linux Sound Architecture Driver Initialized.
[ 0.148684] clocksource: Switched to clocksource arch_sys_counter
[ 0.148785] VFS: Disk quotas dquot_6.6.0
[ 0.148824] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.148958] pnp: PnP ACPI: disabled
[ 0.152885] NET: Registered protocol family 2
[ 0.153248] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.153383] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[ 0.153586] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.153677] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.153714] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[ 0.153826] NET: Registered protocol family 1
[ 0.154064] RPC: Registered named UNIX socket transport module.
[ 0.154069] RPC: Registered udp transport module.
[ 0.154072] RPC: Registered tcp transport module.
[ 0.154075] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.154082] PCI: CLS 0 bytes, default 128
[ 0.154699] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 0.154913] kvm [1]: 8-bit VMID
[ 0.154917] kvm [1]: IDMAP page: 190d000
[ 0.154921] kvm [1]: HYP VA range: 800000000000:ffffffffffff
[ 0.155446] kvm [1]: vgic-v2@c4304000
[ 0.155491] kvm [1]: vgic interrupt IRQ1
[ 0.155502] kvm [1]: virtual timer IRQ4
[ 0.155553] kvm [1]: Hyp mode initialized successfully
[ 0.156775] Initialise system trusted keyrings
[ 0.156876] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[ 0.161198] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.161617] NFS: Registering the id_resolver key type
[ 0.161635] Key type id_resolver registered
[ 0.161639] Key type id_legacy registered
[ 0.161648] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.161765] 9p: Installing v9fs 9p2000 file system support
[ 0.163307] Key type asymmetric registered
[ 0.163312] Asymmetric key parser 'x509' registered
[ 0.163428] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.163435] io scheduler noop registered
[ 0.163556] io scheduler cfq registered (default)
[ 0.163561] io scheduler mq-deadline registered
[ 0.163565] io scheduler kyber registered
[ 0.164554] GPIO line 501 (usb-hub-reset) hogged as output/high
[ 0.167939] soc soc0: Amlogic Meson GXBB (S905) Revision 1f:b (0:1) Detected
[ 0.171362] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.172869] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 13, base_baud = 1500000) is a meson_uart
[ 1.030240] console [ttyAML0] enabled
[ 1.034727] meson-drm d0100000.vpu: Queued 2 outputs on vpu
[ 1.039828] meson-drm d0100000.vpu: Failed to create debugfs directory
[ 1.045867] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.052392] [drm] No driver support for vblank timestamp query.
[ 1.058308] meson-drm d0100000.vpu: CVBS Output connector not available
[ 1.092728] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)
[ 1.097052] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver
[ 1.104848] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops)
[ 1.420955] Console: switching to colour frame buffer device 240x67
[ 1.454851] meson-drm d0100000.vpu: fb0: frame buffer device
[ 1.460826] [drm] Initialized meson 1.0.0 20161109 for d0100000.vpu on minor 0
[ 1.472248] loop: module loaded
[ 1.473949] libphy: Fixed MDIO Bus: probed
[ 1.475304] tun: Universal TUN/TAP device driver, 1.6
[ 1.480337] thunder-xcv, ver 1.0
[ 1.483089] thunder-BGX, ver 1.0
[ 1.486285] thunder-nic, ver 1.0
[ 1.489650] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1.495217] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.501115] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[ 1.507989] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 1.513529] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 1.521267] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 1.527238] sky2: driver version 1.30
[ 1.531352] meson8b-dwmac c9410000.ethernet: PTP uses main clock
[ 1.536718] meson8b-dwmac c9410000.ethernet: no reset control found
[ 1.543066] stmmac - user ID: 0x11, Synopsys ID: 0x37
[ 1.547917] meson8b-dwmac c9410000.ethernet: Ring mode enabled
[ 1.553700] meson8b-dwmac c9410000.ethernet: DMA HW capability register supported
[ 1.561116] meson8b-dwmac c9410000.ethernet: Normal descriptors
[ 1.566978] meson8b-dwmac c9410000.ethernet: RX Checksum Offload Engine supported
[ 1.574397] meson8b-dwmac c9410000.ethernet: COE Type 2
[ 1.579569] meson8b-dwmac c9410000.ethernet: TX Checksum insertion supported
[ 1.586558] meson8b-dwmac c9410000.ethernet: Wake-Up On Lan supported
[ 1.592959] meson8b-dwmac c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 2.652685] libphy: stmmac: probed
[ 2.653643] VFIO - User Level meta-driver version: 0.3
[ 2.656538] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.662024] ehci-pci: EHCI PCI platform driver
[ 2.666446] ehci-platform: EHCI generic platform driver
[ 2.671698] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.677730] ohci-pci: OHCI PCI platform driver
[ 2.682138] ohci-platform: OHCI generic platform driver
[ 2.687576] usbcore: registered new interface driver usb-storage
[ 2.694315] i2c /dev entries driver
[ 2.698186] sdhci: Secure Digital Host Controller Interface driver
[ 2.702833] sdhci: Copyright(c) Pierre Ossman
[ 2.707192] Synopsys Designware Multimedia Card Interface Driver
[ 2.713873] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[ 2.757094] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.757917] ledtrig-cpu: registered to indicate activity on CPUs
[ 2.766684] meson-sm: secure-monitor enabled
[ 2.767781] usbcore: registered new interface driver usbhid
[ 2.772949] usbhid: USB HID core driver
[ 2.776914] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[ 2.785827] NET: Registered protocol family 17
[ 2.787990] 9pnet: Installing 9P2000 support
[ 2.792211] Key type dns_resolver registered
[ 2.796891] registered taskstats version 1
[ 2.801438] Loading compiled-in X.509 certificates
[ 2.810188] dwc2 c9000000.usb: c9000000.usb supply vusb_d not found, using dummy regulator
[ 2.813302] dwc2 c9000000.usb: c9000000.usb supply vusb_a not found, using dummy regulator
[ 2.822647] phy phy-c0000000.phy.0: USB ID detect failed!
[ 2.826809] phy phy-c0000000.phy.0: phy poweron failed --> -22
[ 2.832663] dwc2: probe of c9000000.usb failed with error -22
[ 2.838654] dwc2 c9100000.usb: c9100000.usb supply vusb_d not found, using dummy regulator
[ 2.846504] dwc2 c9100000.usb: c9100000.usb supply vusb_a not found, using dummy regulator
[ 2.972926] dwc2 c9100000.usb: DWC OTG Controller
[ 2.972961] dwc2 c9100000.usb: new USB bus registered, assigned bus number 1
[ 2.979009] dwc2 c9100000.usb: irq 34, io mem 0xc9100000
[ 2.984716] hub 1-0:1.0: USB hub found
[ 2.987970] hub 1-0:1.0: 1 port detected
[ 2.992706] meson-gx-mmc d0072000.mmc: Got CD GPIO
[ 3.038247] scpi_protocol scpi: SCP Protocol 0.0 Firmware 0.0.0 version
[ 3.044275] hctosys: unable to open rtc device (rtc0)
[ 3.044438] VCC3V3: disabling
[ 3.047155] ALSA device list:
[ 3.050080] No soundcards found.
[ 3.059110] Waiting for root device /dev/mmcblk0p2...
[ 3.200128] mmc1: new high speed SDHC card at address aaaa
[ 3.200418] mmcblk1: mmc1:aaaa SL16G 14.8 GiB
[ 3.206324] mmcblk1: p1 p2
[ 3.384696] usb 1-1: new high-speed USB device number 2 using dwc2
[ 3.594391] hub 1-1:1.0: USB hub found
[ 3.594688] hub 1-1:1.0: 4 ports detected
[ 3.884692] usb 1-1.3: new low-speed USB device number 3 using dwc2
[ 3.994165] input: DELL Dell QuietKey Keyboard as /devices/platform/soc/c9100000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:413C:2106.0001/input/input0
[ 4.061028] hid-generic 0003:413C:2106.0001: input: USB HID v1.10 Keyboard [DELL Dell QuietKey Keyboard] on usb-c9100000.usb-1.3/input0
[ 5.141560] random: crng init done
- OverSun
- Posts: 1414
- Joined: Mon Apr 29, 2013 5:12 pm
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
It just waits for root filesystem, that's all.
Code: Select all
[ 3.059110] Waiting for root device /dev/mmcblk0p2...
[ 3.200128] mmc1: new high speed SDHC card at address aaaa
[ 3.200418] mmcblk1: mmc1:aaaa SL16G 14.8 GiB
[ 3.206324] mmcblk1: p1 p2
-
- Posts: 277
- Joined: Wed Jan 28, 2015 8:12 pm
- languages_spoken: english,german
- ODROIDs: XU3,C1
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 17
- Joined: Sat Aug 13, 2016 9:12 pm
- languages_spoken: english
- ODROIDs: Odroid C2
- Contact:
Re: Odroid C2 mainline kernel support
- rooted
- Posts: 6252
- Joined: Fri Dec 19, 2014 9:12 am
- languages_spoken: english
- Location: Gulf of Mexico, US
- Contact:
Re: Odroid C2 mainline kernel support
That is good news.arny91 wrote:I report HDMI finally working with kernel version 4.16-rc1 on archlinuxarm. Hoo-ray!
-
- Posts: 5
- Joined: Sun Feb 18, 2018 10:19 pm
- languages_spoken: english, german
- ODROIDs: Odroid C2
- Contact:
Re: Odroid C2 mainline kernel support
Can you maybe post the content of your script modify_odroid_c2_dtb.sh. How do you make sure that it will work with more recent kernel versions changing the dtb file?Michi wrote:I also have to update the Device Tree for my Odroid C2 after linux-aarch installation/upgrade. Therefore i created a small script with the needed changes and a pacman hook. The hook is running after the linux-aarch64 package installation.
The hook is placed in "/etc/pacman.d/hooks/" and the content is:
This works perfectly for me.Code: Select all
[Trigger] Operation = Upgrade Operation = Install Type = Package Target = linux-aarch64 [Action] Description = Modify Orodid C2 Device Tree for eMMC... When = PostTransaction Exec = /usr/local/bin/modify_odroid_c2_dtb.sh
I hope I am not going to feel the impact of the limitation to 100MHz too much. Since right now with kernel 4.13.12 I do get very decent read speeds from the emmc:
Code: Select all
[someuser@odroid ~]# sudo dd if=/dev/mmcblk0 of=/dev/null bs=2048 status=progress
15586736128 bytes (16 GB, 15 GiB) copied, 96 s, 162 MB/s
7633920+0 records in
7633920+0 records out
15634268160 bytes (16 GB, 15 GiB) copied, 96.2677 s, 162 MB/s
Code: Select all
[someuser@odroid ~]# sudo dd if=/dev/mmcblk1 of=/dev/null bs=2048 status=progress
18188195840 bytes (18 GB, 17 GiB) copied, 921 s, 19.7 MB/s^C
8886459+0 records in
8886458+0 records out
18199465984 bytes (18 GB, 17 GiB) copied, 921.574 s, 19.7 MB/s
Code: Select all
[someuser@odroid ~]$ dmesg | grep "card at"
[ 1.249291] mmc0: new HS200 MMC card at address 0001
[ 1.968641] mmc1: new high speed SDXC card at address 0001
-
- Posts: 6
- Joined: Wed Dec 27, 2017 8:20 pm
- languages_spoken: english; german
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
This is the content of the script. The script has no intelligence. It is just changing the max frequency value from 200 to 150.ivanovic wrote: Can you maybe post the content of your script modify_odroid_c2_dtb.sh. How do you make sure that it will work with more recent kernel versions changing the dtb file?
Since this is a kernel update, I also check if it worked before rebooting. In the worst case, I have to make the adjustment again later.
Code: Select all
#!/bin/bash
VAR_ORG=0xbebc200
VAR_NEW=0x8f0d180
VAR_DTB=/boot/dtbs/amlogic/meson-gxbb-odroidc2.dtb
VAR_DTS=/boot/dtbs/amlogic/meson-gxbb-odroidc2.dts
# decompile meson-gxbb-odroidc2.dtb
/usr/bin/dtc -I dtb -O dts -o ${VAR_DTS} ${VAR_DTB}
# change max-frequency for eMMC from 0xbebc200 to 0x8f0d180
/usr/bin/sed -i "s/${VAR_ORG}/${VAR_NEW}/g" ${VAR_DTS}
# compile modified dts to meson-gxbb-odroidc2.dtb
/usr/bin/dtc -O dtb -b O -o ${VAR_DTB} ${VAR_DTS}
-
- Posts: 1162
- Joined: Thu Oct 02, 2014 11:42 pm
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
https://lkml.org/lkml/2018/2/17/51
Code: Select all
Jerome Brunet (1):
Revert "mmc: meson-gx: include tx phase in the tuning process"
-
- Posts: 5
- Joined: Sun Feb 18, 2018 10:19 pm
- languages_spoken: english, german
- ODROIDs: Odroid C2
- Contact:
Re: Odroid C2 mainline kernel support
Ah, nice. This change is already part of 4.16-rc2. So at least the 4.16 series should be good again even as default package. Let's see if this change gets a backport to 4.15 as well, it is not part of 4.15.4.moon.linux wrote:Fix for eMMC issue might have got merger with following pull request, with stable back-port so dont worry too much.
https://lkml.org/lkml/2018/2/17/51Code: Select all
Jerome Brunet (1): Revert "mmc: meson-gx: include tx phase in the tuning process"
-
- Posts: 12
- Joined: Sun Jun 26, 2016 10:59 pm
- languages_spoken: english
- ODROIDs: c1, c2,xu4
- Contact:
Re: Odroid C2 mainline kernel support
I have enabled in my kernel build higher Modes:
Code: Select all
[ 4.309486] mmc0: new ultra high speed SDR50 SDXC card at address 0001
[ 4.314966] mmcblk0: mmc0:0001 ED4QT 119 GiB
Code: Select all
/dev/mmcblk0:
Timing cached reads: 1884 MB in 2.00 seconds = 942.20 MB/sec
Timing buffered disk reads: 126 MB in 3.04 seconds = 41.44 MB/sec
Code: Select all
bus-width = <4>
cap-sd-highspeed;
sd-uhs-sdr12; //SD UHS SDR12 speed is supported
sd-uhs-sdr25; //SD UHS SDR25 speed is supported
sd-uhs-sdr50; // SD UHS SDR50 speed is supported
max-frequency = <100000000>;
disable-wp;
-
- Posts: 20
- Joined: Sun Feb 18, 2018 2:36 am
- languages_spoken: english
- ODROIDs: odroid-c2
- Contact:
Re: Odroid C2 mainline kernel support
See my thread here:campbell wrote:There SHOULD be a way to make it happen with fdt commands inside the uboot script. I haven't figured it out yet and I keep rendering it non bootable while trying, so I gave up. That file (boot.txt/boot.scr) is generally NOT replaced when upgrading the kernel.mad_ady wrote:You can automate the dtb edits further and place a script that does it in /etc/kernel/post-install.d/
viewtopic.php?f=138&t=30156#p215724
So somewhere in your uboot script after the device tree block is loaded to memory:
Code: Select all
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}
Code: Select all
fdt addr ${fdt_addr_r}
Code: Select all
fdt set /soc/apb@d0000000/mmc@74000 max-frequency <0x08f0d180>
Som not knowing quite what you are trying to do I think you need something like:
Code: Select all
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} /boot/dtbs/${fdtfile}
fdt addr ${fdt_addr_r}
fdt resize
fdt mknode /soc/cbus@c1100000/i2c@8500 pcf8563@51
fdt set /soc/cbus@c1100000/i2c@8500/pcf8563@51 status "okay"
fdt set /soc/cbus@c1100000/i2c@8500/pcf8563@51 compatible "nxp,pcf8563"
fdt set /soc/cbus@c1100000/i2c@8500/pcf8563@51 reg <0x51>
fdt set /soc/cbus@c1100000/i2c@8500/pcf8563@51 #clock-cells <0x0>
Oh and I've guessed the i2c port - there seem three in the device tree
i2c@8500/
i2c@87c0/
i2c@87e0/
- emk2203
- Posts: 34
- Joined: Fri Oct 16, 2015 12:29 am
- languages_spoken: english, german
- ODROIDs: C1+, C2, XU4, HC1
- Contact:
Re: Odroid C2 mainline kernel support
I am not looking for a 'for dummies' version, but a specific guide which takes care of things like .dtb, eMMC frequency, USB issues, HDMI - all the C2 specific things. It can be brief, just a checklist-like thing with references where to find the information. I am reading this thread since a long while, there are excellent informations in it, but never at one accessible place. From what I see, there are lots of people reinventing the wheel at the moment
Who is online
Users browsing this forum: No registered users and 2 guests