Checking Out Debian and Linux SDK for VideoStrong VS-RD-RK3399 Board

VideoStrong VS-RD-RK3399 (aka VS-RK3399) is a features-packed development board powered by Rockchip RK3399 hexa core core processor which offers an alternative to Firefly-RK3399 board. The company sent me a development kit for evaluation, and I’ve already looked into VS-RD-RK3399 hardware and SDK in the first part of the review. Today, after shortly looking into the pre-installed Android 7.1 OS to make sure the board boots fine, I’ll report my experience with Debian 9, and building it from source.

Click to Enlarge

A Quick Look at Android 7.1

I connected the board to my HDMI TV, added an Ethernet cable, and after powering it, VS-RK3399 promptly booted into Android 7.1 with the following launched.

Click to Enlarge

It just has a few apps pre-installed, and lack Google Play store, but as I’ve seen in the new version of the SDK, a patch for Google Play store is provided, if that’s something you need for your use case.

Click to Enlarge

The version I had pre-installed was built on August 14, 2017 with Android 7.1.2 OS running on top of Linux 4.4.55 kernel.

The storage section shows plenty of space left out of the 29.12GB flash partition, and the NTFS and EXT-4 partitions of my USB drives were mounted properly.

However, Explorer app would keep on reporting all USB partitions were NOT mounted. I had to use my smartphone to transfer the screenshots over Bluetooth. Adb would have been another option. Anyway, the Android version I had on my board was pretty rough, but I can see they’ve released another Android image in VS3399 board’s MEGA folder. I have not tried it, since I’ve spent enough time playing with Android on RK3399 with TV boxes such as Yundoo Y8 and Vorke Z3.

Installing Debian

So instead I went to the aforelinked MEGA folder, and downloaded VS-RD-RK3399-linuxSDK, which not only have the SDK like last month, but also a Debian image.

So I downloaded debia_linux_20170905.rar, and the rar file in linux_update_tools, but the latter actually contains (outdated versions of) Windows based Rockchip’s AndroidTool & DriverAssistant, but since I’m using Ubuntu, I went with upgrade_tool instead just like I did for Rock64 board quick start guide.

We’ll need to enter recovery mode to flash the Debian image. While the board is running keep pressing the recovery button, press the reset button shortly, count to 2 or 3, and release the recovery button. When you connect the USB type C to USB 3.0 cable between the board and your computer, you should see the board in the kernel log (dmesg):


How we can extract the Debian firmware, and flash it with upgrade_tool:


if successful the procedure is successful, the output should like the four lines below:


and the board should have automatically rebooted to Debian 9.

Testing Debian 9 on VS-RK3399 Board

Now that the installation is complete, we can start to play with the Debian on the board. Or can’t we? There’s no menu available at all, and only the Trash icon on the desktop. If I right click I get some more menus…

So I went into Desktop Preferences, enabled some other icons, and change the right click behavior.

Now I can launch some apps such as the terminal emulator and Chromium web browser, but they don’t show on the desktop at all, despite clearly running “somewhere”…

I then noticed I can move the mouse cursor beyond he left side of the HDMI TV, so I’d assumed there must be another display enabled. I tried to connect Dodocool DC30S hub to the USB type C port since it supports DisplayPort, but I get no signal on my other monitor, so the extra display must be connected via eDP or MIPI DSI, and the company sent me neither.

I could see the image is based on Linaro ALIP rootfs, so I connected to the board via SSH, hoping that linaro/linaro username and password would work, and they did:


The image runs Debian 9 with Linux 4.4.55, and we have a 29GB rootfs, and 3877 MB memory in total.

We can get some more details about the CPU with 2 Cortex A72 cores clocked at up to 1.8 GHz, and 4 Cortex A53 cores clocked at up to 1.416 GHz:


The Gigabit Ethernet port and WiFi module are both detected:


I could not find Bluetooth however using “communication”, and the list of buses or bridges only showed USB ports, no PCI(e) interfaces:


lspci did not return anything either.

Build a Debian Image from Source

Since the image is not really usable with LCD display, I won’t perform more tests on Debian firmware, and instead will work with the SDK, trying to build my own image from source. We can extract the Linux SDK we’ve gotten from the MEGA link:


…and follow / adapt the instructions in VS-RK3399 Linux SDK Compile and build (EN).pdf document found in VS-RD software datasheet folder.

The company recommends a build machine running Ubuntu 14.04 / 16.04 64-bit, and I installed some dependencies on my Ubuntu 16.04 computer:


as well as ARM/ARM64 GCC toolchain and other tools and libraries:


We can now build u-boot:


It should only take a few seconds, and we can make sure the build went fine:


Next up is the the Linux kernel:


We have to choose an image to build with the dts file of our choice:


The -edp image is with eDP LCD display, -mipi is for MIPI LCD display, and the -dulelcd must be for both (“dual LCD”). So there’s no option for no LCD at all right now, and I’m not sure why there’s a need for three DTS files for the board, as surely this should be possible to select/configure the LCD outputs are runtime (TBC). But let’s use the MIPI LCD one:


I did not go that well, as the build failed:


I tried with rk3399-videostrong-board-edp.img again, and same error, but I noticed more details by scrolling up:


We can see gsl3673.c file is missing:


So I renamed the c-old file to c, and could complete the build:


Now we can build the complete firmware from source using buildroot:


The build all script will take a long while as it downloads and builds all packages. It took over 2 hours on my machine. I ended with:


It looks OK, except for the script failed to remove one file/directory. Let’s try to create the firmware file:


Sadly that part failed too because of conflicts with a patch:


That failures means the rootfs was not built, and the script is so bad did not stop during mpp build failure, and continued building other libs:


I have not tried to fix the issue, as I don’t know how many other issues are hidden in that big piles of code. VideoStrong should look into and provide an SDK that actually builds.. In case the build works, we should get rootfs.img file that can be flashed with AndroidTool if we follow the instructions in the PDF file.

However, you’ll also be able to flash the files one by one using upgrade_tool in Linux, no need to have a Windows machine for any part of the process.

It’s hard to recommend VS-RD-RK3399 if you are an individual who want a platform for development since software support and documentation are rather poor, but if you are a company that plans to order in quantity, you should have direct support from the company, and you can contact them via Alibaba’s VideoStrong page. If you have a good skills, and are ready to work to solve whatever issues, you can also purchase the board for $168.32 (2GB/16GB) or $213.29 (4GB/32GB) on GearBest where it is sold under the MECOOL brand (Coupon GBCNA will give a 14% discount), or Aliexpress. For reference, Firefly-RK3399 in equivalent memory/storage configuration sells for $179 and $219 on Aliexpress. It’s also listed on Amazon US for $149.99/$199.99.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

35 Replies to “Checking Out Debian and Linux SDK for VideoStrong VS-RD-RK3399 Board”

  1. @cnxsoft
    Thank you! So at least CPU ‘part’ and ‘revision’ differ between big and LITTLE cores and due to the little ones being cpu0-3 (too) primitive CPU cluster detection logic doesn’t break 🙂

    In case time permits I would be really interested in tinymembench numbers for little and big cores individually. I usually kill the unwanted CPU cores like

  2. First run of tinymembench with all cores:

  3. Second run with only Cortex A53 cores:

  4. @cnxsoft
    Nice! Thank you.

    As a quick reference memory performance from another SoC that might get interesting next year: RTD1296 (Tested/provided by BPi folks on their new BPi-W2)

  5. Hi CnxSoft
    I’m trying to boot linux on a h96Max (rk3399 4g ram, gigabit , usb-c). So far i’m able to boot on a archlinux rootfs on usb -C through the sdcard. gigabit is working fine but not the console ttyFIQ00, the systemd process is eating 1 cpu

    I’ve used the stock android kernel and the u boot from the firefly rk3399, with some dd commands to modify the sdcard provided for the firefly.

    My next step is to recompile a kernel from videostrong and adapt it.

    If you have the time to test it on your side 🙂 it could be a cost effective solution for a powerful arm linux box

    Cheers
    Occip

  6. In case you want to test some stuff like network performance later most probably you’ll realize that all interrupts end up on cpu0 potentially bottlenecking some situations with eg. USB3 and GbE access at the same time.

    I’ve not seen full /proc/interrupts output for RK3399 so far (neither vendor nor mainline kernel) but something like thisshould work in any case to have at least a more sane Ethernet IRQ processing. But then it still might depend on cpufreq scaling (when clockspeed of the little cores remains at the lower limit then saturating Gigabit Ethernet might not be possible so either tweaking cpufreq settings or moving eth0 to cpu5 might be an idea).

    On the other hand since you’re testing with Debian 9 you could give irqbalanced a try (Debian/Ubuntu packages prior to Debian 9/Stretch were broken, did nothing useful but only wasting resources and freezing the machine after some time due to a memory leak). Though I would expect an optimized fixed IRQ affinity will result in better numbers (higher performance, lower system utilization)

  7. Somebody asked about idle power consumption on G+.
    The board running Debian 9 with USB keyboard and mouse, HDMI and Ethernet consumes about 4.1W in idle mode.

  8. @Occip
    Ah you went further than I did with H96Max. All the linux images that I tried hang during the kernel boot, and I yet didn’t manage to replace only the rootfs and keep the kernel (it took me a while to figure that this board has to be flashed via the USB3 port and not the USB-C). I’ll definitely have to try that archlinux image. I’d like to at least get an u-boot with the bootdelay set to 1 so that I can interrupt it. By experience, development process becomes much faster once you have this.

    @cnxsoft, I didn’t find the URL of your debian image in the post, I’m interested in trying it on my h96max just to see if I can get something to start with and completely ditch the existing android rootfs.

  9. @cnxsoft
    No I didn’t skip it, though I read quicker I admit, but the text around the link speaks about the Android image and I didn’t correlate it with the linux one. Thanks for the link 😉

  10. @Occip
    Sounds good and looking forward. Good to see @willy is also working on it 🙂
    Wondering whether to buy a H96 Max now or later since i just got 2x H96Pro+ 🙂

  11. @cnxsoft
    Hi CnxSoft
    I’ve played with the debian image on H96Max . I’ve got the same problem as you the HDMI is on the right side.
    I’ve opened a terminal (and dragged it on the right) and issued the following command:

    The menu is now available on HDMI 🙂

    I’ve enabled the wired network and the wifi seems to work .

  12. @fossxplorer
    Hi
    I’ve uploaded a sdcard image on your owncloud server. H96maxdebian.img. Just put your sdcard in your hp96max board and wait 🙂
    Use at your own risk. The usb-c connector is not working, it may need a kernel mod.
    I will try to compile a mainline kernel after tweaking the videostrong kernel

  13. Btw, i’ve already started to think about replacing the heatsink with a bigger one and possibly also a fan (USB fan) on top of it. I dunno how H96Max looks inside, but i’ll probably use a pretty big heatsink and just remove one side of the cover.

    How do you guys remove stock heatsink without breaking anything?
    :)I need to do the same on H96Pro+ as well.

  14. @Stane1983
    Hi
    I’m very happy with the videostrong kernel, almost everything is working on my H96Max :
    All usb ports OK
    shutdown OK
    wifi OK
    ethernet OK
    HDMI working (lxde desktop ok)

    What i’ve done:
    extract the DTB from the original resource.img ( h96 android kernel, offset 0x800)
    convert DTB to DTS with dtc command ( I’m very impressed )
    compile the videstrong kernel as described on this page with my DTS
    put kernel.img + resource.img on sdcard .

    The system is really fast , 10 seconds to the LXDE desktop 🙂

    Next step is to compile mainline kernel (4.12)

  15. My Debian impressions…. I’m actually surprised… If there was HDMI issue on wrong side, with image that is available now for download it’s fixed. Everything I tested (except Bluetooth) worked. No lags, UI is smooth, web browsing using Chromium is smooth, youtube playback is smooth but could be smoother (maybe it’s because of WiFi, didn’t use ethernet to connect to net). Kodi 17.1 that ships with Debian stretch works just fine… This is my first experience with Rockchip SoC after long time…. and I love it 🙂

  16. @occip
    Same here, I flashed the VS image onto my H96Max and it worked out of the box. I was surprized that the rootfs is 32-bit only despite the 64-bit kernel. Not a big deal though. The first tests I’ve run show that it’s about 10% faster than the MiQi for gcc. At the moment it’s limited to 1.8/1.4 GHz. I haven’t modified the DTB yet to change this (the rockchip process is a real pain to go through with all their conversion steps and I’m not feeling brave enough to go into this again right now). The device doesn’t heat much during builds, actually less than the RK3288. I was surprized to see that I forgot to replug the power adapter after flashing it and that running all 6 cores out of just a USB3 power supply went fine (or I was very lucky).

    1. Hi
      On h96max With the correct DTB the shutdown is working as well as the usb C.
      I’ve made test with the latest mainline kernel ( rk3399 EVM dts) . Only gigabit and usb3 are working, no hdmi and no cpufreq ( stay at 408MHz)
      We have to wait for the next kernel version …

  17. I added VS device trees to rockchip upstream kernel if someone wants to check it out:
    https://github.com/Stane1983/kernel

    there is also separate branch vs-rk3399 with 2 more commits (Makefile predefined toolchains removed and rockchip_linux_defconfig merged with VS one).

    I tested kernel only with headless Linux (Debian 9 aarch64 rootfs). What I tested worked 🙂 Comments, issues, PRs are welcome.

  18. I have maybe a bit stupid question but….

    This board lacks a bit of community support while VERY similar board Firefly Rk3399 seems to be a bit more supported ie – armbian… Will software from Firefly RK3399 work on VS RK3399?

    1. Well… board does not boot from SD with Armbian for Firefly RK3399… which is good and bad…
      Good because according to documentation boot from SD should happen only if eMMC will be shortcuted but this board actually boots try to boot as while SD card is in with system normal eMMC is not starting and for Armbian it is changing led to red even (short the eMMC clock to GND) http://opensource.rock-chips.com/wiki_Boot_option#Boot_flow

      Bad – since board didnt booted.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC