Jump to content

CSC Armbian for RK3318/RK3328 TV box boards


jock

Recommended Posts

2 hours ago, Antoxic said:

Could you @fabiobassare-upload your miniloader.bin please? The link in your post is outdated

Maybe it's my miniloader a bugged one or not a right version. It's really difficult to find it on the web, downloads from old web pages no longer works

thank you

This specific rkdeveloptool compiled by rockchip never failed me, newer versions compiled from sources by myself gave me some headaches in the past.

Are you also sure that your box is a rk3328 (and not a rk3318) ?

Note also that there is no 3328A (nor B), the one @MattWestB was talking about is 3228A, which is a different chip.

Another thing: if your box, as you claim, is really locked somehow, you could have stepped in a very rare rk3328 box. @hexdump referred about some tv boxes with encrypted bootloaders. Mostly they are amlogic tv boxes but, AFAIR, there are few locked rk3328 boxes too (some of his instructions and repositories are here: https://github.com/hexdump0815/u-boot-misc/tree/master/misc.rk3328-no-sd-boot/rockchip-u-boot).

 

Link to comment
Share on other sites

@jock - that linked u-boot was for a rk3328 box, which has the sd card connected in a way, so that it cannot boot from it - with that special u-boot written to emmc i was able to boot that u-boot and that then was able to read a boot.scr or extlinux.conf from sd card or usb and so it allowed to indirectly boot from sd card

 

on boxes with locked bootloader i have two amlogic ones (one s905x2 and one s905x) and a rk3288 one (https://github.com/hexdump0815/imagebuilder/tree/main/systems/orbsmart_s92_beelink_r89) which most probably all do not match here ...

 

best wishes - hexdump

Link to comment
Share on other sites

@hexdumpthank you mate, but as you can see my box is different from yours. Btw, I found that some version of H96 boxes are almost a clone of MX10Pro like mine.

And yes, my box has SD boot and USB boot locked in some way, so I would flash emmc to boot a nice linux distro.

I tried first of all to flash new android firmware, few versions, but none working. Even stock firmaware I found was unable to flash. Now I got it with android 7.1 but it doesn't recognize wifi-bt module, nor LAN port... Well, I think is another paperweight on my desk...:D

Link to comment
Share on other sites

1 hour ago, Antoxic said:

@jock Just recompiled rkdeveloptool with your new one, but still no luck. Maybe it's my MiniLoaderAll not working. but I can't remember where I downloaded it from...

 

This is what I using:
RK3328MiniLoaderAll_V2.50.bin

You didn't pay attention: it is not "mine", I pointed to a binary provided by rockchip itself from the rockchip github repository, no need to compile by sources, because sources are broken and resulting binary does not work.

I don't have any loader for rk3328/rk3318, don't know where you pick up that one. Surely you can try something official from rockchip from here (rk322xh is old name for rk3318/rk3328), but I still don't understand why you need such procedure, multitool is not sufficient for your purposes?

Link to comment
Share on other sites

@Antoxic ah ok I understand.

Well, as @fabiobassa says, the uart is essential to understand what is going on with your box and why it does not accept the miniloader.

 

Also you didn't tell what is the current state of your box:

* does it boot with android or it doesn't boot at all?

* when you plug the multitool, android boots and ignores completely the sdcard, stays stuck at boot or boots Android normally?

* still, do you know, for sure, if it is a 3318 or a 3328? (don't consider the rk3328 signature on the board)

 

From what you said in the previous posts, I see that you are able to run rkdeveloptool rd 3 without error messages, am I right?

 

Link to comment
Share on other sites

12.02.2022 в 03:34, jock сказал:

@awawa @markst I updated the images and deb packages with latest kernel compilation (5.15.23) and with bcm43342 patch in.

Obviously I can't test it, but if you have the chance to give it a shot and give a fallback it will be appreciated ;)

Hi All

I want to test bcm43342, but not want to lost my environment. How can I update Kernal only?

Link to comment
Share on other sites

30 minutes ago, vitaliy.burkut said:

I want to test bcm43342, but not want to lost my environment. How can I update Kernal only?

deb packages and instructions for upgrading the kernel only on running system are available on first page, but you also need to put brcmfmac43342-sdio.bin and brcmfmac43342-sdio.txt in /lib/firmware/brcm directory (take them from here).

Note that it is preferred to do a backup before you do such upgrades

Link to comment
Share on other sites

@fabiobassa @jock ok, ty again. I dont'have any uart at home, I'm afraid. Will try to find one from my friend 

I'll start over from scratch and I will post some screenshot with more infos to help you guys to help me. 

for Jock questions:

1 boot into android, no prompt

2 ignore sd and usb, boot to android with no issues

3 actually no. I'm pretty sure it is a 3328 as I can read from inxi, but I will detach the fixed cooler to read codes on the chip.

Link to comment
Share on other sites

@Antoxic ok so your board is apparently ignoring sdcard because most probably the sdcard is wires to an alternative bus.

 

Did you read this post from @fabiobassa?

It is mentioned in the first post under section "Multitool does not boot" and contains instructions and a miniloader to flash the armbian image directly onto the internal eMMC, which is the only way to go on your board.

 

If it does not work, I'm afraid the only other option is to understand what is going on with a serial adapter. :unsure:

 

 

Link to comment
Share on other sites

I tried to activate the i2c-7 overlay (which I think is actually I2c-1), but I couldn't create access to this bus because I found this in dmesg:

 

[    1.804400] rockchip-pinctrl pinctrl: pin gpio2-4 already requested by ff1b0000.pwm; cannot claim for ff160000.i2c
[    1.804429] rockchip-pinctrl pinctrl: pin-68 (ff160000.i2c) status -22
[    1.804447] rockchip-pinctrl pinctrl: could not request pin 68 (gpio2-4) from group i2c1-xfer  on device rockchip-pinctrl

 

What could be the cause of the problem?

Link to comment
Share on other sites

@Antoxic I just remembered that a board similar to yours was already spotted in the past and a lot of work was done to support it.

It's from @MX10.AC2N and the pictures are at page 15 of this thread.

Nonetheless he has a MXQ_RK3328_D4_A V1.01 board, yours is MXQ_RK3328_D4 V1.3. There can be subtle but important differences.

@MX10.AC2N board houses a rk3328 chip and not a rk3318.

 

Moreover, if you could extract the dtb from the original android image, or provide the original firmware I can take a look into to understand what are the hardware characteristics of your board.

 

I guess your board is probably housing an rk3328 because it looks like it has a proper RK805 voltage regulator under the smaller heatsink, which is not common on rk3318 boards.

Link to comment
Share on other sites

23 часа назад, jock сказал:

deb packages and instructions for upgrading the kernel only on running system are available on first page, but you also need to put brcmfmac43342-sdio.bin and brcmfmac43342-sdio.txt in /lib/firmware/brcm directory (take them from here).

Note that it is preferred to do a backup before you do such upgrades

Thank you @jock. But for start a test I need to rebuild driver for my wifi dongle (it has some bug and not want work with mainline version). But in this link https://users.armbian.com/jock/rk3318/upgrade/

I see that header deb file is for 5.15.16 kernel (not for 5.15.23, file has old timestamp date) and it stops me. Can you distribute the headers for the new kernel version?

Link to comment
Share on other sites

16 hours ago, vitaliy.burkut said:

Thank you @jock. But for start a test I need to rebuild driver for my wifi dongle (it has some bug and not want work with mainline version). But in this link https://users.armbian.com/jock/rk3318/upgrade/

I see that header deb file is for 5.10.16 kernel (not for 5.10.23, file has old timestamp date) and it stops me. Can you distribute the headers for the new kernel version?

Effectively the headers file is misaligned, I need to build and upload new images and packages to keep all of them aligned.

Anyway, currently the kernel is 5.15 though.

 

By the way, installing the deb kernel packages alone already installs the kernel with bcm43342 support in (plus you need the firmware files as above).

 

edit: debian bullseye and deb packages have been aligned to kernel 5.15.25

Edited by jock
Link to comment
Share on other sites

@jock thank you very match!!! Its work on 5.10.23!

[    9.387354] brcmfmac: F1 signature read @0x18000000=0x1601a94e
[    9.391175] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43342-sdio for chip BCM43342/1
[    9.391590] usbcore: registered new interface driver brcmfmac
[    9.395707] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43342-sdio.rockchip,rk3318-box.bin failed with error -2
[    9.406546] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43342-sdio.rockchip,rk3318-box.txt failed with error -2
[    9.556537] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43342-sdio for chip BCM43342/1
[    9.556748] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[    9.557482] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43342/1 wl0: Oct 18 2016 17:43:42 version 6.25.134.25 (r662387) FWID 01-281dd9d9
[   10.034121] Bluetooth: hci0: BCM: 'brcm/BCM.hcd'

 

Link to comment
Share on other sites

On 2/25/2022 at 9:10 PM, jock said:

@Antoxic I just remembered that a board similar to yours was already spotted in the past and a lot of work was done to support it.

It's from @MX10.AC2N and the pictures are at page 15 of this thread.

Nonetheless he has a MXQ_RK3328_D4_A V1.01 board, yours is MXQ_RK3328_D4 V1.3. There can be subtle but important differences.

@MX10.AC2N board houses a rk3328 chip and not a rk3318.

Yes i read, he got a MX10, mine is a Pro version. I think my is with ddr4 ram onstead of ddr3

I read post but I haven't found any help to boot my box

 

On 2/25/2022 at 9:10 PM, jock said:

 

Moreover, if you could extract the dtb from the original android image, or provide the original firmware I can take a look into to understand what are the hardware characteristics of your board.

 

I think it is not possible cause I flashed the rom with a older firmware (7.1) hoping to unlock the bootloader. I used a Rockchip utility FactoryTool.exe v. 1.64. This is the only software I found which is able to restore the firmware. I used it several times, I think i burned everything that was original.

Btw, I don't even know what is dtb and how to extract it... ahahah Sorry, I'm not a tech

 

Quote

Did you read this post from @fabiobassa?

Yes, I posted here because of that post, as I cant load miniloader to install armbian

Link to comment
Share on other sites

On 2/11/2021 at 17:21, fabiobassa said:

@chinhhut

Hãy thử các bước sau:
1) đẩy công tắc nhỏ vào bên trong lỗ trong khi cắm cáp đực-đực vào otg
2) trên một máy linux khác, bây giờ bạn sẽ có một thiết bị mới (lsusb sẽ giúp bạn) và bạn có thể chạy rkdeveloptool
3) rkdeveloptool ld nên Liệt kê Thiết bị
4) rkdeveloptool rd 3 nên Đặt lại Thiết bị ở chế độ 3 (maskrom)
5) rkdeveloptool db MiniLoaderAll.bin (tất nhiên là từ đường dẫn của bạn) nên tải lên trình tải tạm thời để nhận ra emmc
nội bộ 6) nếu tất cả đều thành công cho đến bây giờ bạn có thể rkdeveloptool wl 0X0 yourimage.img. Điều này sẽ flash emmc bên trong .

KHUYẾN CÁO: cách tiếp cận rất "nguy hiểm", hãy sẵn sàng có cơ hội để rút ngắn emmcchốt đồng hồ xuống đất để quay lại rom mặt nạ: ph34r:
 

MiniLoaderAll.zip 177,8 kB · 55 lượt tải xuống

I don't have a linux computer to use rkdeveloptool , on a windows computer have AndroidTool with similar function can you guide me step by step ? Thank you very much

HvJOfxf.png

J8OA4ii.png

nsCsuua.png

 

 

Link to comment
Share on other sites

Hi, I need some clarification about the kernel packages in https://users.armbian.com/jock/rk3318/upgrade/

 

I periodically update the kernel from there, but I have just noticed that the package names have changed. Now I have on my system both a set of packages marked as "edge" (the former ones) and a set of package marked as "current" (those right now on the link above, which deliver a more recent kernel).

 

I would like to know:

- if I should delete the edge packages

- if having both installed may have lead to problems

- if the current packages need to be put on hold just as it was for the edge ones or the name change is the index that official support has come

- if the instructions on post #1 are still current (as they explicitly mention -edge packages).

 

Thanks!

Link to comment
Share on other sites

1 hour ago, callegar said:

Hi, I need some clarification about the kernel packages in https://users.armbian.com/jock/rk3318/upgrade/

 

I periodically update the kernel from there, but I have just noticed that the package names have changed. Now I have on my system both a set of packages marked as "edge" (the former ones) and a set of package marked as "current" (those right now on the link above, which deliver a more recent kernel).

 

I would like to know:

- if I should delete the edge packages

- if having both installed may have lead to problems

- if the current packages need to be put on hold just as it was for the edge ones or the name change is the index that official support has come

- if the instructions on post #1 are still current (as they explicitly mention -edge packages).

 

Thanks!

Yes, the packages changed names because the armbian master branch current kernel now is 5.15.

In theory, switching between kernel flavours is flawless, but it is something I don't suggest to do.

Remember that the whole rk3318 is still experimental, and keeping up with the kernels may break the system, so people upgrading kernels should be aware on how to restore the system is something goes bad.

Link to comment
Share on other sites

Hello @jock

 

Sometimes, my 3318 box (T9 4GB memory + 32GB flash) stop working (there is no network, no signal on HDMI etc).

If I unplug the power and plug the power again, it works again but repeat this error after 1-2 days.

There is no heavy service on this box. The CPU temperature is around 50-55 degres. 

I just confused which command should I check once booting the box again to find out the root cause of this issue.

 

Thank you.

Link to comment
Share on other sites

4 hours ago, fabiobassa said:

@chinhhut

 

What services/app have installed?

Did kernel crashed before new installation or crashes even with unloaded system ?

As @jockexplained me, no user space applications should ever freeze/panic the kernel , unless drivers are involved.

And if kernel crashes I am afraid you Will not have any log either

I install Home Assisstant Supervisor, Docker on this box. 

 

>Did kernel crashed before new installation or crashes even with unloaded system ?

It works normally after finishing all the installation, only crashes after several hours of working (10-24 hours).

 

I have 2 boxes of 3318 and only 1 box got this issue. 

 

If this issue related to hardware, I still confused how to see the log of the system to see the root cause.

 

Thank you.

Link to comment
Share on other sites

10 hours ago, chinhhut said:

If this issue related to hardware, I still confused how to see the log of the system to see the root cause.

If the kernel crashes then you have no other way than attach a serial adapter to the board UART to log continously, in the hope the kernel says something before the freeze happens.

Link to comment
Share on other sites

On 4/16/2021 at 12:30 PM, jock said:

Run apt-mark hold linux-image-edge-rockchip64 linux-dtb-edge-rockchip64 to avoid the upgrade of kernel with the armbian official one, since it still does not contain rk3318

Hi @jock

I did use the 'apt mark' command as shown in the first post but now it seems to be using the linux-image-current-rockchip64 branch..
Should linux-image-current-rockchip64 be 'apt mark'?

241477039_Capturedcran(32).thumb.png.f334d06b91331b5db32684dad27dcef0.png

Link to comment
Share on other sites

4 minutes ago, MX10.AC2N said:

Hi @jock

I did use the 'apt mark' command as shown in the first post but now it seems to be using the linux-image-current-rockchip64 branch..
Should linux-image-current-rockchip64 be 'apt mark'?

241477039_Capturedcran(32).thumb.png.f334d06b91331b5db32684dad27dcef0.png

Yes. true!

Thanks for reporting, I need a definitive solution for that :rolleyes:

Link to comment
Share on other sites

On 3/7/2022 at 5:24 PM, chinhhut said:

Hello @jock

Sometimes, my 3318 box (T9 4GB memory + 32GB flash) stop working (there is no network, no signal on HDMI etc).

If I unplug the power and plug the power again, it works again but repeat this error after 1-2 days.

There is no heavy service on this box. The CPU temperature is around 50-55 degres. 

I just confused which command should I check once booting the box again to find out the root cause of this issue.

 

I have a similar problem. My X88 Pro 10 box becomes unavailable on the network at 1-2 days after boot.
I have also Home Assistant (docker) installed.
On the serial console I see these repeating messages:

[549535.724967] EXT4-fs error (device sda1): __ext4_find_entry:1614: inode #297037: comm coredns: reading directory lblock 0
[549540.725016] EXT4-fs error (device sda1): __ext4_find_entry:1614: inode #297037: comm coredns: reading directory lblock 0
[549542.223122] EXT4-fs error (device sda1): __ext4_find_entry:1614: inode #98370: comm cron: reading directory lblock 0
[549545.725179] EXT4-fs error (device sda1): __ext4_find_entry:1614: inode #297037: comm coredns: reading directory lblock 0
[549546.552355] EXT4-fs error (device sda1): __ext4_find_entry:1614: inode #854279: comm dockerd: reading directory lblock 0
[549546.584734] EXT4-fs error (device sda1): __ext4_find_entry:1614: inode #1117992: comm dockerd: reading directory lblock 0
[549547.248250] EXT4-fs error (device sda1): __ext4_find_entry:1614: inode #98305: comm dockerd: reading directory lblock 0

 

So it means that the kernel is alive. Problem is with the disk access.

I am booting from SSD disk attached to the USB port. Disk has two partitions - system (armbian) and data:

root@hassio:~# mount | grep mmcfdisk -l /dev/sda
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Disk model: M4SSD1          
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbf43edfd

Device     Boot    Start       End   Sectors   Size Id Type
/dev/sda1          32768  29982719  29949952  14.3G 83 Linux
/dev/sda2       29982720 500118191 470135472 224.2G 83 Linux

 

How can I log all the messages to the /dev/sda2 partittion? (mounted as /DATA)
Alternatively I can connect USB flash disk to the USB 3.0 port and store the logs here - if possible.
 

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