Odroid C2 mainline kernel support

Post Reply
best_odroidfreak
Posts: 366
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by best_odroidfreak »

I gonna purchase DAC http://www.ebay.com/itm/Assembly-CS8416 ... SwcB5ZEXbP and connect it to Odroid C2 via I2s.
Will UDEV utilize and load kernel modules (drivers) for this board?
Is it possible to use I2s bus for the connection of this DAC?

it9exm
Posts: 17
Joined: Sat Aug 13, 2016 9:12 pm
languages_spoken: english
ODROIDs: Odroid C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by it9exm »

Linux 4.12-rc5 is out! Anyone tried it?
tuxx wrote:I am currently testing on latest archlinuxarm:

Code: Select all

pacman -S linux-aarch64-rc
pacman -R uboot-odroid-c2
pacman -S uboot-odroid-c2-mainline

Code: Select all

[root@alarm ~]# uname -a
Linux alarm 4.12.0-rc4-1-ARCH #1 SMP Sun Jun 4 19:13:14 MDT 2017 aarch64 GNU/Linux
I haven't tested any device yet, but I am going to set up an MPD box now to use with my usb dac in order to test usb performance.

Something I noticed is that there's no boot.ini file. If I create one will it be functional with this kernel?

Many thanks in advance.
Is hdmi working for you?

Seems like there's no boot.ini with uboot mainline. You have to edit boot.txt and then run mkscr from /boot, it will generate boot.scr.
teknoid wrote: Is there someting similiar for odroid's boot.ini or do we need it hack all the stuff manually into the meson-gxbb-odroidc2.dtb?
questions over questions... :?
Any tip to do that? After a lot of time i figured out that this is probably the cause of hdmi not working. It has nothing to do with the graphics driver, as the user afaerber confirmed this on #linux-amlogic (irc.freenode.net)

See also this:
viewtopic.php?f=135&t=26969

redhad
Posts: 20
Joined: Wed May 03, 2017 10:58 pm
languages_spoken: english, german, russian, french
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by redhad »

HDMI is not present in the mainline kernel devicetree description of the C2, at least yet. It is however merged for 4.13:
add HDMI and CVBS nodes for multiple boards
pinctrl pins: SPI, HDMI CEC

best_odroidfreak
Posts: 366
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by best_odroidfreak »

Kernel mainlining progress

v4.13

DT: cleanup/reorganize alphabetically to better avoid conflicts
add HDMI and CVBS nodes for multiple boards
pinctrl pins: SPI, HDMI CEC
SCPI: fix thermal sensor reporting
New board support
NanoPi K2 (GXBB)
R-Box Pro (GXM)

alpha_one_x86
Posts: 103
Joined: Wed Aug 27, 2014 6:47 am
languages_spoken: french, english, spanish
ODROIDs: U3, C1, C2, N2, H2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Odroid C2 mainline kernel support

Post by alpha_one_x86 »

Hi, for kernel 4.12-RC5 vanilla, I have:

Code: Select all

ee_gate_off ...
## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   linux-next
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    14086656 Bytes = 13.4 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
"Synchronous Abort" handler, esr 0x96000010
ELR:     77f4c51c
LR:      77f4d1cc
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000010 x3 : 0000000000000024
x4 : 0000000000000010 x5 : 0000000000000000
x6 : 0000000077f7f6f8 x7 : 0000000000000044
x8 : 0000000000000031 x9 : 0000000000000000
x10: 000000000000000f x11: 0000000077f809b8
x12: 0000000000000000 x13: 0000000000000000
x14: 0000000000000000 x15: 0000000000000000
x16: 0000000000000000 x17: 0000000000000000
x18: 0000000073f29e28 x19: 0000000077fa5f08
x20: 0000000073f2f240 x21: 0000000000000000
x22: 0000000077fa6008 x23: 0000000077fa6010
x24: 0000000000000016 x25: 0000000077fa6008
x26: 0000000000000000 x27: 0000000077f85d20
x28: 0000000000000000 x29: 0000000073f29970
uboot from shipped ubuntu
Developer of ImageUltracopier/ImageSupercopier and of the game ImageCatchChallenger

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

Hey, im new and i tried to compile the latest mainline kernel from odroidc2-4.y-final.
However no matter what i do the led stays blue and i cant get it to boot.

I already tried the u-boot config from here:
http://repo.builtonline.net/testing/cus ... g/boot.ini

I also had no luck with updating u-boot on my device the current mainline build doesnt even give me a blue led at all.

What are the minimal steps needed in order to get the new 4.12 mainline kernel to boot ?
(Im crosscompiling + im trying to boot without initramfs)

Kind regards
MartB

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

Re: Odroid C2 mainline kernel support

Post by brad »

MartB wrote:Hey, im new and i tried to compile the latest mainline kernel from odroidc2-4.y-final.
Which version of the kernel is this? 4.x is still much in development for Odroid C2 so there is not really any final version as yet.

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

Re: Odroid C2 mainline kernel support

Post by brad »

alpha_one_x86 wrote:Hi, for kernel 4.12-RC5 vanilla, I have:

Code: Select all

ee_gate_off ...
## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   linux-next
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    14086656 Bytes = 13.4 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
"Synchronous Abort" handler, esr 0x96000010
ELR:     77f4c51c
LR:      77f4d1cc
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000010 x3 : 0000000000000024
x4 : 0000000000000010 x5 : 0000000000000000
x6 : 0000000077f7f6f8 x7 : 0000000000000044
x8 : 0000000000000031 x9 : 0000000000000000
x10: 000000000000000f x11: 0000000077f809b8
x12: 0000000000000000 x13: 0000000000000000
x14: 0000000000000000 x15: 0000000000000000
x16: 0000000000000000 x17: 0000000000000000
x18: 0000000073f29e28 x19: 0000000077fa5f08
x20: 0000000073f2f240 x21: 0000000000000000
x22: 0000000077fa6008 x23: 0000000077fa6010
x24: 0000000000000016 x25: 0000000077fa6008
x26: 0000000000000000 x27: 0000000077f85d20
x28: 0000000000000000 x29: 0000000073f29970
uboot from shipped ubuntu
It seems the load address / entry point might be wrong. When you say the shipped uboot with Ubuntu is this the hardkernel uboot or mainline?

For hardkernel uboot you would need to use a uImage format of image to load as the entry point / load address for the image (not the uImage) must be modified. We need to use the mkimage command to produce the uImage from an existing Image (I posted this command before in this thread but I had a typo in the load address, below is correct and I also fixed my earlier post)

Code: Select all

mkimage -A arm64 -O linux -C none -T kernel -a 0x1080000 -e 0x1080000 -n linux-next -d Image uImage
This will produce the uImage file which can be loaded from hard-kernel uboot

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

Greetings everyone!

I'm running Odroid C2 with kernel 3.14 and I'm trying to upgrade to mainline 4.12.
I've tried @umiddelb tutorial on his github repo at https://github.com/umiddelb/armhf/wiki/ ... perimental

I was able to run the whole process with the following results:

HypriotOS boot.ini file

Code: Select all

ODROIDC2-UBOOT-CONFIG

########################################################################
# Changes made to this are overwritten every time there's a new upgrade
# To make your changes permanent change it on
# boot.ini.default
# After changing it on boot.ini.default run the bootini command to
# rewrite this file with your personal permanent settings.
# Documentation: http://odroid.com/dokuwiki/doku.php?id=en:c2_persistent_bootini
########################################################################

# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.

# Custom modeline!
# To use custom modeline you need to disable all the below resolutions
# and setup your own!
# For more information check our wiki:
# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting
# Example below:
# setenv m "custombuilt"
# setenv modeline "1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1"

# 480 Lines (720x480)
# setenv m "480i60hz" # Interlaced 60Hz
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv m "480p60hz" # 480 Progressive 60Hz
# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz

# 576 Lines (720x576)
# setenv m "576i50hz" # Interlaced 50Hz
# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
# setenv m "576p50hz" # Progressive 50Hz
# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz

# 720 Lines (1280x720)
# setenv m "720p50hz" # 50Hz
# setenv m "720p60hz" # 60Hz

# 1080 Lines (1920x1080)
# setenv m "1080i60hz" # Interlaced 60Hz
# setenv m "1080p60hz" # Progressive 60Hz
# setenv m "1080i50hz" # Interlaced 50Hz
# setenv m "1080p50hz" # Progressive 50Hz
# setenv m "1080p24hz" # Progressive 24Hz

# 4K (3840x2160)
# setenv m "2160p30hz"    # Progressive 30Hz
# setenv m "2160p25hz"    # Progressive 25Hz
# setenv m "2160p24hz"    # Progressive 24Hz
# setenv m "smpte24hz"    # Progressive 24Hz SMPTE
# setenv m "2160p50hz"    # Progressive 50Hz
# setenv m "2160p60hz"    # Progressive 60Hz
# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)

### VESA modes ###
# setenv m "640x480p60hz"
# setenv m "800x480p60hz"
# setenv m "480x800p60hz"
# setenv m "800x600p60hz"
# setenv m "1024x600p60hz"
# setenv m "1024x768p60hz"
# setenv m "1280x800p60hz"
# setenv m "1280x1024p60hz"
# setenv m "1360x768p60hz"
# setenv m "1440x900p60hz"
# setenv m "1600x900p60hz"
# setenv m "1680x1050p60hz"
# setenv m "1600x1200p60hz"
# setenv m "1920x1200p60hz"
# setenv m "2560x1080p60hz"
# setenv m "2560x1440p60hz"
# setenv m "2560x1600p60hz"
# setenv m "3440x1440p60hz"

# HDMI BPP Mode
# setenv m_bpp "32"
# setenv m_bpp "24"
# setenv m_bpp "16"

# HDMI DVI/VGA modes
# By default its set to HDMI, if needed change below.
# Uncomment only a single Line.
# setenv vout "dvi"
# setenv vout "vga"

# HDMI HotPlug Detection control
# Allows you to force HDMI thinking that the cable is connected.
# true = HDMI will believe that cable is always connected
# false = will let board/monitor negotiate the connection status
# setenv hpd "true"
# setenv hpd "false"

# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "false" # true or false

# Server Mode (aka. No Graphics)
# Setting nographics to 1 will disable all video subsystem
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
setenv nographics "1"

# Meson Timer
# 1 - Meson Timer
# 0 - Arch Timer
# Using meson_timer improves the video playback however it breaks KVM (virtualization).
# Using arch timer allows KVM/Virtualization to work however you'll experience poor video
setenv mesontimer "1"

# UHS (Ultra High Speed) MicroSD mode enable/disable
setenv disableuhs "false"

# MicroSD Card Detection enable/disable
# Force the MMC controlled to believe that a card is connected.
setenv mmc_removable "true"

# Default Console Device Setting
setenv condev "console=ttyS0,115200n8 console=tty0"   # on both

# CPU Frequency / Cores control
###########################################
### WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry:
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
#
# MAX CPU's
# setenv maxcpus "1"
# setenv maxcpus "2"
# setenv maxcpus "3"
setenv maxcpus "4"

# MAX Frequency
# setenv max_freq "2016"  # 2.016GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1920"  # 1.920GHz
# setenv max_freq "1896"  # 1.896GHz
# setenv max_freq "1752"  # 1.752GHz
# setenv max_freq "1680"  # 1.680GHz
# setenv max_freq "1656"  # 1.656GHz
setenv max_freq "1536"  # 1.536GHz



###########################################

# Boot Arguments
if test "${m}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi

setenv bootargs "root=/dev/mmcblk0p2 rootfstype=ext4 rootwait ro ${condev} no_console_suspend hdmimode=${m} ${comde} m_bpp=${m_bpp} vout=${vout} fsck.repair=yes net.ifnames=0 elevator=deadline cgroup_enable=memory cgroup_enable=cpuset swapaccount=1 disablehpd=${hpd} max_freq=${max_freq} maxcpus=${maxcpus} monitor_onoff=${monitor_onoff} disableuhs=${disableuhs} mmc_removable=${mmc_removable}"

# Booting

setenv loadaddr "0x11000000"
setenv dtb_loadaddr "0x1000000"
setenv initrd_loadaddr "0x13000000"

fatload mmc 0:1 ${loadaddr} Image
fatload mmc 0:1 ${dtb_loadaddr} meson64_odroidc2.dtb
fdt addr ${dtb_loadaddr}

if test "${mesontimer}" = "0"; then fdt rm /meson_timer; fdt rm /cpus/cpu@0/timer; fdt rm /cpus/cpu@1/timer; fdt rm /cpus/cpu@2/timer; fdt rm /cpus/cpu@3/timer; fi
if test "${mesontimer}" = "1"; then fdt rm /timer; fi

if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi
if test "${nographics}" = "1"; then fdt rm /meson-fb; fdt rm /amhdmitx; fdt rm /picdec; fdt rm /ppmgr; fi
if test "${nographics}" = "1"; then fdt rm /meson-vout; fdt rm /mesonstream; fdt rm /meson-fb; fi
if test "${nographics}" = "1"; then fdt rm /deinterlace; fdt rm /codec_mm; fi

booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}

After copying all the files the /boot partition has the following files :

http://imgur.com/kg7bZZJ

I've enabled HDMI output with the following:

Code: Select all

# 1080 Lines (1920x1080)
# setenv m "1080i60hz" # Interlaced 60Hz
setenv m "1080p60hz" # Progressive 60Hz
# setenv m "1080i50hz" # Interlaced 50Hz
# setenv m "1080p50hz" # Progressive 50Hz
# setenv m "1080p24hz" # Progressive 24Hz

# HDMI BPP Mode
setenv m_bpp "32"
# setenv m_bpp "24"
# setenv m_bpp "16"

# HDMI HotPlug Detection control
# Allows you to force HDMI thinking that the cable is connected.
# true = HDMI will believe that cable is always connected
# false = will let board/monitor negotiate the connection status
# setenv hpd "true"
setenv hpd "false"

# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "true" # true or false

# Server Mode (aka. No Graphics)
# Setting nographics to 1 will disable all video subsystem
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
setenv nographics "0"
I've commented out the following section and replaced with what @umiddelb proposed with for the console:

Code: Select all

#setenv condev "console=ttyS0,115200n8 console=tty0"   # on both
setenv condev "console=ttyAML0,115200n8 console=tty0"   # on both

Code: Select all

#fatload mmc 0:1 ${loadaddr} Image
fatload mmc 0:1 ${loadaddr} uImage
#fatload mmc 0:1 ${dtb_loadaddr} meson64_odroidc2.dtb
fatload mmc 0:1 ${dtb_loadaddr} meson-gxbb-odroidc2.dtb
I saved the whole thing and plugged it on the board and the blue LED is always on not blinking.

Am I doing something wrong? Does someone see a mistake in my boot.ini file ?

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

Re: Odroid C2 mainline kernel support

Post by brad »

gügü wrote:Am I doing something wrong? Does someone see a mistake in my boot.ini file ?
It looks ok to me although it can be difficult to spot an error. Which windows editor have you edited the boot.ini file with? Notepad and wordpad will save non printable characters (not visible) in the file which are not compatible with Uboot. They might work OK editing a single line in the file but if you enter a newline (ie enter key) or a tab and save it then it will break. I would suggest always editing boot.ini file on windows with an appropriate editor such as notepad++
Last edited by brad on Sun Jun 18, 2017 4:14 pm, edited 1 time in total.

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

brad wrote: Which version of the kernel is this? 4.x is still much in development for Odroid C2 so there is not really any final version as yet.
I simply went for the upstream linux repo from the first post is this not the one i should use ?
I sorted out my issues and im running the latest 4.13(still 4.12 rc5 with more fixes) staging branch from amlogic.
Does someone have working cpufreq and thermal support, if yes what are the exact kernel config options or is there some driver missing ?

/sys/class/thermal is empty + /sys/devices/system/cpu/cpu0/cpufreq doesnt exist

I "fixed" rtc shield with a quick device tree modification:
Simply decompile the device tree using:

Code: Select all

dtc -I dtb meson-gxbb-odroidc2.dtb -O dts -o meson-gxbb-odroidc2.dts
And then add

Code: Select all

pcf8563@51 {
    status = "okay";
    compatible = "nxp,pcf8563";
    reg = <0x51>;
};
inside

Code: Select all

i2c@8500 {
    [...]
    [HERE]
};
Then recompile the tree again:

Code: Select all

dtc -I dts meson-gxbb-odroidc2.dts -O dtb -o meson-gxbb-odroidc2.dtb
Done, if this was well known and useless im sorry but i did not find that anywhere.

Kind regards
MartB
Last edited by MartB on Mon Jun 19, 2017 7:54 am, edited 3 times in total.

best_odroidfreak
Posts: 366
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by best_odroidfreak »

Hi guys!
Is anybody writing full I2s driver for kernel 4.13 - 4.14 Odroid C2 yet?
There are difficulties to connect famous DAC based on chip AK4490/5 to Odroid C2 I2s bus.

crashoverride
Posts: 5133
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 375 times
Contact:

Re: Odroid C2 mainline kernel support

Post by crashoverride »

Im so glad we got back to talking about DACs! I was worried this discussion was going to go way off topic.

[edit]
It should probably be explicitly stated ...

Support for things gets incrementally added to the mainline linux kernel. It should be expected that certain things may not work completely or are currently not supported in mainline. This is not a "release". It is a "work in progress".

Eventually, Amlogic will release a 4.x kernel. They have already posted "previews". Once a release is made and HardKernel officially adopts it, then it can be expected that everything officially supported should work.

This topic is a discussion of advanced development topics by community members. It is not a "Do this to run mainline perfectly today on C2" tutorial.

Of course, the above is my opinion and I do not represent anyone involved in the effort. I am simply offering that at this time: If things works, great! If they don't, this place to interact with kernel developers is the Linux Kernel Mailing List. There will be no official HardKernel support until HardKernel releases a 4.x kernel for public testing. Currently, this topic is community engagement.

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

brad wrote:
gügü wrote:Am I doing something wrong? Does someone see a mistake in my boot.ini file ?
It looks ok to me although it can be difficult to spot an error. Which windows editor have you edited the boot.ini file with? Notepad and wordpad will save non printable characters (not visible) in the file which are not compatible with Uboot. They might work OK editing a single line in the file but if you enter a newline (ie enter key) or a tab and save it then it will break. I would suggest always editing boot.ini file on windows with an appropriate editor such as notepad++
I'm always using Notepad++

The version I based my work upon is from this link : https://github.com/hypriot/image-builde ... tag/v0.3.1

I flashed the sdcard and booted.

umiddelb
Posts: 452
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by umiddelb »

MartB wrote: Does someone have working cpufreq and thermal support, if yes what are the exact kernel config options or is there some driver missing ?
See here.

Cheers
Uli

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

I should confess I spent the whole last week to try to understand how this mainline is working.
I have to say that all that I'm learning here is so advanced.

I never went that deep in kernel related stuffs. I read this thread at least 3 times since the last 3 days.
Going from one link to another one to connect the dots trying to understand the thought process of every post and it is not an easy task.
My bookmark is stuffed with Odroid C1/C2 mainline informations.

To be honest I never shitted rocks as I do right now but I hope it is worth the price!

You guys are super advanced geeks it is not always easy to follow hehe.

Thanx for keeping this thread If I found this place earlier I didn't need to bug Uli(sorry) with all my questions and comments.

I think it make more sense to share and ask questions here.

Thanx for all the hard work you guys are doing!

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

brad wrote:To make it easy for others who want to test but dont want to go about building their own kernel ive made available a prebuilt version.

Its based upon 4.10.10 as mentioned above with many in development patches (As provided from Neil Armstrongs git) added for upcoming features and a modified config to add extra USB device drivers. It also has built in Ethernet drivers to allow an NFS rootfs boot. It does not include mali modules but does include HDMI support

Guide to install onto the standard Ubuntu Mate image. (or any distro for that matter should work)

1) Ensure your system is fully up to date.

2) On the Odroid download and install modules

Code: Select all

$ wget http://repo.builtonline.net/testing/custom/4.10.10-testing/modules-4.10.10.tar.gz
$ sudo tar -xvf modules-4.10.10.tar.gz -C /
3) download prebuilt uImage and device tree onto boot partition

Code: Select all

$ cd /media/boot
$ wget http://repo.builtonline.net/testing/custom/4.10.10-testing/uImage
$ wget http://repo.builtonline.net/testing/custom/4.10.10-testing/meson-gxbb-odroidc2.dtb 
4) Backup original boot.ini and download new version compatible with uImage format

Code: Select all

$ mv boot.ini boot.ini.hardkernel
$ wget http://repo.builtonline.net/testing/custom/4.10.10-testing/boot.ini
5) Sync filesystem to ensure nothing is left cached

Code: Select all

$ sync
6) reboot

To revert to the standard hardkernel kernel simply revert the boot.ini file on the boot partition from the version you backed up in step 4.

There are a couple of issues ive discovered

- A thin purple line exists down the left hand side of the screen (does not exist in the screenshot but you can see a slight tear in the 1080p video with no mali acceleration but given that performance is great)
- HDMI audio not working (I know it can with this kernel but not sure what is wrong yet with the Ubuntu setup)
- In Ubuntu audio is stuck at 2 channel in pulse for all devices, to resolve edit /etc/pulse/daemon.conf and add the following line

Code: Select all

default-sample-channels = 8
I will upload the source code in the next 24 hours the directory http://repo.builtonline.net/testing/cus ... 0-testing/

Can you provide the same files and folders for the 4.12-rc5 version of the kernel please ?

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

umiddelb wrote:
MartB wrote: Does someone have working cpufreq and thermal support, if yes what are the exact kernel config options or is there some driver missing ?
See here.

Cheers
Uli
Managed to initialize but it doesnt boot anymore:

Code: Select all

[    0.928726] scpi_protocol scpi: SCP Protocol 0.0 Firmware 0.0.0 version
[    0.933424] cpu cpu0: bL_cpufreq_init: CPU 0 initialized
[    0.937766] arm_big_little: bL_cpufreq_register: Registered platform driver: scpi

[    0.971344] Unable to handle kernel paging request at virtual address 7ef93c90
[    0.972916] pgd = ffff000008a41000
[    0.976278] [7ef93c90] *pgd=000000007effe003, *pud=0000000000000000
[    0.982489] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[    1.010268] PC is at run_local_timers+0x28/0x60
[    1.014746] LR is at run_local_timers+0x20/0x60
[    1.019230] pc : [<ffff0000080fc620>] lr : [<ffff0000080fc618>] pstate: 200001c5
[    1.026561] sp : ffff80007ef90e70
[    1.029838] x29: ffff80007ef90e70 x28: 00000000369912dc 
[    1.035099] x27: ffff00000810b570 x26: ffff80007ef961c0 
[    1.040361] x25: ffff80007ef961d0 x24: 00000000369912dc 
[    1.045622] x23: 0000000000000001 x22: 0000000000000001 
[    1.050883] x21: 000000003699169a x20: 0000000000000000 
[    1.056144] x19: ffff80007ef93c80 x18: 0000000000000000 
[    1.061406] x17: 0000000000001800 x16: 0000000000001400 
[    1.066667] x15: ffff0000089eb200 x14: 0000000039d723e9 
[    1.071928] x13: 0000000000000000 x12: ffff80007c748080 
[    1.077189] x11: 0000000000000000 x10: 0000000000000040 
[    1.082451] x9 : ffff00000897eb80 x8 : ffff80007c000248 
[    1.087712] x7 : ffff80007c000270 x6 : 0000000006061cfb 
[    1.092973] x5 : 00ffffffffffffff x4 : 0000800076644000 
[    1.098234] x3 : ffff000008968000 x2 : 0000000000b71b00 
[    1.103496] x1 : ffff000008966000 x0 : 00000000fffedbec 
[    1.108758] Process swapper/1 (pid: 0, stack limit = 0xffff80007c79c000)
[    1.115399] Stack: (0xffff80007ef90e70 to 0xffff80007c7a0000)
[    1.121092] Call trace:
[    1.123507] Exception stack(0xffff80007ef90ca0 to 0xffff80007ef90dd0)
[    1.129890] 0ca0: ffff80007ef93c80 0001000000000000 ffff80007ef90e70 ffff0000080fc620
[    1.137652] 0cc0: 0000000000000001 0000000000000001 ffff80007ef90cf0 ffff0000080cf8e8
[    1.145414] 0ce0: ffff80007c74db00 0000000000000000 ffff80007ef90d00 ffff0000083b9874
[    1.153177] 0d00: ffff80007ef90d40 ffff00000808df04 0000000000000003 ffff80007c74db00
[    1.160940] 0d20: 0000000000000004 0000000000000140 ffff80007efc7b80 ffff000008968b50
[    1.168702] 0d40: 00000000fffedbec ffff000008966000 0000000000b71b00 ffff000008968000
[    1.176465] 0d60: 0000800076644000 00ffffffffffffff 0000000006061cfb ffff80007c000270
[    1.184227] 0d80: ffff80007c000248 ffff00000897eb80 0000000000000040 0000000000000000
[    1.191990] 0da0: ffff80007c748080 0000000000000000 0000000039d723e9 ffff0000089eb200
[    1.199751] 0dc0: 0000000000001400 0000000000001800
[    1.204584] [<ffff0000080fc620>] run_local_timers+0x28/0x60
[    1.210103] [<ffff0000080fc67c>] update_process_times+0x24/0x58
[    1.215968] [<ffff00000810b564>] tick_sched_handle.isra.8+0x34/0x40
[    1.222177] [<ffff00000810b5b4>] tick_sched_timer+0x44/0x88
[    1.227698] [<ffff0000080fd210>] __hrtimer_run_queues+0xe8/0x160
[    1.233649] [<ffff0000080fd518>] hrtimer_interrupt+0xa8/0x230
[    1.239344] [<ffff0000085d1ea0>] arch_timer_handler_phys+0x28/0x40
[    1.245466] [<ffff0000080ed158>] handle_percpu_devid_irq+0x80/0x138
[    1.251676] [<ffff0000080e7efc>] generic_handle_irq+0x24/0x38
[    1.257368] [<ffff0000080e8584>] __handle_domain_irq+0x5c/0xb0
[    1.263147] [<ffff000008080cd4>] gic_handle_irq+0x54/0xa8
[    1.268492] Exception stack(0xffff80007c79fe20 to 0xffff80007c79ff50)
[    1.274876] fe20: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
[    1.282638] fe40: 0000000000000000 ffff80007c79ff50 0000800076644000 0000000000000001
[    1.290401] fe60: 00000000000000c0 ffff80007c79fed0 0000000000000900 0000000000000000
[    1.298163] fe80: ffff80007c748080 0000000000000000 0000000039d723e9 ffff0000089eb200
[    1.305926] fea0: 0000000000001400 0000000000001800 0000000000000000 ffff000008949000
[    1.313688] fec0: ffff000008968000 ffff000008968000 ffff000008954ac8 ffff000008968e00
[    1.321451] fee0: 0000000000000000 0000000000000000 ffff80007c791a00 0000000000000000
[    1.329213] ff00: 0000000000000000 ffff80007c79ff50 ffff000008084a6c ffff80007c79ff50
[    1.336976] ff20: ffff000008084a70 0000000000000045 0000000000000000 ffff00000810b6d4
[    1.344738] ff40: ffffffffffffffff 7fffffffffffffff
[    1.349568] [<ffff000008081ff4>] el1_irq+0xb4/0x128
[    1.354399] [<ffff000008084a70>] arch_cpu_idle+0x10/0x18
[    1.359661] [<ffff0000080dc0c0>] do_idle+0x120/0x1d8
[    1.364576] [<ffff0000080dc318>] cpu_startup_entry+0x20/0x28
[    1.370183] [<ffff00000808d8dc>] secondary_start_kernel+0x10c/0x118
[    1.376393] [<000000000171b1b4>] 0x171b1b4
[    1.380446] Code: 8b130013 94000423 d0004341 f9454020 (f9400a62) 
[    1.386489] ---[ end trace 319b48bde02e581d ]---
[    1.391055] Kernel panic - not syncing: Fatal exception in interrupt
[    1.397351] SMP: stopping secondary CPUs
[    2.436572] SMP: failed to stop secondary CPUs 1-2

I will try to debug that a lil bit further, but disabling the arm Big.little driver fixes the issue so its 100% related to that.
Edit:
Might this be related to a frequency thats set too high ?
Solved: it was the mainline u-boot.
Resources:
https://github.com/hardkernel/u-boot/co ... dbc7ed698d
I have no idea what this commit msg means but 2ghz is way too high.
Fyi im using the latest branch from amlogics tree.

umiddelb
Posts: 452
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by umiddelb »

HK has released a 1.5 GHz / 2.0 GHz u-boot recently, this is what I mean with 'latest u-boot required'.

Cheers
Uli

crashoverride
Posts: 5133
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 375 times
Contact:

Re: Odroid C2 mainline kernel support

Post by crashoverride »

FYI, Amlogic released a new kernel 4.9 buildroot the other day. The remaining issues list in the release notes is getting shorter. Hopefully this means we are close to a final release.
http://openlinux.amlogic.com/wiki/index ... /Buildroot

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

I was able to install mainline Debian distro with @umiddelb's help.

I wanted to change the DHCP Ip address of my node to static but somehow the standard way doesn't work anymore.

I changed DHCP part at \etc\network\interfaces.d\eth0 by the following:

Code: Select all

auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address	192.168.1.14
netmask	255.255.255.0	
gateway	192.168.1.1
and rebooted and it seems not to work anymore. Can't access the node via SSH.

After searching a bit I found this link which explains a bit about the new ip command which replaces ifconfig.

https://www.tecmint.com/ip-command-examples/

I've used the sample to my case :

Code: Select all

auto eth0
iface eth0 inet static
address 192.168.1.14
netmask 255.255.255.0
gateway 192.168.1.1
#########{Static Route}###########
up ip route add 192.168.1.14/24 via 192.168.1.1 dev eth0
Doesn't work neither. Anyone have a clue how this can work ?

moon.linux
Posts: 1195
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Odroid C2 mainline kernel support

Post by moon.linux »

Ethernet generate random mac address so you need to set up ip match to particular mac address on the router dhcp pool settings.
Or you can

Code: Select all

odroid@odroid64:~$ cat /etc/network/interfaces.d/eth0
auto eth0
iface eth0 inet dhcp
  hwaddress ether 00:1E:06:33:37:7A
odroid@odroid64:~$

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

I had a working system. Then I did
pacman -S linux-aarch64-rc linux-aarch64-rc-headers uboot-odroid-c2-mainline
replacing linux-odroid-c2 kernel.
And after reboot I got this:
...
[ 3.776753] random: crng init done
ERROR: device 'PARTUUID=00000000-01' not found. Skipping fsck.
:: mounting 'PARTUUID=00000000-01' on real root
mount: can't find PARTUUID=00000000-01
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#

Can somebody please tell me how to fix this issue?

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

hhh1 wrote:I had a working system. Then I did
mount: can't find PARTUUID=00000000-01
solved by modifying /boot/boot.txt and replacing root=PARTUUID=... with root=UUID= of the device shown with blkid /dev/yourcardp1
and running ./mkscr then

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

Can somebody please tell me where is /sys/devices/virtual/thermal/thermal_zone0/temp in this kernel?

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

moon.linux wrote:Ethernet generate random mac address so you need to set up ip match to particular mac address on the router dhcp pool settings.
Or you can

Code: Select all

odroid@odroid64:~$ cat /etc/network/interfaces.d/eth0
auto eth0
iface eth0 inet dhcp
  hwaddress ether 00:1E:06:33:37:7A
odroid@odroid64:~$

Your answer is still for DHCP can you provide a full example with static IP please ?

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

Help me please!

Where's ${fbt_id#}" in boot options in 4.2 kernel?
It doesn't show anymore.

How to separate one odroid device from another?

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

hhh1 wrote:Can somebody please tell me where is /sys/devices/virtual/thermal/thermal_zone0/temp in this kernel?

Code: Select all

cat /sys/class/hwmon/hwmon0/temp1_input
@hhh1
What do you mean with ${fbt_id#} ?
The device tree file (.dtb) ?

Kind regards
MartB

sirko
Posts: 10
Joined: Sun Oct 16, 2016 11:44 pm
languages_spoken: german, english
ODROIDs: C2
Location: Germany
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by sirko »

Hi,

I have written an Ansible playbook for the whole procedure of installing dependencies, cloning git repos, setting kernel config, compiling and installing kernel 4.12, getting and compiling binaries out of legacy u-boot, compiling mainline u-boot, signing and installing it. 8-)

With just one command: ansible-playbook playbook.yml

https://github.com/datenklause/odroid-c ... 12-ansible

This is a initial commit. Bug reports are welcome.

Regards
Sirko

moon.linux
Posts: 1195
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
ODROIDs: U3, XU3. XU4, C1+...
Has thanked: 0
Been thanked: 13 times
Contact:

Re: Odroid C2 mainline kernel support

Post by moon.linux »

@sirko Thanks you for your wonderful instructions.

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

To whom is interested to know I do not recommend to use @umiddelb following odroid-c2 zero to docker github package at this address until all the bugs are fixed.

Tested distros : debian and ubuntu

https://github.com/umiddelb/z2d

The reason why I give this feedback is to save a lot of time for other people.

I tried both the debian odroid-c2 and ubuntu-c2 and here are my results.


The debian version works until up to the point where I boot the Odroid C2 device.
When I try to run the debian-docker-00.sh script it doesn't work and Docker doesn't get installed.

Plus there is some king of bugs with the 4 USB Hubs when I connect an external HD the board doesn't recognize it.
But weird enough when I plug a second device in another free USB slot then both devices are recognized and fdisk shows them in its listing.

The ubuntu version don't boot at all and I've tried it 2 times today.

Let us know @umiddelb when you will release a working version or that yourself tested first on the board.

Hope this helps

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

MartB wrote:
hhh1 wrote:Can somebody please tell me where is /sys/devices/virtual/thermal/thermal_zone0/temp in this kernel?

Code: Select all

cat /sys/class/hwmon/hwmon0/temp1_input
thank you
MartB wrote:
hhh1 wrote: @hhh1
What do you mean with ${fbt_id#} ?
The device tree file (.dtb) ?

Kind regards
MartB
fbt_id# is a system ID that is accessible via boot options like this

Code: Select all

setenv bootargs "root=/dev/mmcblk0p1 rootwait rw ${condev} no_console_suspend serialno=${fbt_id#}"
and then you'll get in cat /proc/cmdline :

Code: Select all

root=/dev/mmcblk0p1 rootwait rw console=ttyS0,115200n8 console=tty0 no_console_suspend serialno=HKC215254FFCEE30
this is done by amlogic driver function efuse_read_usr in u-boot that is obviously absent in uboot-odroid-c2-mainline

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

Can somebody please tell me where is /sys/bus/gpio/export? I looked everywhere.

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

hhh1 wrote: fbt_id# is a system ID that is accessible via boot options like this

Code: Select all

setenv bootargs "root=/dev/mmcblk0p1 rootwait rw ${condev} no_console_suspend serialno=${fbt_id#}"
and then you'll get in cat /proc/cmdline :

Code: Select all

root=/dev/mmcblk0p1 rootwait rw console=ttyS0,115200n8 console=tty0 no_console_suspend serialno=HKC215254FFCEE30
this is done by amlogic driver function efuse_read_usr in u-boot that is obviously absent in uboot-odroid-c2-mainline
Albeit having efuse read support in u-boot mainline theres no populating of ${serial#} going on as far as i can tell.

However without patching u-boot you can still do

Code: Select all

hexdump /sys/bus/nvmem/devices/meson-efuse0/nvmem 
And read the serial no. + all the other stuff in the efuse from here.

KARL23
Posts: 15
Joined: Sun Jun 26, 2016 10:59 pm
languages_spoken: english
ODROIDs: c1, c2,xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by KARL23 »

Hallo,

in the dtsi files of odroidc2 there are templates for multiple Uarts. Three of them (uart_A, uart_B, uart_c) are connected to
40pin header. with following patch for mainline kernel i am able to enable uart_A:

Code: Select all

--- linux-khil-20170606/arch/arm64/boot/dts/amlogic//meson-gxbb-odroidc2.dts.orig       2017-06-09 12:46:48.584070660 +0200
+++ linux-khil-20170606/arch/arm64/boot/dts/amlogic//meson-gxbb-odroidc2.dts    2017-06-09 13:13:29.447803613 +0200
@@ -53,6 +53,7 @@

        aliases {
                serial0 = &uart_AO;
+               serial1 = &uart_A;
        };
 
        chosen {
@@ -293,6 +294,12 @@
        pinctrl-names = "default";
 };
 
+&uart_A {
+        status = "okay";
+        pinctrl-0 = <&uart_a_pins>;
+        pinctrl-names = "default";
+};
+
 &usb0_phy {
        status = "okay";
        phy-supply = <&usb_otg_pwr>;

see following dmesg lines:

Code: Select all

[    0.927486] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.928479] c11084c0.serial: ttyAML1 at MMIO 0xc11084c0 (irq = 10, base_baud = 1500000) is a meson_uart
[    0.928726] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 13, base_baud = 1500000) is a meson_uart
Doing it analogous for uart_C does not work. It conflicts with the SD card reader.

Can someone give me a hint how to activate uart_c in Mainline?

Thanks for any hint

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

MartB wrote:
hhh1 wrote: However without patching u-boot you can still do

Code: Select all

hexdump /sys/bus/nvmem/devices/meson-efuse0/nvmem 
And read the serial no. + all the other stuff in the efuse from here.
/sys/bus/nvmem/devices/ is empty :(
and without gpio all this is useless anyway since there's no /sys/class/gpio at all
Why it can't just work. Ehh...

crashoverride
Posts: 5133
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 375 times
Contact:

Re: Odroid C2 mainline kernel support

Post by crashoverride »

hhh1 wrote:Why it can't just work.
Because, as mentioned before, this is not a release. It is not intended for consumer use or in production environments. It is for skilled developers to test and experiment with.

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

hhh1 wrote:
MartB wrote:
hhh1 wrote: However without patching u-boot you can still do

Code: Select all

hexdump /sys/bus/nvmem/devices/meson-efuse0/nvmem 
And read the serial no. + all the other stuff in the efuse from here.
/sys/bus/nvmem/devices/ is empty :(
and without gpio all this is useless anyway since there's no /sys/class/gpio at all
Why it can't just work. Ehh...
For the efuse to work you need to specify

Code: Select all

CONFIG_MESON_EFUSE=m
in your kernel configuration before you compile.
In order to expose the gpios under /sys/ you also need.

Code: Select all

CONFIG_GPIO_SYSFS=y
Im using https://git.kernel.org/pub/scm/linux/ke ... g/?h=integ as my daily driver for my test boards.

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

MartB wrote: For the efuse to work you need to specify

Code: Select all

CONFIG_MESON_EFUSE=m
in your kernel configuration before you compile.
In order to expose the gpios under /sys/ you also need.

Code: Select all

CONFIG_GPIO_SYSFS=y
Im using https://git.kernel.org/pub/scm/linux/ke ... g/?h=integ as my daily driver for my test boards.
Ah that's why. Thank you. Are there any other odroid C2 specific settings? There's only defconfig in the repository, and no odroidc2_defconfig.
I've installed it the easy way
just did
pacman -S uboot-odroid-c2-mainline
and
pacman -S linux-aarch64-rc

Looks like the easy way doesn't work.
Thanks, now it's clear. I'll compile it by myself then like I did with https://github.com/hardkernel/linux/tre ... dc2-3.14.y
Its a pity they said they didn't have resources to provide mainline for C2, only for XU4. Shame I can't use XU4 because I need same frequencies on all cores for my high load network application. Ehh...

If you only knew how I'm tired of usb errors, they're all around in odroid c2, everywhere.
On 3.14 it's

Code: Select all

kernel: usb 1-1.3: can't set config #1, error -71
kernel: hub 1-1:1.0: hub_port_status failed (err = -71)
or
kernel: hub 1-1:1.0: cannot reset port 2 (err = -71)
and on 4.12 kernel its

Code: Select all

kernel: dwc2 c9000000.usb: hcint 0x00000002, intsts 0x04200021
kernel: dwc2 c9000000.usb: dwc2_hc_chhltd_intr_dma: Channel 8 - ChHltd set, but reason is unknown
kernel: dwc2 c9000000.usb: hcint 0x00000002, intsts 0x04200021
kernel: usb usb1-port1: disabled by hub (EMI?), re-enabling..
all leading to hub reset or freeze.
:|

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

MartB wrote: Im using https://git.kernel.org/pub/scm/linux/ke ... g/?h=integ as my daily driver for my test boards.
I built it with defconfig and it doesn't boot :

Code: Select all

[    1.270992] mmc0: new HS200 MMC card at address 0001
[    1.275971] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.280121] mmcblk0: mmc0:0001 DJNB4R 116 GiB
[    1.280284] mmcblk0boot0: mmc0:0001 DJNB4R partition 1 4.00 MiB
[    1.280403] mmcblk0boot1: mmc0:0001 DJNB4R partition 2 4.00 MiB
[    1.287101] mmcblk0: response CRC error sending r/w cmd command, card status 0x900
[    1.306327] mmcblk0: response CRC error sending r/w cmd command, card status 0x900
...
and the kernel from linux-aarch64-rc package boots ok.

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

Did you update your modules properly ?
I cant reproduce your error I tried the old u-boot + mainline, with sd card only, emmc only and both.

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

MartB wrote:Did you update your modules properly ?
I did

Code: Select all

git clone --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic
cd linux-amlogic
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export PATH=$PATH:/opt/toolchains/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/
make defconfig
make -j4 Image Image.gz dtbs modules
mount /dev/sdb1 ./mount
cp arch/arm64/boot/Image ./mount/boot/
cp arch/arm64/boot/Image.gz ./mount/boot/
cp ./arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ./mount/boot/dtbs/amlogic
make modules_install ARCH=arm64 INSTALL_MOD_PATH=./mount
make headers_install ARCH=arm64 INSTALL_MOD_PATH=./mount INSTALL_HDR_PATH=./mount/usr

MartB
Posts: 15
Joined: Sun Jun 18, 2017 4:38 am
languages_spoken: english, german
ODROIDs: C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by MartB »

You need to use the integ branch (https://git.kernel.org/pub/scm/linux/ke ... g/?h=integ) from this repo their master branch is 3 months old and i suspect your issues are coming from that.

hhh1
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by hhh1 »

MartB wrote:You need to use the integ branch (https://git.kernel.org/pub/scm/linux/ke ... g/?h=integ) from this repo their master branch is 3 months old and i suspect your issues are coming from that.
Yes you were right. Thank you for your help.

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

Greetings all!

I was able to upgrade Odroid C2 kernel from 3.14 original to 4.12-rc6 from @umiddelb.
I base my experiment from this micro-sd card image that I have customized myself to be able to test multiple kernel side by side by increasing the vfat partition size to 512 MB.

Flashable image : https://github.com/gdeverlant/image-bui ... ses/latest

Once I booted the Odroid C2 with HypriotOS these are the steps:

1. Download this release https://www.dropbox.com/s/kiq6xkv8f7xcv ... ar.xz?dl=0

2.

Code: Select all

sudo tar --numeric-owner -C / -xhpPJf kiq6xkv8f7xcvt6/linux-4.12.0-rc6-gx-116817-gd0dff52.tar.xz?dl=0
3. Replace the boot.ini file in the vFAT partition by this :

Code: Select all

#------------------------------------------------------------------------------------------------------
#
# boot.ini identification
#
#------------------------------------------------------------------------------------------------------
ODROIDC2-UBOOT-CONFIG

# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.

# Custom modeline!
# To use custom modeline you need to disable all the below resolutions
# and setup your own! 
# For more information check our wiki: 
# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting
# Example below:
# setenv m "custombuilt" 
# setenv modeline "1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1"

# Auto Detection of Monitor settings based on your Screen information
# See: http://odroid.com/dokuwiki/doku.php?id=en:c2_auto_detect_display
setenv display_autodetect "true"

# 480 Lines (720x480)
# setenv m "480i60hz" # Interlaced 60Hz
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv m "480p60hz" # 480 Progressive 60Hz
# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz

# 576 Lines (720x576)
# setenv m "576i50hz" # Interlaced 50Hz
# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
# setenv m "576p50hz" # Progressive 50Hz
# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz

# 720 Lines (1280x720)
# setenv m "720p50hz" # 50Hz
# setenv m "720p60hz" # 60Hz

# 1080 Lines (1920x1080)
# setenv m "1080i60hz" # Interlaced 60Hz
setenv m "1080p60hz" # Progressive 60Hz
# setenv m "1080i50hz" # Interlaced 50Hz
# setenv m "1080p50hz" # Progressive 50Hz
# setenv m "1080p24hz" # Progressive 24Hz

# 4K (3840x2160)
# setenv m "2160p30hz"    # Progressive 30Hz
# setenv m "2160p25hz"    # Progressive 25Hz
# setenv m "2160p24hz"    # Progressive 24Hz
# setenv m "smpte24hz"    # Progressive 24Hz SMPTE
# setenv m "2160p50hz"    # Progressive 50Hz
# setenv m "2160p60hz"    # Progressive 60Hz
# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)

### VESA modes ###
# setenv m "640x480p60hz"
# setenv m "800x480p60hz"
# setenv m "480x800p60hz"
# setenv m "800x600p60hz"
# setenv m "1024x600p60hz"
# setenv m "1024x768p60hz"  
# setenv m "1280x800p60hz"
# setenv m "1280x1024p60hz"
# setenv m "1360x768p60hz"
# setenv m "1440x900p60hz"
# setenv m "1600x900p60hz"
# setenv m "1680x1050p60hz"
# setenv m "1600x1200p60hz"
# setenv m "1920x1200p60hz"
# setenv m "2560x1080p60hz"
# setenv m "2560x1440p60hz"
# setenv m "2560x1600p60hz"
# setenv m "3440x1440p60hz"

# HDMI BPP Mode
setenv m_bpp "32"
# setenv m_bpp "24"
# setenv m_bpp "16"

# HDMI DVI/VGA modes
# By default its set to HDMI, if needed change below.
# Uncomment only a single Line.
# setenv vout "dvi"
# setenv vout "vga"

# HDMI HotPlug Detection control
# Allows you to force HDMI thinking that the cable is connected.
# true = HDMI will believe that cable is always connected
# false = will let board/monitor negotiate the connection status
setenv hpd "true"
# setenv hpd "false"

# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "false" # true or false

# Server Mode (aka. No Graphics)
# Setting nographics to 1 will disable all video subsystem
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
setenv nographics "0"

# Meson Timer
# 1 - Meson Timer
# 0 - Arch Timer 
# Using meson_timer improves the video playback however it breaks KVM (virtualization).
# Using arch timer allows KVM/Virtualization to work however you'll experience poor video
setenv mesontimer "1"

# UHS (Ultra High Speed) MicroSD mode enable/disable
setenv disableuhs "false"

# MicroSD Card Detection enable/disable
# Force the MMC controlled to believe that a card is connected.
setenv mmc_removable "true"

# USB Multi WebCam tweak
# Only enable this if you use it.
setenv usbmulticam "false"

# Disable/Enable ODROID-VU7 Touchscreen
setenv disable_vu7 "true"

# Default Console Device Setting
setenv condev "console=ttyS0,115200n8 console=tty0"   # on both


#------------------------------------------------------------------------------------------------------
#
# Boot Specific Stuff
#
# Note: set root=root=/dev/mmcblk0p2 for mmc card boot
#------------------------------------------------------------------------------------------------------
setenv bootrootfs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 root=/dev/mmcblk0p2 "

#------------------------------------------------------------------------------------------------------
#
# Console Setup
#   setenv condev "console=ttyAML0,115200n8"                # on serial port
#   setenv condev "console=tty0"                            # on display (HDMI)
#   setenv condev "console=tty0 console=ttyAML0,115200n8"   # on both
#
#------------------------------------------------------------------------------------------------------
setenv console "console=tty0 console=ttyAML0,115200n8"

#------------------------------------------------------------------------------------------------------
#
# Odroid C2 specific
#
#------------------------------------------------------------------------------------------------------
setenv odroid   "no_console_suspend consoleblank=0 loglevel=8 debug ro rootwait"

# CPU Frequency / Cores control
###########################################
### WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry: 
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
#
# MAX CPU's
# setenv maxcpus "1"
# setenv maxcpus "2"
# setenv maxcpus "3"
setenv maxcpus "4"

# MAX Frequency
# setenv max_freq "2016"  # 2.016GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1920"  # 1.920GHz
# setenv max_freq "1896"  # 1.896GHz
# setenv max_freq "1752"  # 1.752GHz
# setenv max_freq "1680"  # 1.680GHz
# setenv max_freq "1656"  # 1.656GHz
setenv max_freq "1536"  # 1.536GHz

#------------------------------------------------------------------------------------------------------
#
# U-Boot bootcmd command
#
#------------------------------------------------------------------------------------------------------
setenv kernel  "fatload mmc 0:1 0x1080000 /kernel.d/linux-4.12.0-rc2-gx-gee2b4b4/uImage"
setenv dtb     "fatload mmc 0:1 0x1000000 /kernel.d/linux-4.12.0-rc2-gx-gee2b4b4/meson-gxbb-odroidc2.dtb"
setenv bootseq "bootm 0x1080000 - 0x1000000"
setenv bootcmd "${kernel}; ${dtb}; ${bootseq}"

#------------------------------------------------------------------------------------------------------
#
# Kernel boot
#
#------------------------------------------------------------------------------------------------------

# Populate the final bootcmd
setenv bootargs "${console} ${bootrootfs} ${odroid}"

# Boot the board
run bootcmd

Once rebooted the blue LED on the board is blinking but I was not able to SSH into the board from the network. The hostname is not visible or reachable by the router.

Did I do something wrong ?

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

@ummidelb I tried your latest 4.12-rc7 on my HypriotOS board and it's the same as the 4.12-rc6.

Link : https://www.dropbox.com/sh/l751jmswzr2v ... 5bf.tar.xz

The board boots the LED blinks showing alive sign but I can't see any output on the HDMI TV nor can I ssh into it.

boot.ini

Code: Select all

#------------------------------------------------------------------------------------------------------
#
# boot.ini identification
#
#------------------------------------------------------------------------------------------------------
ODROIDC2-UBOOT-CONFIG

# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.

# Custom modeline!
# To use custom modeline you need to disable all the below resolutions
# and setup your own! 
# For more information check our wiki: 
# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting
# Example below:
# setenv m "custombuilt" 
# setenv modeline "1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1"

# Auto Detection of Monitor settings based on your Screen information
# See: http://odroid.com/dokuwiki/doku.php?id=en:c2_auto_detect_display
setenv display_autodetect "true"

# 480 Lines (720x480)
# setenv m "480i60hz" # Interlaced 60Hz
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv m "480p60hz" # 480 Progressive 60Hz
# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz

# 576 Lines (720x576)
# setenv m "576i50hz" # Interlaced 50Hz
# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
# setenv m "576p50hz" # Progressive 50Hz
# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz

# 720 Lines (1280x720)
# setenv m "720p50hz" # 50Hz
setenv m "720p60hz" # 60Hz

# 1080 Lines (1920x1080)
# setenv m "1080i60hz" # Interlaced 60Hz
# setenv m "1080p60hz" # Progressive 60Hz
# setenv m "1080i50hz" # Interlaced 50Hz
# setenv m "1080p50hz" # Progressive 50Hz
# setenv m "1080p24hz" # Progressive 24Hz

# 4K (3840x2160)
# setenv m "2160p30hz"    # Progressive 30Hz
# setenv m "2160p25hz"    # Progressive 25Hz
# setenv m "2160p24hz"    # Progressive 24Hz
# setenv m "smpte24hz"    # Progressive 24Hz SMPTE
# setenv m "2160p50hz"    # Progressive 50Hz
# setenv m "2160p60hz"    # Progressive 60Hz
# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)

### VESA modes ###
# setenv m "640x480p60hz"
# setenv m "800x480p60hz"
# setenv m "480x800p60hz"
# setenv m "800x600p60hz"
# setenv m "1024x600p60hz"
# setenv m "1024x768p60hz"  
# setenv m "1280x800p60hz"
# setenv m "1280x1024p60hz"
# setenv m "1360x768p60hz"
# setenv m "1440x900p60hz"
# setenv m "1600x900p60hz"
# setenv m "1680x1050p60hz"
# setenv m "1600x1200p60hz"
# setenv m "1920x1200p60hz"
# setenv m "2560x1080p60hz"
# setenv m "2560x1440p60hz"
# setenv m "2560x1600p60hz"
# setenv m "3440x1440p60hz"

# HDMI BPP Mode
setenv m_bpp "32"
# setenv m_bpp "24"
# setenv m_bpp "16"

# HDMI DVI/VGA modes
# By default its set to HDMI, if needed change below.
# Uncomment only a single Line.
# setenv vout "dvi"
# setenv vout "vga"

# HDMI HotPlug Detection control
# Allows you to force HDMI thinking that the cable is connected.
# true = HDMI will believe that cable is always connected
# false = will let board/monitor negotiate the connection status
setenv hpd "true"
# setenv hpd "false"

# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "false" # true or false

# Server Mode (aka. No Graphics)
# Setting nographics to 1 will disable all video subsystem
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
setenv nographics "0"

# Meson Timer
# 1 - Meson Timer
# 0 - Arch Timer 
# Using meson_timer improves the video playback however it breaks KVM (virtualization).
# Using arch timer allows KVM/Virtualization to work however you'll experience poor video
setenv mesontimer "1"

# UHS (Ultra High Speed) MicroSD mode enable/disable
setenv disableuhs "false"

# MicroSD Card Detection enable/disable
# Force the MMC controlled to believe that a card is connected.
setenv mmc_removable "true"

# USB Multi WebCam tweak
# Only enable this if you use it.
setenv usbmulticam "false"

# Disable/Enable ODROID-VU7 Touchscreen
setenv disable_vu7 "true"

# Default Console Device Setting
setenv condev "console=ttyS0,115200n8 console=tty0"   # on both


#------------------------------------------------------------------------------------------------------
#
# Boot Specific Stuff
#
# Note: set root=root=/dev/mmcblk0p2 for mmc card boot
#------------------------------------------------------------------------------------------------------
setenv bootrootfs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 root=/dev/mmcblk0p2"

#------------------------------------------------------------------------------------------------------
#
# Console Setup
#   setenv condev "console=ttyAML0,115200n8"                # on serial port
#   setenv condev "console=tty0"                            # on display (HDMI)
#   setenv condev "console=tty0 console=ttyAML0,115200n8"   # on both
#
#------------------------------------------------------------------------------------------------------
setenv console "console=tty0 console=ttyAML0,115200n8"

#------------------------------------------------------------------------------------------------------
#
# Odroid C2 specific
#
#------------------------------------------------------------------------------------------------------
setenv odroid   "no_console_suspend consoleblank=0 loglevel=8 debug ro rootwait"

# CPU Frequency / Cores control
###########################################
### WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry: 
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
#
# MAX CPU's
# setenv maxcpus "1"
# setenv maxcpus "2"
# setenv maxcpus "3"
setenv maxcpus "4"

# MAX Frequency
# setenv max_freq "2016"  # 2.016GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1920"  # 1.920GHz
# setenv max_freq "1896"  # 1.896GHz
# setenv max_freq "1752"  # 1.752GHz
# setenv max_freq "1680"  # 1.680GHz
# setenv max_freq "1656"  # 1.656GHz
setenv max_freq "1536"  # 1.536GHz

#------------------------------------------------------------------------------------------------------
#
# U-Boot bootcmd command
#
#------------------------------------------------------------------------------------------------------

setenv linux_version "/kernel.d/linux-4.12.0-rc7-gx-117011-g14be5bf/"
#setenv linux_version "/kernel.d/linux-4.12.0-rc6-gx-116817-gd0dff52/"

setenv kernel  "fatload mmc 0:1 0x1080000 ${linux_version}uImage"
setenv dtb     "fatload mmc 0:1 0x1000000 ${linux_version}meson-gxbb-odroidc2.dtb"
setenv bootseq "bootm 0x1080000 - 0x1000000"
setenv bootcmd "${kernel}; ${dtb}; ${bootseq}"

#------------------------------------------------------------------------------------------------------
#
# Kernel boot
#
#------------------------------------------------------------------------------------------------------

# Populate the final bootcmd
setenv bootargs "${console} ${bootrootfs} ${odroid}"

# Boot the board
run bootcmd
STEPS
1. Download the file onto the board
2. sudo tar --numeric-owner -C / -xhpPJf linux-4.12.0-rc7-gx-117011-g14be5bf.tar.xz
3. sync
4. replace the boot.ini by the one I listed above

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

Can it be that the problem with networking is related to my 100/1000 switches?

I found in this thread that 4.x have issues with Gigabyte networks : viewtopic.php?f=135&t=22717#p152672

Can someone validate my suspicion?

Extra observations I noticed few minutes ago.

The LAN yellow LED is blinking and going off forever.
When I connected a USB stick beside of the External HD at boot time the HD led started to blink and the board somehow initialized it with the stick. Otherwise the HD is not detected if it is plugged alone on the USB port.

crashoverride
Posts: 5133
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 375 times
Contact:

Re: Odroid C2 mainline kernel support

Post by crashoverride »

gügü wrote:Can it be that the problem with networking is related to my 100/1000 switches?
The easiest way to test that is to boot with the official Ubuntu image. If you have the same networking issues, then the issue is hardware related. If it works, then its kernel 4.x driver related.

gügü
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by gügü »

crashoverride wrote:
gügü wrote:Can it be that the problem with networking is related to my 100/1000 switches?
The easiest way to test that is to boot with the official Ubuntu image. If you have the same networking issues, then the issue is hardware related. If it works, then its kernel 4.x driver related.
If I revert to the original kernel which comes with HypriotOS that is 3.14 from HKernel then everything works well again.

Can it be that this boot.ini config which I'm using : viewtopic.php?f=135&t=22717&start=350#p191557 is missing the uInitrd part?

How can I add the uInitrd part which is missing (which loading address)?

I've runned 4.10, 4.11, 4.12rc5 and 4.12rc7 against this boot.ini file and their all behaving the same.

Blinking LED but no ssh or networking

Code: Select all

#------------------------------------------------------------------------------------------------------
#
# boot.ini identification
#
#------------------------------------------------------------------------------------------------------
ODROIDC2-UBOOT-CONFIG

# Possible screen resolutions
# Uncomment only a single Line! The line with setenv written.
# At least one mode must be selected.

# Custom modeline!
# To use custom modeline you need to disable all the below resolutions
# and setup your own! 
# For more information check our wiki: 
# http://odroid.com/dokuwiki/doku.php?id=en:c2_hdmi_autosetting
# Example below:
# setenv m "custombuilt" 
# setenv modeline "1920,1200,154000,74040,60,1920,1968,2000,2080,1200,1202,1208,1235,1,0,1"

# Auto Detection of Monitor settings based on your Screen information
# See: http://odroid.com/dokuwiki/doku.php?id=en:c2_auto_detect_display
setenv display_autodetect "true"

# 480 Lines (720x480)
# setenv m "480i60hz" # Interlaced 60Hz
# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz
# setenv m "480p60hz" # 480 Progressive 60Hz
# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz

# 576 Lines (720x576)
# setenv m "576i50hz" # Interlaced 50Hz
# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz
# setenv m "576p50hz" # Progressive 50Hz
# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz

# 720 Lines (1280x720)
# setenv m "720p50hz" # 50Hz
# setenv m "720p60hz" # 60Hz

# 1080 Lines (1920x1080)
# setenv m "1080i60hz" # Interlaced 60Hz
setenv m "1080p60hz" # Progressive 60Hz
# setenv m "1080i50hz" # Interlaced 50Hz
# setenv m "1080p50hz" # Progressive 50Hz
# setenv m "1080p24hz" # Progressive 24Hz

# 4K (3840x2160)
# setenv m "2160p30hz"    # Progressive 30Hz
# setenv m "2160p25hz"    # Progressive 25Hz
# setenv m "2160p24hz"    # Progressive 24Hz
# setenv m "smpte24hz"    # Progressive 24Hz SMPTE
# setenv m "2160p50hz"    # Progressive 50Hz
# setenv m "2160p60hz"    # Progressive 60Hz
# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)
# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it)

### VESA modes ###
# setenv m "640x480p60hz"
# setenv m "800x480p60hz"
# setenv m "480x800p60hz"
# setenv m "800x600p60hz"
# setenv m "1024x600p60hz"
# setenv m "1024x768p60hz"  
# setenv m "1280x800p60hz"
# setenv m "1280x1024p60hz"
# setenv m "1360x768p60hz"
# setenv m "1440x900p60hz"
# setenv m "1600x900p60hz"
# setenv m "1680x1050p60hz"
# setenv m "1600x1200p60hz"
# setenv m "1920x1200p60hz"
# setenv m "2560x1080p60hz"
# setenv m "2560x1440p60hz"
# setenv m "2560x1600p60hz"
# setenv m "3440x1440p60hz"

# HDMI BPP Mode
setenv m_bpp "32"
# setenv m_bpp "24"
# setenv m_bpp "16"

# HDMI DVI/VGA modes
# By default its set to HDMI, if needed change below.
# Uncomment only a single Line.
# setenv vout "dvi"
# setenv vout "vga"

# HDMI HotPlug Detection control
# Allows you to force HDMI thinking that the cable is connected.
# true = HDMI will believe that cable is always connected
# false = will let board/monitor negotiate the connection status
setenv hpd "true"
# setenv hpd "false"

# Monitor output
# Controls if HDMI PHY should output anything to the monitor
setenv monitor_onoff "false" # true or false

# Server Mode (aka. No Graphics)
# Setting nographics to 1 will disable all video subsystem
# This mode is ideal of server type usage. (Saves ~300Mb of RAM)
setenv nographics "0"

# Meson Timer
# 1 - Meson Timer
# 0 - Arch Timer 
# Using meson_timer improves the video playback however it breaks KVM (virtualization).
# Using arch timer allows KVM/Virtualization to work however you'll experience poor video
setenv mesontimer "1"

# UHS (Ultra High Speed) MicroSD mode enable/disable
setenv disableuhs "false"

# MicroSD Card Detection enable/disable
# Force the MMC controlled to believe that a card is connected.
setenv mmc_removable "true"

# USB Multi WebCam tweak
# Only enable this if you use it.
setenv usbmulticam "false"

# Disable/Enable ODROID-VU7 Touchscreen
setenv disable_vu7 "true"

# Default Console Device Setting
setenv condev "console=ttyS0,115200n8 console=tty0"   # on both


#------------------------------------------------------------------------------------------------------
#
# Boot Specific Stuff
#
# Note: set root=root=/dev/mmcblk0p2 for mmc card boot
#------------------------------------------------------------------------------------------------------
setenv bootrootfs "boot=/dev/mmcblk0p1 disk=/dev/mmcblk1p1 root=/dev/mmcblk1p1"

#------------------------------------------------------------------------------------------------------
#
# Console Setup
#   setenv condev "console=ttyAML0,115200n8"                # on serial port
#   setenv condev "console=tty0"                            # on display (HDMI)
#   setenv condev "console=tty0 console=ttyAML0,115200n8"   # on both
#
#------------------------------------------------------------------------------------------------------
setenv console "console=tty0 console=ttyAML0,115200n8"

#------------------------------------------------------------------------------------------------------
#
# Odroid C2 specific
#
#------------------------------------------------------------------------------------------------------
setenv odroid   "no_console_suspend consoleblank=0 loglevel=8 debug ro rootwait"

# CPU Frequency / Cores control
###########################################
### WARNING!!! WARNING!!! WARNING!!!
# Before changing anything here please read the wiki entry: 
# http://odroid.com/dokuwiki/doku.php?id=en:c2_set_cpu_freq
#
# MAX CPU's
# setenv maxcpus "1"
# setenv maxcpus "2"
# setenv maxcpus "3"
setenv maxcpus "4"

# MAX Frequency
# setenv max_freq "2016"  # 2.016GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1944"  # 1.944GHz
# setenv max_freq "1920"  # 1.920GHz
# setenv max_freq "1896"  # 1.896GHz
# setenv max_freq "1752"  # 1.752GHz
# setenv max_freq "1680"  # 1.680GHz
# setenv max_freq "1656"  # 1.656GHz
setenv max_freq "1536"  # 1.536GHz

#------------------------------------------------------------------------------------------------------
#
# U-Boot bootcmd command
#
#------------------------------------------------------------------------------------------------------
setenv kernel  "ext4load mmc 0:1 0x1080000 /boot/kernel.d/linux-4.12.0-rc2-gx-gee2b4b4/uImage"
setenv dtb     "ext4load mmc 0:1 0x1000000 /boot/kernel.d/linux-4.12.0-rc2-gx-gee2b4b4/meson-gxbb-odroidc2.dtb"
setenv bootseq "bootm 0x1080000 - 0x1000000"
setenv bootcmd "${kernel}; ${dtb}; ${bootseq}"

#------------------------------------------------------------------------------------------------------
#
# Kernel boot
#
#------------------------------------------------------------------------------------------------------

# Populate the final bootcmd
setenv bootargs "${console} ${bootrootfs} ${odroid}"

# Boot the board
run bootcmd

sirko
Posts: 10
Joined: Sun Oct 16, 2016 11:44 pm
languages_spoken: german, english
ODROIDs: C2
Location: Germany
Has thanked: 0
Been thanked: 0
Contact:

Re: Odroid C2 mainline kernel support

Post by sirko »

Is there any git repository only for Odroid C2 4.12 kernel config and if not, how about creating one?

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest