Wow, that's great to learn, thank you.brad wrote:not by default as on some versions of the bootloader it can run to fast and crash on startup. to enable you have to edit the device tree and remove the scpi_clocks disabled https://github.com/ioft/linux/commit/31 ... 3c6f18bfb1graysky wrote: I can't try myself, but since you built that kernel with those patches, can you comment on whether or not cpu governors are available under it?
CODE: SELECT ALL
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
once done this and recompiled the meson-gxbb-odroidc2.dtb it becomes avaliableCode: Select all
odroid@odroid64:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq 250000 odroid@odroid64:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
Odroid C2 mainline kernel support
- graysky
- Posts: 137
- Joined: Wed Jul 13, 2016 9:11 am
- languages_spoken: english
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
Is there an fdt command that can be stuck in boot.ini to do this?graysky wrote:you have to edit the device tree and remove the scpi_clocks disabled
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
It appears it would be possible, I want to use ftd feature as well to change other things in the device tree I will try enabling the scpi clocks first using this method and report back when I have a chance.campbell wrote:Is there an fdt command that can be stuck in boot.ini to do this?graysky wrote:you have to edit the device tree and remove the scpi_clocks disabled
-
- Posts: 364
- Joined: Wed May 04, 2016 1:07 am
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
Hi Brad!brad wrote:campbell wrote:.graysky wrote:clocks
Please answer, can anybody modify and compile the i2s driver (Linux Kernel 4.14) to allow Odroid C2 works in slave mode for bit-perfect playback?
Maybe is it possible to avoid using that boards (see this link http://bbb.ieero.com ) to connect DAC to Odroid C2 via I2s interface ?
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Im not really sure, I now have uda1380 board which I am attempting to control via i2c interface but having some troubles incorporating the control into the device tree.best_odroidfreak wrote:Hi Brad!brad wrote:campbell wrote:.graysky wrote:clocks
Please answer, can anybody modify and compile the i2s driver (Linux Kernel 4.14) to allow Odroid C2 works in slave mode for bit-perfect playback?
Maybe is it possible to avoid using that boards (see this link http://bbb.ieero.com ) to connect DAC to Odroid C2 via I2s interface ?
I haven't attempted anything in i2s slave mode as yet.
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
It seems to work well in the hardkernel uboot im using at the moment, 1 new line to setup a dtbmods command and added ${dtbmods} to the bootcmd line.campbell wrote:Is there an fdt command that can be stuck in boot.ini to do this?graysky wrote:you have to edit the device tree and remove the scpi_clocks disabled
Ensure you have your firmware up to date in uboot as some versions can allow the kernel to run to fast and crash on boot.
Code: Select all
setenv kernel "fatload mmc 0:1 0x1080000 uImage"
setenv dtb "fatload mmc 0:1 0x1000000 meson-gxbb-odroidc2.dtb"
setenv bootseq "bootm 0x1080000 - 0x1000000"
setenv dtbmods "fdt addr 0x1000000; fdt set /scpi/clocks status okay"
setenv bootcmd "${kernel}; ${dtb}; ${dtbmods}; ${bootseq}"
-
- Posts: 3
- Joined: Thu Feb 23, 2017 8:10 pm
- languages_spoken: english
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
Hi everybody,
I using Arch Linux ARM distro to follow mainline development.
With mainline kernel 4.13-rc2 and mainline uboot 2017.07, could I see anything on HDMI output? If so, how to get it work?
Thanks!
oreggin
I using Arch Linux ARM distro to follow mainline development.
With mainline kernel 4.13-rc2 and mainline uboot 2017.07, could I see anything on HDMI output? If so, how to get it work?
Thanks!
oreggin
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
What exactly does this mean, and how do we check it? Is it a property of the sd card image, or does it have to be flashed onto the board itself?brad wrote:Ensure you have your firmware up to date in uboot
-
- Posts: 1162
- Joined: Thu Oct 02, 2014 11:42 pm
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
Here is Neil suggested in the mailing list on getting the drm to work.
sorry: Well I have not tested this yet.
Code: Select all
The blobs delivered by HardKernel has been tweaked to work with their Amlogic kernel
fork, and it will won't work on mainline.
To have X11 running :
- a mainline meson version of xf86-video-armsoc : https://github.com/superna9999/xf86-video-armsoc
- you need to get the Amlogic libMali in : http://openlinux.amlogic.com:8000/download/ARM/filesystem/arm-buildroot-2016-08-18-5aaca1b35f.tar.gz
You can follow the HOWTO at :
https://github.com/superna9999/meson_gx_mali_450#howto
to find the correct libMali for X11.
- add an udev rule for mali (if not already the case) :
Add a file to /etc/udev/rules.d/, perhaps called 50-mali.rules, with the following content:
KERNEL=="mali", MODE="0660", GROUP="video"
- Change the xorg configuration :
Then you should also change the /etc/X11/xorg.conf to something like :
Section "Device"
Identifier "Amlogic Meson DRM driver"
Driver "armsoc"
Option "DRI2" "true"
EndSection
When X11 is running, you can get the status by running the glesgears.
There is some more docs here :
https://github.com/superna9999/OpenArenaPandora#amlogic-s905-mainline-linux
-
- Posts: 445
- Joined: Thu Jan 29, 2015 6:42 am
- languages_spoken: English, German
- ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2
- Contact:
Re: Odroid C2 mainline kernel support
The firmware is stored on the first 2048 sectors of the µSD /eMMC card. Instructions to flash it can be found here.campbell wrote:What exactly does this mean, and how do we check it? Is it a property of the sd card image, or does it have to be flashed onto the board itself?brad wrote:Ensure you have your firmware up to date in uboot
You need the latest firmware in order to run a mainline kernel with cpufreq support.
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
Also, is there anything that needs to appear in the device tree in order to enable /sys/class/gpio ?
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
gpio should be working. The numbers are different to hardkernel kernel pins though.campbell wrote:Also, is there anything that needs to appear in the device tree in order to enable /sys/class/gpio ?
List of of pin numbers from current mainline https://git.kernel.org/pub/scm/linux/ke ... xbb-gpio.h
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
I am using the Armbian mainline image from this thread viewtopic.php?f=138&t=26991 and /sys/class/gpio does not exist. What I'm wondering is if it needs to be enabled at kernel compile time, or through the device tree?
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
Does the pin number difference affect mmap access to the pins, or just sysfs? I.e. does this code http://odroid.com/dokuwiki/doku.php?id= ... ck_program need to be modified in order to work correctly with the new kernel?
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
That program looks at the registers rather than in the kernel for details. It will report the incorrect pin numbers for mainline kernel (pin numbers are hardcoded into that program)campbell wrote:Does the pin number difference affect mmap access to the pins, or just sysfs? I.e. does this code http://odroid.com/dokuwiki/doku.php?id= ... ck_program need to be modified in order to work correctly with the new kernel?
Im not sure what version of kernel Arch is using but I was of the understanding GPIO had been enabled by default for some time
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
So if I want to write a C program that toggles gpio126 (in the kernel 3.14.x numbering) and run it under kernel 4.12, what should I do?
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Let me look at this further tomorrow, I may have set an option in my kernel config to export the gpio control to /sys (this may be non default)campbell wrote:So if I want to write a C program that toggles gpio126 (in the kernel 3.14.x numbering) and run it under kernel 4.12, what should I do?
Another way to access GPIO control from C might be directly through the gpio API in the kernel http://elixir.free-electrons.com/linux/ ... nux/gpio.h
- mad_ady
- Posts: 5243
- 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
Regarding gpio numbers, as far as I remember they were all shifted by a fixed offset
-
- Posts: 46
- Joined: Wed Jun 15, 2016 3:35 am
- languages_spoken: english
- ODROIDs: c1 c1+ c2
- Contact:
Re: Odroid C2 mainline kernel support
read the previous page of this thread.campbell wrote:So if I want to write a C program that toggles gpio126 (in the kernel 3.14.x numbering) and run it under kernel 4.12, what should I do?
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
Yes, but I want to do it from C via mmap(), not via /sys/class/gpio (because it doesn't appear to be enabled yet in the Armbian mainline image) and what I'm asking about is how to do that for pin 126 in the old numbering (since it's not one of the ones in that gpio_status tool), and whether there would be any difference between the 3.14 and 4.12 numbering if NOT going through sysfs.hhh1 wrote:read the previous page of this thread.campbell wrote:So if I want to write a C program that toggles gpio126 (in the kernel 3.14.x numbering) and run it under kernel 4.12, what should I do?
The reason I want to do this is to see if the USB bus is powered up or not, by measuring whether the overall power consumption goes up or down from its baseline value depending on the state of that pin. I DON'T want USB, and I want to make sure I'm getting the full power savings from having it powered down. In the old kernel I would do this by driving pin 126 low via sysfs.
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
CONFIG_GPIO_SYSFS is the kernel config parameter you need for /sys/class/gpio something that is not normally enabled by default. It appear the USB power control pin is GPIOAO_5 (pin 5) but it is is under control by the usb drivers when usb drivers are loaded....campbell wrote: Yes, but I want to do it from C via mmap(), not via /sys/class/gpio (because it doesn't appear to be enabled yet in the Armbian mainline image) and what I'm asking about is how to do that for pin 126 in the old numbering (since it's not one of the ones in that gpio_status tool), and whether there would be any difference between the 3.14 and 4.12 numbering if NOT going through sysfs.
The reason I want to do this is to see if the USB bus is powered up or not, by measuring whether the overall power consumption goes up or down from its baseline value depending on the state of that pin. I DON'T want USB, and I want to make sure I'm getting the full power savings from having it powered down. In the old kernel I would do this by driving pin 126 low via sysfs.
Code: Select all
root@odroid64:~# echo "5" > /sys/class/gpio/export
-su: echo: write error: Device or resource busy
Code: Select all
setenv dtbmods "fdt addr 0x1000000; fdt set /scpi/clocks status okay; fdt rm /soc/phy@c0000000; fdt rm /soc/phy@c0000020; fdt rm /soc/usb@c9000000; fdt rm /soc/usb@c9100000; fdt rm /regulator-usb-pwrs"
setenv bootcmd "${kernel}; ${dtb}; ${dtbmods}; ${bootseq}"
Code: Select all
odroid@odroid64:~$ lsusb
odroid@odroid64:~$ su -
Password:
root@odroid64:~# echo "5" > /sys/class/gpio/export
root@odroid64:~#
root@odroid64:~# cat /sys/class/gpio/gpio5/
active_low direction subsystem/ value
device/ power/ uevent
root@odroid64:~# cat /sys/class/gpio/gpio5/value
0
Code: Select all
root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port1/power/pm_qos_no_power_off
root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port2/power/pm_qos_no_power_off
root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port3/power/pm_qos_no_power_off
root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port4/power/pm_qos_no_power_off
root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-0\:1.0/usb1-port1/power/pm_qos_no_power_off
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
brad,
Do you think setting all five of those pins low results in more power savings than setting pin 126 low did in the old kernel? I'm still trying to figure out the source of the >170 mW difference between the old and new kernels.
Do you think setting all five of those pins low results in more power savings than setting pin 126 low did in the old kernel? I'm still trying to figure out the source of the >170 mW difference between the old and new kernels.
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Setting all USB port to low I was hoping would then suspend the usb power regulator (we cant actually control each port (no pin) individually due to hardware design so im not too sure)campbell wrote:brad,
Do you think setting all five of those pins low results in more power savings than setting pin 126 low did in the old kernel? I'm still trying to figure out the source of the >170 mW difference between the old and new kernels.
I dont have a current meter to test at the moment sorry.
-
- Posts: 364
- Joined: Wed May 04, 2016 1:07 am
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
Сan anybody write a driver to use Odroid C2 in Slave Mode (DAC in Master Mode) or use Miroslav Rudišin I2s driver https://github.com/miero if it possible for Odroid C2?
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
This results in a reduction of about 50 milliwatts. On the Armbian mainline image, in a warm room, with the stock heatsink, with ifconfig eth0 down and the conservative governor, I get about 0.893 W at idle before applying the above. After applying the above it drops to 0.839 W. I'd like to try this same change in the 3.14 kernel but most of the above doesn't seem to exist in the device tree on the stock Hardkernel odroid image. Any hints?brad wrote:Code: Select all
setenv dtbmods "fdt addr 0x1000000; fdt set /scpi/clocks status okay; fdt rm /soc/phy@c0000000; fdt rm /soc/phy@c0000020; fdt rm /soc/usb@c9000000; fdt rm /soc/usb@c9100000; fdt rm /regulator-usb-pwrs" setenv bootcmd "${kernel}; ${dtb}; ${dtbmods}; ${bootseq}"
Applying this (separately from the above) results in no change at all.brad wrote:Code: Select all
root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port1/power/pm_qos_no_power_off root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port2/power/pm_qos_no_power_off root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port3/power/pm_qos_no_power_off root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-1\:1.0/1-1-port4/power/pm_qos_no_power_off root@odroid64:~# echo 0 > /sys/bus/usb/devices/1-0\:1.0/usb1-port1/power/pm_qos_no_power_off
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
hhh1 wrote:The offset is -122
For example gpio 233 on 3.14 is gpio 111 on 4.12
Wouldn't an offset of -122 mean that it pin 126 becomes pin 4, rather than 5, in the new numbering?brad wrote:CONFIG_GPIO_SYSFS is the kernel config parameter you need for /sys/class/gpio something that is not normally enabled by default. It appear the USB power control pin is GPIOAO_5 (pin 5) but it is is under control by the usb drivers when usb drivers are loaded....
Code: Select all
root@odroid64:~# echo "5" > /sys/class/gpio/export -su: echo: write error: Device or resource busy
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
This seems correct and I think I am misunderstanding, from the odroid c2 schematicscampbell wrote:hhh1 wrote:The offset is -122
For example gpio 233 on 3.14 is gpio 111 on 4.12Wouldn't an offset of -122 mean that it pin 126 becomes pin 4, rather than 5, in the new numbering?brad wrote:CONFIG_GPIO_SYSFS is the kernel config parameter you need for /sys/class/gpio something that is not normally enabled by default. It appear the USB power control pin is GPIOAO_5 (pin 5) but it is is under control by the usb drivers when usb drivers are loaded....
Code: Select all
root@odroid64:~# echo "5" > /sys/class/gpio/export -su: echo: write error: Device or resource busy
Amlogic GPIOAO_4 - Pin 126 hardkernel (4 new kernel) is USB hub RST_N
Amlogic GPIOAO_5 - Pin 127 hardkernel (5 new kernel) is OTG power enable
When I check the device tree in new kernel again
Code: Select all
/*
* WARNING: The USB Hub on the Odroid-C2 needs a reset signal
* to be turned high in order to be detected by the USB Controller
* This signal should be handled by a USB specific power sequence
* in order to reset the Hub when USB bus is powered down.
*/
usb-hub {
gpio-hog;
gpios = <GPIOAO_4 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "usb-hub-reset";
};
Code: Select all
usb_otg_pwr: regulator-usb-pwrs {
compatible = "regulator-fixed";
regulator-name = "USB_OTG_PWR";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
So one thing that makes me a bit nervous is we seem to have lost the ability to toggle the USB bus on and off by toggling that pin from userland...now it requires a device tree edit and a reboot?
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Yes the usb driver takes hold of the pins, they are not avaliabe for gpio with driver loadedcampbell wrote:So one thing that makes me a bit nervous is we seem to have lost the ability to toggle the USB bus on and off by toggling that pin from userland...now it requires a device tree edit and a reboot?
-
- Posts: 352
- Joined: Thu Sep 03, 2015 1:13 pm
- languages_spoken: english
- ODROIDs: N2, C2, C1+, XU4, XU3, Cloudshell, Smart Power
- Contact:
Re: Odroid C2 mainline kernel support
Can the usb driver be unloaded? Is there anything at all to be done about this?brad wrote:Yes the usb driver takes hold of the pins, they are not avaliabe for gpio with driver loadedcampbell wrote:So one thing that makes me a bit nervous is we seem to have lost the ability to toggle the USB bus on and off by toggling that pin from userland...now it requires a device tree edit and a reboot?
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
The USB driver is builtin to the kernel (not a module) so im not sure it can be unloaded. Only real way I know is to not load it in the first place by removing from the device tree.campbell wrote:Can the usb driver be unloaded? Is there anything at all to be done about this?brad wrote:Yes the usb driver takes hold of the pins, they are not avaliabe for gpio with driver loadedcampbell wrote:So one thing that makes me a bit nervous is we seem to have lost the ability to toggle the USB bus on and off by toggling that pin from userland...now it requires a device tree edit and a reboot?
It might be possible to suspend all ports and then suspend the controllers but this would require investigation and testing.
The usb calls to /sys I posted earlier allow ports to be configured as suspended (pm_qos_no_power_off) . I suspect it might be possible to then suspend each of the controllers using sysfs. Its somewhat difficult for me to test anything here as I can not see the power consumption of the odroid.
- mad_ady
- Posts: 5243
- 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
Is there anything preventing the driver to be built as a module instead? Then it could be unloaded with rmmod.
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
It might, I think you would also need to build the USB PHY drivers as a module I believe. Both of these options...mad_ady wrote:Is there anything preventing the driver to be built as a module instead? Then it could be unloaded with rmmod.
CONFIG_PHY_MESON8B_USB2: │
│ │
│ Enable this to support the Meson USB2 PHYs found in Meson8b │
│ and GXBB SoCs. │
│ If unsure, say N.
CONFIG_USB_DWC2: │
│ │
│ Say Y here if your system has a Dual Role Hi-Speed USB │
│ controller based on the DesignWare HSOTG IP Core.
-
- Posts: 28
- Joined: Thu Apr 13, 2017 10:14 pm
- languages_spoken: english, german
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
Hi brad,
do you have any precompiled mainline kernel available that supports NFS and USB? Everytime I selfcompile it seems like its superslow, time is going way to slow and also refresh times of htop for examples are way to slow.
Greetings
Flole
do you have any precompiled mainline kernel available that supports NFS and USB? Everytime I selfcompile it seems like its superslow, time is going way to slow and also refresh times of htop for examples are way to slow.
Greetings
Flole
-
- Posts: 4251
- Joined: Tue Dec 30, 2014 8:42 pm
- languages_spoken: english
- ODROIDs: C1
- Contact:
Re: Odroid C2 mainline kernel support
This usually happens when a timer (arm/meson) is not properly set. Check the device tree to ensure the proper timer is enabled.Flole wrote:time is going way to slow and also refresh times of htop for examples are way to slow.
-
- Posts: 1162
- Joined: Thu Oct 02, 2014 11:42 pm
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
Additional to their is another host meson-dwc2 driver needed to handle and tune runtime pm and the user-space inputs.brad wrote: It might, I think you would also need to build the USB PHY drivers as a module I believe. Both of these options...
CONFIG_PHY_MESON8B_USB2: │
│ │
│ Enable this to support the Meson USB2 PHYs found in Meson8b │
│ and GXBB SoCs. │
│ If unsure, say N.
CONFIG_USB_DWC2: │
│ │
│ Say Y here if your system has a Dual Role Hi-Speed USB │
│ controller based on the DesignWare HSOTG IP Core.
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
I will look into that shortly, what version of NFS and mount options are you using?Flole wrote:Hi brad,
do you have any precompiled mainline kernel available that supports NFS and USB?
-
- Posts: 28
- Joined: Thu Apr 13, 2017 10:14 pm
- languages_spoken: english, german
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
I'm using NFS v3 as root fs (so dhcp is also needed on boot)
-
- Posts: 28
- Joined: Thu Apr 13, 2017 10:14 pm
- languages_spoken: english, german
- ODROIDs: C2
- Contact:
Re: Odroid C2 mainline kernel support
I tried to compile again and I am having the same issues. I used the same device tree that works with a different kernel. Can someone please help me out and provide me with a working build?
-
- Posts: 219
- Joined: Tue Mar 22, 2016 6:34 pm
- languages_spoken: english, spanish
- ODROIDs: odroid c2
- Contact:
Re: Odroid C2 mainline kernel support
does anyone uses uboot non hardkernel without initrd/ramfs?
if so, can you share your boot.cmd?
I'm unable to get the board to boot, uboot doesn't loads up at all.
if so, can you share your boot.cmd?
I'm unable to get the board to boot, uboot doesn't loads up at all.
-
- Posts: 219
- Joined: Tue Mar 22, 2016 6:34 pm
- languages_spoken: english, spanish
- ODROIDs: odroid c2
- Contact:
Re: Odroid C2 mainline kernel support
now I've got stuck in both fronts 
either uboot upgrade or kernel upgrade.
this time I'm trying to use kernel 4.12.5 with hardkernel uboot.
what I've did is took buildroot, updated the kernel version, fixed the needed entries, added the patches and compiled it with the provided config from Neil's repo.
it compiles well, I dd the image into the device, connect the power, both red and blue leds are lighted up, no flushing and serial doesn't display anything.
any idea?

either uboot upgrade or kernel upgrade.
this time I'm trying to use kernel 4.12.5 with hardkernel uboot.
what I've did is took buildroot, updated the kernel version, fixed the needed entries, added the patches and compiled it with the provided config from Neil's repo.
it compiles well, I dd the image into the device, connect the power, both red and blue leds are lighted up, no flushing and serial doesn't display anything.
any idea?
-
- Posts: 1162
- Joined: Thu Oct 02, 2014 11:42 pm
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
First thing you need to do is use the u-boot provided by HK.daggs wrote:now I've got stuck in both fronts
either uboot upgrade or kernel upgrade.
this time I'm trying to use kernel 4.12.5 with hardkernel uboot.
what I've did is took buildroot, updated the kernel version, fixed the needed entries, added the patches and compiled it with the provided config from Neil's repo.
it compiles well, I dd the image into the device, connect the power, both red and blue leds are lighted up, no flushing and serial doesn't display anything.
any idea?
You need to modify the boot.ini as per brad's links viewtopic.php?f=135&t=22717&start=250#p188335
Code: Select all
$ mv boot.ini boot.ini.hardkernel
$ wget http://repo.builtonline.net/testing/custom/4.10.10-testing/boot.ini
Code: Select all
# Populate the final bootcmd
setenv bootargs "${console} ${bootrootfs} ${odroid} ${libreelec} fsck.repair=yes net.ifnames=0"
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
Sorry Flole for the delay I have been away and busy, I will try to organise this weekend for you.Flole wrote:I tried to compile again and I am having the same issues. I used the same device tree that works with a different kernel. Can someone please help me out and provide me with a working build?
-
- Posts: 219
- Joined: Tue Mar 22, 2016 6:34 pm
- languages_spoken: english, spanish
- ODROIDs: odroid c2
- Contact:
Re: Odroid C2 mainline kernel support
as said, this is a different issue than the uboot upgrade.moon.linux wrote:First thing you need to do is use the u-boot provided by HK.daggs wrote:now I've got stuck in both fronts
either uboot upgrade or kernel upgrade.
this time I'm trying to use kernel 4.12.5 with hardkernel uboot.
what I've did is took buildroot, updated the kernel version, fixed the needed entries, added the patches and compiled it with the provided config from Neil's repo.
it compiles well, I dd the image into the device, connect the power, both red and blue leds are lighted up, no flushing and serial doesn't display anything.
any idea?
You need to modify the boot.ini as per brad's links viewtopic.php?f=135&t=22717&start=250#p188335Append the bootargs as per below.Code: Select all
$ mv boot.ini boot.ini.hardkernel $ wget http://repo.builtonline.net/testing/custom/4.10.10-testing/boot.ini
just compile the kernel and update the relevant files /media/boot/ partition.Code: Select all
# Populate the final bootcmd setenv bootargs "${console} ${bootrootfs} ${odroid} ${libreelec} fsck.repair=yes net.ifnames=0"
will try and report back
-
- Posts: 219
- Joined: Tue Mar 22, 2016 6:34 pm
- languages_spoken: english, spanish
- ODROIDs: odroid c2
- Contact:
Re: Odroid C2 mainline kernel support
was fast, got the same behavior, the hk uboot commit id used is eb5d2d16fd45f52ec49e9b4ff9d562630c08e61c
-
- Posts: 219
- Joined: Tue Mar 22, 2016 6:34 pm
- languages_spoken: english, spanish
- ODROIDs: odroid c2
- Contact:
Re: Odroid C2 mainline kernel support
ok, got my serial to work, new info:daggs wrote:was fast, got the same behavior, the hk uboot commit id used is eb5d2d16fd45f52ec49e9b4ff9d562630c08e61c
Code: Select all
GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:0;
TE: 309255
no sdio debug board detected
BL2 Built : 11:44:26, Nov 25 2015.
gxb gfb13a3b-c2 - jcao@wonton
Board ID = 8
set vcck to 1100 mv
set vddee to 1050 mv
CPU clk: 1536MHz
DDR channel setting: DDR0 Rank0+1 same
DDR0: 2048MB(auto) @ 912MHz(2T)-13
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x000000b0
Load bl30 from SD, src: 0x00010200, des: 0x01000000, size: 0x00009ef0
Sending bl30........................................OK.
Run bl30...
Load bl301 from SD, src: 0x0001c200, des: 0x01000000, size: 0x000012d0
Wait bl30...Done
Sending bl301.....OK.
Run bl301...
bl31 from SD, src: 0x00020200, des: 0x10100000, size: 0x00011130
--- UART initialized after reboot ---
[Reset cause: unknown]
[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: ef be ad de d f0 ad ba ef be aLoad bl33 from SD, src: 0x00034200, des: 0x01000000, size: 0x00069fe0
d de not ES chip
[0.423906 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 (Aug 10 2017 - 14:31:36)
DRAM: 2 GiB
Relocation Offset is: 76f3c000
-------------------------------------------------
* Welcome to Hardkernel's ODROID-C2
-------------------------------------------------
CPU : AMLogic S905
S/N : HKC213254DFEA579
MAC : 00:1e:06:34:f1:f9
BID : HKC2211707
-------------------------------------------------
register usb cfg[1][0] = 0000000077f97298
register usb cfg[0][1] = 0000000077f972c0
vpu detect type: 5
vpu clk_level = 7
set vpu clk: 666667000Hz, readback: 666660000Hz(0x300)
MMC: aml_priv->desc_buf = 0x0000000073f34d30
aml_priv->desc_buf = 0x0000000073f36ec0
SDIO Port B: 0, SDIO Port C: 1
ret = 1 .[mmc_init] mmc init success
In: serial
Out: serial
Err: serial
----------------------------------
MMC Size : 8 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
Net: Meson_Ethernet
Hit [Enter] key twice to stop autoboot: 0
reading boot.ini
3346 bytes read in 4 ms (816.4 KiB/s)
cfgload: applying boot.ini...
cfgload: setenv bootrootfs "boot=/dev/mmcblk1p1 disk=/dev/mmcblk1p2 root=/dev/mmcblk1p2"
cfgload: setenv console "console=tty0 console=ttyAML0,115200n8"
cfgload: setenv odroid "no_console_suspend consoleblank=0 loglevel=8 debug ro rootwait"
cfgload: setenv maxcpus "4"
cfgload: setenv max_freq "1536" # 1.536GHz
cfgload: setenv kernel "fatload mmc 0:1 0x1080000 Image"
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} fsck.repair=yes net.ifnames=0"
cfgload: run bootcmd
reading Image
10397704 bytes read in 1006 ms (9.9 MiB/s)
reading meson-gxbb-odroidc2.dtb
20176 bytes read in 6 ms (3.2 MiB/s)
ee_gate_off ...
Wrong Image Format for bootm command
ERROR: can't get kernel image!
ee_gate_on ...
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
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
movi: the partiton 'dtb' is reading...
MMC read: dev # 0, block # 1504, count 128 ... 128 blocks read: OK
movi: the partiton 'boot' is reading...
MMC read: dev # 0, block # 1632, count 32768 ... 32768 blocks read: OK
Bad Linux ARM64 Image magic!
Code: Select all
dagg@NCC-5001-D ~/workspace/buildroots/buildroot-master4 $ grep -i arm board/hardkernel/odroidc2/kernel-4.12.x.config | head
# Linux/arm64 4.12.0 Kernel Configuration
CONFIG_ARM64=y
-
- Posts: 784
- Joined: Tue Mar 29, 2016 1:22 pm
- languages_spoken: english
- ODROIDs: C2 N1
- Location: Australia
- Contact:
Re: Odroid C2 mainline kernel support
The hk uboot wont load mainline kernel via an Image format you need to use a uImage format so it can load from the correct entry point by using the mkimage command.daggs wrote: any ideas?
Code: Select all
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux -d arch/arm64/boot/Image uImage
-
- Posts: 364
- Joined: Wed May 04, 2016 1:07 am
- languages_spoken: english
- Contact:
Re: Odroid C2 mainline kernel support
What is needed for Odroid C2 audio is a general purpose I2S driver which can have its parameters set by editing a text file. We would need to be able to choose master/slave and I2S, left-justified or right-justified output format. Can any body modify this driver?brad wrote:daggs wrote: any ideas?[/code]
-
- Posts: 219
- Joined: Tue Mar 22, 2016 6:34 pm
- languages_spoken: english, spanish
- ODROIDs: odroid c2
- Contact:
Re: Odroid C2 mainline kernel support
ok, one question, whats the diff between uImage and Image?brad wrote:The hk uboot wont load mainline kernel via an Image format you need to use a uImage format so it can load from the correct entry point by using the mkimage command.daggs wrote: any ideas?Code: Select all
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux -d arch/arm64/boot/Image uImage
-
- Posts: 219
- Joined: Tue Mar 22, 2016 6:34 pm
- languages_spoken: english, spanish
- ODROIDs: odroid c2
- Contact:
Re: Odroid C2 mainline kernel support
found the diff, ignore.daggs wrote:ok, one question, whats the diff between uImage and Image?brad wrote:The hk uboot wont load mainline kernel via an Image format you need to use a uImage format so it can load from the correct entry point by using the mkimage command.daggs wrote: any ideas?Code: Select all
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux -d arch/arm64/boot/Image uImage
will try your suggestion, thanks.
Who is online
Users browsing this forum: No registered users and 2 guests