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: 857
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 48 times
Been thanked: 126 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: 857
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 48 times
Been thanked: 126 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: 25
Joined: Fri Oct 16, 2020 5:12 am
languages_spoken: english
ODROIDs: N2 Plus
Has thanked: 2 times
Been thanked: 5 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: 857
Joined: Sat Dec 12, 2015 4:34 pm
languages_spoken: english,german,slovene
ODROIDs: XU4, HC1, C2, C1+
Has thanked: 48 times
Been thanked: 126 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 177 times
.
.
.
ARMBIAN
Linux for ARM development boards
What is Armbian?

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 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

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 3 guests