Firefly team from T-chip company has send me some of their Rockchip development boards, and we’ve already checked the provided boards and accessories, so today I’ll report my experience with one of the board: ROC-RK3328-CC also known as Renegade.
I won’t test it with Android, since I have already reviewed RK3328 Android TV boxes such as Zidoo X7, and I’ve been told the team is hard at work with Android 8.1 SDK, so an Oreo image should be released in a few weeks/months.
So I had initially planned to report my experience with one of the Linux images, then show how to install mainline Linux (currently 4.17) to the board, and reports what works. However, I encountered many issues, although likely not directly related to the board or its software support, so instead I’ll write about my experience getting started with the board, and list all the issues I had so that people can avoid those – or at least easily find the root cause of their issues – with ROC-RK3328-CC and potentially other Arm Linux boards.
Hardware preparations & requirements
The board does not ship with a heatsink by default, but you should certainly add one to your order to avoid throttling and better & stable performance.
Installing the heatsink is very easy, since you just need to push it until the two bits on the corner clip with the board. Just remember to peel off the blue protective film.
If you’ve ever used a Raspberry Pi board, the required accessories will pretty much be the same, and the company recommends a 5V/2A USB power supply, as well as micro SD card with 4GB or greater capacity, and you may also need a micro SD card reader to flash the firmware, if your host computer does not already have one. A serial debug board may be useful to debug issues.
In case you wonder where I got the 5V/2A power supply above with a switch, that’s the one I got with Libre Computer AML-S905X-CC “Le Potato” board.
You’ll probably want to add other optional cables and accessories like Ethernet, HDMI cable and monitor/TV, and USB keyboard & mouse.
Getting Started with Linux on ROC-RK3328-CC
The board is supported by two companies Firefly Team and Libre Computer, and that means we end up with two sets of documentation: one in Firefly Wiki, and the other on Readthedocs.io. I’ve had a quick look at both, and they appear to be in sync, but if something is not clear in one location, it may pay off to check the other link just in case.
That also means we have two separate support forums: Firefly BBS and LoveRpi forums (now down, Sep. 2021), and obviously the content is different, so you may want to browse both in case you are looking for a solution.
The board was sent to me by T-chip/Firefly team so I’ll rely on their documentation and firmware images for this guide/review.
Time to go to the download page to find a Linux image for the board, and there are three Linux firmware images listed: Debian, LibreELEC, and Ubuntu. You’ll notice the dates on the website are a little old (January and April), but if you click you’ll see the actual binary images are more recent May/June.
I decided to go with the Ubuntu 18.04 LXDE image, and first selected the “official server”, but since it was slow 25 KB/s, I went with the Mediafire link with was much faster (550 KB/s).The official download server may work well in China, but outside of China I’d recommend the Google Drive or MediaFire links instead.
Now we can install Etcher and flash the image (ROC-RK3328-CC-ubuntu18.04-LXDE_20180605.img.xz) to a micro SD card. I used a cheap Kingmax 32GB micro SD card that I had used for other reviews before.
I inserted the micro SD card into the board, and connected everything else, including a USB 3.0 hard drive, but not the USB to serial board. I had already setup the serial connection on ROCK64 board before, and it will be similar for ROC-RK3328-CC, except the header pinout is different.
I pressed the power switch on the power adapter cord, and within a few seconds I could see the login prompt on my HDMI TV, and could even login through SSH with firefly/firefly credential:
1 |
ssh firefly@firefly.local |
And Then The Problems Started…
But then I noticed the LXDE desktop environment would not show up… and shortly after I noticed interesting messages on the TV…
Kernel panic at boot time. I disconnected the hard drive in case it could be related to power issues, and tried again and it still failed. Hmmm. Maybe that image is not stable yet, so I tried with the Ubuntu 16.04 image (ROC-RK3328-CC_Ubuntu16.04_Arch64_20180514.img.xz), and the desktop environment would not show up either, but after a while, I noticed a different kind of message.
Lots of “dwmmc_rockchip ff500000.dwmmc: Unexpected interrupt latency” messages. What are those? Some other people also had this issue, and dwmmc_rockchip is Rockchip MMC driver which handles flash storage. A little later the kernel panic kicked in just like with the Ubuntu 18.04 image.
So after all, maybe my micro SD card is not good anymore, although it passed Etcher verification process. So I switched to another micro SD card (ADATA 16GB), but sadly the problem occurred yet again. Can I have two bad micro SD cards? Possible, but unlikely. I though maybe there’s some driver issue in the Ubuntu image, and I’d try with the Debian image.
Debian 9 in ROC-RK3328-CC Board
So I download and flash ROC-RK3328-CC_Debian9-Arch64_20180525.img.xz, and while booting I got some other messages:
During the first boot, the firmware will automatically resize the rootfs partition to make use of all storage available on the board. That’s a good thing, but the first boot will take a while, and maybe many I/Os during Ubuntu boot revealed some performance in my micro SD card with some code potentially timing out, and leading to the errors.
But nevertheless, I finally could get to LXDE desktop environment. I started on Saturday afternoon, and managed to boot on Sunday morning. It took me around 5-6 hours of my time to achieve this “feat”.
You can check out the full first boot log for reference.
We can see it took 220 seconds (3m 20s) to boot with my 16GB card, but subsequent boots are much faster, well under a minute.
Some more info:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
firefly@firefly:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/root 15G 1.6G 13G 11% / devtmpfs 462M 0 462M 0% /dev tmpfs 462M 0 462M 0% /dev/shm tmpfs 462M 13M 450M 3% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 462M 0 462M 0% /sys/fs/cgroup tmpfs 93M 8.0K 93M 1% /run/user/1000 tmpfs 93M 0 93M 0% /run/user/0 firefly@firefly:~$ free -h total used free shared buff/cache available Mem: 923M 170M 517M 31M 235M 706M Swap: 0B 0B 0B firefly@firefly:~$ uname -a Linux firefly 4.4.114-00004-gdfc5669-dirty #32 SMP Thu May 24 19:38:23 HKT 2018 aarch64 GNU/Linux firefly@firefly:~$ cat /etc/issue Debian GNU/Linux 9 \n \l firefly@firefly:~$ cat /proc/cpuinfo processor : 0 BogoMIPS : 48.00 Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 CPU implementer : 0x41 CPU architecture: 8 CPU variant : 0x0 CPU part : 0xd03 CPU revision : 4 .... Serial : 8adcc906d88f3745 |
The rootfs was indeed properly resized, and I’ve got 13GB storage free. However, while the company allegedly sent me the 2GB version of the board – that’s what the sticker says – only 1GB RAM is shown in Linux. So I went back to check the resolution photos of ROC-RK3328-CC board, and found out it had two Samsung K4A4G165WE-BCRC DDR4 chip with 4Gb capacity each, so that’s 1GB RAM in total. So just a sticker issue, not a technical issue.
The processor details are exactly the same as in ROCK64 board, which should be expected. Now let’s check for module:
1 2 3 4 |
firefly@firefly:~$ lsmod Module Size Used by firefly@firefly:~$ ls /sys/class/gpio/ export gpiochip1000 gpiochip1032 gpiochip1064 gpiochip1096 gpiochip1510 unexport |
None are loaded, but for example the GPIO drivers is there, just built into the kernel, and not as a module. GPIO should work, but I have not tested them, as the produced will be the same as for GPIO’s on ROCK64 board just with a different pin layout.
3D Acceleration with OpenGL ES
At this stage, I wanted to test 3D acceleration, by installing the packages required for es2gears and glmark2-es2:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
firefly@firefly:~$ sudo apt install mesa-utils-extra glmark2-es2 Reading package lists... Done Building dependency tree Reading state information... Done Package glmark2-es2 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'glmark2-es2' has no installation candidate firefly@firefly:~$ sudo apt install mesa-utils-extra Reading package lists... Done Building dependency tree Reading state information... Done mesa-utils-extra is already the newest version (8.3.0-3). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libc6-dev : Depends: linux-libc-dev (>= 4.9.65-3) but 4.4.114-00003-g78cbf59-dirty-29 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). |
Hmm. it failed, so I ran:
1 |
sudo apt --fix-broken install |
and the system tried to install linux-libc-dev, but could not complete as the board hung. After restarting the board, I had a facepalm moment when I found out the tools were already pre-installed.
So I could run es2_info:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
es2_info EGL_VERSION: 1.4 Linux-r7p0-00rel0 EGL_VENDOR: ARM EGL_EXTENSIONS: EGL_KHR_image, EGL_KHR_image_base, EGL_KHR_image_pixmap, EGL_EXT_image_dma_buf_import, EGL_KHR_gl_texture_2D_image, EGL_KHR_gl_texture_cubemap_image, EGL_KHR_gl_renderbuffer_image, EGL_KHR_reusable_sync, EGL_KHR_fence_sync, EGL_KHR_swap_buffers_with_damage, EGL_EXT_swap_buffers_with_damage, EGL_KHR_lock_surface, EGL_KHR_lock_surface2, EGL_EXT_create_context_robustness, EGL_ANDROID_blob_cache, EGL_KHR_create_context, EGL_KHR_partial_update, EGL_KHR_create_context_no_error EGL_CLIENT_APIS: OpenGL_ES GL_VERSION: OpenGL ES 2.0 GL_RENDERER: Mali-450 MP GL_EXTENSIONS: GL_OES_texture_npot, GL_OES_vertex_array_object, GL_OES_compressed_ETC1_RGB8_texture, GL_EXT_compressed_ETC1_RGB8_sub_texture, GL_OES_standard_derivatives, GL_OES_EGL_image, GL_OES_depth24, GL_ARM_rgba8, GL_ARM_mali_shader_binary, GL_OES_depth_texture, GL_OES_packed_depth_stencil, GL_EXT_texture_format_BGRA8888, GL_OES_vertex_half_float, GL_EXT_blend_minmax, GL_OES_EGL_image_external, GL_OES_EGL_sync, GL_OES_rgb8_rgba8, GL_EXT_multisampled_render_to_texture, GL_EXT_discard_framebuffer, GL_OES_get_program_binary, GL_ARM_mali_program_binary, GL_EXT_shader_texture_lod, GL_EXT_robustness, GL_OES_depth_texture_cube_map, GL_KHR_debug, GL_ARM_shader_framebuffer_fetch, GL_ARM_shader_framebuffer_fetch_depth_stencil, GL_OES_mapbuffer, GL_KHR_no_error [xcb] Unknown request in queue while appending request [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. es2_info: ../../src/xcb_io.c:151: append_pending_request: Assertion `!xcb_xlib_unknown_req_pending' failed. Aborted |
es2_info will not end graciously, but it was also the case for es2_info on ROCK64, but at least it shows Mali-450 MP drivers are installed, and OpenGL ES enabled.
es2gears worked, but at just about 30 fps, which may be because video output was set to 1080p30 (TBC). Anyway, ROCK64 was not much better at around 35 fps with the exact same 1.4 Linux-r7p00-00rel0 Mali driver.
glmark2-es2 works too, but again with a rather low score:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
glmark2-es2 ======================================================= glmark2 2017.07 ======================================================= OpenGL Information GL_VENDOR: ARM GL_RENDERER: Mali-450 MP GL_VERSION: OpenGL ES 2.0 ======================================================= [build] use-vbo=false: FPS: 38 FrameTime: 26.316 ms [build] use-vbo=true: FPS: 33 FrameTime: 30.303 ms [texture] texture-filter=nearest: FPS: 24 FrameTime: 41.667 ms [texture] texture-filter=linear: FPS: 29 FrameTime: 34.483 ms [texture] texture-filter=mipmap: FPS: 30 FrameTime: 33.333 ms [shading] shading=gouraud: FPS: 30 FrameTime: 33.333 ms [shading] shading=blinn-phong-inf: FPS: 30 FrameTime: 33.333 ms [shading] shading=phong: FPS: 30 FrameTime: 33.333 ms [shading] shading=cel: FPS: 30 FrameTime: 33.333 ms [bump] bump-render=high-poly: FPS: 29 FrameTime: 34.483 ms [bump] bump-render=normals: FPS: 28 FrameTime: 35.714 ms [bump] bump-render=height: FPS: 20 FrameTime: 50.000 ms [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 18 FrameTime: 55.556 ms [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 16 FrameTime: 62.500 ms [pulsar] light=false:quads=5:texture=false: FPS: 20 FrameTime: 50.000 ms [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 15 FrameTime: 66.667 ms [desktop] effect=shadow:windows=4: FPS: 19 FrameTime: 52.632 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 13 FrameTime: 76.923 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 16 FrameTime: 62.500 ms [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 16 FrameTime: 62.500 ms [ideas] speed=duration: FPS: 19 FrameTime: 52.632 ms [jellyfish] <default>: FPS: 18 FrameTime: 55.556 ms Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0 [terrain] <default>: Unsupported [shadow] <default>: FPS: 17 FrameTime: 58.824 ms [refract] <default>: FPS: 9 FrameTime: 111.111 ms [conditionals] fragment-steps=0:vertex-steps=0: FPS: 19 FrameTime: 52.632 ms [conditionals] fragment-steps=5:vertex-steps=0: FPS: 18 FrameTime: 55.556 ms [conditionals] fragment-steps=0:vertex-steps=5: FPS: 19 FrameTime: 52.632 ms [function] fragment-complexity=low:fragment-steps=5: FPS: 19 FrameTime: 52.632 ms [function] fragment-complexity=medium:fragment-steps=5: FPS: 18 FrameTime: 55.556 ms [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 19 FrameTime: 52.632 ms [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 19 FrameTime: 52.632 ms [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 19 FrameTime: 52.632 ms ======================================================= glmark2 Score: 21 ======================================================= |
The score (21) is actually lower than the one on ROCK64 (26) but still in the same ballpark. glmark2-es2 program installed in ROC-RK3328-CC is more recent (2017 vs 2014), and can passed a few more tests, e.g. refract failed on ROCK64, but passed in our Renegade board.
Problems are back with HDD and Micro SD Card
Having just shown 3D graphics acceleration on the board, I wanted to try to play some videos now, so I connected my USB 3.0 hard drive where I store test videos, and it was properly detected:
1 2 3 4 5 6 |
[ 2568.537863] usb 5-1: new SuperSpeed USB device number 2 using xhci-hcd [ 2568.551987] usb 5-1: New USB device found, idVendor=0bc2, idProduct=2312 [ 2568.552608] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 2568.553338] usb 5-1: Product: Expansion [ 2568.553765] usb 5-1: Manufacturer: Seagate [ 2568.554151] usb 5-1: SerialNumber: NA495NNC |
However, none of the partition were detected:
1 2 3 4 5 6 7 8 |
lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT mmcblk0 179:0 0 14.7G 0 disk |-mmcblk0p1 179:1 0 3.9M 0 part |-mmcblk0p2 179:2 0 4M 0 part |-mmcblk0p3 179:3 0 4M 0 part |-mmcblk0p4 179:4 0 112M 0 part `-mmcblk0p5 179:5 0 14.6G 0 part / |
I could see my power meter show around 10 Watts, so that 5V/2A power supply may not be powerful enough, and I could not find any 5V/2.5A USB power adapter in my house. So I reverted to connect my USB hard drive to one of the USB 2.0 port of the board, while connecting the keyboard to the USB 3.0 port, and… success!:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk |-sda1 8:1 0 244.1G 0 part |-sda2 8:2 0 244.1G 0 part |-sda3 8:3 0 244.1G 0 part `-sda4 8:4 0 199.1G 0 part mmcblk0 179:0 0 14.7G 0 disk |-mmcblk0p1 179:1 0 3.9M 0 part |-mmcblk0p2 179:2 0 4M 0 part |-mmcblk0p3 179:3 0 4M 0 part |-mmcblk0p4 179:4 0 112M 0 part `-mmcblk0p5 179:5 0 14.6G 0 part / |
I’m pretty sure using a 5V/2.5A power supply or greater would have fixed this issue. I have many such power adapter, just none with a micro USB plug, so I went to eBay and purchased a 5.5/2.1mm to micro USB adapter for one $1, so next time I won’t have this issue with (micro) USB powered boards.
All four partitions (NTFS, EXT-4, exFAT, and BTRFS) could be mounted:
1 2 3 4 5 |
firefly@firefly:~$ mount | grep USB3 /dev/sda4 on /media/firefly/USB3_BTRFS type btrfs (rw,nosuid,nodev,relatime,noacl,space_cache,subvolid=5,subvol=/,uhelper=udisks2) /dev/sda3 on /media/firefly/USB3_EXFAT type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2) /dev/sda2 on /media/firefly/USB3_EXT4 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2) /dev/sda1 on /media/firefly/USB3_NTFS type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2) |
I intended to play a 1080p H.264 video at this stage, but ffmpeg, nor any other video player like vlc or smplayer, were installed.
So I tried to install ffmpeg:
1 2 3 4 5 6 7 8 9 10 |
sudo apt install ffmpeg ... Preparing to unpack .../00-linux-libc-dev_4.9.88-1+deb9u1_arm64.deb ... Unpacking linux-libc-dev:arm64 (4.9.88-1+deb9u1) over (4.4.114-00003-g78cbf59-dirty-29) ... dpkg: error processing archive /tmp/apt-dpkg-install-oRK7yD/00-linux-libc-dev_4.9.88-1+deb9u1_arm64.deb (--unpack): unable to stat './usr/include/linux/netfilter/ipset/ip_set_list.h' (which I was about to install): Structure needs cleaning dpkg: error while cleaning up: unable to restore backup version of '/usr/include/linux/netfilter/ipset/ip_set_hash.h': Read-only file system ... |
But it failed, and even switched my rootfs to read-only. Looking at the kernel, it does not look like a low level error, but a file system error:
1 2 |
[ 142.112470] EXT4-fs error (device mmcblk0p5): ext4_lookup:1605: inode #9507: comm dpkg: deleted inode referenced: 31411 [ 142.201240] EXT4-fs (mmcblk0p5): Remounting filesystem read-only |
Using remount,rw option to remount the drive as read/write would not work, but after rebooting I could get back to read/write mode. So I tried again, and same error. I repeated this a third and still the same problem. After all it may be some hardware issue, and the file in /tmp is downloaded/extracted each time.
eMMC flash Module to the Rescue, and Ubuntu 18.04 on ROC-RK3328-CC Board
Then I remembered I got an eMMC flash module with Libre Computer’s Le Potato board, and thought it might be good idea to give it a try on ROC-RK3328-CC “Renegade” board, even using the Ubuntu image to see if the problems would just magically go away. I also used an eMMC flash module with Rock64 board, but since those modules are compatible with Hardkernel’s eMMC flash module, I could flash it like micro SD cards using a micro SD card to eMMC flash adapter. Libre Computer’s eMMC flash modules have a different layout to deliver more current, and I don’t have a adapter, so the flashing method is differrent. First let’s install the module on the board, and take out the micro SD card.
You’ll also need a male to male USB type A cable for flashing the firmware to the board. If you don’t have one, you should definitely get one since those are often required for reflashing firmware in TV boxes and/or development boards with eMMC flash.
If you want to flash an SD card image (aka raw firmware), you’ll need rkdeveloptool command line tool, and I explain the fully procedure in more details in the post entitled Flashing Firmware to Rockchip Devices in Linux with rkdeveloptool Open Source Utility. Basically I had to run five commands to flash Ubuntu 18.04 to the eMMC flash module:
1 2 3 4 5 |
xz -d ROC-RK3328-CC-ubuntu18.04-LXDE_20180605.img.xz wget https://github.com/rockchip-linux/rkbin/raw/master/rk33/rk3328_loader_ddr786_v1.06.243.bin rkdeveloptool db rk3328_loader_ddr786_v1.06.243.bin rkdeveloptool wl 0x0 ROC-RK3328-CC-ubuntu18.04-LXDE_20180605.img rkdeveloptool rd |
The first command extract the raw image file, the second downloads the bootloader, the third and four flash the bootloader and raw image respectively, and the last one simply reboots the board.
And lo and behold within a short time, I could access the Ubuntu desktop.
Everything appears to work, and the only issue was the lack of support for exFAT file system, so one of the partitions on my hard drive could not be mounted. Anyway, that means the system may have trouble running in a stable fashion with slow storage. I’ve covered potential performance issues about micro SD cards for development board, but it’s the first time I actually experienced stability issues, beside programs appearing to freeze due to poor random I/O performance, with kernel panic and so on. So maybe there’s a driver issue too. But based on my experience, with faster storage like the eMMC flash module I used in the review, and likely better micro SD card, many problems seem to go away.
Here’s the boot log (not the fist one) for reference:
Based on timing provided by dmesg, the kernel boots up in less than 12 seconds to the point where we get network connectivity, and drive partitions are mounted right at the 15 seconds, and we can get from power desktop to using the desktop in less than 20 seconds. But bad for a $35 board.
Some more details about OS, memory and storage:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
firefly@firefly:~$ uname -a Linux firefly 4.4.114 #46 SMP Tue Jun 5 17:30:08 HKT 2018 aarch64 aarch64 aarch64 GNU/Linux firefly@firefly:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS" firefly@firefly:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/root 58G 2.7G 53G 5% / devtmpfs 462M 0 462M 0% /dev tmpfs 462M 0 462M 0% /dev/shm tmpfs 462M 892K 461M 1% /run tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 462M 0 462M 0% /sys/fs/cgroup /dev/mmcblk1p4 100M 16M 84M 17% /boot tmpfs 93M 16K 93M 1% /run/user/1000 tmpfs 93M 0 93M 0% /run/user/0 /dev/sda4 200G 174G 24G 89% /media/firefly/USB3_BTRFS /dev/sda2 241G 181G 48G 80% /media/firefly/USB3_EXT4 /dev/sda1 245G 182G 63G 75% /media/firefly/USB3_NTFS firefly@firefly:~$ free -h total used free shared buff/cache available Mem: 923M 239M 169M 12M 515M 657M Swap: 0B 0B 0B |
This time uas module is loaded as I connected a USB hard drive, and GPIO are stil supported just like in Debian:
1 2 3 4 5 6 |
firefly@firefly:~$ lsmod Module Size Used by uas 20480 0 firefly@firefly:~$ ls /sys/class/gpio/ export gpiochip1032 gpiochip1096 unexport gpiochip1000 gpiochip1064 gpiochip1510 |
Before going further, let me throw iozone results for the eMMC flash module as somebody may ask:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
iozone -e -I -a -s 500M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 Iozone: Performance Test of File I/O Version $Revision: 3.429 $ Compiled for 64 bit mode. Build: linux Include fsync in write timing O_DIRECT feature enabled Auto Mode Output is in kBytes/sec Time Resolution = 0.000001 seconds. Processor cache size set to 1024 kBytes. Processor cache line size set to 32 bytes. File stride size set to 17 * record size. random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 512000 4 19003 20795 17580 16112 13389 10283 512000 16 31335 34158 31586 31512 28928 33337 512000 512 36303 36831 44674 44652 44492 36821 512000 1024 39564 40208 44889 44889 44798 40259 512000 16384 39963 40581 45504 45391 45507 40676 iozone test complete. |
Sequential read/write speed are not that impressive at 45 MB/s and 40 MB/s, but random I/Os looks pretty good, and that’s the important thing for this type of appication.
es2gears and glmark2-es2 are not installed in Ubuntu 18.04, but this time I could indeed install both with:
1 |
sudo apt install es2gears glmark2-es2 |
Both worked, but es2gears was limited to around 23 fps, and the score for glmark2-es2 was also quite lower:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
======================================================= glmark2 2017.07 ======================================================= OpenGL Information GL_VENDOR: ARM GL_RENDERER: Mali-450 MP GL_VERSION: OpenGL ES 2.0 ======================================================= [build] use-vbo=false: FPS: 18 FrameTime: 55.556 ms [build] use-vbo=true: FPS: 13 FrameTime: 76.923 ms [texture] texture-filter=nearest: FPS: 12 FrameTime: 83.333 ms [texture] texture-filter=linear: FPS: 12 FrameTime: 83.333 ms [texture] texture-filter=mipmap: FPS: 13 FrameTime: 76.923 ms [shading] shading=gouraud: FPS: 14 FrameTime: 71.429 ms [shading] shading=blinn-phong-inf: FPS: 18 FrameTime: 55.556 ms [shading] shading=phong: FPS: 17 FrameTime: 58.824 ms [shading] shading=cel: FPS: 16 FrameTime: 62.500 ms [bump] bump-render=high-poly: FPS: 16 FrameTime: 62.500 ms [bump] bump-render=normals: FPS: 18 FrameTime: 55.556 ms [bump] bump-render=height: FPS: 18 FrameTime: 55.556 ms [effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 15 FrameTime: 66.667 ms [effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 12 FrameTime: 83.333 ms [pulsar] light=false:quads=5:texture=false: FPS: 19 FrameTime: 52.632 ms [desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 11 FrameTime: 90.909 ms [desktop] effect=shadow:windows=4: FPS: 17 FrameTime: 58.824 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 15 FrameTime: 66.667 ms [buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 16 FrameTime: 62.500 ms [buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 16 FrameTime: 62.500 ms [ideas] speed=duration: FPS: 18 FrameTime: 55.556 ms [jellyfish] <default>: FPS: 16 FrameTime: 62.500 ms Error: SceneTerrain requires Vertex Texture Fetch support, but GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS is 0 [terrain] <default>: Unsupported [shadow] <default>: FPS: 16 FrameTime: 62.500 ms [refract] <default>: FPS: 8 FrameTime: 125.000 ms [conditionals] fragment-steps=0:vertex-steps=0: FPS: 19 FrameTime: 52.632 ms [conditionals] fragment-steps=5:vertex-steps=0: FPS: 16 FrameTime: 62.500 ms [conditionals] fragment-steps=0:vertex-steps=5: FPS: 15 FrameTime: 66.667 ms [function] fragment-complexity=low:fragment-steps=5: FPS: 12 FrameTime: 83.333 ms [function] fragment-complexity=medium:fragment-steps=5: FPS: 12 FrameTime: 83.333 ms [loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 17 FrameTime: 58.824 ms [loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 18 FrameTime: 55.556 ms [loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 17 FrameTime: 58.824 ms ======================================================= glmark2 Score: 15 ======================================================= |
Video Playback in ROC-RK3328-CC Board
But let’s go back to the test I wanted to do in Debian before the micro SD problem came back: video playback. ffmpeg is already installed in Ubuntu 18.04 so we can try to play a 1080p H.264 video straightaway:
1 |
ffplay big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4 |
But all I got was a full screen transparent window, and some error / warning messages such as:
Failed to initialize a hardware accelerated renderer: Couldn’t find matching renderer driver
No accelerated colorspace conversion found from yuv420 to rgba.
So I just killed the process. That’s the full output of ffplay:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
ffplay version 3.4.2-2 Copyright (c) 2003-2018 the FFmpeg developers built with gcc 7 (Ubuntu/Linaro 7.3.0-16ubuntu2) configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Failed to initialize a hardware accelerated renderer: Couldn't find matching render driver Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4': Metadata: major_brand : mp42 minor_version : 1 compatible_brands: isommp423gp5 creation_time : 2011-08-04T01:51:12.000000Z title : big_buck_bunny_1080p_surround.avi_006.AVI.MP4 artist : created with SUPER(C).v2011.bld.49 encoder : eRightSoft comment : 09:51:32 Duration: 00:00:45.00, start: 0.000000, bitrate: 7356 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 7254 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default) Metadata: creation_time : 2011-08-05T01:50:11.000000Z handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 96 kb/s (default) Metadata: creation_time : 2011-08-04T01:51:16.000000Z handler_name : GPAC ISO Audio Handler Stream #0:2(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default) Metadata: creation_time : 2011-08-04T01:51:21.000000Z handler_name : GPAC MPEG-4 OD Handler Stream #0:3(und): Data: none (mp4s / 0x7334706D), 0 kb/s (default) Metadata: creation_time : 2011-08-04T01:51:21.000000Z handler_name : GPAC MPEG-4 BIFS Handler [swscaler @ 0x7f6833a5d0] No accelerated colorspace conversion found from yuv420p to rgba. Switch subtitle stream from #-1 to #-1 vq= 0KB sq= 0B f=0/0 Switch subtitle stream from #-1 to #-1 vq= 0KB sq= 0B f=0/0 Switch subtitle stream from #-1 to #-1 vq= 0KB sq= 0B f=0/0 Switch subtitle stream from #-1 to #-1 vq= 0KB sq= 0B f=0/0 Switch subtitle stream from #-1 to #-1 vq= 0KB sq= 0B f=0/0 Switch subtitle stream from #-1 to #-1 vq= 0KB sq= 0B f=0/0 Switch subtitle stream from #-1 to #-1 vq= 0KB sq= 0B f=0/0 |
So I went to check out the forums, but there’s not that much activity on Firefly forums, and instead I found some info on LoveRpi forums dated from March/April:
Android and LibreELEC will decode properly. Ubuntu does not feature hardware decoding yet. Every OS has a different decoding pipeline that needs to be implemented. It’s like Windows and Linux. Just because it works on Windows does not mean it works on Linux and vice versa.
It looks like hardware video decoding it still not supported in Ubuntu or Debian using X11, so if you want to play videos on ROC-RK3328 board, your options are Android and LibreELEC, so it won’t work in Linux “Desktop” distributions just yet. [Update: It’s possible to play 1080p H.264 videos with h264dec.sh, see comments section for details]
Conclusion & Lesson Learned
Kernel panic can be due to a software bug, but usually for stable firmware, I always think about unsufficient power supply, but in this case, it appears slow micro SD card caused troubles wih the MMC driver and eventually a kernel panic. So you should either get an eMMC flash module like I did in the second part of the review, or a fast and reliable micro SD card such as Samsung 32GB EVO Plus or some class A1 / A2 micro SD cards which can be found on Amazon for around $12 and up.
Firefly and Libre Computer recommend a 5V/2A power supply for ROC-RK3328-CC “Renegade” board, and it works well, as long as you don’t plug a USB 3.0 drive into the USB 3.0 drive, in that case a 5V/2.5A or greater is needed, at least that’s my experience in this review.
Once you get fast storage and a decent power supply everything appears to work fairly well with GPIO supported, and 3D graphics acceleration working in Ubuntu and Debian, although performance looks a bit lower than accepted. However, video hardware decoding is not supported at all in those two operating systems, at least for now, so for media playback, you’d have to go with Android, or Linux based LibreELEC distribution running Kodi only. Since the board comes with DDR4 memory it may perform better than competing solution relying on DRR3 for 4K videos with HDR, but this would be tested, so maybe in another post if time permits.
ROC-RK3328-CC board can be purchased from $35 on Amazon, Firefly Shop, or LoveRpi store.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
Wrt the SD card problem: One Armbian dev also with a 1GB version is also running in troubles: https://forum.armbian.com/topic/5864-librecomputer-renegade-rk3328/?do=findComment&comment=57519
And a small note wrt powering: If you avoid the Micro USB connector you can attach whatever you want to the USB ports. My Renegade is powered through GPIO header and works like a charme even with power hungry USB3 disks connected.
Are you using a 5V/2A power supply, or something a bit better?
I tested with 2A using the crappy Micro USB connector and failed as expected. But the board I got donated came with a great PSU mod using a reliable 4A PSU: https://forum.armbian.com/topic/5864-librecomputer-renegade-rk3328/?do=findComment&comment=54881
micro-USB just isn’t able to carry that kind of current without an excessive voltage drop. Boards needing >1A of current really need to use a different connector or include an integrated buck/boost SMPS.
My recommendation is to use a standard 5.5×2.5mm (or 2.1mm if you’re odd) jack and put a buck SMPS on it that’s capable of taking in >20V. That way you can use anything as a source of power that’s >5V–2S Li, 12V, 19V laptop supply, etc.
The Firefly kernel and images are still a little iffy at this point in terms of SD card phase tuning and clock rates. It is the only other board besides Le Potato to support UHS. The issue you mentioned doesn’t pop up on other boards because ROCK64 doesn’t support UHS. 3D and video decode is supported across the board now on Firefly images. For 3D, try glmark-es-drm. X11 is crap for ARM. For H.264, try h264dec.sh on X11. Upstream kernel work on V4L2 is still WIP so Rockchip mpp the reliable way to get video working properly. The power supply… Read more »
3D worked for me, but I’ve just tried glmark2-es2-drm, and it also workss. Similar test but fully screen, and the glmark2 score is 12.
h264dec.sh works for 1080p60 (Big buck bunny), the 4K sample I tried (H.264 30 fps) only played in “slideshow” mode.
Some notes to self: make sure to copy the video to /home/firefly/h264.mp4, or modify the script in /usr/local/bin/h264dec.sh. It’s based on gst-launch-1.0 (gstreamer)
There’s also h264enc.sh for H.264 encoding.
With regards to the hard drive, I tried again with Ubuntu 18.04 on the eMMC flash, and there was no problem this time. I also ran iozone on one partition to stress test it a bit, and no disconnection or anything. I did have some related error messages at boot time however. I don’t know if those are normal: [ 35.853471] sd 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN [ 35.853485] sd 0:0:0:0: tag#0 CDB: opcode=0x12 12 01 00 00 40 00 [ 35.853567] scsi host0: uas_eh_bus_reset_handler start [ 35.853595] xhci-hcd xhci-hcd.9.auto: ERROR Transfer event for disabled endpoint… Read more »
I repeated the iozone test with a large file, but it did not end (hung): firefly@firefly:/media/firefly/USB3_NTFS$ iozone -e -I -a -s 1000M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 Iozone: Performance Test of File I/O Version $Revision: 3.429 $ Compiled for 64 bit mode. Build: linux random random bkwd record stride kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread 1024000 4 12178 15101 74721 74523 123456789 firefly@firefly:/media/firefly/USB3_NTFS$ iozone -e -I -a -s 1000M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i… Read more »
FYR. I wanted to check iotop, but some features are not enabled in the kernel:
The kernel flags they use are not well configured. The SDK is crap. I’ll shoot you a mainline image when I am done with them.
Those error messages can be safely ignored: dwmmc_rockchip ff520000.dwmmc: Unexpected interrupt latency
Getting this ‘ERROR Transfer event for disabled endpoint or incorrect stream ring’ message once when the kernel accesses an USB3 superspeed disk the first time is ‘normal’ with RK3328 and RK’s 4.4 kernel.
If you get more of these messages in operation there’s something wrong. See here with ODROID-XU4 and an underpowered 2.5″ disk: https://forum.openmediavault.org/index.php/Thread/17855-Building-OMV-automatically-for-a-bunch-of-different-ARM-dev-boards/?postID=148387#post148387 (as with your situation the random IO test needing more juice triggered the problem).
You still power the board via Micro USB?
OK. Noted. Still powered over USB, that was the point of the test based on Da Xue comment.
Just realized you use a Seagate USB3 disk (‘idVendor=0bc2, idProduct=2312’). Those things all ship with a somewhat broken firmware causing UAS issues with Linux. In Armbian/OMV we therefore blacklist them completely. In upstream Linux with 4.14 a less invasive way of dealing with them (applying a quirk then causing issues with SMART queries) has been included. This fix got backported by Rockchip to their 4.4 kernel but I’ve no idea whether Firefly uses the ‘fix’ or not.
This is not the mainline version but at least it fixes most of the bugs. http://share.loverpi.com/board/libre-computer-project/libre-computer-board-roc-rk3328-cc/image/ubuntu/rk3328-roc-cc_ubuntu18.04_lxde_20180717.tgz
well micro usb power & sd card errors really are recurring themes with those dev boards, if only a dc plug had been implemented on the rpi it would have trickle solved so many problems.. besides that, are there any noticeable differences (improvements/features) from the rock64 board ? On a side note, i’ve been using my z28 pro tv box (rk3328 / gbe) with armbian “no support” image for a week, in a headless server context, and i must say it is a massive improvement over my amlogic s905. I’m still tempted to get a H6 board as well and… Read more »
The differences to Rock64 as follows:
– slightly faster memory (DDR4 vs. DDR3 — check page 4 of the thread I linked to for some examples)
– once SD card issues are resolved much better SD card storage performance compared to Rock64 if crappy SD cards are avoided and performant ones are used (SanDisk Extreme (Plus) A1, Samsung Pro or something like that)
– Unfortunatenly Micro USB for DC-IN so novice users run in the usual undervoltage sh*t show
You might spot something interesting at the bottom of https://forum.pine64.org/showthread.php?tid=6288 😉
thx tkaiser for the summary.
i went out and found a recent video from a libre computer guy who discusses their various boards, shenzen fun facts and other stuff.
The interviewer is a little bit all over the place (not too technical hardware wise) but you get some interesting insights on the production of the boards, including their incredibly low prices (sales are done at a loss), check it out :
https://www.youtube.com/watch?v=JC8ta-41N78
What does the “-CC” in ROC-RK3328-CC mean?
I don’t know the exact meaning but the -CC, -AC or -PC suffixes describe the form factor. -CC is like Raspberry Pi, -AC is smaller and -PC is the form factor they use for all the boards with a high(er) power budget. Renegade Elite based on RK3399 being the first and Amlogic S922 and S905D2/X2 following.
“the -CC, -AC or -PC suffixes describe the form factor. ”
Ah … then … CC = CreditCard sized?