NanoPC-T4

Some of my Nano-PC T4 experiences from the last year and a bit. For a long time I never could get the T4s stable. They always keeled over when I was pushing them.

Casing and cooling

The metal cases are nice (and in general I like "industrial" cases) but with just a heatsink they kept the T4s hot. I have never tried the heat sinks with fan inside the metal cases I have to admit. The acrylic cases are okay.

I ended up putting a Noctua A4x20 5V PWM next to the T4 blowing over both the NVME and the heat sink which keeps idle temperature around 30C here and under high load (no GPU used) still below 50C. Power comes from GPIO Pins 2 and 4 (5V and GND).

I am currently looking into solutions to put them into 19" rack cases.

U-Boot

And this is where most of the problems came from I believe. Any stock U-Boot (at least recent ones) do funny things to my T4, likely related to memory initialization. The nanopi4* derived SoCs are some of the very few using Samsung LPDDR3 by default. As it turns out the NanoPC-T4 1908 (not 18xx) also uses an LPDDR3e chip which could go up to 2133. In the end I gave up trying to fix it and went back to a vendor U-Boot as I had found the pre-installed Android on my last T4 was stable. I have since found that for what I am using the T4 is has become very stable even though being back at 1600 and not 1866. In addition to the ports PR, the diff is here: 20210520-01-sysutils-u-boot-nanopc-t4-friendlyelec.diff .

SD card and partitioning

I am not using the eMMC currently but am running fully of the uSD Card (Samsung EVO Select 128): Here's the GPT partitions:

# gpart create -s GPT da3
# gpart add -t efi -i 1 -b 256M -s 256M da3
# gpart add -t freebsd-ufs -i 2 -b 1G -s 3G da3
# gpart show 
=>       40  250085296  sdda0  GPT  (119G)
         40     524248         - free -  (256M)
     524288     524288      1  efi  (256M)
    1048576    1048576         - free -  (512M)
    2097152    6291456      2  freebsd-ufs  (3.0G)
    8388608  241696728         - free -  (115G)

Formatting partitions:

# newfs_msdos -F 16 -L EFI -O EFI /dev/da3p1 
# newfs -U -O2 -j /dev/da3p2

Ethernet MAC

In order to get a deterministic Ethernet address and not setting it in the u-boot config I am using a FDT overlay (using the FreeBSD OUI):

/dts-v1/;
/plugin/;

/ {
        compatible = "friendlyarm,nanopc-t4", "rockchip,rk3399";
};

&{/ethernet@fe300000} {
        local-mac-address = [ 58 9c fc 01 23 45 ];
};

compiling it like:

dtc -@ -O dtb -o mac.dtbo mac.dtso

and then loading it (and I am historically using loader.rc directly so you may need to figure this out for lua loader):

set fdt_overlays="/mac.dtbo"

References

  1. NanoPC-T4

  2. NanoPC T4 Wiki/U-Boot

  3. PR 256033

  4. Noctua A4x20 5V PWM FAQ

  5. Reference to my posting to U-Boot about LPDDR3 init (a careful reader will spot more problems in this code)

  6. FreeBSD OUI

BjoernZeeb/NanoPC-T4 (last edited 2021-07-06T22:31:32+0000 by BjoernZeeb)