Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

User avatar
tobetter
Posts: 12338
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 875 times
Been thanked: 2083 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by tobetter »

debian-server-fanboy wrote:
Sat Apr 08, 2023 8:44 am
Spent some time testing linux-6.2.10.

RJ45 Ethernet Port - ok.
HDMI - ok.
USB 2.0 - ok.
USB 3.0 - fail.

it's good enough to pair it with Debian bookworm to benchmark open source GPU driver.
What's the output of uname -a?

debian-server-fanboy
Posts: 20
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by debian-server-fanboy »

tobetter wrote:
Sat Apr 08, 2023 8:48 am
What's the output of uname -a?

Code: Select all

Linux debian 6.2.10 #1 SMP PREEMPT Fri Apr  7 18:33:33 EDT 2023 aarch64 GNU/Linux

debian-server-fanboy
Posts: 20
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by debian-server-fanboy »

CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y did solve the problem with USB 3.0.

Did notice that there is a problem with SATA3.

debian-server-fanboy
Posts: 20
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by debian-server-fanboy »

CONFIG_AHCI_DWC=y did solve the problem with SATA3.

debian-server-fanboy
Posts: 20
Joined: Fri Aug 09, 2019 11:05 pm
languages_spoken: english
ODROIDs: odroid-c2
Has thanked: 2 times
Been thanked: 5 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by debian-server-fanboy »

I have problem with communication through /dev/ttyS1 (uart0: serial@fdd50000).

Here is device tree on linux 4.19.219-odroid-arm64:

Code: Select all

	serial@fdd50000 {
		reg-io-width = <0x04>;
		pinctrl-names = "default";
		pinctrl-0 = <0x42>;
		clock-names = "baudclk\0apb_pclk";
		interrupts = <0x00 0x74 0x04>;
		clocks = <0x32 0x0b 0x32 0x2c>;
		dma-names = "tx\0rx";
		compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart";
		status = "okay";
		reg = <0x00 0xfdd50000 0x00 0x100>;
		phandle = <0x169>;
		dmas = <0x41 0x00 0x41 0x01>;
		reg-shift = <0x02>;
	};
Here is device tree on linux 6.2.10:

Code: Select all

	serial@fdd50000 {
		reg-io-width = < 0x04 >;
		pinctrl-names = "default";
		pinctrl-0 = < 0x25 >;
		clock-names = "baudclk\0apb_pclk";
		interrupts = < 0x00 0x74 0x04 >;
		clocks = < 0x1d 0x0b 0x1d 0x2c >;
		compatible = "rockchip,rk3568-uart\0snps,dw-apb-uart";
		status = "disabled";
		reg = < 0x00 0xfdd50000 0x00 0x100 >;
		dmas = < 0x24 0x00 0x24 0x01 >;
		reg-shift = < 0x02 >;
	};

monnier
Posts: 20
Joined: Mon Jul 04, 2022 8:11 am
languages_spoken: english
ODROIDs: None yet
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by monnier »

BTW, I recently noticed that my kernel command line includes an option "pci=nomsi" which came along with the first 5.18.0-odroid-m1 kernel I used, but I notice that if I remove it not only that old 5.18 kernels fails to boot, but the 6.3.0 mainline kernel also fails to boot. Not sure what happens: in both cases I simply get no output at all anywhere (neither ttyS0 nor HDMI) and the HDMI monitor says "not connected".
Is this a known problem that will be fixed in some later kernel?
If it's a hardware problem, is there any chance it will be added to `drivers/pci/quirks.c` so we don't need this command-line workaround?

usual user
Posts: 86
Joined: Sat Sep 10, 2022 10:47 pm
languages_spoken: english
Has thanked: 2 times
Been thanked: 24 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by usual user »

monnier wrote:
Wed Jul 05, 2023 10:30 am
kernel command line includes an option "pci=nomsi"
I'm running mainline kernel since day one and never had such an option in place. It must be due to your configuration, or an out-of-tree patch that is applied.

nz_monkey
Posts: 12
Joined: Wed Apr 13, 2022 5:16 pm
languages_spoken: english
ODROIDs: C1, XU4, M1
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by nz_monkey »

Is there any chance we will see Debian and Ubuntu images containing the new "mainline" kernels with native support for the ODROID-M1 ?

User avatar
tobetter
Posts: 12338
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 875 times
Been thanked: 2083 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by tobetter »

nz_monkey wrote:
Mon Aug 21, 2023 2:46 pm
Is there any chance we will see Debian and Ubuntu images containing the new "mainline" kernels with native support for the ODROID-M1 ?
What's exactly do you mean by native support?

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by johnbshk »

tobetter wrote:
Mon Aug 21, 2023 2:50 pm
nz_monkey wrote:
Mon Aug 21, 2023 2:46 pm
Is there any chance we will see Debian and Ubuntu images containing the new "mainline" kernels with native support for the ODROID-M1 ?
What's exactly do you mean by native support?
I hope that we will be able to install both Debian 12.1 and Ubuntu 23.10 from the mainline, without any problems

Thanks, John

usual user
Posts: 86
Joined: Sat Sep 10, 2022 10:47 pm
languages_spoken: english
Has thanked: 2 times
Been thanked: 24 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by usual user »

johnbshk wrote:
Thu Aug 31, 2023 5:46 pm
I hope that we will be able to install both Debian 12.1 and Ubuntu 23.10 from the mainline, without any problems
I'm guessing you're barking at the wrong tree then. Hardkernel is not the maker of Debian, Ubuntu or any other distribution. Sure, they offer forks with their extensions and modifications of some distributions, but if you want to use them natively, you also need to ensure native support in the chosen distribution. And that's not Hardkernel's primary job. I'm expecting a good level of support for mainline integration as well, but hardware manufacturers aren't very good at it most of the time. Fortunately, everything necessary is available for the ODROID M1 these days. It is solely the task of the distribution maintainers to pick it up. And since many distributions are community-driven, anyone can contribute and make his preferred distribution shine.
My preferred distribution does not take into account the ODROID M1 in any way, but follows current mainline developments in a timely manner. Therefore, my preferred distribution has been natively usable for the ODROID M1 for quite some time due to the existing mainline support out-of-the-box. There is no need for any special distribution maintainer work in relation to the ODROID M1.
The only thing missing is a firmware capable of booting the operating system. The one supplied by the manufacturer can only be used to a very limited extent for this, but with the release of U-Boot v2023.10, a suitable mainline variant will be available.
My preview firmware build is already used for other distributions and has also been used to replace Petitboot in the SPI flash.

User avatar
mad_ady
Posts: 11590
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1
Location: Bucharest, Romania
Has thanked: 649 times
Been thanked: 1154 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by mad_ady »

@usual user If you have an uboot capable of booting from usb/nvme on M1 (and possibly other boards) you should create a new thread about it. I'm sure others would like it as well, as an alternative to petitboot (or to boot non-spi boards from usb stgorage).

User avatar
rooted
Posts: 10373
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 801 times
Been thanked: 657 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by rooted »

Sounds like he means building upstream uboot.

*edit*
I'm not sure if he's pulling in patches before they make it into git or using the next branch or what exactly.

I do know he's using extlinux.conf to manage what to boot and from where.

usual user
Posts: 86
Joined: Sat Sep 10, 2022 10:47 pm
languages_spoken: english
Has thanked: 2 times
Been thanked: 24 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by usual user »

mad_ady wrote:
Fri Sep 01, 2023 2:19 pm
If you have an uboot capable of booting from usb/nvme on M1 ... you should create a new thread about it.
It is already being used and talked about in various other posts on this forum. For the current state of the art, see here. I haven't uploaded my latest binary until now, as no one has asked for it yet.
mad_ady wrote:
Fri Sep 01, 2023 2:19 pm
(and possibly other boards)
Device firmware provides the only truly device-specific code and is therefore different for each device variant. I rebuild the firmware for all my devices myself and configure them so that they work according to my ideas. I've even built some myself for related devices that I don't own, and they've been confirmed to work as expected. I therefore know that the same feature set can be available on all these devices, as long as the device offers the necessary hardware requirements.
rooted wrote:
Fri Sep 01, 2023 2:24 pm
Sounds like he means building upstream uboot.
Yes, my firmware builds are always based on mainline U-Boot as a payload to be able to provide equivalent functionality with all devices.
rooted wrote:
Fri Sep 01, 2023 2:24 pm
I do know he's using extlinux.conf to manage what to boot and from where.
The firmware build supports way more bootflows, see the already referenced thread for details.

User avatar
rooted
Posts: 10373
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 801 times
Been thanked: 657 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by rooted »


usual user wrote:
rooted wrote:
Fri Sep 01, 2023 2:24 pm
I do know he's using extlinux.conf to manage what to boot and from where.
The firmware build supports way more bootflows, see the already referenced thread for details.
I know it does, I was commenting on what you use with fedora.

johnbshk
Posts: 19
Joined: Wed Aug 17, 2022 3:31 pm
languages_spoken: english
ODROIDs: ODROID M1
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by johnbshk »

usual user wrote:
Sat Sep 02, 2023 1:59 am
Yes, my firmware builds are always based on mainline U-Boot as a payload to be able to provide equivalent functionality with all devices.
Thanks, this is very helpful. I would be grateful if you could state which distribution you have been using that works well as I would like to start using my M1 as a Roon device with HDMI 5.1 audio and the Hardkernel distributions do not work for this.

Thanks, John

usual user
Posts: 86
Joined: Sat Sep 10, 2022 10:47 pm
languages_spoken: english
Has thanked: 2 times
Been thanked: 24 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by usual user »

johnbshk wrote:
Fri Sep 08, 2023 4:17 am
I would be grateful if you could state which distribution you have been using
Choose whatever fits your needs. My firmware build allows you to boot any distribution that either suppots extlinux (extlinux.conf), efiboot or legacy-boot (boot.scr) as a boot method from any storage device the ODROID M1 provides.
johnbshk wrote:
Fri Sep 08, 2023 4:17 am
HDMI 5.1 audio
I don't run any advanced audio configuration, but I'm sure fedora has all the tools in its repository to support it. Since the audio subsystem is very complex, it is not pre-configured for a specific use case, nor is it a few mouse clicks to set it up. You have to know very well what to do to setup a proper configuration for your use case.

marinomrc
Posts: 91
Joined: Tue Apr 12, 2022 9:52 pm
languages_spoken: english
ODROIDs: Odroid M1
Has thanked: 3 times
Been thanked: 10 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by marinomrc »

Hello,
quick and probably stupid question on this topic:

Can we use this kernel without any change?

If this is not possible, please, can you give me an explanation about it? I'm trying to learn this new thing and it's unclear to me.

Thanks,
Marco

EDIT: I'm asking because it seems that the file dtb-rk3568-odroid-m1.dtb is included in the kernel now

usual user
Posts: 86
Joined: Sat Sep 10, 2022 10:47 pm
languages_spoken: english
Has thanked: 2 times
Been thanked: 24 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by usual user »

marinomrc wrote:
Fri Sep 08, 2023 6:52 pm
I'm asking because it seems that the file dtb-rk3568-odroid-m1.dtb is included in the kernel now
The devicetree describes the components of a device and how they are wired-up so that suitable drivers can be selected and they receive the necessary parameters for their operation. The kernel source code usually provides support for all required components, but the availability of the DTB does not guarantee that all drivers described there have been enabled by the .config for the kernel binary build and hence be available at runtime. The design of the build configuration ultimately determines the usability of the kernel for a specific purpose. I usually build my kernels in a generic form, i.e. all kinds of components are built and it can be used for all devices for which a suitable DTB is available. Others prefer to build for a dedicated device and therefore have to build a separate one for each device, which can then also be used only dedicated.
These users thanked the author usual user for the post:
marinomrc (Sat Sep 09, 2023 3:26 pm)

marinomrc
Posts: 91
Joined: Tue Apr 12, 2022 9:52 pm
languages_spoken: english
ODROIDs: Odroid M1
Has thanked: 3 times
Been thanked: 10 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by marinomrc »

Thanks! your answer is extremely helpful for me!

So, I guess that some specific driver is missing in the deb package I linked in my previous post.
But, if I understood correctly, I can freely clone the upstream kernel repo (not the rockchip repo), add a customized .config file and compile for Odroid M1, right?

Can you share a .config file that works for the Odroid M1? Also, is there a .deb package somewhere? I'm not sure but it seems it doesn't exist in the linuxfactory repo

Thanks again!
Marco

EDIT: found it (I mean the deb package for 6.2)

usual user
Posts: 86
Joined: Sat Sep 10, 2022 10:47 pm
languages_spoken: english
Has thanked: 2 times
Been thanked: 24 times
Contact:

Re: Mainline kernel for ODROID-M1 (Feat. Ubuntu 22.04)

Post by usual user »

marinomrc wrote:
Sat Sep 09, 2023 3:25 pm
I guess that some specific driver is missing
Hard to say without further analysis of proper serial console logs.
marinomrc wrote:
Sat Sep 09, 2023 3:25 pm
I can freely clone the upstream kernel repo (not the rockchip repo), add a customized .config file and compile for Odroid M1
Yep, that's right.
marinomrc wrote:
Sat Sep 09, 2023 3:25 pm
Can you share a .config file that works for the Odroid M1?
I'm running fedora since day one on my device, for me all Debian based distributions with their software stack are way to stable - outdated. In order to get a kernel build according to my personal preferences, I regularly rebuild current fedora kernel source packages with my modifications on top. Thereby the .config varies greatly with each new source package. It is therefore difficult to provide a representative .config. But if it helps, here's the current one. The Fedora stock kernel works right out of the box for the ODROID M1. This is also the reason why a single fedora raw OS image flavor can be used unmodified for various devices. The only requirement is sufficient mainline kernel (DTB) support for the device and firmware that can boot the OS.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest