Armbian for Odroid N2

etcetera
Posts: 13
Joined: Fri Feb 15, 2019 11:31 pm
languages_spoken: english, german
ODROIDs: 3 x N2, 1 x N2+
Location: Switzerland
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Armbian for Odroid N2

Post by etcetera »

Dear Readers


I want to use smartmontools on my external USB Seagate disks.

On other operating systems I used usb-storage quirks to blacklist uas and use usb-storage instead.

I can see the quirks under /sys/module/usb_storage/parameters/quirks but lsusb -t shows that uas is still being used.

There is no usb-storage.ko under /lib/modules/...

I am running Armbian 5.9.14-meson64 #20.11.3 SMP PREEMPT Fri Dec 11 21:02:17 CET 2020 aarch64 GNU/Linux on Odroid N2.

I appreciate any hints you might have.


Regards
etcetera

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

etcetera wrote:
Tue Dec 15, 2020 8:41 pm
I want to use smartmontools on my external USB Seagate disks.

On other operating systems I used usb-storage quirks to blacklist uas and use usb-storage instead.
On Armbian this is done automatically for last 7 -8 years ... but sadly this doesn't work this way only on Odroid N2 since its among last ones that uses Hardkernel standard / proprietary boot script. Fix is in the work.

You need to add something like this:
usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u to your /boot/boot.ini kernel parameter line. Usb storage support is build into the kernel.
These users thanked the author igorpec for the post:
etcetera (Wed Dec 16, 2020 10:34 pm)
ARMBIAN
Linux for ARM development boards
What is Armbian?

etcetera
Posts: 13
Joined: Fri Feb 15, 2019 11:31 pm
languages_spoken: english, german
ODROIDs: 3 x N2, 1 x N2+
Location: Switzerland
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Armbian for Odroid N2

Post by etcetera »

Dear igorpec


Thank you for your answer and explanations.

On my machine the file /boot/boot.ini reads in the file /boot/armbianEnv.txt. The file /boot/armbianEnv.txt has a line with usbstoragequirks.

I verified that the usbstoragequirks are active like this:

Code: Select all

# cat /sys/module/usb_storage/parameters/quirks 
0x2537:0x1066:u,0x2537:0x1068:u,0x0bc2:0x3321:u,0x0bc2:0xab38:u,0x0bc2:0xab44:u,0x0bc2:0xab45:u
Can the problem be that there is no module usb-storage.ko in my standard distribution?


Regards
etcetera

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

etcetera wrote:
Tue Dec 15, 2020 9:39 pm
Can the problem be that there is no module usb-storage.ko in my standard distribution?
Primary problem is that you are asking for help without providing any logs. I am engineer, not a wizard :)

Did you add your USB drive ID? We only cover well known buggy one, but not all that exists on the market.
These users thanked the author igorpec for the post:
etcetera (Wed Dec 16, 2020 10:34 pm)
ARMBIAN
Linux for ARM development boards
What is Armbian?

etcetera
Posts: 13
Joined: Fri Feb 15, 2019 11:31 pm
languages_spoken: english, german
ODROIDs: 3 x N2, 1 x N2+
Location: Switzerland
Has thanked: 13 times
Been thanked: 1 time
Contact:

Re: Armbian for Odroid N2

Post by etcetera »

Dear igorpec and other readers


Sorry for not being precise. I am new to Armbian and do not fully understand the boot process of the Odroid N2.

I made further investigations and want to share some observations.

I have an external USB Seagate disk with vendor id 0x0bc2 and product id 0xab38. Remember: I want that the system uses the driver usb-storage instead of uas in order to be able to use smartmontools.

The system information is like this the following.

Code: Select all

# uname -a
Linux odroidn2 5.9.14-meson64 #20.11.3 SMP PREEMPT Fri Dec 11 21:02:17 CET 2020 aarch64 GNU/Linux

First case – Standard Armbian

The first case is based on standard Armbian – especially without changes to files in the directory /boot.

After booting with the external disk plugged in I run the following commands.

Code: Select all

# cat /sys/module/usb_storage/parameters/quirks 
0x2537:0x1066:u,0x2537:0x1068:u,0x0bc2:0xab38:u,0x0bc2:0xab44:u,0x0bc2:0xab45:u

Code: Select all

# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/3p, 5000M
            |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 4, If 0, Class=Hub, Driver=hub/3p, 480M
The second command shows that the driver uas is used.

After plugging out and plugging in again the external disk I get the following.

Code: Select all

# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 5, If 0, Class=Hub, Driver=hub/3p, 5000M
            |__ Port 1: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 5, If 0, Class=Hub, Driver=hub/3p, 480M
 
The command shows that now the driver usb-storage is used.

It seems that the quirks shown under /sys/module/usb_storage/parameters/quirks are not active if the disk is plugged in at boot time.


Second case – quirks in /boot/boot.ini

I change the file /boot/boot.ini to include quirks like the following:

Code: Select all

# diff /boot/boot.ini /boot/boot.ini_orig 
113c113
< setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} ${bootsplash} cvbscable=${cvbscable} overscan=${overscan} consoleblank=0 usb-storage.quirks=0x0bc2:0xab38:u"
---
> setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 elevator=noop hdmimode=${hdmimode} cvbsmode=576cvbs max_freq_a53=${max_freq_a53} max_freq_a73=${max_freq_a73} maxcpus=${maxcpus} voutmode=${voutmode} ${cmode} disablehpd=${disablehpd} ${bootsplash} cvbscable=${cvbscable} overscan=${overscan} consoleblank=0"
After rebooting I run the following commands.

Code: Select all

# cat /sys/module/usb_storage/parameters/quirks 
0x2537:0x1066:u,0x2537:0x1068:u,0x0bc2:0xab38:u,0x0bc2:0xab44:u,0x0bc2:0xab45:u
This shows the same result as in the first case.

Code: Select all

# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/3p, 5000M
            |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 3, If 0, Class=Hub, Driver=hub/3p, 480M
This shows that the driver usb-storage is used.


Summary

It seems that I was confused about quirks showing up under /sys/module/usb_storage/parameters/quirks and not being active at boot time.

I added the quirks to the file /boot/boot.ini and the desired driver usb-storage is used after booting. This is the behaviour that I need. I wonder whether there is a better solution than changing /boot/boot.ini.


Regards
etcetera

trwn2p
Posts: 36
Joined: Fri Oct 16, 2020 5:12 am
languages_spoken: english
ODROIDs: N2 Plus
Has thanked: 2 times
Been thanked: 7 times
Contact:

Re: Armbian for Odroid N2

Post by trwn2p »

Anybody managed to get a patched 5.10.x kernel with mesa 20.3/21.0 installed? This would allow a panfrost powered desktop to be installed afterwards simply using apt. I'm not interested in any prebuilt desktops from armbian atm. Maybe down the road.

Archetech

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

We are thinking to change our default shell to ZSH but we would like to hear your opinion.
Do you support the decision?
.
.
.
zshtmux-m.jpg
zshtmux-m.jpg (11.07 KiB) Viewed 775 times
.
.
.
ARMBIAN
Linux for ARM development boards
What is Armbian?

loredin
Posts: 44
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 11 times
Been thanked: 0
Contact:

Re: Armbian for Odroid N2

Post by loredin »

Hi soory for being lazy and not going through the whole thread but a search after "petitboot" did not match my usecase.
Can someone tell me if my boot.ini in the post looks correct for being abe to boot on multi OS installed on a single emmc card :

viewtopic.php?p=318284#p318284

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

Added several new automated preview desktop and CLI images:

Focal budgie desktop, 5.10.7, 775M Jan 18 2021 # Ubuntu 20.04 based
Focal deepin desktop, 5.10.7, 983M Jan 18 2021 # Ubuntu 20.04 based
Focal gnome desktop, 5.10.7, 744M Jan 18 2021 # Ubuntu 20.04 based
Focal mate desktop, 5.10.7, 799M Jan 18 2021 # Ubuntu 20.04 based
Focal xfce desktop, 5.10.7, 748M Jan 18 2021 # Ubuntu 20.04 based
Hirsute CLI nightly, 5.10.7, 284M Jan 18 2021 # Ubuntu 21.04 based

Video / desktop acceleration upgrade ready - when stable enough. Build with enhanced Armbian build machine.
ARMBIAN
Linux for ARM development boards
What is Armbian?

Viald
Posts: 80
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 5 times
Contact:

Re: Armbian for Odroid N2

Post by Viald »

I tried the last Armbian Buster image on SD card. Boot and installation were ok, and the system is running well.
I tried the same image on my USB SSD, but the installation didn't start. It seems that the system crashed just after petitboot run kexec.
I have no log from the console.
I upgrade my N2 with the last version of petitboot (20201222), the issue is still the same.

Any idea ?
Thank you

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

Viald wrote:
Sat Jan 23, 2021 3:44 am
I tried the last Armbian Buster image on SD card. Boot and installation were ok, and the system is running well.
I tried the same image on my USB SSD, but the installation didn't start. It seems that the system crashed just after petitboot run kexec.
I have no log from the console.
I upgrade my N2 with the last version of petitboot (20201222), the issue is still the same.

Any idea ?
Thank you
We don't maintain Petitboot, Hardkernel does and I hope they fix this soon - I don't know what is the origin of this problem. Have to investigate.
ARMBIAN
Linux for ARM development boards
What is Armbian?

Viald
Posts: 80
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 5 times
Contact:

Re: Armbian for Odroid N2

Post by Viald »

Thank you for your feedback.
If you don't support petitboot, what other bootloader do you recommend for the N2 which works with USB disk ?

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

Viald wrote:
Sat Jan 23, 2021 3:06 pm
Thank you for your feedback.
If you don't support petitboot, what other bootloader do you recommend for the N2 which works with USB disk ?
Perhaps this way https://forum.armbian.com/topic/11741-b ... d-with-n2/ but I didn't try it yet.
ARMBIAN
Linux for ARM development boards
What is Armbian?

Viald
Posts: 80
Joined: Thu Aug 01, 2019 6:47 am
languages_spoken: english
Has thanked: 9 times
Been thanked: 5 times
Contact:

Re: Armbian for Odroid N2

Post by Viald »

In fact, I use a SD card to boot. System has been transferred to SSD. I hope that the SDcard will have a better MTBF with this configuration.

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

Release notes for Armbian v21.02.1 that affects Hardkernel boards and general changes (2021-02-03)

Finished projects:
  • [AR-235] - Implement Device Tree Editor
  • [AR-476] - Add sound to Odroid N2
  • [AR-485] - Improve multicore compilation
  • [AR-487] - Rework download pages
  • [AR-508] - Add Odroid HC4
  • [AR-571] - Move Meson64 DEV to 5.10.y
  • [AR-589] - Add ZShell via armbian-zsh package
  • [AR-590] - ZRAM Enhancements - decouple swap config from tmp

Closed tasks
  • [AR-163] - Systematically cleanup distribution defaults
  • [AR-467] - Enable AUFS support back
  • [AR-472] - Added support for Ubuntu 20.10 Groovy
  • [AR-517] - Mark Bionic builds host as deprecated
  • [AR-553] - Update builder to retrieve web seeds from mirrors api
  • [AR-554] - OdroidN2 Ethernet Failure Pt2
  • [AR-556] - Adding vnstat and ZFS support to MOTD
  • [AR-563] - Improve headers compilation
  • [AR-579] - Improve (oh-my)ZSH loading speed
  • [AR-594] - Upgrade Meson64 u-boot to 2020.10
  • [AR-607] - Move Meson64 Current to 5.10.y
  • [AR-614] - Upgrade ZFS packages
  • [AR-624] - Provide an option to skip autodetection at first login
  • [AR-628] - Bump Meson64 u-boot to 2021.01
  • [AR-630] - Bump Odroid XU4 DEV to 5.10.y

Fixed bugs
  • [AR-365] - 4k not detected properly on Amlogic, Rockchip devices
  • [AR-440] - Errors shown at 1st login under certain conditions
  • [AR-514] - Download and verify not fully reliable
  • [AR-547] - First login: adding a non-existing keyboard variant
  • [AR-557] - GCC compatibility issues
  • [AR-559] - First login script - not all locales have UTF8 encoding
  • [AR-565] - SATA on HC4 is not recognized
  • [AR-570] - Improper order in getty override.conf
  • [AR-605] - Booting troubles on Odroid C4 / HC4
  • [AR-606] - Force boot script update throws out some error
  • [AR-608] - Broken building out-of-tree modules
  • [AR-616] - Ubuntu Bionic ZSH / BASH changing issue
  • [AR-617] - Locales detection doesn&#39;t work properly in some cases
  • [AR-627] - Ubuntu update is overwriting our welcome screen
  • [AR-629] - Odroid HC4 SATA failure
  • [AR-632] - Desktop fails to load at second run
ARMBIAN
Linux for ARM development boards
What is Armbian?

igorpec
Posts: 913
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 55 times
Been thanked: 130 times
Contact:

Re: Armbian for Odroid N2

Post by igorpec »

Small bugfix update that add overclocking values back to N2+ and kernel update to 5.10.16 https://docs.armbian.com/Release_Change ... 2021-02-16
ARMBIAN
Linux for ARM development boards
What is Armbian?

0n3man
Posts: 19
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Armbian for Odroid N2

Post by 0n3man »

The 2021-02-04 version fails to reboot with "shutdown -r now". Makes it to "Reached: target reboot", screen goes black then stuck with only red light an nothing else. Power cycle is required. Armbian site mentions error with reboot. Any thoughts on how to address this? Not sure if it matters but I'm booting off micro sd.

Update: I connected the console port and on reboot the system goes into a loop, the output is below.

reboot: Restarting system
bl31 reboot reason: 0xd
bl31 reboot reason: 0x0
system cmd 1.
G12B:BL:6e7c85:2a3b91;FEAT:E0F83180:402000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:1;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:2;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:3;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:4;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;LOOP:5;EMMC:800;NAND:81;SD?:0;SD:800;USB:8;

Update: Installed on an eMMc module and this has successfully rebooted a couple of times. I'm still interested on thoughts on SD install if anyone has suggestion on making this work.

0n3man
Posts: 19
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1
Has thanked: 0
Been thanked: 0
Contact:

Re: Armbian for Odroid N2

Post by 0n3man »

It doesn't appear the gpiod driver provide interrupt access to gpio pins with the 5.10 kernal on the latest version of armbian. Using gpiod/libgpiod2 on the N2+ the gpioget command successfully returns pin value, however an attempt to utilize gpiomon on the same pin results in: "No such device". Any thoughts on what the issue might be with gpiod on the N2+ and how to fix it?

ASword
Posts: 217
Joined: Fri Aug 04, 2017 12:48 pm
languages_spoken: english
ODROIDs: XU4, HC1, 2x N2
Has thanked: 14 times
Been thanked: 6 times
Contact:

Re: Armbian for Odroid N2

Post by ASword »

When will that Feb16 build be promoted to be the recommended download?

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 1 guest