Jump to content

CSC Armbian for RK3318/RK3328 TV box boards


jock

Recommended Posts

1 час назад, Minh Chau Nguyen сказал:

I have a H96 Max, but it cannot boot from multitools. It always boots from original Android TV, I tried replacing different sd card but no luck, meanwhile other ones work perfectly
How can I do now?

Do SD cards work at all in android? Maybe the SD cards slot is damaged or something...

Link to comment
Share on other sites

Armbian & Khadas are rewarding contributors

8 hours ago, Minh Chau Nguyen said:

I have a H96 Max, but it cannot boot from multitools. It always boots from original Android TV, I tried replacing different sd card but no luck, meanwhile other ones work perfectly

First page: The Multitool does not boot

Link to comment
Share on other sites

Hi, @jock

Do you have functional ethernet in uboot?

 

At first it was not work at all with eth probe error: No PHY reset control found: ret=-61

Then I've replaced reset handle location in u-boot/drivers/net/gmac_rockchip.c:

- ret = reset_get_by_name(dev, "mac-phy", &pdata->phy_reset);
+ ret = reset_get_by_index_nodev(args.node, 0,  &pdata->phy_reset);

 

Now, eth probes without errors but has 50% packet loss (uboot's netconsole is unusable), negotiate at 10Mbit, and every second boot or so it doesn't work at all.

Edited by Alex ThreeD
Link to comment
Share on other sites

@Alex ThreeD

 I did not delve into ethernet, but the "No ethernet found" message I often see in u-boot makes me think it has some troubles.

Also I did not further investigate because v2024.01 finally happened to be transitioning version, in fact I already have a branch working with v2024.07-rc4 as suggested by @Kwiboo in the github issue about memory addresses and relocation.

In particular, there is the rmii support patch that is being carried on starting from v2022.04 or even earlier and still applies, but don't know if it works correctly. It is important to note that this patch - as you may see - changes the device tree node substantially and that could be the reason mainline code breaks.

Link to comment
Share on other sites

Hello,
is there any simple way how to switch the USB to device mode?
I would like to install PiKVM onto my X88 box. So I need one port in host mode (for video capturing) and second port in device mode (to simulate keyboard and mouse).

 

Link to comment
Share on other sites

Hi,

Does anyone have the suitable linux gpu driver for rk3318 which is a mali-450-mp5 with 5 cores?

Armbian allways uses the lima driver for rk3328 (gpu mali-450-mp2) on rk3318 img which has only 2 cores.

 

Edited by jorajo
Link to comment
Share on other sites

On 6/28/2024 at 6:32 AM, lucky62 said:

is there any simple way how to switch the USB to device mode?

I don't remember if there's a device tree overlay to switch the USB2 and USB3 OTG ports to device mode, but you can alter the device tree and change dr_mode="peripheral" for the controller you want.

USB3 controller appears to be more reliable than USB2 in device mode.

Link to comment
Share on other sites

 

I did the change to peripheral mode as suggested by Jock, by manually editing the dtc through armbian-config. But that would be required to be repeated every time you upgrade the kernel.

(Similarly, I have to fix the brcm sdio file every time the armbian-firmware package is updated, but that was easily solved by an @reboot cron job.)

 

Is there some guidance in preparing a device tree overlay for this to make it more "automated" wrt kernel upgrades? Or would that only be possible when the overlays are provided through some official armbian package?

 

 

Quote

USB3 controller appears to be more reliable than USB2 in device mode

 

I found that with the -edge kernels, the usb2 port is also perfectly stable, and appears to have more EPs (endpoints) available, enabling the use of both keyboard/mouse, usb network and usb storage through kvmd. When trying that with the usb3 port, everything silently stopped working when trying to add more EPs than it could handle. For the USB2 port, it shows 10 available EPs in dmesg. For USB3 port, it doesn't show anything. But it's less than 10.

Link to comment
Share on other sites

I think my box is broken. Everything worked before and then I wanted to install some other Linux and it didn't work. Now I wanted to install Android again but multitool sd won't start, the LED only lights up red. factorytool recognizes maskrom but when I want to install firmware the error message "Download boot fail" appears. Can the box still be repaired?

factorytool.JPG

androidtool.JPG

Link to comment
Share on other sites

3 часа назад, Tomek51 сказал:

when I want to install firmware the error message "Download boot fail" appears.

Try "Upgrade" instead of "Restore" in the factory tool. If it wont work - your emmc is probably dead.

Link to comment
Share on other sites

Try These Files to see if 1.5 GHz works for you. :)

on my box it runs around 40 to 50 c when playing music in Kodi for Debian.
feel free to tweak the dts file to work with your device and not of caution; use a heat sink and fan if you can find a fan that fits...

it is as low of an under-volt as i can manage and also note; use a 5v 4 Amps power brick. any less than 4A and the system won't be stable.

 

rk3318-test.dts rk3318-box.dtb

Link to comment
Share on other sites

ADVICE

 

@tERBO discovered, at his expense, that upgrading the kernel to v6.6.38 breaks the eMMC support (see his thread), so please do not upgrade the kernel until the issue is solved!

The issue seems related to some patches that have been mainlined in the kernel, but further inspection is needed to be sure what is causing the problem.

Link to comment
Share on other sites

9 hours ago, jock said:

upgrading the kernel to v6.6.38 breaks the eMMC support

Same for the 6.9.9 -edge kernel currently in the repository.

I had a new X88 Pro 10 delivered, used multitool to erase flash and load the -314 release image, and it consistently kept failing after trying to changie to -edge kernel.

I was already doubting the build quality of the device (also seeing the wifi antenna as a PCB trace versus the real component flying above the PCB as in my H96 Max V11), but this would indeed explain why it fails. Seeing the exact same repeated errors as in @tERBO's thread.

Dumping a backup copy of my H96 onto the X88 using multitool (and adjusting for the ap6334 wifi module) resulted in a working system with an older 6.8 kernel.

Link to comment
Share on other sites

Side note: I noticed that the older u-boot (also -edge, from around end May 24) appears to be progressing quickly, while the u-boot from both the -314 release image appears to hang for 2 sec between showing ff580000 and DWC2. (I think both u-boot-current and u-boot-edge, but I've been trying so many combinations that I could be mistaken here... at least the u-boot included in the -314 image does this)

 

Didn't dare trying to update u-boot on my working H96, but this is what I noticed when first burning the -314 image (minimal, bookworm) on my X88 and later restoring the backup from the H96 onto the X88.

 

Possibly related: after burning the -314 image on the X88, my keyboard stopped working in the usb2 port but did work properly in the usb3 port. With the usb2 port indeed being ff580000, this could very well be linked to u-boot failing/timing out to talk to the usb2 controller.

 

If you want me to do some more debugging, just let me know. After wasting several hours on trying to get started with a fresh install I now just threw it aside 😉

 

Link to comment
Share on other sites

About the eMMC issue, this is the patch series that breaks eMMC and also GPIO pins (leds does not work either): https://patchwork.kernel.org/project/linux-rockchip/cover/20240606125755.53778-1-i@eh5.me/

 

It has been mainlined in kernel 6.6.37 and probably will break more rk3328 boards as well.

Reverting the patch series from the 6.6.37 kernel, it works again

Link to comment
Share on other sites

I lost HOURS in the last week thinking it was a me problem, I didn't want to ask because I was afraid people would be mad at me for my skill issues, saying to myself "if it isn't a ME problem, someone else will post about it". They did, but after I lost a lot of time lol. I hope they will fix this.

Link to comment
Share on other sites

12.07.2024 в 22:33, Netraam31 сказал:

my keyboard stopped working in the usb2 port but did work properly in the usb3 port. With the usb2 port indeed being ff580000, this could very well be linked to u-boot failing/timing out to talk to the usb2 controller.

 

I can confirm DWC2 usb2 does not see keyboard/flash-drive in u-boot 2024.07. (usb3 port doesn't work either on my board, but the same was in uboot 2024.01 and 2022.07).

Also DWC2 init takes significantly longer in 2024.07 (~10 sec, whereas in 2024.01 it took about 1 sec).


uboot 2024.01:

=> usb start

starting USB...

Bus usb@ff5c0000: USB EHCI 1.00

Bus usb@ff5d0000: USB OHCI 1.0

Bus usb@ff580000: USB DWC2

scanning bus usb@ff5c0000 for devices... 1 USB Device(s) found

scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found

scanning bus usb@ff580000 for devices... 2 USB Device(s) found

scanning usb for storage devices... 0 Storage Device(s) found


uboot 2024.07:

=> usb start

starting USB...

Bus usb@ff580000: USB DWC2

Bus usb@ff5c0000: USB EHCI 1.00

Bus usb@ff5d0000: USB OHCI 1.0

scanning bus usb@ff580000 for devices... 1 USB Device(s) found

scanning bus usb@ff5c0000 for devices... 1 USB Device(s) found

scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found

scanning usb for storage devices... 0 Storage Device(s) found

Link to comment
Share on other sites

I've been playing with a box that has an X88 Pro B Board (RK3318) for the past week or so.   Got it from an Amazon return bin place, so not a big deal if I have ruined it!
I had it running with Armbian successfully, but when trying to install Klipper made a mistake and attempted to reflash armbian.  This is where my issues started.   

After much experimentation and possibly flashing the wrong loader with Androidtool (rk322x_loader_v1.10.238_256.bin)  I'm now left with a board in the following condition.

-I can get it into umask mode with some cajoling can re-flash android using factorytool.   
-Android boots fine

-When in this state, it will launch multitool
-multitool will delete emmc and says it successfully flashed Armbian, however it will not boot or even turn on the hdmi.  At this point it's bricked and I can start over in umask mode.

-I've also tried deleting emmc using multitool and burning the image to the SD card with the same result.  

-I've also tried after flashing a firmware I downloaded - going back to the recovery .gz I created, then going to armbian.  Same result.   

Could this be because i used a 322x loader .bin?   Is there a 3318 loader floating around?

 

 

Link to comment
Share on other sites

1 час назад, vintagevalves сказал:

multitool will delete emmc and says it successfully flashed Armbian, however it will not boot or even turn on the hdmi.  At this point it's bricked and I can start over in umask mode.

When it's "flashing armbian" is it going instantly? Like 0-100% in 1 second or is it taking a significant amount of time? I had an issue with a faulty or incompatible SD card when it was booting multitool but refusing to flash any images. The other card worked just fine.

 

Also try this image with factorytool:  https://drive.google.com/file/d/1EoQJMtfkvgYQE0WOa4qSpH-SDNjwxyct/view

Link to comment
Share on other sites

@tERBO Something worked!   

I flashed that image you shared.  It was not promising; as the VFD display was not working.   

 

I redownloaded Multitool and a different Armbian image from @jock's stable folder and flashed a different microSD using a different computer.  

Happy to report that I have a live system now!  I wish I had asked sooner before wasting nearly a day going in circles!   Thanks for the assistance - was nearly ready to send this board to eWaste recycling.  

Link to comment
Share on other sites

On 7/14/2024 at 4:37 PM, Alex ThreeD said:

I can confirm DWC2 usb2 does not see keyboard/flash-drive in u-boot 2024.07. (usb3 port doesn't work either on my board, but the same was in uboot 2024.01 and 2022.07).

 

This definitely requires more attention. Each uboot revision seem to change something and every time is a lucky shot.

Link to comment
Share on other sites

Hi could someone point me in the right direction? I've just installed the latest stable image using rkdeveloptool. The device boots normally but it doesn't have wifi and since this box doesn't have an ethernet port that's a big deal...
When I run rk3318 it says the wifi device is a rtl8189ES/ETV, how can I make it work?

Thank you for your help

Edited by Manuel Ribeiro
Link to comment
Share on other sites

On 7/12/2024 at 10:49 PM, jock said:

About the eMMC issue, this is the patch series that breaks eMMC and also GPIO pins (leds does not work either): https://patchwork.kernel.org/project/linux-rockchip/cover/20240606125755.53778-1-i@eh5.me/

 

It has been mainlined in kernel 6.6.37 and probably will break more rk3328 boards as well.

Reverting the patch series from the 6.6.37 kernel, it works again

 

In terms of expectations management towards some people here: would there by any timeline for expecting the regular -current and/or -edge kernel updates would incorporate these reverts? So far it seems that with the current trunk.399 kernel the emmc is still not visible.

 

Or, could this be resolved by updates to the device tree? I didn't look at too much detail, but given the error message and the patch, it could be that some device tree updates with more explicit configuration lines could also help in having the kernel code take the correct paths towards a working configuration?

 

 

As a backup plan I could proceed with copying a pre-existing device's flash to a new device, wipe and regenerate ssh keys and tailscale secret, to get a new device into production. But aside from those two keys/ID's I would expect some more device-unique parts would be set up on a device during initial boot. Such as some form of machine ID or something. So without knowing all of those details, the backup plan route feels a bit tricky.

Link to comment
Share on other sites

@Netraam31 

 

First fact:

the problem is in a mainline upstream kernel driver; there is no device tree magic sauce that will fix until the driver is fixed.

The patch to fix the issue is already around in the kernel mailing lists (https://patchwork.kernel.org/project/linux-rockchip/patch/20240709105428.1176375-1-i@eh5.me/), if it will take more than another week to be merge, I will import into armbian patches set.

 

Second fact:

the big fat disclaimer when you run community armbian images tells you that they are not stated to run in production. If you do so, you have no guarantees of any kind. Community supported boards (CSC, as all tvboxes are), can only have community images. Supported boards (proper SBCs) have supported images.

 

Link to comment
Share on other sites

Thanks @jock

 

Well aware of the second fact. Yet deploying 15-20 times a supported ~400 euro "official" configuration versus the ~35 euro alternative was made consciously. And once deployed, as read-only devices with automatic updates being disabled, and no direct internet exposure, the "acceptable risk" was that it would just need to be delivered in a working state. The only thing that had not been fully thought through was the initial setup part for additional deployments, which is surfacing now, and may indeed very well lead to a revised decision on budgets versus "operational" risks.

 

As for the fix: good to see the single line fix is already being discussed and would be in mainline kernel soon. For us, no need to rush. With the summer holiday season kicking off in Europe, we can stretch this process for another 2-3 weeks if necessary.

 

Thanks for the update!

Link to comment
Share on other sites

Welcome to Armbian 24.5.1 Jammy with Linux 6.6.32-current-rockchip64

 

After package upgrade:

 

Kernel update it braking booting then cant finding root file system and landing in Ubuntu Busybux.

Only one of 3  RG3318 ungraded the other ones shall waiting.

 

The package is 6-linux-image-current-rockchip64_24.5.3_arm64.deb

with  kernel 6.6.39-current-rockchip64 (current NOT Edge !!).

 

So recommending frees kernel updates so staying on 6.6.32 or you is getting no working system.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines