Will DietPi work on the NanoPi R2S Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
gtludwig
Posts: 18
Joined: Tue Nov 17, 2020 11:28 am

Will DietPi work on the NanoPi R2S

Post by gtludwig »

I installed DietPi on my Odroid HC2 and I found it absolutely amazing. Congrats to all responsible for this brilliant project.

I also got a new SBC, the NanoPi R2S, and I was wondering if anyone has had any experiences with installing DietPi on it as it is not listed in the supported devices list. It sports a Rockchip SOC (RK3328) and there is support for RK3399 and RK3308. So I would not imagine it failing to install.

Thoughts?
User avatar
Joulinar
Posts: 4836
Joined: Sat Nov 16, 2019 12:49 am

Re: Will DietPi work on the NanoPi R2S

Post by Joulinar »

Hi,

you simple can give it a try. You will recognise it soon if it is not working ;)

Another option is to use an Armbian Buster image https://www.armbian.com/nanopi-r2s/
and trans form it into DietPi using PREP script https://github.com/MichaIng/DietPi/issues/1285
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gtludwig
Posts: 18
Joined: Tue Nov 17, 2020 11:28 am

Re: Will DietPi work on the NanoPi R2S

Post by gtludwig »

Joulinar wrote: Tue Nov 17, 2020 12:27 pm Hi,

you simple can give it a try. You will recognise it soon if it is not working ;)
Cheers,

I'll have a go at it some time and will post back! It is now live with a FriendlyWRT image and, though it runs rather hot with its plastic case on, once I removed I noticed some 10C drop in temperature, enough to prevent the noisy fan to stay shut...
User avatar
Joulinar
Posts: 4836
Joined: Sat Nov 16, 2019 12:49 am

Re: Will DietPi work on the NanoPi R2S

Post by Joulinar »

I recommend using the Armbian Buster if you go for the PREP script
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gtludwig
Posts: 18
Joined: Tue Nov 17, 2020 11:28 am

Re: Will DietPi work on the NanoPi R2S

Post by gtludwig »

I have just found it now that there is an official DietPi release for the NanoPi R2S.

Great work, guys!

I'm flashing it now!
User avatar
MichaIng
Site Admin
Posts: 3032
Joined: Sat Nov 18, 2017 6:21 pm

Re: Will DietPi work on the NanoPi R2S

Post by MichaIng »

Indeed, it has been released in summer already :D. Sadly our tools don't have OOTB support for the WAN port/modem capabilities, that part of the network setup would need to be done manually. To assure it does not collide accidentally with what dietpi-config does, at best create your configs in /etc/network/interfaces.d/ as separate files, e.g. to use the WAN port as such and the Ethernet port as hotspot to share internet and DHCP through.
gtludwig
Posts: 18
Joined: Tue Nov 17, 2020 11:28 am

Re: Will DietPi work on the NanoPi R2S

Post by gtludwig »

That's brilliant, @MichaIng!

I'll get it working properly eventually!

I'm facing two issues with dietpi at this moment.

The first is that I got this metal case with a fan and the fan is always on! On one hand it's nice to have it running at 34 'C, but the fan is always on. Is there a way to define the fan operation according to the temperature?

The second is that the board sports 1GiB of DDR4 RAM, but I don't seem to access it all.

Code: Select all

root@DietPi:~# free -m
              total        used        free      shared  buff/cache   available
Mem:            468         156         106           3         205         300
Swap:           511           0         511
Is this some setting I failed to configure?

Thanks,
User avatar
MichaIng
Site Admin
Posts: 3032
Joined: Sat Nov 18, 2017 6:21 pm

Re: Will DietPi work on the NanoPi R2S

Post by MichaIng »

Ha, 512 MiB detected only. The kernel packages are up-to-date?

Code: Select all

dpkg -l | grep 'linux-*'
Since the fan is attached via PWM fan connector, generally it can work.

Can you show:

Code: Select all

lsmod
ls -l /sys/devices/platform/pwm-fan
ls -l /sys/devices/virtual/thermal/thermal_zone0
ls -l /sys/class/pwm/pwmchip1
gtludwig
Posts: 18
Joined: Tue Nov 17, 2020 11:28 am

Re: Will DietPi work on the NanoPi R2S

Post by gtludwig »

Code: Select all

root@DietPi:~# dpkg -l | grep 'linux-*'
ii  console-setup-linux                  1.193~deb10u1                all          Linux specific part of console-setup
ii  libselinux1:arm64                    2.8-1+b1                     arm64        SELinux runtime shared libraries
ii  linux-base                           4.6                          all          Linux image base package
ii  linux-buster-root-current-nanopi-r2s 20.11.6                      arm64        Armbian tweaks for buster on nanopi-r2s (current branch)
ii  linux-dtb-current-rockchip64         20.11.4                      arm64        Linux DTB, version 5.9.14-rockchip64
ii  linux-image-current-rockchip64       20.11.4                      arm64        Linux kernel, version 5.9.14-rockchip64
ii  linux-u-boot-nanopi-r2s-current      20.11.6                      arm64        Uboot loader 2020.10
ii  util-linux                           2.33.1-0.1                   arm64        miscellaneous system utilities

Code: Select all

root@DietPi:~# lsmod
Module                  Size  Used by
xt_conntrack           16384  1
xt_MASQUERADE          20480  1
nf_conntrack_netlink    57344  0
xfrm_user              45056  1
xfrm_algo              16384  1 xfrm_user
nft_counter            16384  15
xt_addrtype            16384  2
nft_compat             20480  4
nft_chain_nat          16384  4
nf_nat                 53248  2 nft_chain_nat,xt_MASQUERADE
nf_conntrack          172032  4 xt_conntrack,nf_nat,nf_conntrack_netlink,xt_MASQUERADE
nf_defrag_ipv6         24576  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
nf_tables             212992  45 nft_compat,nft_counter,nft_chain_nat
nfnetlink              16384  4 nft_compat,nf_conntrack_netlink,nf_tables
br_netfilter           28672  0
bridge                233472  1 br_netfilter
cdc_ether              20480  0
usbnet                 57344  1 cdc_ether
r8152                 237568  0
hantro_vpu             90112  0
v4l2_h264              16384  1 hantro_vpu
videobuf2_dma_contig    24576  1 hantro_vpu
v4l2_mem2mem           45056  1 hantro_vpu
videobuf2_vmalloc      20480  1 hantro_vpu
videobuf2_memops       20480  2 videobuf2_vmalloc,videobuf2_dma_contig
videobuf2_v4l2         36864  2 hantro_vpu,v4l2_mem2mem
videobuf2_common       65536  3 videobuf2_v4l2,hantro_vpu,v4l2_mem2mem
videodev              307200  4 videobuf2_v4l2,hantro_vpu,videobuf2_common,v4l2_mem2mem
mc                     65536  5 videodev,videobuf2_v4l2,hantro_vpu,videobuf2_common,v4l2_mem2mem
rockchip_rng           20480  0
rng_core               24576  1 rockchip_rng
cpufreq_dt             20480  0
usb_f_acm              20480  1
u_serial               36864  1 usb_f_acm
g_serial               16384  0
libcomposite           81920  2 g_serial,usb_f_acm
ip_tables              32768  0
x_tables               53248  5 xt_conntrack,nft_compat,xt_addrtype,ip_tables,xt_MASQUERADE
autofs4                49152  2
realtek                24576  1
dwmac_rk               28672  0
stmmac_platform        24576  1 dwmac_rk
stmmac                217088  2 stmmac_platform,dwmac_rk
mdio_xpcs              20480  1 stmmac
gpio_syscon            20480  0

Code: Select all

root@DietPi:~# ls -l /sys/devices/platform/pwm-fan
ls: cannot access '/sys/devices/platform/pwm-fan': No such file or directory

Code: Select all

root@DietPi:~# ls -l /sys/devices/virtual/thermal/thermal_zone0
total 0
-r--r--r-- 1 root root 4096 Jan 31 18:05 available_policies
lrwxrwxrwx 1 root root    0 Jan 31 18:05 cdev0 -> ../cooling_device0
-r--r--r-- 1 root root 4096 Jan 31 18:05 cdev0_trip_point
-rw-r--r-- 1 root root 4096 Jan 31 18:05 cdev0_weight
--w------- 1 root root 4096 Jan 31 18:05 emul_temp
drwxr-xr-x 3 root root    0 Jan 31 18:05 hwmon0
-rw-r--r-- 1 root root 4096 Jan 31 18:05 integral_cutoff
-rw-r--r-- 1 root root 4096 Jan 31 18:05 k_d
-rw-r--r-- 1 root root 4096 Jan 31 18:05 k_i
-rw-r--r-- 1 root root 4096 Jan 31 18:05 k_po
-rw-r--r-- 1 root root 4096 Jan 31 18:05 k_pu
-rw-r--r-- 1 root root 4096 Jan 31 18:05 mode
-rw-r--r-- 1 root root 4096 Jan 31 18:05 offset
-rw-r--r-- 1 root root 4096 Jan 31 18:05 policy
drwxr-xr-x 2 root root    0 Jan 31 18:05 power
-rw-r--r-- 1 root root 4096 Jan 31 18:05 slope
lrwxrwxrwx 1 root root    0 Jan 31 18:05 subsystem -> ../../../../class/thermal
-rw-r--r-- 1 root root 4096 Jan 31 18:05 sustainable_power
-r--r--r-- 1 root root 4096 Jan 31 17:22 temp
-rw-r--r-- 1 root root 4096 Jan 31 18:05 trip_point_0_hyst
-rw-r--r-- 1 root root 4096 Jan 31 18:05 trip_point_0_temp
-r--r--r-- 1 root root 4096 Jan 31 18:05 trip_point_0_type
-rw-r--r-- 1 root root 4096 Jan 31 18:05 trip_point_1_hyst
-rw-r--r-- 1 root root 4096 Jan 31 18:05 trip_point_1_temp
-r--r--r-- 1 root root 4096 Jan 31 18:05 trip_point_1_type
-rw-r--r-- 1 root root 4096 Jan 31 18:05 trip_point_2_hyst
-rw-r--r-- 1 root root 4096 Jan 31 18:05 trip_point_2_temp
-r--r--r-- 1 root root 4096 Jan 31 18:05 trip_point_2_type
-r--r--r-- 1 root root 4096 Jan 31 18:05 type
-rw-r--r-- 1 root root 4096 Jan 31 18:05 uevent

Code: Select all

root@DietPi:~# ls -l /sys/class/pwm/pwmchip1
ls: cannot access '/sys/class/pwm/pwmchip1': No such file or directory
gtludwig
Posts: 18
Joined: Tue Nov 17, 2020 11:28 am

Re: Will DietPi work on the NanoPi R2S

Post by gtludwig »

@MichaIng,

The PWM and recognizing 512MiB of RAM appears to be something with the DietPi_NanoPiR2S-ARMv8-Buster - at least the one I got here! I have tried the "official" NanoPi R2S image from their website and both the PWM and RAM are nominal. Is there somewhere I can open an issue on this?
Post Reply