[OS] Debian Bullseye for ODROID N1 (WIP)

Post Reply
User avatar
meveric
Posts: 12027
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: 82 times
Been thanked: 652 times
Contact:

[OS] Debian Bullseye for ODROID N1 (WIP)

Post by meveric »

This is my version of Debian Bullseye (11) 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.

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.

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.

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

Size compressed: 165MB
Size uncompressed: 1.3GB

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:
Both Chromium and Firefox should work fine with hardware accelerated browsing and WebGL support.

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.

Known Issues:
Vulkan support will not be available MESA developers dropped Vulkan support for Midgard Mali GPU architecture.
If you run the image from SD card reboot is not working.

My backported MESA drivers currently support both OpenGL ES and OpenGL up to version 3.1
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: 1907
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: 155 times
Been thanked: 426 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

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 12027
    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: 82 times
    Been thanked: 652 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: 12027
    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: 82 times
    Been thanked: 652 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: 1618
    Joined: Tue Mar 29, 2016 1:22 pm
    languages_spoken: english
    ODROIDs: C2 C4 HC4 N1 N2 N2+ H2 H2+ M1 (64 bit ftw)
    Location: Australia
    Has thanked: 186 times
    Been thanked: 256 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: 10037
    Joined: Fri Dec 19, 2014 9:12 am
    languages_spoken: english
    Location: Gulf of Mexico, US
    Has thanked: 788 times
    Been thanked: 587 times
    Contact:

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

    Post by rooted »

    Thanks for doing this.

    User avatar
    meveric
    Posts: 12027
    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: 82 times
    Been thanked: 652 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: 10037
    Joined: Fri Dec 19, 2014 9:12 am
    languages_spoken: english
    Location: Gulf of Mexico, US
    Has thanked: 788 times
    Been thanked: 587 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: 12027
    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: 82 times
    Been thanked: 652 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: 1801
    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: 165 times
    Been thanked: 361 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: 12027
    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: 82 times
    Been thanked: 652 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: 1801
    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: 165 times
    Been thanked: 361 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: 1801
    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: 165 times
    Been thanked: 361 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: 12027
    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: 82 times
    Been thanked: 652 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: 1801
    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: 165 times
    Been thanked: 361 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)

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 12027
    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: 82 times
    Been thanked: 652 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.

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 1801
    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: 165 times
    Been thanked: 361 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: 1618
    Joined: Tue Mar 29, 2016 1:22 pm
    languages_spoken: english
    ODROIDs: C2 C4 HC4 N1 N2 N2+ H2 H2+ M1 (64 bit ftw)
    Location: Australia
    Has thanked: 186 times
    Been thanked: 256 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: 1801
    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: 165 times
    Been thanked: 361 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: 12027
    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: 82 times
    Been thanked: 652 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.

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

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

    Post by mad_ady »

    Impressive!

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 12027
    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: 82 times
    Been thanked: 652 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.

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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.

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 12027
    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: 82 times
    Been thanked: 652 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.

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

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

    Post by mad_ady »

    Thanks, I'll try that

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 12027
    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: 82 times
    Been thanked: 652 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.

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 12027
    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: 82 times
    Been thanked: 652 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.

    User avatar
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 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: 12027
    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: 82 times
    Been thanked: 652 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.

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

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

    Post by mad_ady »

    @meveric - is the newest kernel you're building/using on N1 this one? https://oph.mdrjr.net/meveric/pool/n1/l ... rc7-arm64/ ? Or is it a different package name/location that hosts a more recent kernel?
    Thanks!

    Edit: Should I use this one instead?
    https://oph.mdrjr.net/meveric/pool/main ... 64-odroid/

    User avatar
    meveric
    Posts: 12027
    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: 82 times
    Been thanked: 652 times
    Contact:

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

    Post by meveric »

    https://oph.mdrjr.net/meveric/pool/main ... -upstream/
    The 5.17.5 is the current one.. the N1 specific Kernel I dropped after I confirmed that for arm64 one kernel is enough for all boards :)

    If you use my repository:
    https://oph.mdrjr.net/meveric/sources.l ... -main.list

    you can install it via:

    Code: Select all

    apt install linux-image-arm64-odroid linux-headers-arm64-odroid
    
    The one that you linked is the meta package that is installed for that.
    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
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 times
    Contact:

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

    Post by mad_ady »

    Thanks!

    Not sure it's safe to add your repo on top of my ubuntu, but I can install the kernel from deb instead...

    User avatar
    meveric
    Posts: 12027
    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: 82 times
    Been thanked: 652 times
    Contact:

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

    Post by meveric »

    should be fine the all/main package list should only have packages that are OS independent.. that's why I have different repos for wheezy, jessie, strech, buster, bullseye and of cause "all" ;)
    Kernel is a kernel independent packages... doesn't matter which OS. which is why it's in all/main.

    GPU drivers (MESA) for example is under bullseye/backports, as it depends on the OS version and as it replaces original packages with packages from a different version (backport from Debian Sid or Experimental).

    Also you can always put a option in your /etc/apt/preferences, which lowers the priority of that repository.
    Which means it will never be installed automatically, and always require specific option via apt to install packages from that repository.
    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
    mad_ady
    Posts: 11322
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, H2, Go, Go Advance, M1
    Location: Bucharest, Romania
    Has thanked: 647 times
    Been thanked: 1081 times
    Contact:

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

    Post by mad_ady »

    Ok, I tried to boot kernel 5.17, but my uboot had other plans:

    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)
    
    Model: Hardkernel ODROID-N1
    DRAM:  3.9 GiB
    PMIC:  RK808
    MMC:   mmc@fe320000: 1, sdhci@fe330000: 0
    Loading Environment from MMC... Card did not respond to voltage select!
    *** Warning - No block device, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    Model: Hardkernel ODROID-N1
    Net:
    Error: ethernet@fe300000 address not set.
    No ethernet found.
    
    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
    1975 bytes read in 19 ms (100.6 KiB/s)
    ## Executing script at 00500000
    14399368 bytes read in 395 ms (34.8 MiB/s)
    57313 bytes read in 20 ms (2.7 MiB/s)
    23072474 bytes read in 592 ms (37.2 MiB/s)
    Booting Linux 5.17.5-arm64 from mmc 0:1...
    kernel_comp_addr_r or kernel_comp_size is not provided!
    SCRIPT FAILED: continuing...
    
    My boot.scr is built from this:

    Code: Select all

    #
    # 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=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"
    setenv fk_kvers "5.17.5-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.17.5-arm64'
    fi
    
    if test -z "${distro_bootpart}"; then
      setenv partition ${bootpart}
    else
      setenv partition ${distro_bootpart}
    fi
    
    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}
    
    
    You had promissed an uncompressed vmlinuz... :D. After it was ungzipped, it booted just fine, thanks!

    Update: The fan seems to have been fixed. My Noctua fan is spinning nicely when running stress and the board doesn't go over 60C. Great! I will check other things as well (such as my ir-blaster), but it looks like it's solid!

    User avatar
    meveric
    Posts: 12027
    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: 82 times
    Been thanked: 652 times
    Contact:

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

    Post by meveric »

    my u-boot is slightly newer 2020.10 and already has configuration for compressed Kernel files.
    I guess you can configure it manually:

    Code: Select all

    kernel_comp_addr_r=0x08000000
    kernel_comp_size=0x2000000
    
    sadly my fan is still not fixed, I even switched out the fan since I suspected the fan might actually be damaged, but guess that's not the case.
    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.

    DarkBahamut
    Posts: 334
    Joined: Tue Jan 19, 2016 10:19 am
    languages_spoken: english
    ODROIDs: XU4, N1
    Has thanked: 0
    Been thanked: 0
    Contact:

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

    Post by DarkBahamut »

    meveric wrote:
    Fri May 13, 2022 3:53 am
    sadly my fan is still not fixed, I even switched out the fan since I suspected the fan might actually be damaged, but guess that's not the case.
    I recall around 5.10 RC5 they made a change to SPI handling that stopped my N1 fan working too. At the time I made this change and It's seemed to work normally ever since :)

    https://github.com/Emerald-Phoenix/odro ... 548107bb79

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

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

    Post by mad_ady »

    @DarkBahamut are you sure that patch affects fan? It's a change under SPI flash (which the N1 doesn't have on-board).

    I've added the change to my dtb:

    Code: Select all

    fdtput rk3399-odroid-n1.dtb /spi@ff1d0000/w25q128@0 spi-cs-high
    
    I'll give it a try later today, when I am allowed to make a scheduled downtime :D

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

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

    Post by mad_ady »

    Update - I made the change to the DTB and rebooted and yes, it seems to have made a difference. The fan seems to spin faster - at least I can hear it slowing down and starting up again - previously it wasn't noticeable. Also, temperature is 3-4 degrees lower under load. Most likely it hits 60C and uses a different fan speed and lowers the temperature quickly, starts to spin lower, but then the temperature rises and can't spin down.
    Anyway, thank you for the fix!

    @meveric - I've noticed one problem compared to my old 5.8 kernel - the eth0 NIC gets a random MAC address on boot. I couldn't see what causes it - no obvious e-fuse errors in dmesg:

    Code: Select all

    [    3.406317] Run /init as init process
    [    3.410426]   with arguments:
    [    3.410429]     /init
    [    3.410431]     earlyprintk
    [    3.410433]   with environment:
    [    3.410435]     HOME=/
    [    3.410437]     TERM=linux
    [    3.410439]     biosdevname=0
    [    3.740633] rk_gmac-dwmac fe300000.ethernet: IRQ eth_wake_irq not found
    [    3.748110] rk_gmac-dwmac fe300000.ethernet: IRQ eth_lpi not found
    [    3.755224] rk_gmac-dwmac fe300000.ethernet: PTP uses main clock
    [    3.762169] rk_gmac-dwmac fe300000.ethernet: clock input or output? (input).
    [    3.770122] rk_gmac-dwmac fe300000.ethernet: TX delay(0x28).
    [    3.776476] rk_gmac-dwmac fe300000.ethernet: RX delay(0x11).
    [    3.782878] rk_gmac-dwmac fe300000.ethernet: integrated PHY? (no).
    [    3.790306] rk_gmac-dwmac fe300000.ethernet: cannot get clock clk_mac_speed
    [    3.800989] rk_gmac-dwmac fe300000.ethernet: clock input from PHY
    [    3.813261] rk_gmac-dwmac fe300000.ethernet: init for RGMII
    [    3.823311] rk_gmac-dwmac fe300000.ethernet: User ID: 0x10, Synopsys ID: 0x35
    [    3.831382] rk_gmac-dwmac fe300000.ethernet:         DWMAC1000
    [    3.837278] rk_gmac-dwmac fe300000.ethernet: DMA HW capability register supported
    [    3.845705] rk_gmac-dwmac fe300000.ethernet: RX Checksum Offload Engine supported
    [    3.854130] rk_gmac-dwmac fe300000.ethernet: COE Type 2
    [    3.860017] rk_gmac-dwmac fe300000.ethernet: TX Checksum insertion supported
    [    3.863060] rockchip-vop ff8f0000.vop: Adding to iommu group 3
    [    3.867941] rk_gmac-dwmac fe300000.ethernet: Wake-Up On Lan supported
    [    3.879903] panfrost ff9a0000.gpu: clock rate = 500000000
    [    3.881931] rk_gmac-dwmac fe300000.ethernet: Normal descriptors
    [    3.894366] rk_gmac-dwmac fe300000.ethernet: Ring mode enabled
    [    3.896526] rk808-rtc rk808-rtc: registered as rtc0
    [    3.900897] rk_gmac-dwmac fe300000.ethernet: Enable RX Mitigation via HW Watchdog Timer
    [    3.900906] rk_gmac-dwmac fe300000.ethernet: device MAC address 12:bb:7d:ee:67:02
    
    
    I wonder if it happens for you too, or if it's caused by using a slightly older u-boot.
    The problem is the box gets a different link-local IPv6 address, and I advertise the old one as my DNS server. I guess time to either force a MAC on boot, or set up Unique local IPv6 addresses instead (https://datatracker.ietf.org/doc/html/rfc4193).

    User avatar
    meveric
    Posts: 12027
    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: 82 times
    Been thanked: 652 times
    Contact:

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

    Post by meveric »

    First thanks for the DTB patch I'm gonna try this later today as well.

    And yes the change with the MAC I noticed as well.
    That's why I have this as an option in my config.ini to set a fixed IP.
    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: 12027
    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: 82 times
    Been thanked: 652 times
    Contact:

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

    Post by meveric »

    DarkBahamut wrote:
    Thu May 26, 2022 4:39 pm
    I recall around 5.10 RC5 they made a change to SPI handling that stopped my N1 fan working too. At the time I made this change and It's seemed to work normally ever since :)

    https://github.com/Emerald-Phoenix/odro ... 548107bb79
    Nice git repo.. I probably gonna take over some of your changes in my Kernel build :)
    Thanks for keeping the N1 alive :)
    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: 12027
    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: 82 times
    Been thanked: 652 times
    Contact:

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

    Post by meveric »

    Update:
    Updated the base image to my unified Debian-Bullseye arm64 image with Kernel 6.1.0
    U-Boot has been update to version 2022.10 and overlay support is activated (not sure if it can be used for anything good yet).
    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 “Ubuntu/Debian”

    Who is online

    Users browsing this forum: No registered users and 1 guest