NanoPC-T4 を試すヨ (その2)

電源は、昇降圧電源経由で。

12V時、0.2〜0.4Aかな。bench中は、0.8Aくらいまで。

OS関連その後、、

移行を進めてたら、なんと、iptables関連が一切ビルドされてなかった。。。

公式なimageでのkernelは諦め、armbianをテストすることに!

www.armbian.com/nanopc-t4

取り急ぎ、sdにイメージを焼いて、ブートしてみた!

# uname -a
Linux mz20mon-nanopct4 4.4.174-rk3399 #31 SMP Sun Feb 10 00:37:23 CET 2019 aarch64 aarch64 aarch64 GNU/Linux
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
# lsmod 
Module                  Size  Used by
iptable_filter         16384  0
af_packet              40960  12
dm_mirror              24576  0
dm_region_hash         20480  1 dm_mirror
dm_log                 20480  2 dm_region_hash,dm_mirror
midgard_kbase         405504  0
rk_vcodec              65536  0
ip_tables              24576  1 iptable_filter
x_tables               32768  2 ip_tables,iptable_filter
autofs4                40960  2

Goodです!!

aarch64なので、gpioバイナリも問題なし!!

# ldd /usr/local/bin/gpio
        linux-vdso.so.1 (0x0000007f866c0000)
        libwiringPi.so => /usr/local/lib/libwiringPi.so (0x0000007f8664b000)
        libwiringPiDev.so => /usr/local/lib/libwiringPiDev.so (0x0000007f86633000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000007f865fe000)
        librt.so.1 => /lib64/librt.so.1 (0x0000007f865dd000)
        libm.so.6 => /lib64/libm.so.6 (0x0000007f8651c000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000007f864d3000)
        libc.so.6 => /lib64/libc.so.6 (0x0000007f8635b000)
        /lib/ld-linux-aarch64.so.1 (0x0000007f86692000)

この環境が良さげすね。

  • ベースのSDカードbootイメージ
    • Armbian: Armbian_5.75_Nanopct4_Debian_stretch_default_4.4.174.img
  • rootfs
    • Fedora 29 (aarch64) 改
  • WiringPi(NP)
    • rk3399-sd-friendlydesktop-bionic-4.4-arm64-20181219.img 付属のバイナリ!

wifiとかserialとか

オンボードなwifi(wlan0)は、dmesgにエラー吐きまくりでキモいので、usbなnicに。

usb-serialは、FT232なやつ2個でいこうかな。gpsとcamp用。

# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0411:0242 BUFFALO INC. (formerly MelCo., Inc.) 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
# ethtool -i wlan1
driver: rtl88xxau
version: 
firmware-version: 
expansion-rom-version: 
bus-info: 3-1:1.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
# udevadm info --attribute-walk -n /dev/ttyUSB0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/platform/fe3a0000.usb/usb6/6-1/6-1:1.0/ttyUSB0/tty/ttyUSB0':
    KERNEL=="ttyUSB0"
    SUBSYSTEM=="tty"
    DRIVER==""

  looking at parent device '/devices/platform/fe3a0000.usb/usb6/6-1/6-1:1.0/ttyUSB0':
    KERNELS=="ttyUSB0"
    SUBSYSTEMS=="usb-serial"
    DRIVERS=="ftdi_sio"
    ATTRS{latency_timer}=="16"
    ATTRS{port_number}=="0"

  looking at parent device '/devices/platform/fe3a0000.usb/usb6/6-1/6-1:1.0':
    KERNELS=="6-1:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="ftdi_sio"
    ATTRS{authorized}=="1"
    ATTRS{bAlternateSetting}==" 0"
    ATTRS{bInterfaceClass}=="ff"
    ATTRS{bInterfaceNumber}=="00"
    ATTRS{bInterfaceProtocol}=="ff"
    ATTRS{bInterfaceSubClass}=="ff"
    ATTRS{bNumEndpoints}=="02"
    ATTRS{interface}=="FT232R USB UART"
    ATTRS{supports_autosuspend}=="1"

  looking at parent device '/devices/platform/fe3a0000.usb/usb6/6-1':
    KERNELS=="6-1"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="00"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="8"
    ATTRS{bMaxPower}=="90mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0600"
    ATTRS{bmAttributes}=="a0"
    ATTRS{busnum}=="6"
    ATTRS{configuration}==""
    ATTRS{devnum}=="2"
    ATTRS{devpath}=="1"
    ATTRS{idProduct}=="6001"
    ATTRS{idVendor}=="0403"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="FTDI"
    ATTRS{maxchild}=="0"
    ATTRS{product}=="FT232R USB UART"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{serial}=="AH00TNQA"
    ATTRS{speed}=="12"
    ATTRS{urbnum}=="16"
    ATTRS{version}==" 2.00"

  looking at parent device '/devices/platform/fe3a0000.usb/usb6':
    KERNELS=="usb6"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ATTRS{authorized}=="1"
    ATTRS{authorized_default}=="1"
    ATTRS{avoid_reset_quirk}=="0"
    ATTRS{bConfigurationValue}=="1"
    ATTRS{bDeviceClass}=="09"
    ATTRS{bDeviceProtocol}=="00"
    ATTRS{bDeviceSubClass}=="00"
    ATTRS{bMaxPacketSize0}=="64"
    ATTRS{bMaxPower}=="0mA"
    ATTRS{bNumConfigurations}=="1"
    ATTRS{bNumInterfaces}==" 1"
    ATTRS{bcdDevice}=="0404"
    ATTRS{bmAttributes}=="e0"
    ATTRS{busnum}=="6"
    ATTRS{configuration}==""
    ATTRS{devnum}=="1"
    ATTRS{devpath}=="0"
    ATTRS{idProduct}=="0001"
    ATTRS{idVendor}=="1d6b"
    ATTRS{interface_authorized_default}=="1"
    ATTRS{ltm_capable}=="no"
    ATTRS{manufacturer}=="Linux 4.4.174-rk3399 ohci_hcd"
    ATTRS{maxchild}=="1"
    ATTRS{product}=="Generic Platform OHCI controller"
    ATTRS{quirks}=="0x0"
    ATTRS{removable}=="unknown"
    ATTRS{serial}=="fe3a0000.usb"
    ATTRS{speed}=="12"
    ATTRS{urbnum}=="27"
    ATTRS{version}==" 1.10"

  looking at parent device '/devices/platform/fe3a0000.usb':
    KERNELS=="fe3a0000.usb"
    SUBSYSTEMS=="platform"
    DRIVERS=="ohci-platform"
    ATTRS{driver_override}=="(null)"

  looking at parent device '/devices/platform':
    KERNELS=="platform"
    SUBSYSTEMS==""
    DRIVERS==""

# cat /etc/udev/rules.d/99-local.rules
KERNEL=="ttyUSB*", KERNELS=="2-1*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyUSB_gps"
KERNEL=="ttyUSB*", KERNELS=="6-1*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyUSB_camp"

続く〜