[OS] Debian Bullseye for ODROID N1 (WIP)

Post Reply
User avatar
meveric
Posts: 11357
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 58 times
Been thanked: 443 times
Contact:

[OS] Debian Bullseye for ODROID N1 (WIP)

Post by meveric »

This is my first version of Debian Bullseye (testing) with upstream Kernel support for the ODROID N1.

Due to the fact, that the Rockchip RK3399 hardware is one of the best supported ARM hardware in Linux Kernel at the moment I wanted to test what is currently available and working and was surprised to find that nearly everything worked out of the box.

This image is based on Debian Bullseye which is still under heavy development and therefore not considered stable.
Still it shows what is currently possible, which is quite a lot.

It's a headless server image only with user root. But it has all my repositories included, which allows for easy installation and updates of packages such as Kernel and Headers and other packages.
I currently included Debian Buster repository list as well, as in Debian Bullseye there aren't many packages available yet.

The image has my usual setup: means on first boot it's resizing the rootfs partition and configures SSH. It will automatically reboot after the initial setup after which this image is ready to use.
Kernel and headers are already installed if you need to build your own drivers.
A few basic tools such as htop, mc, vim and bash-completion are already installed for your convenience.
A full list of installed applications and dependencies can be found in the root of the image ("/").

Download: https://oph.mdrjr.net/meveric/images/Bu ... -N1.img.xz md5 sha512 sig

Size compressed: 186MB
Size uncompressed: 1104MB

Default Login: root
Default Password: odroid

It's ready to be used as a server image.

First things first:
Since there's constantly new development for this image and ODROIDs in general the First thing you should do after the image is up and running is to install all updates:

Code: Select all

apt update && apt upgrade && apt dist-upgrade
How to convert the image into a Desktop image:
The image can easily converted into a Desktop image looking similar to this:
Image

I created a setup tool that's already preinstalled:

Code: Select all

setup-odroid
Which should easily allow you to install a Desktop Environment.

You can even install Gnom3 under wayland:
Image

Hints:
Changing language:
If you install a Desktop environment you should already have keybord-configuration installed, it will ask upon the first installation what keyboard layout it should use.
This configuration is for your X11 Desktop so you have your desired keyboard layout.
For console you need to install console-setup to do the same, so just in case:

Code: Select all

apt-get install console-setup keyboard-configuration
dpkg-reconfigure keyboard-configuration
should be all that is needed to change your keyboard layout.
You probably want to set timezone as well

Code: Select all

dpkg-reconfigure tzdata
Setting up WLAN from command line
Edit the file /etc/network/interfaces or create a new one under /etc/network/interfaces.d/ and add the following lines

Code: Select all

auto wlan0
iface wlan0 inet dhcp
    wpa-essid <NAME-OF-YOUR-WLAN>
    wpa-psk <WLAN-PASSWORD>
If you're using a "hidden" network, please also add wpa-scan-ssid 1

Webbrowser:
While webbrowser is working, I don't think it uses hardware acceleration properly.
WebGL will work under FireFox but it's extremely slow so I don't think it uses hardware acceleration.
Chromium only finds MESA software renderer not sure why.

Kodi (X11):
Kodi will work "fine". You can use setup-odroid to install Kodi for X11 (should work under wayland as well).
It will not use hardware accelerated decoding, but will use GPU support and the CPU is fast enough to even show H265 1080p videos.

Please Note:
As good as this works at the moment, this is still a testing image and not everything might work.
Panfrost works out of the box, and supports OpenGL 2.1 as well as OpenGL ES 3.1

Known Issues:
I have some sound issues, which might be from my monitor that I use, but I doubt that.
The sound cracks up a lot which will disappear if I reduce overall volume in Linux.
I can however increase volume of the Monitor without issues compensating for the lower volume in Linux.

The version of MESA in Debian Bullseye currently only supports OpenGL ES 1.1 and 2.0 it does not support 3.0, 3.1, 3.2 as the hardware would.
Aside from that OpenGL 2.1 profile does work as well.
I backported MESA from sid, which has support for OpenGL ES 3.0 as well as other OpenGL features.
It can be installed from my repostitories.

If you run the image from SD card reboot is not working.
These users thanked the author meveric for the post (total 3):
AreaScout (Mon Nov 02, 2020 3:20 am) • brad (Mon Nov 02, 2020 7:06 am) • hominoid (Mon Nov 02, 2020 11:13 pm)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

AreaScout
Posts: 1588
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 91 times
Been thanked: 264 times
Contact:

Re: [OS] Debian Bullseye for ODROID N1 (WIP)

Post by AreaScout »

    This is very good, now I can successfully test the vendor with the best Panfrost support :) :ugeek:

    RG

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    meveric, whatever possesed you to create an image for an EOL board that has maybe 30 boards in the wild and is loved by all who have it?
    Though I'm not a regular Debian user I feel compelled to steal the kernel and use it on my in-house Ubuntu. Could you share your kernel config so I can validate it has docker support and gpio-ir-tx?
    Also - are you running mainline uboot?
    Thanks!

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    mad_ady wrote:
    Mon Nov 02, 2020 4:35 am
    meveric, whatever possesed you to create an image for an EOL board that has maybe 30 boards in the wild and is loved by all who have it?
    Though I'm not a regular Debian user I feel compelled to steal the kernel and use it on my in-house Ubuntu.
    As you said it's kinda a favorite of mine as well and I wanted to see how Panfrost performs on a SoC that is "fully" supported.
    It was also good training to maybe get other boards up and running with mainline as well.
    I learned a lot at least :)

    mad_ady wrote:
    Mon Nov 02, 2020 4:35 am
    Could you share your kernel config so I can validate it has docker support and gpio-ir-tx?
    Also - are you running mainline uboot?
    Thanks!
    I only used the stuff that is in the Trying to get mainline kernel working on N1 thread.
    Including the config for the Kernel and the U-Boot :)
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    I backported MESA 20.2.1 from Debian Sid to Debian Bullseye which can be installed from my repository.
    Panfrost now has OpenGL ES 3.0 support as well as more OpenGL features in total.
    Funny though, Wayland performance went down from over 1700 FPS tops to 1100 FPS
    But X11 performance went up a little.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    brad
    Posts: 1355
    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: 117 times
    Been thanked: 168 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by brad »

    Thanks @meveric will move my board over soon :) I'm getting sick of seeing this "Linux odroid 4.4.114-21 #1 SMP Mon Mar 19 01:05:12 UTC 2018 aarch64 GNU/Linux"

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

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by rooted »

    Thanks for doing this.

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    Update:
    I've updated the base image with newer version of u-boot.
    I also fixed SD card support which is now working (without UHS support at the moment it seems).
    These users thanked the author meveric for the post:
    joerg (Tue Nov 10, 2020 11:41 pm)
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

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

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by rooted »

    Don't use it anyway but it's nice to know it's working.

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    well for me it was annoying, I was using a 16GB eMMC originally as most of the software was on the network.
    But since I now start with an entire new image I first have to test the software directly on the system and probably start over and over again several times.
    And 16GB doesn't hold much data, but I still had a 128 GB SD laying around from my GO2 testing so that is something that's very handy for testing :)
    But not being able to boot from is was really annoying :D

    I wanna test some Windows games on it with wine and so on therefore I need quite a bit of space :)
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    User avatar
    joerg
    Posts: 1248
    Joined: Tue Apr 01, 2014 2:14 am
    languages_spoken: german, english, español
    ODROIDs: C1, C1+, C2, N1, N2, C4
    Location: Germany
    Has thanked: 79 times
    Been thanked: 163 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by joerg »

    @meveric: Thank you very much for this. I am on the way to rebuild my N1 NAS with two new harddisks and with your Debian image. I installed it on a 64GB Sandisk Extreme as I don't want yet overwrite the emmc that has a working system. So far it has booted, now I will continue to install OMV and Nextcloud, I will report after.

    [edit]
    It turns out that OMV5 needs php7.3 that is not installable on Bullseye. Currently I am compiling php7.3. Don't know if the decencies will be met to install OMV5...

    [edit]
    It stucks at

    Code: Select all

    The following packages have unmet dependencies:
     php-pam : Depends: phpapi-20180731 but it is not installable
    
    I wonder how I can make this virtual package phpapi by myself. I haven't found so far...

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    php7.3 is Debian Buster, since this is bullseye it's a little ahead, although it's odd that it's not downward compatible.
    Instead of compiling it yourself you can also try adding:
    https://packages.sury.org/php/

    Code: Select all

    apt install wget
    wget -O- https://packages.sury.org/php/apt.gpg | apt-key add -
    echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list
    apt update
    
    although it's for buster, it should be compatible with bullseye as well (I hope) and it has different versions of php available that you can install.
    It will also give you security updates and fixes, which is not the case if you compile it yourself.

    It should provide packages for php 5.6, 7.0. 7.1 7.2 7.3 7.4 and 8.0 so even if the requirements of OMV change you should be covered for some time :)
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    User avatar
    joerg
    Posts: 1248
    Joined: Tue Apr 01, 2014 2:14 am
    languages_spoken: german, english, español
    ODROIDs: C1, C1+, C2, N1, N2, C4
    Location: Germany
    Has thanked: 79 times
    Been thanked: 163 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by joerg »

    I will try it, thank you.
    But later this week, because I installed back the emmc to have my NAS online.

    User avatar
    joerg
    Posts: 1248
    Joined: Tue Apr 01, 2014 2:14 am
    languages_spoken: german, english, español
    ODROIDs: C1, C1+, C2, N1, N2, C4
    Location: Germany
    Has thanked: 79 times
    Been thanked: 163 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by joerg »

    @meveric: I was able to install php7.3 with the buster sources. :)

    Then I installed OMV5 as is written here for buster: https://forum.openmediavault.org/index. ... 10-buster/
    I had to disable apache2.
    And I had to install an additional php package php7.3-xml as there was an error Uncaught Error: Class 'DOMDocument' not found

    OMV5 now is coming up. Let's see if I can adjust it with all options i have on the old system.

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    glad to see it's coming together.. Hope it works out :)
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    User avatar
    joerg
    Posts: 1248
    Joined: Tue Apr 01, 2014 2:14 am
    languages_spoken: german, english, español
    ODROIDs: C1, C1+, C2, N1, N2, C4
    Location: Germany
    Has thanked: 79 times
    Been thanked: 163 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by joerg »

    It was as much work as I expected. :(
    I had to export the Nextcloud database from the old system and import it to the new system, to have all the contacts and the calendar entries restored.
    But I had to learn step by step to come to this. On the new system (Bullseye with OMV5) I had to use the old Nextcloud 15 first. I was not able to update Nextcloud from within the gui, the button was missing although I use php7.3. So I had to rename the whole Nextcloud folder and to unzip the next higher update to 16 and to restore the config and the data folder from 15 to 16. The same with 17. The same with 18. The same with 19....Stop! No, I wasn't able to fix a server error with 19. I must stay with Nextcloud 18. :(
    It would be possible to install Nextcloud 20, but I would loose all as the Nextcloud database would be created new.
    Then I uninstalled OMV5 by mistake and I had to learn how to reinstall it. :(
    I had some trouble with apt-get update as the system time didn't synchronize after reboot. I learned that with OMV the package chrony is needed. But chrony service was masked. I enabled the service and put one additional line into the service:

    Code: Select all

    ExecStartPost=/usr/bin/chronyc -a makestep
    This makes the system time synchronized after start up. (It seems to work :))
    Next, I had also trouble with OMV logon errors. I found at the end, that the openmediavault-engined.service was also masked and didn't start after reboot.
    I unmasked and enabled it with:

    Code: Select all

    sudo systemctl unmask openmediavault-engined
    sudo systemctl enable openmediavault-engined
    
    BTW, @meveric, you know that the N1 does not make reboot? It does start after power cycle or with press PWR button. (Not so important for me as it should stay on 24/7)

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Does it reboot correctly with reboot -f? My N1, on kernel 5.7.0 rc5 reboots correctly, but a while ago reboot was problematic. There might be some patch missing (in u-boot?)

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    mad_ady wrote:
    Mon Nov 16, 2020 4:49 am
    Does it reboot correctly with reboot -f? My N1, on kernel 5.7.0 rc5 reboots correctly, but a while ago reboot was problematic. There might be some patch missing (in u-boot?)
    For me, reboot from eMMC works fine, but reboot from SD always hangs and you need to press the reset button.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    You may be right - I only use emmc with N1. So mine may behave the same way.

    User avatar
    joerg
    Posts: 1248
    Joined: Tue Apr 01, 2014 2:14 am
    languages_spoken: german, english, español
    ODROIDs: C1, C1+, C2, N1, N2, C4
    Location: Germany
    Has thanked: 79 times
    Been thanked: 163 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by joerg »

    Funny, now the Updater button was present in Nextcloud and I could do the update from 18.0.4 to 18.0.11 to 19.0.5 to 20.0.2. :)
    Sometimes it's good to wait...

    brad
    Posts: 1355
    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: 117 times
    Been thanked: 168 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by brad »

    I will take a look at sd card, UHS mode and sd reboot issue once I get my new drives for the HC4 and migrate my data (hopefully by the end of the week).

    I suspect the sd card reset line is not working so kernel cannot reset to UHS modes and also the reboot can not reset to standard mode for trusted firmware to find the initial bootloader code.
    These users thanked the author brad for the post:
    meveric (Mon Nov 16, 2020 10:23 pm)

    User avatar
    joerg
    Posts: 1248
    Joined: Tue Apr 01, 2014 2:14 am
    languages_spoken: german, english, español
    ODROIDs: C1, C1+, C2, N1, N2, C4
    Location: Germany
    Has thanked: 79 times
    Been thanked: 163 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by joerg »

    Thank you @brad. But do this work only if you find it important. For me it's not so important, as I hope that the N1 with Bullseye and mainline kernel runs as stable that I don't need to reboot for really long time.

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    Just to show off:
    System details, to show it's running on the N1 using experimental OpenGL 3.3 backend for Panfrost:
    https://oph.mdrjr.net/meveric/other/Vid ... tor2-1.mp4

    In game graphics:
    https://oph.mdrjr.net/meveric/other/Vid ... tor2-2.mp4

    The game seems to run at full speed, I did not experience any lagging.
    It's the x86 version of KotoR II which requires OpenGL 3.x to work.
    In fact it even works with OpenGL 2.1 (default for Panfrost) but videos won't work.

    Since this is an x86 game it runs on box86 from @ptitSeb

    It's amazing, that is two out of three games that I want to run on ODROIDs :D
    And the third game already work but is just too slow.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Impressive!

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Ok, just to show everyone what a leach I can be, I tried to steal meveric's kernel and install it on my Ubuntu 20.04 running on N1 (was running kernel 5.8 previously). And I failed to make it boot - not sure exactly why.
    First I copied the kernel, dtb, modules to the right places (for me the kernel lives in /media/boot/boot along with boot.scr). I even took meveric's original boot.scr and adapted it to my needs (looks like this after recompilation):

    Code: Select all

    $ strings boot.scr
    # flash-kernel: bootscr.odroid-n1
    ##!/bin/bash
    #mkimage -A arm64 -T script -O linux -d boot.txt boot.scr
    # Bootscript using the new unified bootcmd handling
    # Expects to be called with the following environment variables set:
    #  devtype              e.g. mmc/scsi etc
    #  devnum               The device number of the given type
    #  bootpart             The partition containing the boot files
    #  distro_bootpart      The partition containing the boot files
    #                       (introduced in u-boot mainline 2016.01)
    #  prefix               Prefix within the boot partiion to the boot files
    #  kernel_addr_r        Address to load the kernel to
    #  fdt_addr_r           Address to load the FDT to
    #  ramdisk_addr_r       Address to load the initrd to.
    # The uboot must support the booti and generic filesystem load commands.
    #setenv bootargs " ${bootargs} root=UUID=a977a8c4-0492-48d9-9876-8f53ac858a41 rootwait ro"
    setenv bootargs " earlyprintk root=/dev/mmcblk1p2 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro console=ttyS2,115200n8 cma=800M clk_ignore_unused usb-storage.quirks=0x174c:0x1153:u,0x152d:0x0578:u"
    setenv fk_kvers "5.10.0-rc7-arm64"
    setenv fdtfile "rk3399-odroid-n1.dtb"
    setenv prefix "/boot/"
    setenv fdt_addr_r "0x20000000"
    if test -z "${fk_kvers}"; then
       setenv fk_kvers '5.10.0-rc1-arm64'
    if test -z "${distro_bootpart}"; then
      setenv partition ${bootpart}
    else
      setenv partition ${distro_bootpart}
    load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers}
    load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}${fdtfile}
    load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers}
    echo "Booting Linux ${fk_kvers} from ${devtype} ${devnum}:${partition}..."
    booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
    
    
    
    The kernel, dtb and initrd are as follows:

    Code: Select all

    -rwxr-xr-x 1 root root  8759572 Dec 26 18:57 initrd.img-5.10.0-rc7-arm64
    -rwxr-xr-x 1 root root    57639 Dec 26 17:31 rk3399-odroid-n1.dtb
    -rwxr-xr-x 1 root root 11919230 Dec 11 15:37 vmlinuz-5.10.0-rc7-arm64
    
    However, uboot complains that:

    Code: Select all

    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    Scanning mmc 0:1...
    Found U-Boot script /boot/boot.scr
    1948 bytes read in 19 ms (99.6 KiB/s)
    ## Executing script at 00500000
    syntax error
    SCRIPT FAILED: continuing...
    
    Not sure where the syntax error is... When I get my next manintenance window I'll try to execute each line manually to see what happens....

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    You if statement for partition is not closed.
    Also I'm not sure if you use prefix correctly.
    That one would try to find everything in a subfolder called boot
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Thanks, I missed the ending if statement while .... borrowing your code.
    The /boot subfolder is correct for my case.

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Ok, I figured out why the "fi" statements were missing - I ran strings on your boot.scr and "fi" by itself was too short of a string and didn't get printed out. I should have used cat instead. Lesson learned!

    I fixed boot.scr and it still failed to boot. Here are the boot commands ran manually and the error I get:

    Code: Select all

    odroidn1 => 
    odroidn1 => setenv bootargs " earlyprintk root=/dev/mmcblk1p2 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro console=ttyS2,115200n8 cma=800M clk_ignore_unused usb-storage.quirks=0x174c:0x1153:u,0x152d:0x0578:u"
    odroidn1 => setenv fk_kvers "5.10.0-rc7-arm64"
    odroidn1 => setenv fdtfile "rk3399-odroid-n1.dtb"
    odroidn1 => setenv prefix "/boot/"
    odroidn1 => setenv fdt_addr_r "0x20000000"
    odroidn1 => if test -z "${fk_kvers}"; then
    >    setenv fk_kvers '5.10.0-rc1-arm64'
    > fi
    odroidn1 => printenv fk_kvers
    fk_kvers=5.10.0-rc7-arm64
    odroidn1 => if test -z "${distro_bootpart}"; then
    >   setenv partition ${bootpart}
    > else
    >   setenv partition ${distro_bootpart}
    > fi
    odroidn1 => 
    odroidn1 => printenv partition
    partition=1 
    odroidn1 => printenv devtype
    ## Error: "devtype" not defined
    odroidn1 => printenv devnum
    ## Error: "devnum" not defined
    odroidn1 => printenv $devtype
    ## Error: "mmc" not defined
    odroidn1 => printenv ${devtype}
    ## Error: "mmc" not defined
    odroidn1 => printenv $devnum
    ## Error: "0" not defined
    odroidn1 => printenv $kernel_addr_r
    ## Error: "0x02080000" not defined
    odroidn1 => printenv $fdt_addr_r
    ## Error: "0x20000000" not defined
    odroidn1 => printenv $ramdisk_addr_r
    ## Error: "0x06000000" not defined
    odroidn1 => load ${devtype} ${devnum}:${partition} ${kernel_addr_r} ${prefix}vmlinuz-${fk_kvers}
    11919230 bytes read in 301 ms (37.8 MiB/s)
    odroidn1 => load ${devtype} ${devnum}:${partition} ${fdt_addr_r} ${prefix}${fdtfile}
    57639 bytes read in 26 ms (2.1 MiB/s)
    odroidn1 => load ${devtype} ${devnum}:${partition} ${ramdisk_addr_r} ${prefix}initrd.img-${fk_kvers}
    8759572 bytes read in 245 ms (34.1 MiB/s)
    odroidn1 => echo "Booting Linux ${fk_kvers} from ${devtype} ${devnum}:${partition}..."
    Booting Linux 5.10.0-rc7-arm64 from mmc 0:1...
    odroidn1 => echo $filesize
    85a914
    odroidn1 => booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
    kernel_comp_addr_r or kernel_comp_size is not provided!
    
    I'm guessing the difference is in u-boot version (or compile options). My uboot is probably older than yours:

    Code: Select all

    
    U-Boot TPL 2020.07-rc3-00048-ga08e0a28eb-dirty (May 30 2020 - 21:42:06)
    Channel 0: DDR3, 800MHz
    BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
    Channel 1: DDR3, 800MHz
    BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
    256B stride
    256B stride
    Trying to boot from BOOTROM
    Returning to boot ROM...
    
    U-Boot SPL 2020.07-rc3-00048-ga08e0a28eb-dirty (May 30 2020 - 21:42:06 -0400)
    Trying to boot from MMC2
    NOTICE:  BL31: v2.3(release):v2.3-107-gdd1eb34aa
    NOTICE:  BL31: Built : 21:42:00, May 30 2020
    
    
    U-Boot 2020.07-rc3-00048-ga08e0a28eb-dirty (May 30 2020 - 21:42:06 -0400)
    
    Next I'll try to steal your uboot as well and see how that goes... :D I'll have to be careful not to nuke my partition table...

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    there was an error I did on the last kernel.. which apparently didn't matter with my uboot but may be an issue with yours.
    The vmlinuz-5.10.0-rc7-arm64 is actually compressed but you want an uncompressed one.
    change the name to vmlinuz-5.10.0-rc7-arm64.gz use gunzip to uncompress it and try again.
    My next Kernel has this fixed again.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Thanks, I'll try that

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Ok, this time - success! I can confirm that your 5.10.3-arm64 runs fine on my Ubuntu N1 :)
    I still had issues:
    - emmc became mmcblk2 instead of mmcblk1 (and my rootfs was not mounted by UUID, fixed it on my side)
    - the initrd - the one copied from your image fails to boot because it can't find :

    Code: Select all

    Begin: Running /scripts/local-block ... done.
    Begin: Running /scripts/local-block ... done.
    Begin: Running /scripts/local-block ... done.
    done.
    Gave up waiting for root file system device.  Common problems:
     - Boot args (cat /proc/cmdline)
       - Check rootdelay= (did the system wait long enough?)
     - Missing modules (cat /proc/modules; ls /dev)
    ALERT!  /dev/disk/by-uuid/52662db4-d4fa-434f-b6ff-75eab420603b does not exist.  Dropping to a shell!
    
    
    BusyBox v1.30.1 (Debian 1:1.30.1-6) built-in shell (ash)
    Enter 'help' for a list of built-in commands.
    
    (initramfs) cat /proc/cmdline
     earlyprintk root=UUID=a130ca78-0841-400a-8823-06a304a00850 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes mitigations=off rootwait ro console=ttyS2,115200n8 cma=800M clk_ignore_unused usb-storage.quirks=0x174c:0x1153:u,0x152d:0x0578:u
    (initramfs) blkid
    /dev/mmcblk2p1: SEC_TYPE="msdos" LABEL_FATBOOT="boot" LABEL="boot" UUID="AAAA-BBBB" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="630bb630-01"
    /dev/mmcblk2p2: LABEL="rootfs" UUID="a130ca78-0841-400a-8823-06a304a00850" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="630bb630-02"
    /dev/sdb1: UUID="585826ea-f84f-578c-5a00-8477c557061a" TYPE="linux_raid_member" PARTLABEL="primary1" PARTUUID="0f4e09a0-0b94-4e84-ad81-27bcdac76162"
    /dev/sdb2: UUID="fe63ac7f-2a4b-5df6-5a00-8477c557061a" TYPE="linux_raid_member" PARTLABEL="primary2" PARTUUID="cffcdeda-63cd-4a0f-8dea-57ddd5871c4a"
    /dev/sdb3: UUID="b0fd946f-37d1-aec0-5a00-8477c557061a" TYPE="linux_raid_member" PARTLABEL="primary3" PARTUUID="6e1322cf-f880-4714-ad2c-751cba6d711a"
    /dev/sdb4: UUID="f722c7ae-496c-6306-bb26-17a5f4338677" UUID_SUB="c7eb2f4b-5781-47db-8be4-9e1c78a28d62" LABEL="MyBookWorld:2" TYPE="linux_raid_member" PARTLABEL="primary4" PARTUUID="e523e666-b50e-4e85-9c45-9f37b49909b2"
    /dev/sda1: LABEL="ssd480_venus" UUID="a21c689b-dc6a-46cb-b650-f79d4bf46e9a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="000ef0d0-01"
    /dev/sdc1: LABEL="4TB" UUID="5c4d416f-5bce-46e5-b628-2f822cff6d59" BLOCK_SIZE="4096" TYPE="xfs" PARTLABEL="primary" PARTUUID="f605e7fe-df4c-4ddc-acd4-ea3a71b7f496"
    (initramfs) ls -l /dev/disk/by-uuid/
    total 0
    lrwxrwxrwx    1 0        0               10 Jan  1 00:00 5c4d416f-5bce-46e5-b628-2f822cff6d59 -> ../../sdc1
    lrwxrwxrwx    1 0        0               15 Jan  1 00:00 AAAA-BBBB -> ../../mmcblk2p1
    lrwxrwxrwx    1 0        0               15 Jan  1 00:00 a130ca78-0841-400a-8823-06a304a00850 -> ../../mmcblk2p2
    lrwxrwxrwx    1 0        0               10 Jan  1 00:00 a21c689b-dc6a-46cb-b650-f79d4bf46e9a -> ../../sda1
    
    
    Presumably that's the uuid of your image's rootfs. So I ended up using my old initrd and the system booted just fine.
    One thing I've noticed is the fan doesn't start. I haven't changed the trip points, but it seems to enter thermal throttling at 70C and fan doesn't start. I set the fan speed via dtb:

    Code: Select all

    sudo fdtput -t x rk3399-odroid-n1.dtb /pwm-fan cooling-levels 0x0 0x50 0x96 0xff
    
    Docker and modules were all there, so thanks for your work!

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    I have issues with the fan myself. I actually put the powerlevels to 255 and even then it's just like a slight breeze.
    I think the power regulator is not working correctly, but it's already at 5.5V I think kinda the highest that exists or else I'd have tried to use a higher power regulator for the fan.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    Hmm, odd... It works on 5.8.0 (built from tobetter's branch (I think). Do you think the difference may be in the dtb? I'll check when I get a bit of time...

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    I used the dtb/dts that was in the other thread: viewtopic.php?f=155&t=33373&start=132

    So haven't changed anything here, still I'm not sure.
    If you find out what could be the problem, let me know, cause I'd really like to have that working as well.
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    mad_ady
    Posts: 9049
    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: 595 times
    Been thanked: 573 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by mad_ady »

    You're right, it behaves the same way with the old 5.8 DTB. What 5.10 branch did you use to build your kernel? The official one (mainline), or some other one? I want to look for differences in PWM driver, see if I can spot something.

    User avatar
    meveric
    Posts: 11357
    Joined: Mon Feb 25, 2013 2:41 pm
    languages_spoken: german, english
    ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
    Has thanked: 58 times
    Been thanked: 443 times
    Contact:

    Re: [OS] Debian Bullseye for ODROID N1 (WIP)

    Post by meveric »

    mad_ady wrote:
    Mon Dec 28, 2020 8:13 pm
    You're right, it behaves the same way with the old 5.8 DTB. What 5.10 branch did you use to build your kernel? The official one (mainline), or some other one? I want to look for differences in PWM driver, see if I can spot something.
    The "Master" package (up to rc7) were directly from Linus.
    The new 5.10.3 comes from the linux stable kernel tree: https://git.kernel.org/pub/scm/linux/ke ... /linux.git
    Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
    Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
    If you want to add my repository to your image read my HOWTO integrate my repo into your image.

    Post Reply

    Return to “Projects”

    Who is online

    Users browsing this forum: No registered users and 2 guests