August 16, 2018

A bit more with Linux on the Nanopi Fire3

After a week of working on getting a network driver functioning with U-Boot, I decided to take a break and try some things with linux. Among other things, this serves to test the hardware and give me confidence that I am not fighting hardware issues.

I boot it up from a fresh SD card, and su to root (password "fa").

root@NanoPi-Fire3:/dev# uname -a
Linux NanoPi-Fire3 4.4.49-s5p6818 #1 SMP PREEMPT Wed May 9 14:01:02 CST 2018 aarch64 aarch64 aarch64 GNU/Linux
root@NanoPi-Fire3:/dev# df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              383552       0    383552   0% /dev
tmpfs              96812    4512     92300   5% /run
/dev/mmcblk0p2   7517744 4583440   2917920  62% /
tmpfs             488152       0    488152   0% /dev/shm
tmpfs               5120       4      5116   1% /run/lock
tmpfs             488152       0    488152   0% /sys/fs/cgroup
tmpfs              97632       0     97632   0% /run/user/1000
tmpfs              97632       0     97632   0% /run/user/0
The directories /bin and /usr/bin are distinct, unlike Fedora (but like the good old days). Almost everything imaginable is available. Ruby (2.3), perl (5.22.1), vim python (2.7 and 3.5). Even the gcc compiler (also available as aarch64-linux-gnu-gcc if you like that better).
gcc --version
gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The time is set properly (but displaying UTC).

cat /proc/cpuinfo shows 8 of these:

processor	: 0
BogoMIPS	: 19.84
Features	: fp asimd aes pmull sha1 sha2 crc32
CPU implementer	: 0x41
CPU architecture: 8
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 3

I gotta be me!

su
adduser tom
usermod -aG sudo tom

Network

Since I booted it up with a network cable attached, it apparently did DHCP and got an IP address for itself, as follows:
root@NanoPi-Fire3:/dev# ifconfig -a
eth0      Link encap:Ethernet  HWaddr d2:a5:61:c9:2e:4e
          inet addr:192.168.0.33  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c660:328e:b97d:df30/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:679 errors:0 dropped:0 overruns:0 frame:0
          TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:46982 (46.9 KB)  TX bytes:19927 (19.9 KB)
          Interrupt:29 Base address:0x4000
No weird network names like Fedora, just good old "eth0". And I can use ssh to log in, so it runs an ssh server by default. I guess I am convinced that the network hardware is working!

Lessons Learned

The network hardware on my NanoPi Fire3 works just fine using linux. In fact, using the system via ssh is pretty impressive, and I have yet to find annoying things that are not nicely configured. Every piece of software I can imagine seems to be in place.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / [email protected]