MichaIng / DietPi

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

Image | Orange Pi Zero 2W #6827

Open jamsinclair opened 9 months ago

jamsinclair commented 9 months ago

Creating an image request

Formal device information

Is the SBC officially supported by the Debian installer?

If not, is a reliable 3rd party Debian image available for this SBC?

If not, are there install instructions for Debian available?


I see previous issues that requested an Orange Pi image had been closed. If this is still the case, feel free to close this issue πŸ™‡

jamsinclair commented 9 months ago

I tried making my own distribution, following the guide, however, I couldn't get the created image working on the device. I can only connect headlessly over wifi to the device, so this may have been the overall issue πŸ˜…

Looking at the specs between the OPi Zero 3 and the OPI Zero 2W there's a lot of similar components used, I've just flashed the Zero 3 image to my device and it seems to be working ok so far... 🀞 and the wifi definitely works – due to my reliance on headless setup.

OPi Zero 3 OPi Zero 2W
CPU Allwinner H618 Quad-core Cortex-A53 processor 1.5GHz Allwinner H618 Quad-core Cortex-A53 processor 1.5GHz βœ…
GPU Mali G31 MP2 Mali G31 MP2 βœ…
Memory 1GB/1.5GB/2GB/4GB LPDDR4 1GB/1.5GB/2GB/4GB LPDDR4 βœ…
On-board storage 16MB SPI Flash 16MB SPI Flash βœ…

Are there any other board features that we should care about that might affect the usage of the Zero 3 image on the Zero 2W? On paper they look pretty similar, the only difference really being their form factor and the Zero 3 having some additional physical I/O, like ethernet.

Edit: it seems like there's already a lot discussion over in #6594

Edit 2: (5 Jan 2024) I've been using the Orange Pi Zero 3 image successfully for a week now with no issues. It's only connected via WiFi. I have successfully been using software like Tailscale, NFS network drive etc with it.

deftdawg commented 8 months ago

I'm also using the OPi Zero 3 dietpi image on an OPi Zero 2W, only issue I've had is some instability because of thermals (system hot to the touch when it crashed).

I changed the Governor to max out at 1008Mhz (down from 1502Mhz) and that seems to have stabilised the system.

MichaIng commented 8 months ago

It actually makes sense, since the kernel/dtb package contains device trees for the Zero 2 and Zero 2W as well: image

The bootloader is Zero 3 specific, but since it is the same SoC/RAM/SPI flash, it makes sense that this works as well on Zero 2. And after the kernel booted, the bootloader is not relevant anymore.

Only one thing would be good to check: Does the bootloader enforce the Zero 3 device tree or does it choose the correct one based on the actual model:

cat /proc/device-tree/model

Does someone have a Zero 2 non-W and can check whether it is the same issue with the Ethernet adapter disappearing on reboot?

jamsinclair commented 8 months ago

Only one thing would be good to check: Does the bootloader enforce the Zero 3 device tree or does it choose the correct one based on the actual model:

cat /proc/device-tree/model

@MichaIng it doesn't seem to. Running this from an OPi Zero 2W it returns OrangePi Zero3.

Are there any quick workaround to selecting the correct device tree during the bootload (or after the fact)?

MichaIng commented 8 months ago

Try the following:

G_CONFIG_INJECT 'fdtfile=' 'fdtfile=allwinner/sun50i-h616-orangepi-zero2w.dtb' /boot/dietpiEnv.txt
reboot
jamsinclair commented 8 months ago

Thanks for the quick response! That makes sense, I'll be away from my OPi for a couple of weeks. If someone else can confirm in the interim, go ahead!

deftdawg commented 8 months ago

G_CONFIG_INJECT said I didn't have permissions, when I prefixed with sudo command wasn't found. So applied the change with sudo nano and rebooted.

dietpi@DietPi:~$ cat /proc/device-tree/model
OrangePi Zero2 W

One thing I noticed is that with this Zero2 W booted with the proper config my dual nic carrier board doesn't work properly (nics light up, but don't work, stay lit after disconnecting Ethernet). Reverting dietpiEnv.txt and rebooting restores function of the nics.

The carrier board connects via 4 pogo pins to the middle USB port (visible around green led)

image

As an aside, the following message is present regardless which dtb is used

-
[
57.0884801 sproul:wlan_delba_event: NOT FOUND sta_lut_index: 6, tid: 4
57.107166]
sprowl:wlan_delba_event: NOT FOUND
sta_lut_index: 6, tid: 5
57. 109182)
sprdul: wlan_delba_event: NOT FOUND sta_lut_index: 6,
_index: 6, tid: 6
57.1159271 sprdwl: wlan_delba_event: NOT FOUND sta_lut_index: 6, tid: 7
jamsinclair commented 7 months ago

Back in business πŸ’Ό

Following @MichaIng's instruction

The device on boot now reports the correct device tree:

$ cat /proc/device-tree/model
OrangePi Zero2 W
deftdawg commented 7 months ago

I still don't get why the carrier board (which is a usb hub connected over pogo pins) would work fine out of the box with the OrangePi Zero 3 device tree but not work at all with the OrangePi Zero 2 W tree.

MichaIng commented 7 months ago

I still don't get why the carrier board (which is a usb hub connected over pogo pins) would work fine out of the box with the OrangePi Zero 3 device tree but not work at all with the OrangePi Zero 2 W tree.

Hmm, that is nasty indeed πŸ€”.

samjw-nz commented 7 months ago

Can confirm the Orange Pi Zero 3 image DOES technically work on the Zero 2W, however I can't get GPIO serial to work. I'm trying to use the Zero 2W as an Octoprint board in my Prusa, and can't get it working on any of the 5 GPIO serial connections. No issue with DietPi-Software or any of the typical usage stuff, but for the life of me I can't get communication working. Having an attempt with converting the OrangePi image to DietPi but haven't gotten far yet.

MichaIng commented 7 months ago

Some someone else test/verify this: https://dietpi.com/forum/t/manually-install-wifi-package-or-firmware-file/13182/21?u=michaing

samjw-nz commented 6 months ago

Reckon I can give this a test this week. Do you have any example tests / commands I can use to verify? I'm not experienced with testing these things and don't currently have a bluetooth use-case, I'm just a user who just happens to own the hardware and have some time to chip in.

srimanachanta commented 6 months ago

I installed the Orange Pi Zero 3 image on my Zero 2W and when running i2c-detect over the ports (should be i2c-1 on zero 2w so im checking i2c-3 on the zero3) my device isn't connected. I have went ahead and checked all other ports (0 and 1 are present when checking /dev/i2c* but also 2, 3, and 4.

Also, when modifying /boot/dietpiEnv.txt to set the dtb file to zero2w, it doesn't work, and after checking the dtb directory, only the file for zero3 is present.

el-bakkali commented 6 months ago

I have the same issue,

I ran Michael command as recommended, and after reboot i can no longer ssh into the device.

As mentioned the zero2w dtb files does not exist in the dtb directory

Since this device uses the same chip as zero3 , it would be nice to have a universal image for it same way we do for raspberry pi etc. as the saying goes it will kill two bird with one stone.

srimanachanta commented 6 months ago

Orange Pi supplies a Debian image here. Im going to install that and then install DietPi using these docs. Hopefully, that works better.

srimanachanta commented 6 months ago

I have the same issue,

I ran Michael command as recommended, and after reboot i can no longer ssh into the device.

As mentioned the zero2w dtb files does not exist in the dtb directory

Since this device uses the same chip as zero3 , it would be nice to have a universal image for it same way we do for raspberry pi etc. as the saying goes it will kill two bird with one stone.

I think the issue with a universal issue is that they have different IOs and bus-to-pin layouts. I'm not super knowledgeable on the DietPi system though, so I may be wrong here.

MichaIng commented 6 months ago

Without a matching device tree, most hardware features won't work, simple as that. And indeed, the latest kernel build does not contain a Zero 2W device tree anymore: image

Not sure why it was present in the first place. Mainline Linux 6.6 does not contain it either: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/allwinner?h=linux-6.6.y But Linux 6.8 added one: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm64/boot/dts/allwinner?h=linux-6.8.y

There is already a draft at Armbian to add support based on this DTB: https://github.com/armbian/build/pull/6451

Allwinner edge kernel builds with Armbian are still Linux 6.7, otherwise we would not need to wait for the PR: https://github.com/armbian/build/blob/main/config/sources/families/include/sunxi64_common.inc

I just started builds based on this PR:

srimanachanta commented 6 months ago

Is there is an Image I can test with? I don't see any artifacts under those builds unless I'm just blind lol.

Joulinar commented 6 months ago

There is no image yet.

MichaIng commented 6 months ago

These were kernel and bootloader builds. I triggered an image build here: https://github.com/MichaIng/DietPi/actions/runs/8491738902/job/23264002541

It can be found here once done: https://dietpi.com/downloads/images/testing/

srimanachanta commented 6 months ago

These were kernel and bootloader builds. I triggered an image build here: https://github.com/MichaIng/DietPi/actions/runs/8491738902/job/23264002541

It can be found here once done: https://dietpi.com/downloads/images/testing/

Thank you, I will test that out after its done and report back

MichaIng commented 6 months ago

Btw, the SBC has no GPIO header exposed by default, but it can be soldered onto the PCB to be usable? I.e. does it make sense to enable a UART console by default, and e.g. expose the SPI toggle we added for Orange Pi Zero 3?

Or does it support USB UART on one of the USB ports in OTG/gadget mode?

srimanachanta commented 6 months ago

Btw, the SBC has no GPIO header exposed by default, but it can be soldered onto the PCB to be usable? I.e. does it make sense to enable a UART console by default, and e.g. expose the SPI toggle we added for Orange Pi Zero 3?

Or does it support USB UART on one of the USB ports in OTG/gadget mode?

Not sure about the latter part but yes, it includes a 2x20 header set that I had to solder on the SBC. I think UART console should be left the same as the OPI Zero3 because people are already prompted to disable it if they aren't using it. I also thing its supported over USB but regardless, prob just leave it on.

srimanachanta commented 6 months ago

@MichaIng Seems the build failed, I don't think an artifact was uploaded either.

MichaIng commented 6 months ago

Yes, I forgot to move the bootloader package in place. It is rerunning.

Okay, I'll enable /dev/ttyS0 then. Would still be great to have some feedback of someone actually using it, and e.g. as well SPI πŸ™‚.

srimanachanta commented 6 months ago

Not sure why but I don't have an HDMI output nor can I SSH or ping it. For context, I am setting up my OPI headlessly by preseeding the network info according to this guide. I went back and reinstalled the DietPi OPI Zero3 image and can confirm that still works (minus HDMI) in terms of immediately connecting and me being able to ping and SSH into it.

MichaIng commented 6 months ago

You tried it with this image? https://dietpi.com/downloads/images/testing/DietPi_OrangePiZero2W-ARMv8-Bookworm.img.xz And configured WiFi for first boot via dietpi.txt and dietpi-wifi.txt?

srimanachanta commented 6 months ago

You tried it with this image? https://dietpi.com/downloads/images/testing/DietPi_OrangePiZero2W-ARMv8-Bookworm.img.xz And configured WiFi for first boot via dietpi.txt and dietpi-wifi.txt?

Yes

MichaIng commented 6 months ago

Maybe the bootloader does not pick the correct device tree automatically. I'll redo a build later with this defined explicitly.

el-bakkali commented 6 months ago

thank you @MichaIng for your work its much appreciated .

MichaIng commented 6 months ago

Build is rerunning, with UART enabled, SPI toggle and device tree set explicitly in boot config: https://github.com/MichaIng/DietPi/actions/runs/8491738902/job/23267416633

srimanachanta commented 6 months ago

Build is rerunning, with UART enabled, SPI toggle and device tree set explicitly in boot config: https://github.com/MichaIng/DietPi/actions/runs/8491738902/job/23267416633

Still doesn't work. Same issues as previously mentioned

MichaIng commented 6 months ago

Not sure then. Looks like we need someone with a GPIO header and UART adapter to check serial console logs. The PR at Armbian is also still in draft, quite possible that it is not yet fully functional. In case it is just the bootloader, since the Zero 3 image did boot for @jamsinclair, we could try it with a new Zero 3 image: https://github.com/MichaIng/DietPi/actions/runs/8493763090 Once finished, it can be found here: https://dietpi.com/downloads/images/testing/ Flash it and then you just manually change the device tree (which is present in this kernel build):

fdtfile=allwinner/sun50i-h618-orangepi-zero2w.dtb

Change this in dietpiEnv.txt on the FAT partition, prior to first boot.

Btw @srimanachanta do you have a variant with 1.5 GB RAM? Because that one won't boot with the Armbian bootloader build, same as on Zero 3. Then we could use the bootloader build from Orange Pi. But since I have the board here now, I am working with someone at OpenWRT to test and in case add a patch to add support for 1.5 GB RAM to mainline U-Boot as well. At least we already know how do hardcode it, so there is still a dedicated U-Boot build required, but at least it can be mainline U-Boot.

EDIT: Ah, @srimanachanta with the Zero 3 image, at least WiFi worked well for you as well? Then I am more certain that the bootloader is the issue, and hence using the Zero 3 image with Zero 2W device tree hopefully works. No big issue, in this case, to switch the bootloader for our actual Zero 2W builds.

srimanachanta commented 6 months ago

Not sure then. Looks like we need someone with a GPIO header and UART adapter to check serial console logs. The PR at Armbian is also still in draft, quite possible that it is not yet fully functional. In case it is just the bootloader, since the Zero 3 image did boot for @jamsinclair, we could try it with a new Zero 3 image: https://github.com/MichaIng/DietPi/actions/runs/8493763090 Once finished, it can be found here: https://dietpi.com/downloads/images/testing/ Flash it and then you just manually change the device tree (which is present in this kernel build):

fdtfile=allwinner/sun50i-h616-orangepi-zero2w.dtb

Change this in dietpiEnv.txt on the FAT partition, prior to first boot.

Ah, btw @srimanachanta do you have a variant with 1.5 GB RAM? Because that one won't boot with the Armbian bootloader build, same as on Zero 3. Then we could use the bootloader build from Orange Pi. But since I have the board here now, I am working with someone at OpenWRT to test and in case add a patch to add support for 1.5 GB RAM to mainline U-Boot as well. At least we already know how do hardcode it, so there is still a dedicated U-Boot build required, but at least it can be mainline U-Boot.

I don't have a 1.5GB variant, sorry. I will try the Zero3 with the changes sometime later.

MichaIng commented 6 months ago

Okay, I'll also redo a Zero 2W image with the Zero 3 bootloader tomorrow, but need to sleep now πŸ™‚.

srimanachanta commented 6 months ago

Not sure then. Looks like we need someone with a GPIO header and UART adapter to check serial console logs. The PR at Armbian is also still in draft, quite possible that it is not yet fully functional. In case it is just the bootloader, since the Zero 3 image did boot for @jamsinclair, we could try it with a new Zero 3 image: https://github.com/MichaIng/DietPi/actions/runs/8493763090 Once finished, it can be found here: https://dietpi.com/downloads/images/testing/ Flash it and then you just manually change the device tree (which is present in this kernel build):

fdtfile=allwinner/sun50i-h616-orangepi-zero2w.dtb

Change this in dietpiEnv.txt on the FAT partition, prior to first boot.

Btw @srimanachanta do you have a variant with 1.5 GB RAM? Because that one won't boot with the Armbian bootloader build, same as on Zero 3. Then we could use the bootloader build from Orange Pi. But since I have the board here now, I am working with someone at OpenWRT to test and in case add a patch to add support for 1.5 GB RAM to mainline U-Boot as well. At least we already know how do hardcode it, so there is still a dedicated U-Boot build required, but at least it can be mainline U-Boot.

EDIT: Ah, @srimanachanta with the Zero 3 image, at least WiFi worked well for you as well? Then I am more certain that the bootloader is the issue, and hence using the Zero 3 image with Zero 2W device tree hopefully works. No big issue, in this case, to switch the bootloader for our actual Zero 2W builds.

Ok, tried the new Zero3 image with your recommendations for the device tree and it still doesn't work. I went back and used the same image but didn't set that line and that didnt work. The base (current release) image for OPI3 does work still so my board isn't bricked πŸ˜€ . So the bootloader for the OPIZ3 is now broken for the OPIZ2W.

Sidenote, the Zero2W uses an H618, why does the device tree refer to it as H616 in the filename?

MichaIng commented 6 months ago

The bootloader for the Zero 3 has not changed, it is still the same build from January. I redid only the kernel πŸ€”. Let's wait for someone else to verify, and in case for someone with GPIO header and UART adapter.

... oh good point with the device tree name, it should be:

fdtfile=allwinner/sun50i-h618-orangepi-zero2w.dtb

However, the Zero 2W image has this set correctly. But please try to adjust that one, as it could be still a bootloader issue. Should be still possible via FAT partition.

srimanachanta commented 6 months ago

@el-bakkali Can you test out the new Orange Pi Zero 3 image from the testing downloads section?

MichaIng commented 6 months ago

New image up which uses the Orange Pi Zero 3 bootloader instead, but Orange Pi Zero 2W device tree: https://dietpi.com/downloads/images/testing/

srimanachanta commented 6 months ago

New image up which uses the Orange Pi Zero 3 bootloader instead, but Orange Pi Zero 2W device tree: https://dietpi.com/downloads/images/testing/

Doesn't work πŸ˜” . Green light is flashing now though, before it was just solid green.

Edit: I built and flashed the upstream Armbian image and can confirm that it boots and I can setup networking and stuff. The issue for DietP is isolated here.

RootLUG commented 6 months ago

I will try to help with testing, my 4G and 1G version just arrived, also with the 24pin extension board. I have already soldered the 40pin header on the 1G version so I can try to test that but I am not sure how to do that properly?

The last image for me boot fines, on the 4G version , for some reason it didn't boot occasionally between reboots, but always did after re-plugging the power. haven't observed/replicated this problem at 1G.

The 24pin extension board does not work fully. The usb ports are working as I see logs in dmesg when inserting usb but for example the eth port appears to not be powered (it is powered when power is applied but then it is disabled) I have not found a way yet to test the buttons or IR receiver. On-board wlan0 worked fine after enabling it in the dietpi-config, didn't had a chance to test bluetooth yet. this is all on the 1G version, I will try to play more with 4G to see if I can replicate the problem with not booting up.

MichaIng commented 6 months ago

Edit: I built and flashed the upstream Armbian image and can confirm that it boots and I can setup networking and stuff. The issue for DietP is isolated here.

Since there isn't any Orange Pi Zero 2W image from Armbian, the PR has not even been merged, which image do you mean? The community build for the Zero 3? We use the same bootloader and kernel, and the bootloader did not change since it worked for you in the past, so it looks a little random to me πŸ€”.

@RootLUG Many thanks for testing and verifying that it does boot in general. You tried this image, right? https://dietpi.com/downloads/images/testing/DietPi_OrangePiZero2W-ARMv8-Bookworm.img.xz I'll revert to using the actual Zero 2W bootloader, as I think srimanachanta was/is suffering from an isolated issue (which requires a serial console to investigate), while the Zero 2W bootloader might actually work. Does HDMI work for you?

About Ethernet, is the adapter detected at all?

ip l

And do you try to use onboard Ethernet via 20pin extension interface? If so, how is this accessible, actually? Via ribbon cable? Or do you mean a USB Ethernet adapter?

The PR at Armbian is still WIP and received some commits recently. Rebuilding kernel (and bootloader) might change/fix things. At least I see USB via 24pin interface was tested.

srimanachanta commented 6 months ago

Since there isn't any Orange Pi Zero 2W image from Armbian, the PR has not even been merged, which image do you mean? The community build for the Zero 3? We use the same bootloader and kernel, and the bootloader did not change since it worked for you in the past, so it looks a little random to me πŸ€”.

I cloned the PR's branch, ran a build using WSL, and flashed the outputted issue.

MichaIng commented 6 months ago

This is exactly what I did for our first Zero 2W image with Zero 2W bootloader. But as said, there were commits in between, so I'll redo that.

srimanachanta commented 6 months ago

This is exactly what I did for our first Zero 2W image with Zero 2W bootloader. But as said, there were commits in between, so I'll redo that.

Ok, that makes sense. Thank for your help. One other note, when I setup the Arabian image, I did so using Ethernet but setup the DietPi image via WiFi so maybe wifi wasn't correctly working for some reason?

RootLUG commented 6 months ago

@MichaIng yes that's the image I used. I do not see the eth adapter in ip or ifconfig cli tools. The interesting thing is that the TX/RX leds on eth port are on when the device is powered but few seconds into booting it is turned off so it has power but something is disabling it or crashing I think. This is the official expansion board: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/2W-expansion-board.html . It is connected via the ribbon cable to the zero2w. Like I mentioned the USB appears to be working as I see dmesg logs when I inserted testing usb flash drive that it was a mass storage with fat32 partitions so the communication with the board is fine, but the other peripherals does not appear to work. I have tried pushing the buttons and that also have not produced any output/log in dmesg as well. There is also an audio jack present on the expansion board, I think that is not working as well because I have observed in dmesg logs saying that there is no ALSA device output detected, but I have not tested it yet.

I have observed following errors in dmesg which may be related:

[    1.247013] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    1.255122] sun50i-h616-pinctrl 300b000.pinctrl: initialized sunXi PIO driver
[    1.255815] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    1.256058] sun50i-h616-r-pinctrl 7022000.pinctrl: initialized sunXi PIO driver
[    1.256317] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 224
[    1.256335] sun50i-h616-pinctrl 300b000.pinctrl: pin-224 (5000000.serial) status -517
[    1.256353] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 224 (PH0) from group PH0  on device 300b000.pinctrl
[    1.256374] dw-apb-uart 5000000.serial: Error applying setting, reverse things back
[    1.256876] debugfs: Directory '1100000.mixer' with parent 'regmap' already present!
[    1.256919] debugfs: Directory '1100000.mixer' with parent 'regmap' already present!
[    1.272829] sun4i-drm display-engine: bound 1100000.mixer (ops 0xffff800080ecb6e0)
[    1.273010] sun4i-drm display-engine: bound 6510000.tcon-top (ops 0xffff800080ed0018)
[    1.273323] sun4i-drm display-engine: bound 6515000.lcd-controller (ops 0xffff800080ec82e0)
[    1.273393] sun8i-dw-hdmi 6000000.hdmi: supply hvcc not found, using dummy regulator
[    1.273634] sun8i-dw-hdmi 6000000.hdmi: Detected HDMI TX controller v2.12a with HDCP (DWC HDMI 2.0 TX PHY)
[    1.274125] sun8i-dw-hdmi 6000000.hdmi: registered DesignWare HDMI I2C bus driver
[    1.274389] sun4i-drm display-engine: bound 6000000.hdmi (ops 0xffff800080eca7a0)
[    1.274815] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.274892] sun4i-drm display-engine: [drm] Cannot find any crtc or sizes
[    1.275388] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 64
[    1.275406] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517
[    1.275423] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 64 (PC0) from group PC0  on device 300b000.pinctrl
[    1.275444] sun6i-spi 5010000.spi: Error applying setting, reverse things back
[    1.276512] ehci-platform 5200000.usb: EHCI Host Controller
[    1.276544] ehci-platform 5200000.usb: new USB bus registered, assigned bus number 1
[    1.276608] ehci-platform 5310000.usb: EHCI Host Controller
[    1.276641] ehci-platform 5310000.usb: new USB bus registered, assigned bus number 2
[    1.276695] ehci-platform 5200000.usb: irq 287, io mem 0x05200000
[    1.276748] ehci-platform 5310000.usb: irq 288, io mem 0x05310000
[    1.277666] ehci-platform 5311000.usb: EHCI Host Controller
[    1.277693] ehci-platform 5311000.usb: new USB bus registered, assigned bus number 3
[    1.277710] ohci-platform 5200400.usb: Generic Platform OHCI controller
[    1.277742] ohci-platform 5200400.usb: new USB bus registered, assigned bus number 4
[    1.277790] ohci-platform 5310400.usb: Generic Platform OHCI controller
[    1.277802] ehci-platform 5311000.usb: irq 289, io mem 0x05311000
[    1.277821] ohci-platform 5310400.usb: new USB bus registered, assigned bus number 5
[    1.277831] ohci-platform 5200400.usb: irq 290, io mem 0x05200400
[    1.277899] ohci-platform 5310400.usb: irq 291, io mem 0x05310400
[    1.277937] usb_phy_generic usb_phy_generic.3.auto: dummy supplies not allowed for exclusive requests
[    1.277959] usb_phy_generic usb_phy_generic.3.auto: dummy supplies not allowed for exclusive requests
[    1.278234] ohci-platform 5311400.usb: Generic Platform OHCI controller
[    1.278260] ohci-platform 5311400.usb: new USB bus registered, assigned bus number 6
[    1.278337] ohci-platform 5311400.usb: irq 292, io mem 0x05311400
[    1.278895] sun50i-h616-pinctrl 300b000.pinctrl: supply vcc-pa not found, using dummy regulator
[    1.279354] sun4i-drm display-engine: [drm] Cannot find any crtc or sizes
[    1.279844] axp20x-i2c 0-0036: AXP20x variant AXP313a found
[    1.281714] axp20x-i2c 0-0036: AXP20X driver loaded
[    1.283635] sun50i_cpufreq_nvmem: Using CPU speed bin speed0
[    1.284022] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 210
[    1.284040] sun50i-h616-pinctrl 300b000.pinctrl: pin-210 (300b000.pinctrl:210) status -517
[    1.284853] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 77
[    1.284870] sun50i-h616-pinctrl 300b000.pinctrl: pin-77 (300b000.pinctrl:77) status -517
[    1.285222] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 224
[    1.285239] sun50i-h616-pinctrl 300b000.pinctrl: pin-224 (5000000.serial) status -517
[    1.285257] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 224 (PH0) from group PH0  on device 300b000.pinctrl
[    1.285277] dw-apb-uart 5000000.serial: Error applying setting, reverse things back
[    1.285505] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 64
[    1.285522] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517
[    1.285539] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 64 (PC0) from group PC0  on device 300b000.pinctrl
[    1.285559] sun6i-spi 5010000.spi: Error applying setting, reverse things back
[    1.286009] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 160
[    1.286027] sun50i-h616-pinctrl 300b000.pinctrl: pin-160 (4020000.mmc) status -517
[    1.286050] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 160 (PF0) from group PF0  on device 300b000.pinctrl
[    1.286070] sunxi-mmc 4020000.mmc: Error applying setting, reverse things back
[    1.286515] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 210
[    1.286532] sun50i-h616-pinctrl 300b000.pinctrl: pin-210 (300b000.pinctrl:210) status -517
[    1.286779] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 77
[    1.286796] sun50i-h616-pinctrl 300b000.pinctrl: pin-77 (300b000.pinctrl:77) status -517
[    1.286989] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 224
[    1.287006] sun50i-h616-pinctrl 300b000.pinctrl: pin-224 (5000000.serial) status -517
[    1.287028] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 224 (PH0) from group PH0  on device 300b000.pinctrl
[    1.287052] dw-apb-uart 5000000.serial: Error applying setting, reverse things back
[    1.287282] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 64
[    1.287298] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517
[    1.287316] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 64 (PC0) from group PC0  on device 300b000.pinctrl
[    1.287336] sun6i-spi 5010000.spi: Error applying setting, reverse things back
[    1.287657] of_cfs_init
[    1.287784] of_cfs_init: OK
[    1.287875] clk: Disabling unused clocks
[    1.288007] ALSA device list:
[    1.288020]   No soundcards found.
[    1.288390] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 210
[    1.288408] sun50i-h616-pinctrl 300b000.pinctrl: pin-210 (300b000.pinctrl:210) status -517
[    1.288648] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 77
[    1.288665] sun50i-h616-pinctrl 300b000.pinctrl: pin-77 (300b000.pinctrl:77) status -517
[    1.288861] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 224
[    1.288878] sun50i-h616-pinctrl 300b000.pinctrl: pin-224 (5000000.serial) status -517
[    1.288896] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 224 (PH0) from group PH0  on device 300b000.pinctrl
[    1.288920] dw-apb-uart 5000000.serial: Error applying setting, reverse things back
[    1.289156] sun50i-h616-pinctrl 300b000.pinctrl: request() failed for pin 64
[    1.289173] sun50i-h616-pinctrl 300b000.pinctrl: pin-64 (5010000.spi) status -517
[    1.289190] sun50i-h616-pinctrl 300b000.pinctrl: could not request pin 64 (PC0) from group PC0  on device 300b000.pinctrl
[    1.289210] sun6i-spi 5010000.spi: Error applying setting, reverse things back

HDMI worked without any issues for both boards, that's how I started with testing as I wasn't sure if ssh would work. The 4G version still occasionally doesn't boot, when that happens the hdmi has no output and the green system led is off (e.g. not blinking like it is during normal boot), at the same time the eth leds are off as well after few seconds which may hint that it started maybe booting but crashed early on.

I tried to test the bluetooth but it appears to not be detected (hcitool dev and hciconfig -a does not display anything). Grepping dmesg for "bluetooth", "ble" and "bluez" have not given any results.

HeikoGr commented 6 months ago

To all the users with ethernet problems. I poked around at the orangepi github source (https://github.com/orangepi-xunlong/orangepi-build/blob/next/external/packages/raspi/orangepi/common/files/orangepi-hardware-optimization) and found an interesting part where the ethernet interface for bookworm based kernels maybe is named β€žend0β€œ instead of β€žeth0β€œ.

RootLUG commented 6 months ago

Makes sense, I tried to run it manually, but I got permission denied:

root@DietPi:~# echo "end0"> /sys/class/leds/100m_act/device_name
-bash: /sys/class/leds/100m_act/device_name: Permission denied
root@DietPi:~# echo "end0"> /sys/class/leds/100m_link/device_name
-bash: /sys/class/leds/100m_link/device_name: Permission denied

root@DietPi:~# find / -name "orangepi-hardware-optimization" 2>/dev/null
root@DietPi:~# echo netdev > /sys/class/leds/100m_act/trigger
-bash: echo: write error: Invalid argument
root@DietPi:~# cat /sys/class/leds/100m_act/trigger
[none] usb-gadget usb-host kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock usbport disk-activity disk-read disk-write mtd nand-disk heartbeat cpu cpu0 cpu1 cpu2 cpu3 activity default-on panic mmc0 mmc1 rfkill-any rfkill-none rc-feedback rfkill0

The file (hw optimizations) also doesn't appear to exists on dietpi? Does it need to run at specific time during boot or something I can try/test?

MichaIng commented 5 months ago

The interface is always named eth0. end0 is what systemd renames it to, in case this is not prevented via kernel command-line options, and we do prevent it.

@RootLUG You need to load the kernel module for interface-triggered LEDs:

modprobe ledtrig-netdev
echo netdev > /sys/class/leds/100m_act/trigger
echo eth0 > /sys/class/leds/100m_link/device_name
echo 1 > /sys/class/leds/100m_link/link

However, there is no point to deal with the network adapter LEDs, as long as the network interface itself is not available. Note that these are not the LEDs at the adapter side, but an additional LED at the PCB or case. See e.g. the WAN/LAN1/LAN2 LEDs at the NanoPi R6C case here:

The LEDs right at the adapter socket are not controlled via these sysfs LED devices.

I generated a new image: https://dietpi.com/downloads/images/testing/ This is again using the Zero 2W bootloader. Hopefully it fixes Ethernet for you.