MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.82k stars 494 forks source link

Image | Orange Pi 3B #6659

Closed GremlineQ closed 7 months ago

GremlineQ commented 1 year ago

Creating a bug report/issue

Required Information

Additional Information (if applicable)

Steps to reproduce

  1. I tried to convert Debian to dietpi, everything worked until I rebooted opi 3b

Expected behaviour

Actual behaviour

Extra details

MichaIng commented 1 year ago

Did you download the Debian image from Orange Pi website directly? If so, please try with the Armbian Bookworm image, which also uses a much newer Linux version: https://www.armbian.com/orangepi3b/

This looks like a low hanging fruit for us to implement natively into DietPi. Just made an image request out of it.

I was confused that Orange Pi 3, 3 LTS, and 3B are such different SBCs. Only the latter uses the RK3566, the other two are Allwinner H6 😄.

GremlineQ commented 1 year ago

Yes, I downloaded it from the Orange Pi website. If I understand correctly, you want me to try to download Armbian and run the dietepi script on it and see if it works?

I can't wait for native support, Thanks.

I understand this might be confusing. Anyways, thanks for the quick response. Now, the only thing left to do is wait.

Joulinar commented 1 year ago

@MichaIng a successful try at our forum https://dietpi.com/forum/t/orange-pi-3b-problem/18008/6?u=joulinar

GremlineQ commented 11 months ago

Just out of curiosity, when will we be able to expect native support?

Kenzu commented 9 months ago

Hi What is needed to get native support? How to help?

Jesper

MichaIng commented 9 months ago

Support added with: https://github.com/MichaIng/DietPi/commit/6336fc6 Test image builds are running and can be found here once done, in an hour or so: https://dietpi.com/downloads/images/testing/

MichaIng commented 9 months ago

Would be great if someone could give the images a try, the Bookworm one if unsure. I do not expect surprises, but better be safe than sorry, since we do not own this device to test ourselves.

Kenzu commented 9 months ago

Hi

The image boot on my OPI3B, but i have no output on my 7" Bigtreetech LCD (1024x600@60). The screen works in armbian with legacy kernel 5.10.160. It does give output on my 1920x1080p monitor, so some problem with the 1024x600 mode or some DVI/HDMI feedback from the screen. I did try armbian with edge kernel, and it's the same problem.

Thanks

MichaIng commented 9 months ago

I guess with the Armbian edge images it is the same? https://dl.armbian.com/orangepi3b/archive/

The LCD is attached via HDMI, i.e. just the resolution wrong? For DSI LCDs it will be the same issue reported here: #6740 I also linked two other issues there regarding how to change console mode resolution (and rotation) for console mode, either via fbset, or via video= kernel command-line parameter, but needs testing.

GremlineQ commented 9 months ago

sorry, I forgot to check the topic, and I didn't receive the notification either. If it is needed to test it, I can test it tomorrow

Kenzu commented 9 months ago

Hi

I cannot get wifi to work with onboard wifi. With my rpi usb wifi stick it works. And my 7" HDMI LCD is also not working. Tried with: extraargs=net.ifnames=0 video=HDMI-A-1:1024x600-24@60 in /boot/dietpiEnv.txt but it gives my this in dmesg:

[    3.069590] rockchip-drm display-subsystem: [drm] User-defined mode not supported: "1024x600": 60 51200 1024 1192 1224 1344 600 615 621 635 0x68 0x5
[    3.070903] rockchip-drm display-subsystem: [drm] Cannot find any crtc or sizes

It's the same in Armbian mainline kernel. LCD works with legacy rockchip kernel.

Kenzu commented 9 months ago

Some more info:

root@DietPi:~# cat /sys/class/drm/card0-HDMI-A-1/status
connected
root@DietPi:~# cat /sys/class/drm/card0-HDMI-A-1/modes
root@DietPi:~# cat /sys/class/drm/card0-HDMI-A-1/enabled
disabled
root@DietPi:~#
root@DietPi:~# cat /sys/class/drm/card0-HDMI-A-1/edid | edid-decode
edid-decode (hex):

00 ff ff ff ff ff ff 00 32 8d 02 2c 01 01 01 01
01 15 01 03 80 59 32 78 0a 0d c9 a0 57 47 98 27
12 48 4c 20 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 00 14 00 40 41 58 23 20 a8 20
f6 00 20 c2 31 00 00 1e 00 14 00 40 41 58 23 20
a8 20 f6 00 20 c2 31 00 00 18 00 00 00 fc 00 4c
6f 6e 74 69 75 6d 20 53 65 6d 69 0a 00 00 00 fd
00 3a 3e 0e 46 06 00 0a 20 20 20 20 20 20 01 57

02 03 16 c0 41 01 23 09 07 07 83 01 00 00 67 03
0c 00 10 00 00 0c 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 93

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: LTM
    Model: 11266
    Serial Number: 16843009
    Made in: week 1 of 2011
  Basic Display Parameters & Features:
    Digital display
    Maximum image size: 89 cm x 50 cm
    Gamma: 2.20
    RGB color display
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6250, 0.3398
    Green: 0.2802, 0.5947
    Blue : 0.1552, 0.0703
    White: 0.2832, 0.2978
  Established Timings I & II:
    DMT 0x04:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  1024x600    59.992501 Hz 128:75    38.095 kHz     51.200000 MHz (800 mm x 450 mm)
                 Hfront  168 Hsync  32 Hback  120 Hpol P
                 Vfront   15 Vsync   6 Vback   14 Vpol P
    DTD 2:  1024x600    59.992501 Hz 128:75    38.095 kHz     51.200000 MHz (800 mm x 450 mm)
                 Hfront  168 Hsync  32 Hback  120 Hpol N
                 Vfront   15 Vsync   6 Vback   14 Vpol N
    Display Product Name: 'Lontium Semi'
    Display Range Limits:
      Monitor ranges (GTF): 58-62 Hz V, 14-70 kHz H, max dotclock 60 MHz
  Extension blocks: 1
Checksum: 0x57

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Underscans IT Video Formats by default
  Basic audio support
  Native detailed modes: 0
  Video Data Block:
    VIC   1:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
  Audio Data Block:
    Linear PCM:
      Max channels: 2
      Supported sample rates (kHz): 48 44.1 32
      Supported sample sizes (bits): 24 20 16
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 1.0.0.0
    Maximum TMDS clock: 60 MHz
Checksum: 0x93
disablewong commented 9 months ago

Hello all! I tried the image and the on board wifi is not working either, nothing for wifi was detected through lspci and lshw. Maybe the driver for that is not there is the kernel?

GremlineQ commented 9 months ago

Hello all! I tried the image and the on board wifi is not working either, nothing for wifi was detected through lspci and lshw. Maybe the driver for that is not there is the kernel?

from what I've been looking, the driver for this wireless WiFi card is at the kernel level

MichaIng commented 9 months ago

@Kenzu Hmm, so EDID info shows 1024x600 is supported but kernel driver reports 1024x600 is not supported 🤔. Did you try to skip depth and frequency, hence only video=HDMI-A-1:1024x600? AFAIK the others are optional.

from what I've been looking, the driver for this wireless WiFi card is at the kernel level

Drivers on Linux are always kernel drivers 😉. Let's see whether the driver really is missing, or just the firmware, or it fails to load. Are there any kernel errors?

dmesg -l 0,1,2,3

I am not sure how it is internally attacked, hence it might be expected that lspci does not show it.

Also check dmesg whether there is any other info regarding detected (WiFi) devices.

Kenzu commented 9 months ago

Yes i did try without -24@60 and a lot of other combinations, but they all give:

[    3.069590] rockchip-drm display-subsystem: [drm] User-defined mode not supported: "1024x600": 60 51200 1024 1192 1224 1344 600 615 621 635 0x68 0x5
[    3.070903] rockchip-drm display-subsystem: [drm] Cannot find any crtc or sizes

I don’t have time today to look at WiFi, but it works in armbian so we might be able to find the needed info there.

Jesper

Kenzu commented 9 months ago

https://forum.armbian.com/topic/26315-armbian-build-pr-consolidate-uwe5622-driver-add-v61-kernel-support/

Some info about WiFi chipset and driver.

disablewong commented 9 months ago

Um.... Actually i had tried to install dietpi to the board through script from armbian and it was succeeded. https://dietpi.com/forum/t/orange-pi-3b-problem/18008/6?u=joulinar

The wifi was working with that image and most of the function i use seems to be normal. However, when i try to move it to my optane drive at e-key pcie slot then it failed to boot no matter how i flash the spi... It is strange....

When trying to boot the optane drive with official image from orangepi and the test image from dietpi, they were able to boot successfully. But then it seems the wifi was dropped....

Dmesg, lspci, lshw, iw and even lsmod shows no wireless interface, i think it suggest the driver was not compiled into kernel, not the firmware issues

MichaIng commented 9 months ago

Armbian provides "edge" images only, so probably it works with edge kernel, but not with "current" kernel. Can someone test this on a DietPi image (not converted):

apt install linux-{image,dtb}-edge-rockchip64
reboot
MagicShrimp22 commented 9 months ago

I tried that command on the bookworm and trixie images of dietpi for the 3b. After the reboot command my device gets stuck on a black screen and won't boot up again.

disablewong commented 9 months ago

I tried that command on the bookworm and trixie images of dietpi for the 3b. After the reboot command my device gets stuck on a black screen and won't boot up again.

maybe you can try to rescue the system through mounting the sd card on another linux machine, then editing /boot/extlinux/extlinux.conf . Change the default to original kernel and try to boot it again.

MagicShrimp22 commented 8 months ago

I tried that command on the bookworm and trixie images of dietpi for the 3b. After the reboot command my device gets stuck on a black screen and won't boot up again.

maybe you can try to rescue the system through mounting the sd card on another linux machine, then editing /boot/extlinux/extlinux.conf . Change the default to original kernel and try to boot it again.

I ended up using the image you shared in another thread and everything works, so I'm sticking with that one.

disablewong commented 8 months ago

I am glad to hear that, however, that image cannot boot my optane disk.... That's annoyed me... I would try to get an updated image for that...

jake5253 commented 8 months ago

I used the Bookworm version from 12/31/23 that's available on https://dietpi.com/downloads/images/testing/ and from what I can tell it's working fine. Built-in ethernet works straight out of the gate, hdmi thus far has worked fine. Did you guys erase your old u-boot from SPI before trying DietPi? My guess is you're booting with the wrong u-boot and you need to wipe that out. HDMI problems 9 times outta 10 are caused by P.O.S. cables. Try a better cable? WiFi doesn't work because the wifi module doesn't get loaded. type modprobe sprdwl_ng now you have WiFi. You can use a systemd service to do that at boot-time. from Armbian: See Here

[Unit]
Description=WIFI AW859A

[Service]
Type=forking
ExecStart=/sbin/modprobe sprdwl_ng
TimeoutSec=0
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

Bluetooth might not work. I didn't test it, I have no need for it. But, I saw info about it while fixing WiFi so, i'll include what I know.

# Bluetooth on orangepi3b board is handled by a Spreadtrum (sprd) chip and requires
# a custom hciattach_opi binary, plus a systemd service to run it at boot time
install -m 755 hciattach_opi /usr/bin
cp sprd-bluetooth.service /lib/systemd/system/
.......
systemctl enable sprd-bluetooth.service

Those files are here: hciattach_opi sprd-bluetooth.service

disablewong commented 8 months ago

Built

Nice to learn that wifi is back! But it sound strange that I need to load the wifi manually as they are usually detected and loaded during boot-up. Anyways it at least got a workaround! Thanks for sharing!

jake5253 commented 8 months ago

I agree that a systemd service to load the wifi module seems... excessive. But that's the way Armbian does it.

F.W.I.W: the official orangepi-build uses a "more normal(?)" method of doing it; they add the following two entries in /etc/modules:

sprdbt_tty
sprdwl_ng

In case you want to see more about their method, have a look at scripts/distributions.sh Line 74 (for the /etc/modules file) and line 797 (Where they (possibly?) add it to initrd. Unverified if it's added to initrd)

The official orangepi-build appears to use a systemd service for the bluetooth helper app, much like Armbian. Interestingly, the services are setup quite differently between the two. See here

MichaIng commented 8 months ago

Ah nice, so it is the same as on Orange Pi Zero 3, where we add these modules already when WiFi/BT is enabled. The _tty one is for Bluetooth only, btw. Yeah, the systemd unit from Armbian is kinda overkill given one can use a /etc/modules-load.d config to have it done more naturally, but in the end both does exactly the same.

I'll have the code we already use for Orange Pi Zero 3 running for Orange Pi 3B then as well, probably with a condition in both cases that the module must exist, so that we can move to mainline kernel without having the scripts broken.

MagicShrimp22 commented 8 months ago

Can confirm that using "modprobe sprdwl_ng" on a fresh install of the bookworm test image enables wifi. Still had to use Ethernet to set it up but all is working now.

MichaIng commented 8 months ago

Onboard WiFi/BT will work with next version: https://github.com/MichaIng/DietPi/commit/d53811d

About the potential SPI bootloader issue: Those where the image does not boot (at all, not just blank HDMI), do you have a USB-UART adapter to check serial console output? Probably there is some syntax in our boot.scr which is not understood by the vendor bootloader and which we can adjust. We did so for Odroid N2/C4 as well with their strange pre-installed petitboot SPI bootloader.

nyx-rattapoom commented 8 months ago

Last time I tried, armbian base seems like it have a problem with ethernet packet loss when running ookla speedtest, but this problem does not occur with the official build. @disablewong Can you confirm this problem still exists ?

MichaIng commented 7 months ago

I'll mark this as closed. Orange Pi 3B images have been added to download page. For any existing or new problem, please open a new issue.

Kenzu commented 7 months ago

How would I go about making a dietpi image with linux-rk35xx-legacy kernel 5.10.160 from armbian? That works with my 7” lcd in 1024x600.

Thanks

MichaIng commented 7 months ago

You can just install the legacy kernel afterwards:

apt install linux-{image,dtb}-legacy-rk35xx
reboot

In case, remove the "edge" one:

apt autopurge linux-{image,dtb}-edge-rockchip64
MichaIng commented 6 months ago

Does NVMe work for you guys?

https://dietpi.com/forum/t/19827

GremlineQ commented 6 months ago

Does NVMe work for you guys?

https://dietpi.com/forum/t/19827

Not for me.

Katarn commented 6 months ago

It worked for me after installing nvme-utils (I don’t remember exactly the name of the package and can’t check it now) and rebooting.

MichaIng commented 6 months ago

You mean nvme-cli? Hmm, this is for managing and monitoring NVMe drives, but not a driver for general access of NVMe drives. No other NVMe-capable SBC requires userland tools or libraries to access and mount NVMe drives 🤔.

GremlineQ commented 6 months ago

maybe it's just my problem, I don't know, I have one WD Black sn720 drive, it is not detected in general (lspci or any other command does not display it) but it also heats up, and the second drive is adata sx8200pro which is detected by lspci but not by others commands, e.g. those that display partitions and disks, also get warm

Katarn commented 6 months ago

Yes, nvme-cli. I was surprised myself, but in my case it worked. SSDs from WD and Gudga began to be detected, before that even lspci had not seen them. Perhaps he downloaded some drivers as a dependency, I don’t remember now.

But I remember, I did a lot of experiments to make support for SSD drives, and when I found a solution, I reinstalled DietPi from scratch, after that the first thing I did was install nvme-cli, reboot, and everything worked immediately. Block devices /dev/nvme* appeared.

MichaIng commented 6 months ago

Perhaps he downloaded some drivers as a dependency

It does not. If it was not even detected via lspci, then a missing driver was not the reason. Probably some coincidence and actually flaky physical connectivity or voltage/powering was the issue.

Katarn commented 6 months ago

No, everything was fine with the physical connectivity. I checked on two different SSD. I also tested on Armbian - and it was after Armbian detected it that I realized the device was working, so I went back to my research with DietPi.

jake5253 commented 6 months ago

It seems hit or miss to me. I have an NVME that started going bad that appears to work on my OPi-3B (at least until data fills up to the failure point in the chip) and I have an El Cheapo no-name generic that doesn't seem to be detected whatsoever by my OPi-3B, but works fine in my other PCs. My biggest problem is, now that it's far too late to return my OPi-3B to Amazon from whence it came, the Ethernet port doesn't work anymore. Not even with the official Orange Pi builds. The LEDs light up but there's no connection, the device is unseen by the OS (all of them that I've tried). I think the Ethernet chip took a shiitake and died. I feel like I've seen other people on forums someplace with the same.

disablewong commented 5 months ago

Sorry just read this email. I am using Optane m10 on my orangepi 3b and it works well for me. I am using it as the boot disk.

MichaIng commented 5 months ago

For those where it does not work well, I generated new kernel and U-Boot packages, to test whether those changed something. Next test would be to test with the Rockchip vendor kernel based on Linux 6.1:

cd /tmp
wget https://dietpi.com/downloads/binaries/testing/linux-{image,dtb}-edge-rockchip64.deb https://dietpi.com/downloads/binaries/testing/linux-u-boot-orangepi3b-edge.deb
dpkg -i linux-{image,dtb}-edge-rockchip64.deb linux-u-boot-orangepi3b-edge.deb
rm linux-{image,dtb}-edge-rockchip64.deb linux-u-boot-orangepi3b-edge.deb
source /usr/lib/u-boot/platform_install.sh
write_uboot_platform "$DIR" "$(lsblk -npo PKNAME "$G_ROOTFS_DEV")"
write_uboot_platform_mtd

I actually missed that of course the SPI bootloader is used for NVMe boot, hence the last command is essential.