Any plan for basic mainline linux support?

back2future
Posts: 292
Joined: Sun Jul 23, 2017 3:19 pm
languages_spoken: english
Has thanked: 13 times
Been thanked: 8 times
Contact:

Re: Any plan for basic mainline linux support?

Post by back2future » Mon Mar 16, 2020 2:32 am


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

Re: Any plan for basic mainline linux support?

Post by brad » Mon Mar 16, 2020 10:19 am

elatllat wrote:
Sun Mar 15, 2020 11:08 pm
My build has 5 fixes to mainline (usb, speed, pwm, ram, size), only reason I'm building my own is I want weekly (same day) upstream security patches.
So if tobetter starts weekly builds with minimal diff from mainline I would use that.
The elec build has audio support, it might be nice to get that in a patch.
For me I generally recompile to add additional modules (I can make a list of options but many are included by defconfig)

- Additional USB audio modules
- GPIO interface for sysfs
- NFS filesystem, NFS on rootfs, built in network / PHY drivers
- Anything needed for Odroid C2 including lima (No reason single kernel cannot support both N1 & C2)
- Always try to include support for Odroid N1 and Rockchip
- Squash filesystem all compression support
- CEC support
- keymap support for remotes and LIRC support
- Kernel vdec drivers for testing
- Meson watchdog

I then add current stable realtime kernel patches for realtime variant of kernel

Plan to start testing onboard audio again for N2 shortly to work out what is missing now.

In regards to version its nice to have the 5.4.x LTS (as this is what Ubuntu 20 is likey to use in upcoming release) but stable is good for latest features.

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Mon Mar 16, 2020 11:27 pm

elatllat wrote:
Sun Mar 15, 2020 11:08 pm
My build has 5 fixes to mainline (usb, speed, pwm, ram, size), only reason I'm building my own is I want weekly (same day) upstream security patches.
So if tobetter starts weekly builds with minimal diff from mainline I would use that.
The elec build has audio support, it might be nice to get that in a patch.
I am building the branch whenever it's been updated with patches or upstream branch is out and I do a minimal test before releasing it. The sound also has been worked a couple of weeks ago, but as of now, one needs to run some commands once on Ubuntu 19.04 while Debian 10 does not need any other configuration with the same kernel. :)
These users thanked the author tobetter for the post:
elatllat (Mon Mar 16, 2020 11:46 pm)

alvarow
Posts: 47
Joined: Wed Apr 10, 2019 10:44 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 22 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by alvarow » Tue Mar 17, 2020 2:47 am

Humm.. seems new kernel did not help, I still get stack traces with 5.4.x ... I'll create a new thread for it. Seem related to cpufreq.

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Tue Mar 17, 2020 3:35 am

alvarow wrote:
Tue Mar 17, 2020 2:47 am
Humm.. seems new kernel did not help, I still get stack traces with 5.4.x ... I'll create a new thread for it. Seem related to cpufreq.
Because my build is practically mainline (the usb fix just got accepted by Greg) you can report any stack traces from it to upstream;ubuntu.com/kernel.org . Only the firmware blobs in uboot are maintained by HardKernel/AMLogic.

bas25
Posts: 10
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by bas25 » Tue Mar 17, 2020 5:41 pm

Hi Brad,
brad wrote:
Mon Mar 16, 2020 10:19 am
For me I generally recompile to add additional modules (I can make a list of options but many are included by defconfig)

- GPIO interface for sysfs
did you use gpio on N2 ?
i try to use gpio irq but have no edge file in sysfs interface.
Can you look if you have this file ?
thx.

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Tue Mar 17, 2020 10:10 pm

N2 5.X gpio example;

Code: Select all

gpioset gpiochip0 65=1
viewtopic.php?f=176&t=33993&start=450#p272533

bas25
Posts: 10
Joined: Sun Sep 24, 2017 2:25 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by bas25 » Tue Mar 17, 2020 11:33 pm

elatllat wrote:
Tue Mar 17, 2020 10:10 pm
N2 5.X gpio example;

Code: Select all

gpioset gpiochip0 65=1
viewtopic.php?f=176&t=33993&start=450#p272533
yep, i know gpioget or gpioset, and they works as expected.
but gpiomon not (for me at least):
gpiomon: error waiting for events: No such device

and in sysfs i have no edge file.

nick793
Posts: 38
Joined: Mon Jun 24, 2019 9:35 pm
languages_spoken: english
ODROIDs: N2, GO
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Any plan for basic mainline linux support?

Post by nick793 » Thu Mar 19, 2020 2:26 am

@elatllat does the hwmon interface for the cpu temp sensors work in your kernel build? I'm using the armbian 5.4.25 build and can't seem to get a temperature reading. The temp file is there but trying to read it results in an invalid operation error.

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Thu Mar 19, 2020 3:04 am

No but with that masive heatsync I'm not worried. I do get thermal data from drives though because they do try to cook themselves.

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Wed Mar 25, 2020 8:37 pm

tobetter wrote:
Mon Mar 16, 2020 11:27 pm
elatllat wrote:
Sun Mar 15, 2020 11:08 pm
... if tobetter starts weekly builds with minimal diff from mainline I would use that...
I am building the branch when... upstream branch is out ...
Looks like the 6 days of 5.4.27 was missed completely, guess I'll keep building my own.
Hope you are doing well in these times.
Last edited by elatllat on Wed Mar 25, 2020 8:48 pm, edited 1 time in total.

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Wed Mar 25, 2020 8:44 pm


elatllat wrote:
tobetter wrote:
Mon Mar 16, 2020 11:27 pm
elatllat wrote:
Sun Mar 15, 2020 11:08 pm
... if tobetter starts weekly builds with minimal diff from mainline I would use that...
I am building the branch when... upstream branch is out ...
Looks like the 6 days of 5.4.27 was missed completely, guess I'll keep building my own.
Obviously not able to stop your own build, just my build is not released yet. :)

"Tapatalk wishes you to have fun with ODROID"


odroidn2user
Posts: 243
Joined: Fri Oct 25, 2019 4:14 pm
languages_spoken: english
ODROIDs: N2, C4
Has thanked: 62 times
Been thanked: 62 times
Contact:

Re: Any plan for basic mainline linux support?

Post by odroidn2user » Thu Apr 02, 2020 3:22 am

So, I'm trying 5.4 (tobetter image with Ubuntu 19.04 Gnome) and 5.5.8 (Manjaro KDE Plasma) kernels, and the graphics / visuals are glitching, with disruptive flashes.
For a split of a second, the picture that is shown on the monitors breaks and then immediately corrects itself back to normal.
This happens more when the device is active, for example when watching video. And less (but still) when idling.

I've tried 2 Odroid N2 devices, using 4 different HDMI cables and three monitors, happens in every combination involving kernel 5.4 and 5.5.
The devices, hdmi cables and monitors work fine with the 4-series kernel and other devices I have around.

Experimenting with tobetter's wonderful image indicates that whether using the Mali Wayland drivers or not, this happens.
Which indicates to me this is a kernel issue. Perhaps there is a bug with syncing, some missing protocol implementation or data transmission error handling of some sort?
It basically renders the kernel 5-series unusable for me, and for anything other than basic home server use.

Do any of you know if this is a known issue that is being worked on?
Are there patches, configuration solutions or workarounds?

Update: And the plot thickens!
Armbian (Xfce/Bionic) does 5.4.27 and 5.4.28 without the glitching!
So, Armbian uses different patching or it is somewhere in the display manager...

(I'm going to give Manjaro KDE another try to see if things changed.)

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Tue Apr 14, 2020 6:37 pm

FYI, my personal package repository is updated with Linux kernel 5.4.32 and have uploaded a video clip that runs GNOME Desktop on Ubuntu 20.04.
viewtopic.php?f=182&t=37109&p=288656&hi ... ot#p288656
These users thanked the author tobetter for the post (total 2):
istanbulls (Tue Apr 14, 2020 9:04 pm) • brad (Wed Apr 15, 2020 5:52 pm)

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Sat Apr 18, 2020 6:38 am

The bug fix I asked Neil to clean, and submit for us, made it to mainline
https://lkml.org/lkml/2020/4/17/655
tobetter wrote:
Tue Sep 17, 2019 5:55 am
... I have no idea how to describe the patch when it's submitted.
Now we know anything will do, but "usb: dwc3: core: add support for disabling SS instances in park mode" is the preferred format.
These users thanked the author elatllat for the post (total 2):
brad (Mon Apr 20, 2020 6:28 pm) • skeetre (Wed Apr 22, 2020 2:21 am)

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Thu Apr 23, 2020 12:33 pm

Ubuntu 20.04 (Focal Fossa) Minimal Image with Linux kernel 5.4 is ready to download...

Ubuntu 20.04 Focal Fossa Minimal image for ODROID-N2

EDIT:
In case if you like to run Linux kernel 5.6 rather than 5.4, please do install after booting with the image. Linux kernel 5.6.0 will up after rebooting.

Code: Select all

$ sudo apt update
$ sudo apt install linux-image-5.6.0-odroid-arm64
$ sudo reboot
.
Last edited by tobetter on Sun Apr 26, 2020 10:23 am, edited 2 times in total.
These users thanked the author tobetter for the post (total 5):
mad_ady (Thu Apr 23, 2020 2:47 pm) • elatllat (Thu Apr 23, 2020 9:26 pm) • IgaBiva (Thu Apr 23, 2020 11:46 pm) • xabolcs (Fri Apr 24, 2020 9:27 am) • maier-johno (Sat Apr 25, 2020 10:16 pm)

wallyz21
Posts: 137
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 10 times
Been thanked: 16 times
Contact:

Re: Any plan for basic mainline linux support?

Post by wallyz21 » Fri Apr 24, 2020 7:24 pm

tobetter wrote:
Thu Apr 23, 2020 12:33 pm
Ubuntu 20.04 (Focal Fossa) Minimal Image with Linux kernel 5.4 is ready to download...

Ubuntu 20.04 Focal Fossa Minimal image for ODROID-N2
Is this in mainline?

Can users of N2 Ubuntu 18.04 MATE Desktop upgrade to 20.04 via the release upgrade method?

$ sudo do-release-upgrade -d

Or is a clean install required?
Walter Zambotti
N2 - Ubuntu Mate Desktop

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Fri Apr 24, 2020 7:34 pm

wallyz21 wrote:
Fri Apr 24, 2020 7:24 pm
tobetter wrote:
Thu Apr 23, 2020 12:33 pm
Ubuntu 20.04 (Focal Fossa) Minimal Image with Linux kernel 5.4 is ready to download...

Ubuntu 20.04 Focal Fossa Minimal image for ODROID-N2
Is this in mainline?

Can users of N2 Ubuntu 18.04 MATE Desktop upgrade to 20.04 via the release upgrade method?

$ sudo do-release-upgrade -d

Or is a clean install required?
As noted, it runs Linux kernel 5.4 and you can judge if it's mainline that you think or not.
https://github.com/hardkernel/linux/tree/odroid-5.4.y

The image I am sharing does not use FAT* and the packages I built for Linux kernel cannot work with FAT. So you will need to overwrite your memory card.

miskol
Posts: 249
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 1 time
Been thanked: 17 times
Contact:

Re: Any plan for basic mainline linux support?

Post by miskol » Fri Apr 24, 2020 7:43 pm

I think you can try armbian ubuntu 20.04 with 5.6 kernel
and when you add apt install ubuntu-desktop
gnome will work with llvmpipe sw gpu

DanDroid
Posts: 15
Joined: Sun Mar 31, 2019 3:58 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 19 times
Been thanked: 0
Contact:

Re: Any plan for basic mainline linux support?

Post by DanDroid » Fri Apr 24, 2020 10:35 pm

It would be great if a desktop-build of Ubuntu 20.04 with kernel 5.6 would become available _/-\0_

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Fri Apr 24, 2020 10:55 pm

Out of curiosity, what makes you to use 5.6 rather than 5.4?

"Tapatalk wishes you to have fun with ODROID"


miskol
Posts: 249
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 1 time
Been thanked: 17 times
Contact:

Re: Any plan for basic mainline linux support?

Post by miskol » Fri Apr 24, 2020 11:03 pm

tobetter wrote:
Fri Apr 24, 2020 10:55 pm
Out of curiosity, what makes you to use 5.6 rather than 5.4?

"Tapatalk wishes you to have fun with ODROID"
off topic
I installed yesterday yours ubuntu 20.04 version on N2 and I can't start terminal
simple clicking on terminal icon and it didn't show up
firefox fine
and I see lots of warnings in dmesg

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Fri Apr 24, 2020 11:11 pm

miskol wrote:
Fri Apr 24, 2020 11:03 pm
tobetter wrote:
Fri Apr 24, 2020 10:55 pm
Out of curiosity, what makes you to use 5.6 rather than 5.4?

"Tapatalk wishes you to have fun with ODROID"
off topic
I installed yesterday yours ubuntu 20.04 version on N2 and I can't start terminal
simple clicking on terminal icon and it didn't show up
firefox fine
and I see lots of warnings in dmesg
It's known issue, please refer to the link.
viewtopic.php?f=182&t=37109&p=289461&hi ... er#p289153
I meet the same issue many times while bring up 20.04 it happens randomly whenever the Ubuntu repository is updated.

By the way, did you install the package 'mali-bifrost-wayland-driver' as well?

miskol
Posts: 249
Joined: Wed Jan 15, 2014 2:58 am
languages_spoken: english,slovak
Has thanked: 1 time
Been thanked: 17 times
Contact:

Re: Any plan for basic mainline linux support?

Post by miskol » Fri Apr 24, 2020 11:19 pm

tobetter wrote:
Fri Apr 24, 2020 11:11 pm
miskol wrote:
Fri Apr 24, 2020 11:03 pm
tobetter wrote:
Fri Apr 24, 2020 10:55 pm
Out of curiosity, what makes you to use 5.6 rather than 5.4?

"Tapatalk wishes you to have fun with ODROID"
off topic
I installed yesterday yours ubuntu 20.04 version on N2 and I can't start terminal
simple clicking on terminal icon and it didn't show up
firefox fine
and I see lots of warnings in dmesg
It's known issue, please refer to the link.
viewtopic.php?f=182&t=37109&p=289461&hi ... er#p289153
I meet the same issue many times while bring up 20.04 it happens randomly whenever the Ubuntu repository is updated.

By the way, did you install the package 'mali-bifrost-wayland-driver' as well?
I installed mali-bifrost-wayland-driver
But I don't know if gnome is gpu accelerated on N2 or not
es2 is working.

I have a armbian based ubuntu 20.04 for odroid c2 with LIMA
and I had same problem month ago with terminal. but everything start to work fine with gnome 3.36.1
But maybe it is just random :)

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Sat Apr 25, 2020 1:00 am

miskol wrote:
Fri Apr 24, 2020 11:19 pm
tobetter wrote:
Fri Apr 24, 2020 11:11 pm
miskol wrote:
Fri Apr 24, 2020 11:03 pm
tobetter wrote:
Fri Apr 24, 2020 10:55 pm
Out of curiosity, what makes you to use 5.6 rather than 5.4?

"Tapatalk wishes you to have fun with ODROID"
off topic
I installed yesterday yours ubuntu 20.04 version on N2 and I can't start terminal
simple clicking on terminal icon and it didn't show up
firefox fine
and I see lots of warnings in dmesg
It's known issue, please refer to the link.
viewtopic.php?f=182&t=37109&p=289461&hi ... er#p289153
I meet the same issue many times while bring up 20.04 it happens randomly whenever the Ubuntu repository is updated.

By the way, did you install the package 'mali-bifrost-wayland-driver' as well?
I installed mali-bifrost-wayland-driver
But I don't know if gnome is gpu accelerated on N2 or not
es2 is working.

I have a armbian based ubuntu 20.04 for odroid c2 with LIMA
and I had same problem month ago with terminal. but everything start to work fine with gnome 3.36.1
But maybe it is just random :)
If you have installed my custom package 'mali-bifrost-wayland-driver' and 'glmark2-es2-wayland', ARM Mali GPU is definitely enabled, it's very different to LLVMPIPE. By default, when ubuntu-desktop package is installed, you will see 'llvmpip' in the Setting. But after 'mali-bifrost-wayland-driver' is installed and it's enabled, it will become 'Unknown' like this. Maybe someone can confirm this if ubuntu-desktop is freshly installed and the score of 'glmark2-es2-wayland'.
Screenshot from 2020-04-24 11-54-42.png
Screenshot from 2020-04-24 11-54-42.png (92.77 KiB) Viewed 2349 times
EDIT: I had to install another 20.04 and have checked how it looks like when Mali Bifrost driver is not installed.
Screenshot from 2020-04-25 21-13-03.png
Screenshot from 2020-04-25 21-13-03.png (96.31 KiB) Viewed 2219 times

maier-johno
Posts: 18
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by maier-johno » Sat Apr 25, 2020 10:31 pm

Hi, guys,

first of all many, many thanks to you! You guys are really great! Special thanks to elatllat, tobetter, brad and all others. for all your efforts! Well, I have two more questions. Excuse me if i am not a real Linux- and/or Hardware professional, but maybe you know that right away:

I use ARCH-Linux on the N2 and boot via USB-SATA-adapter from a HDD. After a long struggle with finding a correct USB-SATA-adapter. But with a current petitboot (thanks tobetter!) it works great! :-) I don't use the gpu or a desktop environment, i use the N2 as different server services (tv-headend, radicale, ISC-dhcp, pihole, smb, ftp, ssh, vpn etc..)

Question 1: Is the script (thanks elatllat!) for the kernel build still up to date? Can it build a 5.6 kernel (because of wireguard) or is there a reason why you use the 5.4 kernel?
Question 2: What is the effect of the boot option: "usb-storage.quirks=0bc2:ab38:,0bc2:3312:u"? For me, it works with this option, as well as without. Should i use this option? Is there any good documentation about the quirk-bits?

Again, thank you very much for your great work! If anyone know about it, i would be glad to hear from you. But if not, i think i'll manage somehow :-)

See you later,
Greetings Johno

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Sat Apr 25, 2020 11:33 pm

@maier-johnno, For your question #1, I think only myself is focusing on 5.4 kernel and other experts are looking into 5.6 or 5.7. The reason why I am staying 5.4 is to share the OS set up. I also have the Linux kernel 5.6 package in my repository and you can use it. I've introduced a small script to download my custom kernel Debian package and extract it to gather Linux kernel files, drivers and DTBS.
viewtopic.php?f=176&t=33993&p=289912&hi ... or#p286010
These users thanked the author tobetter for the post:
maier-johno (Sun Apr 26, 2020 1:51 am)

maier-johno
Posts: 18
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by maier-johno » Sun Apr 26, 2020 12:08 am

thank you! I will try that. I currently going through the script manually and try to build my own kernel. But it fails with the patch:

Code: Select all

[root@Active linux]# git apply -3 ../patch.txt
error: Anwendung des Patches fehlgeschlagen: Documentation/devicetree/bindings/usb/dwc3.txt:75
error: Dem Repository fehlt der notwendige Blob, um auf einen 3-Wege-Merge
zurückzufallen.
error: Documentation/devicetree/bindings/usb/dwc3.txt: Patch konnte nicht angewendet werden
error: Anwendung des Patches fehlgeschlagen: arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi:2197
error: Dem Repository fehlt der notwendige Blob, um auf einen 3-Wege-Merge
zurückzufallen.
error: arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi: Patch konnte nicht angewendet werden
error: Anwendung des Patches fehlgeschlagen: drivers/usb/dwc3/core.c:1029
error: Dem Repository fehlt der notwendige Blob, um auf einen 3-Wege-Merge
zurückzufallen.
error: drivers/usb/dwc3/core.c: Patch konnte nicht angewendet werden
error: Anwendung des Patches fehlgeschlagen: drivers/usb/dwc3/core.h:249
error: Dem Repository fehlt der notwendige Blob, um auf einen 3-Wege-Merge
zurückzufallen.
error: drivers/usb/dwc3/core.h: Patch konnte nicht angewendet werden
Which patch do you use for 5.6? And how do you do that? But i will try your Kernel-Image with the extract method too! Thank you!

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Sun Apr 26, 2020 1:15 am

I think you can try my branch for 5.6.
https://github.com/tobetter/linux/commits/odroid-5.6.y
These users thanked the author tobetter for the post:
maier-johno (Sun Apr 26, 2020 1:52 am)

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 404 times
Contact:

Re: Any plan for basic mainline linux support?

Post by mad_ady » Sun Apr 26, 2020 2:09 am

Question 2: What is the effect of the boot option: "usb-storage.quirks=0bc2:ab38:,0bc2:3312:u"?
This boot argument forces usb devices with the specified vid:pid to work with usb-storage driver, not uas. You need to set the correct vid:pid for your usb-sata bridge to have effect.
These users thanked the author mad_ady for the post:
maier-johno (Sun Apr 26, 2020 5:04 am)

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Sun Apr 26, 2020 5:04 am

maier-johno wrote:
Sat Apr 25, 2020 10:31 pm
...
Question 1: Is the script (thanks elatllat!) for the kernel build still up to date?
...
It is now.
I assume most would use tobetters build,
so although I auto build my own,
I am not posting every build.

5.4.35 (LKML)
builds (and script).
These users thanked the author elatllat for the post (total 2):
maier-johno (Sun Apr 26, 2020 9:27 am) • xabolcs (Thu Apr 30, 2020 4:41 am)

maier-johno
Posts: 18
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by maier-johno » Sun Apr 26, 2020 9:39 am

I don't know what i have to say: Thank you very, very much!

@elatllat: wow! Really great, thanks a lot! It's a mystery to me how you manage the patch-files!! ;-)
@tobetter: thanks, I have checked out your repo and i will try it!

First, I will try the patch from elatllat. It's currently the best for me, if it works with 5.6. -because the github is very slow in checking out. On the other hand, i wouldn't have to deal with the patches. I'll try both and thank you very, very much for that!

@mad_ady: Thanks a lot to you too! I googled it and I think I'll be able to find out the manufacturer id. :-) But i think, with UASP it will run faster? For me it works when i don't disable UASP. But my HDD is not so fast, that i need UASP. But now, i know what it is. Thanks!

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Sun Apr 26, 2020 10:21 am

maier-johno wrote:
Sun Apr 26, 2020 9:39 am
I don't know what i have to say: Thank you very, very much!

@elatllat: wow! Really great, thanks a lot! It's a mystery to me how you manage the patch-files!! ;-)
@tobetter: thanks, I have checked out your repo and i will try it!

First, I will try the patch from elatllat. It's currently the best for me, if it works with 5.6. -because the github is very slow in checking out. On the other hand, i wouldn't have to deal with the patches. I'll try both and thank you very, very much for that!

@mad_ady: Thanks a lot to you too! I googled it and I think I'll be able to find out the manufacturer id. :-) But i think, with UASP it will run faster? For me it works when i don't disable UASP. But my HDD is not so fast, that i need UASP. But now, i know what it is. Thanks!
In case if you need running OS image with 5.6, you can use my 20.04 minimal image that runs with 5.4.
viewtopic.php?p=289995#p289444

After booting from the image to Linux 5.4 kernel, install 5.6 kernel with these commands. Next boot, Linux kernel 5.6 will up while 5.4 is still installed in the same storage.

Code: Select all

$ sudo apt update
$ sudo apt install linux-image-5.6.0-odroid-arm64
$ sudo reboot
These users thanked the author tobetter for the post (total 2):
rooted (Sun Apr 26, 2020 6:15 pm) • maier-johno (Sun Apr 26, 2020 11:09 pm)

maier-johno
Posts: 18
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by maier-johno » Tue Apr 28, 2020 5:01 pm

Hi all,

i just tried the ubuntu-image from tobetter. And it's great! I was able to install the 5.6 properly. Great work! Thanks a lot! But i couldn't copied it to my Arch-Installation, don't know. So i build my own 5.6.7 with the patch and script from elatllat. And it work's great! Because of ARCH i have to do it manually but there was no problem. But one question: elatllat, i copied the command lines from your script. It works perfect, but i don't understand the two parameters in the following line:

Code: Select all

mkimage -A arm64 -O linux -T kernel -C none -a $O -e $O -n "$(make kernelrelease)" -d arch/arm64/boot/Image /boot/uImage
for the load addess and entry point. The variable: $O is nowhere defined? But it works! :-)

here my steps (maybe interesting for someone):

Code: Select all

cp -a /boot /boot_backup
git clone --depth 1 --branch linux-5.6.y https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux

wget 'https://forum.odroid.com/download/file.php?id=11208' -qO patch.txt
cd linux
git apply -3 ../patch.txt

make defconfig
perl -pi -e 's/CONFIG_ARCH_[^_]*=y|.*(DEBUG|NOUVEAU).*//g' .config
echo "CONFIG_MDIO_BUS_MUX_MESON_G12A=y
CONFIG_ARCH_MESON=y

CONFIG_BPF_SYSCALL=y
CONFIG_CGROUP_BPF=y
CONFIG_BPF_EVENTS=y
CONFIG_SQUASHFS_XZ=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
CONFIG_FUSE_FS=y
CONFIG_SQUASHFS_XZ=y
CONFIG_PNFS_BLOCK=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_USB_UAS=y

CONFIG_BLK_DEV_MD=m
CONFIG_MD_AUTODETECT=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID456=m
CONFIG_XOR_BLOCKS=m
CONFIG_ASYNC_CORE=m
CONFIG_ASYNC_MEMCPY=m
CONFIG_ASYNC_XOR=m
CONFIG_ASYNC_PQ=m
CONFIG_ASYNC_RAID6_RECOV=m
CONFIG_RAID6_PQ=m
CONFIG_LIBCRC32C=m

CONFIG_WIRELESS=n
CONFIG_WLAN=n
" >> .config
make olddefconfig

sync
echo 3 > /proc/sys/vm/drop_caches;

make clean
make -j "$(nproc)" && make modules_install && make headers_install

mkimage -A arm64 -O linux -T kernel -C none -a $O -e $O -n "$(make kernelrelease)" -d arch/arm64/boot/Image /boot/uImage
cp arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtb /boot/n2.dtb
sync
reboot
i get the following output from mkimage:

Code: Select all

[johno@Active linux]$ sudo mkimage -A arm64 -O linux -T kernel -C none -a $O -e $O -n "$(make kernelrelease)" -d arch/arm64/boot/Image /boot/uImage
Image Name:   5.6.7-dirty
Created:      Tue Apr 28 09:39:32 2020
Image Type:   AArch64 Linux Kernel Image (uncompressed)
Data Size:    18405888 Bytes = 17974.50 KiB = 17.55 MiB
Load Address: fffffff2
Entry Point:  fffffff2
Is it a coincidence that it works? Thank's for any reply!

Best regards, johno


PS.: again: thank you for all your great work!

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Tue Apr 28, 2020 9:45 pm

maier-johno wrote:
Tue Apr 28, 2020 5:01 pm
...The variable: $O is nowhere defined? ...
line 16;

O="0x1080000"
These users thanked the author elatllat for the post:
maier-johno (Tue Apr 28, 2020 11:08 pm)

jgmdev
Posts: 80
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, C4
Has thanked: 23 times
Been thanked: 48 times
Contact:

Re: Any plan for basic mainline linux support?

Post by jgmdev » Tue Apr 28, 2020 10:15 pm

maier-johno wrote:
Tue Apr 28, 2020 5:01 pm
...
i just tried the ubuntu-image from tobetter. And it's great! I was able to install the 5.6 properly. Great work! Thanks a lot! But i couldn't copied it to my Arch-Installation, don't know. So i build my own 5.6.7 with the patch and script from elatllat. And it work's great! Because of ARCH i have to do it manually but there was no problem. But one question: elatllat, i copied the command lines from your script. It works perfect, but i don't understand the two parameters in the following line:

Code: Select all

mkimage -A arm64 -O linux -T kernel -C none -a $O -e $O -n "$(make kernelrelease)" -d arch/arm64/boot/Image /boot/uImage
for the load addess and entry point. The variable: $O is nowhere defined? But it works! :-)
...
Why are you building your own 5.6 kernel? The archlinuxarm repo has 5.6 (linux-aarch64) and 5.7rc (linux-aarch64-rc), both of them work with the odroid n2, just make sure to edit the boot.ini file as follow and change the root parameter from /dev/sda2 to meet your needs:

/boot/boot.ini

Code: Select all

ODROIDN2-UBOOT-CONFIG

# System Label
setenv bootlabel "ArchLinux"

# Default Console Device Setting
setenv condev "console=ttyAML0,115200n8"

# Boot Args
setenv bootargs "root=/dev/sda2 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 clk_ignore_unused"

# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x3080000"

# Load kernel, dtb and initrd
load mmc ${devno}:1 ${loadaddr} /Image
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson-g12b-odroid-n2.dtb
load mmc ${devno}:1 ${initrd_loadaddr} /initramfs-linux.uimg

# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}
These users thanked the author jgmdev for the post:
maier-johno (Tue Apr 28, 2020 11:08 pm)

maier-johno
Posts: 18
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by maier-johno » Tue Apr 28, 2020 11:13 pm

@elatllat: ah, ok thank you!
@jgmdev: OMG :o i think i can't see the forest for the trees :)

Anyway, at least I learned a little something. And it was interesting, too.

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Wed Apr 29, 2020 4:19 am

tobetter wrote:
Thu Apr 23, 2020 12:33 pm
Ubuntu 20.04 (Focal Fossa) Minimal Image with Linux kernel 5.4 is ready to download...

Ubuntu 20.04 Focal Fossa Minimal image for ODROID-N2

EDIT:
In case if you like to run Linux kernel 5.6 rather than 5.4, please do install after booting with the image. Linux kernel 5.6.0 will up after rebooting.

Code: Select all

$ sudo apt update
$ sudo apt install linux-image-5.6.0-odroid-arm64
$ sudo reboot
.
EDIT: Linux kernel 5.7-rc3 experimental package is uploaded.

Code: Select all

$ sudo apt update
$ sudo apt install linux-image-5.7.0-odroid-arm64
$ sudo reboot
These users thanked the author tobetter for the post (total 2):
elatllat (Wed Apr 29, 2020 4:28 am) • maier-johno (Wed Apr 29, 2020 5:24 am)

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 404 times
Contact:

Re: Any plan for basic mainline linux support?

Post by mad_ady » Wed Apr 29, 2020 5:08 am

Don't you ever sleep tobetter? Must be 3 a.m. in KR...
These users thanked the author mad_ady for the post:
m8kbv (Wed Apr 29, 2020 5:34 am)

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Wed Apr 29, 2020 5:22 am

mad_ady wrote:
Wed Apr 29, 2020 5:08 am
Don't you ever sleep tobetter? Must be 3 a.m. in KR...
5:22
These users thanked the author tobetter for the post:
m8kbv (Wed Apr 29, 2020 5:34 am)

maier-johno
Posts: 18
Joined: Sun May 12, 2019 1:09 am
languages_spoken: german, a little bit english
ODROIDs: N2
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Any plan for basic mainline linux support?

Post by maier-johno » Wed Apr 29, 2020 5:25 am

i could understand you! :P

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 404 times
Contact:

Re: Any plan for basic mainline linux support?

Post by mad_ady » Wed Apr 29, 2020 12:45 pm

tobetter wrote:
mad_ady wrote:
Wed Apr 29, 2020 5:08 am
Don't you ever sleep tobetter? Must be 3 a.m. in KR...
5:22
Completely different then.... Image

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Thu Apr 30, 2020 4:18 am

Kevin queued the opp-points patch for v5.8, so I think that's the last server thing for the N2 mainlined.
Anyone know about the u-boot/kernel/dts RAM auto detection (previously discussed in this thread)?
My assumption is u-boot was not passing the param to the kernel, (but I did not look into it, and don't remember when I last updated u-boot)

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Thu Apr 30, 2020 4:32 am

elatllat wrote:
Thu Apr 30, 2020 4:18 am
Kevin queued the opp-points patch for v5.8, so I think that's the last server thing for the N2 mainlined.
Anyone know about the u-boot/kernel/dts RAM auto detection (previously discussed in this thread)?
My assumption is u-boot was not passing the param to the kernel, (but I did not look into it, and don't remember when I last updated u-boot)
I am seeing that your board can see only 1GB out of 4GB, is that the issue you want to resolve?
Which U-boot do you use with which kernel?

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Thu Apr 30, 2020 4:38 am

yes, I'll have to update uboot and test again (kernel is mainline 5.4) was just wondering if you recall a related change in u-boot since way back then.

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Thu Apr 30, 2020 4:43 am

elatllat wrote:
Thu Apr 30, 2020 4:38 am
yes, I'll have to update uboot and test again (kernel is mainline 5.4) was just wondering if you recall a related change in u-boot since way back then.
Don't you use HK's stock U-boot? or Mainline U-boot?
Can you point me out the DTS what you are using?

elatllat
Posts: 1763
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4
Has thanked: 45 times
Been thanked: 113 times
Contact:

Re: Any plan for basic mainline linux support?

Post by elatllat » Thu Apr 30, 2020 4:49 am

One of your old U-boot builds, I'd like to get mainline U-boot working on the N2 but have not made the time. This dts...

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Thu Apr 30, 2020 5:07 am

elatllat wrote:
Thu Apr 30, 2020 4:49 am
One of your old U-boot builds, I'd like to get mainline U-boot working on the N2 but have not made the time. This dts...
This makes the kernel always recognize as 1GB only, it says literally 0x40000000.
https://git.kernel.org/pub/scm/linux/ke ... 5.4.36#n29

I've not run mainline U-boot yet, you should check if it recognize 4GB in U-boot regardless how much memory is recognized in the Linux kernel. And what I made is this patch, this one read a register AO_SEC_GP_CFG0 which gives a memory size, give this to the function 'fdt_fixup_memory_banks(...)'.
https://github.com/hardkernel/u-boot/co ... fc1fe7d9ee

Then, this function replace the memory size in the DTB which is loaded into memory just before booting.
https://github.com/hardkernel/u-boot/bl ... ort.c#L474

User avatar
tobetter
Posts: 5207
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Any plan for basic mainline linux support?

Post by tobetter » Fri May 01, 2020 2:50 pm

20200501 - Korean Labour day Edition

I've worked to upgrade the image with Linux kernel 5.7-rc3 from 5.4 as per the request of many users and more features are supported for regular users. Please download the image, Ubuntu 20.04 (Focal Fossa), and flash with the Etcher.

Note:
  • The Linux kernel 5.7-rc3 is installed.
  • Ubuntu 20.04 Ubuntu Desktop can be installed.
  • ARM Mali Bifrost kernel driver r24p0 is available.
  • Qt5 using EGL/Wayland is available.
  • HDMI stereo output is available
  • The minimal CPU frequency is set as 1000MHz
  • The default user account and its password is odroid and odroid
For Ubuntu Gnome Desktop users:
You can install Ubuntu Gnome Desktop on this server image.

Code: Select all

$ sudo apt update
$ sudo apt install ubuntu-desktop mali-bifrost-wayland-driver
$ sudo reboot
EDIT: I forgot to mention I appreciate to Amlogic kernel maintainers, and @brad and @odroidn2user helped me a lot for debugging and testing.
Last edited by tobetter on Sat May 02, 2020 1:01 am, edited 5 times in total.
These users thanked the author tobetter for the post (total 11):
mad_ady (Fri May 01, 2020 4:18 pm) • rooted (Fri May 01, 2020 4:20 pm) • Sav (Fri May 01, 2020 4:27 pm) • maier-johno (Fri May 01, 2020 4:28 pm) • brad (Fri May 01, 2020 5:12 pm) • DanDroid (Fri May 01, 2020 7:04 pm) • istanbulls (Fri May 01, 2020 7:37 pm) • hominoid (Sat May 02, 2020 12:06 am) • xabolcs (Sat May 02, 2020 6:50 am) • elatllat (Sat May 02, 2020 7:59 am) and one more user

User avatar
mad_ady
Posts: 8151
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 567 times
Been thanked: 404 times
Contact:

Re: Any plan for basic mainline linux support?

Post by mad_ady » Fri May 01, 2020 4:17 pm

You know, labour day needs to be honored with the lack of labour. We'll call it a hobby, so you don't break any rules... :D

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: Baidu [Spider] and 0 guests