CSC Armbian for RK3318/RK3328 TV box boards


jock
 Share

26 26

Recommended Posts

@Wester_Minsk
 

Quote

....or share a link to a simple instruction


I suppose you want to build a uboot for supporting booting from usb3 .
This isn't a simple task and if it was simple,  somebody else already could had done for all of us. It is needed deep knowledge of processes undergoing the compilation and the modding of c sources. It isn't just a flag " boot from usb3..." but a chain on changes to do to the code, if someone already has written a code for it

By the way here is the link
https://github.com/rockchip-linux/u-boot

but then don't ask for assistance in what when and where apply patch since if this infos were clear and well known uboot already had have usb3 support.

But you really welcome to study and share your results

Link to post
Share on other sites

Donate and support the project!

9 часов назад, fabiobassa сказал:

@Wester_Minsk
 


I suppose you want to build a uboot for supporting booting from usb3 .
This isn't a simple task and if it was simple,  somebody else already could had done for all of us. It is needed deep knowledge of processes undergoing the compilation and the modding of c sources. It isn't just a flag " boot from usb3..." but a chain on changes to do to the code, if someone already has written a code for it

By the way here is the link
https://github.com/rockchip-linux/u-boot

but then don't ask for assistance in what when and where apply patch since if this infos were clear and well known uboot already had have usb3 support.

But you really welcome to study and share your results

Thanks for the link!
A very interesting topic for me.
Jokingly speaking - "@ I have "Windows" of the brain."
I've been goofing around in xp,7,10 for 25 years. Linux is difficult for me so far, but I'm trying and moving a little.

I've done some experiments. 1 was successful.
I erased the eMMC, burned the image to SD and deleted the USR and VAR folders from it and inserted it into the board. Then I recorded the same image on an SSD and connected it to USB 3. The system started and works very well and quickly until the first reboot, then u-boot no longer sees the kernel on the SSD:

Скрытый текст

20220115_211352.thumb.jpg.30aae4d3a9c75b008f24f6d2006f76d8.jpg

After overwriting the SD and SSD images, the system starts again.

Can such a method be workable?

Maybe you can build an image with a u-boot without a kernel?
I'll continue the tests.
If this is a lot of work for you, then I'll try again.

Link to post
Share on other sites

a few tests on cpu 1000

https://storage.jamesachambers.com/

     Category                  Test                      Result
HDParm                    Disk Read                 290.29 MB/s
HDParm                    Cached Disk Read          256.37 MB/s
DD                        Disk Write                90.2 MB/s
FIO                       4k random read            12256 IOPS (49024 KB/s)
FIO                       4k random write           5804 IOPS (23219 KB/s)
IOZone                    4k read                   26091 KB/s
IOZone                    4k write                  16847 KB/s
IOZone                    4k random read            16587 KB/s
IOZone                    4k random write           24202 KB/s

                          Score: 5507

my raspberry have 7,590

if up cpu is on the board, the result will be about with pi4

Link to post
Share on other sites

15 hours ago, jock said:

First post: there is a list of things useful for support and debug.

Thanks for the direction .
since i am allow of one post / day let hope i have all the info.

Photo : https://imgur.com/a/nSiPiN2
DTB  i cant attache file yet ... but it is the rk3318-box.dtb from the Armbian 21.11 - Debian Bullseye desktop [xfce] - mainline kernel 5.15.2 - Download
armbianmonitor -u : http://ix.io/3Mgd

 

i can ssh to the box via wired 
i am running from sd for now, i did not move to emmc for now.

 

hope that will help

Thanks

Link to post
Share on other sites

4 hours ago, Wester_Minsk said:


I erased the eMMC, burned the image to SD and deleted the USR and VAR folders from it and inserted it into the board. Then I recorded the same image on an SSD and connected it to USB 3. The system started and works very well and quickly until the first reboot, then u-boot no longer sees the kernel on the SSD:

 

After overwriting the SD and SSD images, the system starts again.

 

 

Correct me if I'm wrong. But you want to run the system from a USB3 SSD?

If so, I think the easiest would be to just have the boot on eMMC or SD-card, and the rest of the system on the SSD, then "almost" everything would be running from the fast SSD.

Link to post
Share on other sites

5 часов назад, curse сказал:

Correct me if I'm wrong. But you want to run the system from a USB3 SSD?

If so, I think the easiest would be to just have the boot on eMMC or SD-card, and the rest of the system on the SSD, then "almost" everything would be running from the fast SSD.

You understood correctly.  I see it like this: U-boot (no kernel) with sd/emmc , kernel on SSD.

Link to post
Share on other sites

2 hours ago, Wester_Minsk said:

You understood correctly.  I see it like this: U-boot (no kernel) with sd/emmc , kernel on SSD.

Well not just the kernel, but the whole rootfs must sit on SSD.

Plus if you cloned you sdcard on SSD, both sdcard rootfs and SSD rootfs have the same UUID, and this may confuse the kernel about which rootfs use at boot.

This is pretty normal if you think about it: how does the kernel can know if you want to boot from sdcard or boot from SSD when both contain the same bootable system?

The rootfs UUID is specified in /boot/armbianEnv.txt.

 

There are several approaches:

  • You clone the sdcard on SSD, then you remove the rootfs partition from the sdcard
  • Install just the bootloader on the eMMC erasing the eMMC and then copying the first 4 megabytes of the sdcard (/dev/mmblk0) on the eMMC (/dev/mmcblk2)
  • Change the UUID of the sdcard rootfs, but this will prevent the sdcard rootfs from full boot

The most clean approach is #2, taking in account that you should not plug both sdcard and SSD at the same time when the same cloned filesystem is on them for the usual UUID reason of above.

Link to post
Share on other sites

6 минут назад, jock сказал:

Well not just the kernel, but the whole rootfs must sit on SSD.

Plus if you cloned you sdcard on SSD, both sdcard rootfs and SSD rootfs have the same UUID, and this may confuse the kernel about which rootfs use at boot.

This is pretty normal if you think about it: how does the kernel can know if you want to boot from sdcard or boot from SSD when both contain the same bootable system?

The rootfs UUID is specified in /boot/armbianEnv.txt.

 

There are several approaches:

  • You clone the sdcard on SSD, then you remove the rootfs partition from the sdcard
  • Install just the bootloader on the eMMC erasing the eMMC and then copying the first 4 megabytes of the sdcard (/dev/mmblk0) on the eMMC (/dev/mmcblk2)
  • Change the UUID of the sdcard rootfs, but this will prevent the sdcard rootfs from full boot

The most clean approach is #2, taking in account that you should not plug both sdcard and SSD at the same time when the same cloned filesystem is on them for the usual UUID reason of above.

Thank you.

I will work with it.

Link to post
Share on other sites

I have done a lot of hardware tests to start with USB 3 on my RK3318 board
result:
I have 3 usb 3.0 to sata controllers, only one worked on my board via usb 3, on the core 5.12.2. But at the same time, after migrating from eMMC to SSD, this controller loaded the system poorly, I had to switch to hot so that u-boot could see the system partition. I connected another controller, u-boot reads it perfectly and the system starts stably.

At the moment, I have a confident start with usb3 ports, and continue testing.

Link to post
Share on other sites

I have Armbian_21.11.0-trunk_Rk3318-box_hirsute_edge_5.14.14_xfce_desktop running on a Z28 (original). This has the RK3328 SoC with an RTL8188 WifI chip. Quite acceptable.

 

I replaced xfce with mate following:

and a lot of tweaking.

 

I also am running the xRDP server following https://www.hiroom2.com/ubuntu-2004-xrdp-mate-en and https://github.com/neutrinolabs/pulseaudio-module-xrdp/wiki/README , with a bit of tweaking.

 

I can give more details if anyone expresses interest.

.

There are two issues that I would like some help with if anyone has any info to share:

 

1. RTL8188 WiFi chip is not recognized

 

2. My (admittedly cheap) HDMI TV is recognized as 1080P 30Hz. However other devices I connect to it do use 1080P 60Hz. These refresh rates are as reported by the TV in an info panel that reports the HDMI connectivity status.

Edited by glenb
specify WiFi chip in point 1.
Link to post
Share on other sites

18 hours ago, Wester_Minsk said:

There was a simple way, and it was in front of my nose.


This is the standard way from the official instructions of the Armbian:

 

Start the install script:
nand-data-installation

I chose:
of booting from eMMC/NAND, system to SATA/USB

 

The system migrates to a USB3 SSD
Restart and boot the system from USB3

 

now a stable start with USB3

Much better, I totally forgot about nand-sata-install script, mostly because I never tested it on rk3318 boards :)

Link to post
Share on other sites

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

Much better, I totally forgot about nand-sata-install script, mostly because I never tested it on rk3318 boards :)

 

I have done the migration to SSD several times. It works well.
I also noticed that armbian-config started to work incorrectly. As I understand it, the path to the folder with scripts has changed, it does not work to change the language or region. I think this is a solvable problem.

Otherwise, everything is OK! :) 🍺

 

Link to post
Share on other sites

I'm trying to use the 7-segment display on my H96 Max box.
The display is controlled by an FD6551 driver IC.
I'm using Armbian 21.11 - Debian Bullseye minimal-mainline kernel 5.15.2. It was very difficult, but I managed to compile a driver for it, which resulted in an openvfd.ko kernel module. I put this in the /lib/modules/5.15.2-rockchip64 directory. I tried different config files and placed them in the /etc/modprobe.d directory called vfd.conf. When I try to load the module (modprobe openvfd), this error always occurs:

libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 10: ignoring bad line starting with 'vfd_gpio_clk='0,65,0''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 11: ignoring bad line starting with 'vfd_gpio_dat='0,64,0''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 12: ignoring bad line starting with 'vfd_gpio_stb='0,0,0xFF''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 17: ignoring bad line starting with 'vfd_chars='0,4,3,2,1''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 28: ignoring bad line starting with 'vfd_dot_bits='0,1,3,2,4,5,6''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 36: ignoring bad line starting with 'vfd_display_type='0x00,0x00,0x00,0x00'

Unfortunately, I'm stuck here, I can't find more information on how to install openvfd properly.

Link to post
Share on other sites

11 hours ago, paradigman said:

I'm trying to use the 7-segment display on my H96 Max box.
The display is controlled by an FD6551 driver IC.
I'm using Armbian 21.11 - Debian Bullseye minimal-mainline kernel 5.15.2. It was very difficult, but I managed to compile a driver for it, which resulted in an openvfd.ko kernel module. I put this in the /lib/modules/5.15.2-rockchip64 directory. I tried different config files and placed them in the /etc/modprobe.d directory called vfd.conf. When I try to load the module (modprobe openvfd), this error always occurs:

libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 10: ignoring bad line starting with 'vfd_gpio_clk='0,65,0''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 11: ignoring bad line starting with 'vfd_gpio_dat='0,64,0''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 12: ignoring bad line starting with 'vfd_gpio_stb='0,0,0xFF''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 17: ignoring bad line starting with 'vfd_chars='0,4,3,2,1''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 28: ignoring bad line starting with 'vfd_dot_bits='0,1,3,2,4,5,6''
libkmod: ERROR ../libkmod/libkmod-config.c:657 kmod_config_parse: /etc/modprobe.d/vfd.conf line 36: ignoring bad line starting with 'vfd_display_type='0x00,0x00,0x00,0x00'

Unfortunately, I'm stuck here, I can't find more information on how to install openvfd properly.

BAD LINE means that your syntax is wrong...
Also try to check in hex form if there are some "hidden" chars (usually when you did copy/paste from web pages). Sometimes also the type of EOL (End of Line) chars can be a problem.
 

Link to post
Share on other sites

 Share

26 26