Welcome! Log In Create A New Profile

Advanced

NAND errors - BAD eraseblocks - how to fix it? NSA310, Archlinux 4.4.97-1-ARCH, no chance for a new uBoot?

Posted by arti74 
I copied the disk, but it won't boot - the big one.
U-Boot 2016.09.01-1 (Oct 10 2016 - 23:14:18 -0600) Arch Linux ARM
Zyxel NSA310

SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
IDE:   Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD40PURX-64GVNY0 Firm: 80.00A80 Ser#:  WD-WCC4E0SERLJD
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)
Netconsole has been turned off.
To turn it on, set netconsole variable to on.
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: WDC WD40PURX-64GVNY0 Firm: 80.00A80 Ser#:  WD-WCC4E0SERLJD
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)

USB device 0: unknown device

Device 0: Model: WDC WD40PURX-64GVNY0 Firm: 80.00A80 Ser#:  WD-WCC4E0SERLJD
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)
... is now current device
ide found on device 0
Checking for: /uEnv.txt ...
** File not found /zImage **
** File not found /uImage **
No kernel found

Device 1: not available
Trying to boot from NAND ...
ubi0: attaching mtd1
ubi0: scanning is finished
UBI init error 22
Error reading superblock on volume 'ubi0:rootfs' errno=-19!
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
NSA310>

May it be because I have now only one partition /dev/sda1 and on the printenv I see those values?
bootpart=0:1
setenv bootpart ${devnum}:1

Full printenv:
NSA310> printenv   
bootcmd=run startboot;run bootubi
bootfilem=uImage
bootfilez=zImage
bootpart=0:1
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs  rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
devnum=1
ethact=egiga0
ethaddr=CC:5D:4E:C9:F5:4A
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-nsa310.dtb
if_netconsole=ping $serverip
ipaddr=192.168.1.5
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=192.168.1.5
ncipk=192.168.1.77
netconsole=off
partition=nand0,0
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then  setenv stdin nc; setenv stdout nc;  setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
serverip=192.168.1.74
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
startboot=usb start; ide reset; for devtype in usb ide; do  setenv devnum 0; while ${devtype} dev ${devnum}; do  echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then  load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then  echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi;  run mainargs; if run loadfdt; then  if run loadrd; then  bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else  bootz ${loadaddr} - ${fdtaddr}; fi; else  if run loadrd; then echo Booting uImage with initrd;  bootm ${loadaddr} ${rdaddr}:${filesize}; else  bootm ${loadaddr}; fi; fi; else  echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;

Environment size: 3039/131068 bytes
arti74,

> May it be because I have now only one partition
> /dev/sda1 and on the printenv I see those values?
>bootpart=0:1

No. That's the correct bootpart. 0:1 meaning device 0 partition 1.


The problem is righ here. You probably removed the bootdir env by mistake!

bootcmd=run startboot;run bootubi
bootdir=/boot

So set it and boot:

setenv bootdir /boot
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 05/11/2018 06:37PM by bodhi.
WOW - great! That was it - is working now!
Thank you sooo much.
arti74 Wrote:
-------------------------------------------------------
> WOW - great! That was it - is working now!
> Thank you sooo much.

Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I have one major problem yet to solve, and this is more connected to Archlinux and I didn't got any reply there for this. I would like to apologize if it this is not place to write about it, maybe a new thread would be necessary or something. Besides I bother you often with my problems here and I'm not sure you can do something in this matter: no sensors recognized on my machine. I almost lost hope on this but I know people on Debian rather don't have this problem. Scanning for sensors:
[root@alarm rtorrent]# sensors-detect 
# sensors-detect revision $Revision$
# Kernel: 4.16.8-1-ARCH armv5tel
Use of uninitialized value in concatenation (.) or string at /usr/bin/sensors-detect line 2867.
Use of uninitialized value in concatenation (.) or string at /usr/bin/sensors-detect line 2867.
Use of uninitialized value in concatenation (.) or string at /usr/bin/sensors-detect line 2867.
# Processor: Feroceon 88FR131 rev 1 (v5l) (//)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): Y  
modprobe: FATAL: Module cpuid not found in directory /lib/modules/4.16.8-1-ARCH
Failed to load module cpuid.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): Y
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): Y
Probing for `IPMI BMC KCS' at 0xca0...                      Success!
    (confidence 4, driver `to-be-written')
Probing for `IPMI BMC SMIC' at 0xca8...                     Success!
    (confidence 4, driver `to-be-written')

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no): Y
Probing for `National Semiconductor LM78' at 0x290...       No
Probing for `National Semiconductor LM79' at 0x290...       No
Probing for `Winbond W83781D' at 0x290...                   No
Probing for `Winbond W83782D' at 0x290...                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): Y
Sorry, no supported PCI bus adapters found.

Next adapter: mv64xxx_i2c adapter (i2c-0)
Do you want to scan it? (YES/no/selectively): Y
Client found at address 0x2e
Probing for `Myson MTP008'...                               No
Probing for `National Semiconductor LM78'...                No
Probing for `National Semiconductor LM79'...                No
Probing for `National Semiconductor LM80'...                No
Probing for `National Semiconductor LM96080'...             No
Probing for `TI / National Semiconductor ADC128D818'...     No
Probing for `National Semiconductor LM85'...                No
Probing for `National Semiconductor LM96000 or PC8374L'...  No
Probing for `Analog Devices ADM1027'...                     No
Probing for `Analog Devices ADT7460 or ADT7463'...          No
Probing for `SMSC EMC6D100 or EMC6D101'...                  No
Probing for `SMSC EMC6D102'...                              No
Probing for `SMSC EMC6D103'...                              No
Probing for `SMSC EMC6D103S or EMC2300'...                  No
Probing for `SMSC EMC6W201'...                              No
Probing for `Winbond WPCD377I'...                           No
Probing for `Analog Devices ADT7467 or ADT7468'...          No
Probing for `Analog Devices ADT7470'...                     No
Probing for `Analog Devices ADT7473'...                     No
Probing for `Analog Devices ADT7475'...                     No
Probing for `Analog Devices ADT7476'...                     Success!
    (confidence 7, driver `adt7475')
Probing for `Analog Devices ADT7490'...                     No
Probing for `Andigilog aSC7611'...                          No
Probing for `Andigilog aSC7621'...                          No
Probing for `National Semiconductor LM87'...                No
Probing for `Analog Devices ADM1024'...                     No
Probing for `National Semiconductor LM93'...                No
Probing for `National Semiconductor LM94 or LM96194'...     No
Probing for `Winbond W83781D'...                            No
Probing for `Winbond W83782D'...                            No
Probing for `Winbond W83791D'...                            No
Probing for `Winbond W83792D'...                            No
Probing for `Winbond W83793R/G'...                          No
Probing for `Nuvoton W83795G/ADG'...                        No
Probing for `Nuvoton NCT7802Y'...                           No
Probing for `Nuvoton NCT7904D'...                           No
Probing for `Winbond W83627HF'...                           No
Probing for `Winbond W83627EHF'...                          No
Probing for `Winbond W83627DHG/W83667HG/W83677HG'...        No
Probing for `Asus AS99127F (rev.1)'...                      No
Probing for `Asus AS99127F (rev.2)'...                      No
Probing for `Asus ASB100 Bach'...                           No
Probing for `Winbond W83L786NR/NG/R/G'...                   No
Probing for `Winbond W83L785TS-S'...                        No
Probing for `Analog Devices ADM9240'...                     No
Probing for `Dallas Semiconductor DS1780'...                No
Probing for `National Semiconductor LM81'...                No
Probing for `Analog Devices ADM1026'...                     No
Probing for `Analog Devices ADM1025'...                     No
Probing for `Maxim MAX6639'...                              No
Probing for `Texas Instruments AMC6821'...                  No
Probing for `Analog Devices ADM1029'...                     No
Probing for `Analog Devices ADM1030'...                     No
Probing for `Analog Devices ADM1031'...                     No
Probing for `Analog Devices ADM1022'...                     No
Probing for `Texas Instruments THMC50'...                   No
Probing for `Analog Devices ADM1028'...                     No
Probing for `Texas Instruments THMC51'...                   No
Probing for `ITE IT8712F'...                                No
Probing for `SMSC DME1737'...                               No
Probing for `SMSC SCH5027D-NW'...                           No
Probing for `SMSC EMC2103'...                               No
Probing for `Fintek F75373S/SG'...                          No
Probing for `Fintek F75375S/SP'...                          No
Probing for `Fintek F75387SG/RG'...                         No
Probing for `Winbond W83791SD'...                           No


Now follows a summary of the probes I have just done.
Just press ENTER to continue: 

Driver `to-be-written':
  * ISA bus, address 0xca0
    Chip `IPMI BMC KCS' (confidence: 4)
  * ISA bus, address 0xca8
    Chip `IPMI BMC SMIC' (confidence: 4)

Driver `adt7475':
  * Bus `mv64xxx_i2c adapter'
    Busdriver `i2c_mv64xxx', I2C address 0x2e
    Chip `Analog Devices ADT7476' (confidence: 7)

Note: there is no driver for IPMI BMC KCS yet.
Check http://www.lm-sensors.org/wiki/Devices for updates.

Do you want to overwrite /etc/conf.d/lm_sensors? (YES/no): Y
Created symlink /etc/systemd/system/multi-user.target.wants/lm_sensors.service -> /usr/lib/systemd/system/lm_sensors.service.
Job for lm_sensors.service failed because the control process exited with error code.
See "systemctl status lm_sensors.service" and "journalctl -xe" for details.
[root@alarm rtorrent]# sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
I tried to load all modules which could 'grab' a sensor
[rtorrent@alarm ~]$ lsmod
Module                  Size  Used by
nsa320_hwmon            2464  0
lm85                   19339  0
hwmon_vid               2046  1 lm85
hwmon                   7939  2 lm85,nsa320_hwmon
marvell_cesa           30938  0
i2c_mv64xxx             8014  0
ip_tables              11115  0
x_tables               15664  1 ip_tables
ipv6                  396408  34
But after reboot remains shes e only:
lsmod
Module                  Size  Used by
marvell_cesa           30938  0
i2c_mv64xxx             8014  0
ip_tables              11115  0
x_tables               15664  1 ip_tables
ipv6                  396408  34

And the most important - the adt7475 can't be find (it isn't implemented in the kernel or something?)
[rtorrent@alarm ~]$ sudo modprobe adt7475
modprobe: FATAL: Module adt7475 not found in directory /lib/modules/4.16.8-1-ARCH
ls /lib/modules/4.16.8-1-ARCH
build         kernel         modules.alias.bin  modules.builtin.bin  modules.dep.bin  modules.order    modules.symbols
extramodules  modules.alias  modules.builtin    modules.dep          modules.devname  modules.softdep  modules.symbols.bin



Edited 1 time(s). Last edit at 05/12/2018 12:43PM by arti74.
arti74,

> I have one major problem yet to solve, and this is
> more connected to Archlinux and I didn't got any
> reply there for this. I would like to apologize if
> it this is not place to write about it, maybe a
> new thread would be necessary or something.
> Besides I bother you often with my problems here
> and I'm not sure you can do something in this
> matter: no sensors recognized on my machine. I
> almost lost hope on this but I know people on
> Debian rather don't have this problem.

Don't worry arti! I'll help all Linux users regardless which distro they run.

This problem should be DTS related. I have 3 versions of the DTS in my kernel release. This is because there are 3 variations of the NSA310: red USB Led, lm85 sensor, and adt7476 sensor.

Let me take a look at your bootlog.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you
This is what dmesg shows:
[rtorrent@alarm ~]$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.16.8-1-ARCH (builduser@leming) (gcc version 8.1.0 (GCC)) #1 PREEMPT Fri May 11 02:49:15 UTC 2018
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: ZyXEL NSA310
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] random: get_random_bytes called from start_kernel+0x80/0x424 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs rw rootwait rw rootwait
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 242980K/262144K available (7517K kernel code, 599K rwdata, 1696K rodata, 352K init, 680K bss, 19164K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
                   lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
                   modules : 0xbf000000 - 0xc0000000   (  16 MB)
                     .text : 0x(ptrval) - 0x(ptrval)   (7518 kB)
                     .init : 0x(ptrval) - 0x(ptrval)   ( 352 kB)
                     .data : 0x(ptrval) - 0x(ptrval)   ( 600 kB)
                      .bss : 0x(ptrval) - 0x(ptrval)   ( 681 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000041] Switching to timer-based delay loop, resolution 5ns
[    0.000257] Console: colour dummy device 80x30
[    0.000290] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000311] pid_max: default: 32768 minimum: 301
[    0.000693] Security Framework initialized
[    0.000884] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000905] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001889] CPU: Testing write buffer coherency: ok
[    0.002958] Setting up static identity map for 0x8200 - 0x8258
[    0.003231] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.003465] Hierarchical SRCU implementation.
[    0.004725] devtmpfs: initialized
[    0.010220] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.010248] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.010617] pinctrl core: initialized pinctrl subsystem
[    0.011846] NET: Registered protocol family 16
[    0.012359] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.013838] cpuidle: using governor ladder
[    0.013905] cpuidle: using governor menu
[    0.014427] Feroceon L2: Enabling L2
[    0.014473] Feroceon L2: Cache support initialised.
[    0.019459] No ATAGs?
[    0.029149] vgaarb: loaded
[    0.029466] SCSI subsystem initialized
[    0.029676] libata version 3.00 loaded.
[    0.029887] usbcore: registered new interface driver usbfs
[    0.029944] usbcore: registered new interface driver hub
[    0.030030] usbcore: registered new device driver usb
[    0.030221] pps_core: LinuxPPS API ver. 1 registered
[    0.030231] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.030261] PTP clock support registered
[    0.031242] clocksource: Switched to clocksource orion_clocksource
[    0.096057] VFS: Disk quotas dquot_6.6.0
[    0.096157] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.096367] FS-Cache: Loaded
[    0.105894] NET: Registered protocol family 2
[    0.106654] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.106691] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.106723] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.106753] TCP: Hash tables configured (established 2048 bind 2048)
[    0.106854] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.106877] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.107109] NET: Registered protocol family 1
[    0.107606] RPC: Registered named UNIX socket transport module.
[    0.107618] RPC: Registered udp transport module.
[    0.107625] RPC: Registered tcp transport module.
[    0.107632] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.107643] PCI: CLS 0 bytes, default 32
[    0.107879] Trying to unpack rootfs image as initramfs...
[    0.576510] Freeing initrd memory: 5488K
[    0.578398] Initialise system trusted keyrings
[    0.578640] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.588166] FS-Cache: Netfs 'nfs' registered for caching
[    0.588831] NFS: Registering the id_resolver key type
[    0.588862] Key type id_resolver registered
[    0.588870] Key type id_legacy registered
[    0.588914] jffs2: version 2.2. (NAND) \xc2\xa9 2001-2006 Red Hat, Inc.
[    0.589529] fuse init (API version 7.26)
[    0.596568] Key type asymmetric registered
[    0.596583] Asymmetric key parser 'x509' registered
[    0.596668] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.596681] io scheduler noop registered
[    0.596689] io scheduler deadline registered
[    0.597040] io scheduler cfq registered (default)
[    0.597052] io scheduler mq-deadline registered
[    0.597061] io scheduler kyber registered
[    0.597359] io scheduler bfq registered
[    0.598904] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.600816] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    0.600836] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.600848] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.600861] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.600898] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    0.601141] PCI: bus0: Fast back to back transfers disabled
[    0.601159] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.601505] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    0.601542] pci 0000:01:00.0: reg 0x10: [io  0x0000-0x00ff]
[    0.601566] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00000fff 64bit pref]
[    0.601583] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    0.601595] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.601687] pci 0000:01:00.0: supports D1 D2
[    0.601695] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.601899] PCI: bus1: Fast back to back transfers disabled
[    0.601917] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.601954] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[    0.601969] pci 0000:00:01.0: BAR 7: assigned [io  0x10000-0x10fff]
[    0.601986] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    0.602002] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    0.602024] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    0.602044] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    0.602059] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.602071] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    0.602086] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.602578] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.662382] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.662620] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.722356] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.726488] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.727693] console [ttyS0] disabled
[    0.727757] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    1.424366] console [ttyS0] enabled
[    1.438721] brd: module loaded
[    1.449247] loop: module loaded
[    1.452816] sata_mv f1080000.sata: version 1.28
[    1.453098] sata_mv f1080000.sata: slots 32 ports 2
[    1.460669] scsi host0: sata_mv
[    1.464464] scsi host1: sata_mv
[    1.467818] ata1: SATA max UDMA/133 irq 32
[    1.471984] ata2: SATA max UDMA/133 irq 32
[    1.476928] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.483416] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.488055] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.495692] Scanning device for bad blocks
[    1.560596] Bad eraseblock 631 at 0x000004ee0000
[    1.602985] 9 cmdlinepart partitions found on MTD device orion_nand
[    1.609278] Creating 9 MTD partitions on "orion_nand":
[    1.614468] 0x000000000000-0x000000100000 : "uboot"
[    1.619755] 0x000000100000-0x000000180000 : "uboot_env"
[    1.625349] 0x000000180000-0x000000200000 : "key_store"
[    1.630941] 0x000000200000-0x000000280000 : "info"
[    1.636097] 0x000000280000-0x000000c80000 : "etc"
[    1.641191] 0x000000c80000-0x000001680000 : "kernel_1"
[    1.646753] 0x000001680000-0x000004640000 : "rootfs1"
[    1.652430] 0x000004640000-0x000005040000 : "kernel_2"
[    1.657973] 0x000005040000-0x000008000000 : "rootfs2"
[    1.664122] libphy: Fixed MDIO Bus: probed
[    1.668982] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.674658] pci 0000:00:01.0: enabling device (0140 -> 0143)
[    1.680358] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[    1.686919] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0x(ptrval), 00:00:00:00:00:30, XID 083000c0 IRQ 35
[    1.696570] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    1.705293] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.711898] ehci-pci: EHCI PCI platform driver
[    1.716410] ehci-orion: EHCI orion driver
[    1.720653] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.726235] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.734137] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    1.761266] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.768101] hub 1-0:1.0: USB hub found
[    1.771970] hub 1-0:1.0: 1 port detected
[    1.776526] usbcore: registered new interface driver uas
[    1.782043] usbcore: registered new interface driver usb-storage
[    1.788148] usbcore: registered new interface driver ums-alauda
[    1.794185] usbcore: registered new interface driver ums-cypress
[    1.800282] usbcore: registered new interface driver ums-datafab
[    1.806389] usbcore: registered new interface driver ums_eneub6250
[    1.812729] usbcore: registered new interface driver ums-freecom
[    1.818794] usbcore: registered new interface driver ums-isd200
[    1.824799] usbcore: registered new interface driver ums-jumpshot
[    1.830956] usbcore: registered new interface driver ums-karma
[    1.836867] usbcore: registered new interface driver ums-onetouch
[    1.843054] usbcore: registered new interface driver ums-realtek
[    1.849121] usbcore: registered new interface driver ums-sddr09
[    1.855126] usbcore: registered new interface driver ums-sddr55
[    1.861100] usbcore: registered new interface driver ums-usbat
[    1.867302] mousedev: PS/2 mouse device common for all mice
[    1.873372] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.880365] i2c /dev entries driver
[    1.884903] orion_wdt: Initial timeout 21 sec
[    1.890138] sdhci: Secure Digital Host Controller Interface driver
[    1.896423] sdhci: Copyright(c) Pierre Ossman
[    1.900878] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.908182] ledtrig-cpu: registered to indicate activity on CPUs
[    1.914348] usbcore: registered new interface driver r8712u
[    1.920176] gre: GRE over IPv4 demultiplexor driver
[    1.925152] NET: Registered protocol family 17
[    1.929703] Key type dns_resolver registered
[    1.934854] registered taskstats version 1
[    1.938973] Loading compiled-in X.509 certificates
[    1.956835] Key type encrypted registered
[    1.962856] console [netcon0] enabled
[    1.966537] netconsole: network logging started
[    1.972018] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[    1.979078] rtc-mv f1010300.rtc: setting system clock to 2018-05-12 17:13:41 UTC (1526145221)
[    1.987750] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    1.997223] ata1.00: ATA-9: WDC WD40PURX-64GVNY0, 80.00A80, max UDMA/133
[    2.004052] ata1.00: 7814037168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    2.013432] ata1.00: configured for UDMA/133
[    2.028227] scsi 0:0:0:0: Direct-Access     ATA      WDC WD40PURX-64G 0A80 PQ: 0 ANSI: 5
[    2.037363] sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[    2.045499] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    2.050888] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.056605] sd 0:0:0:0: [sda] Write Protect is off
[    2.061499] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.061625] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.139414]  sda: sda1
[    2.141914] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.151634] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.311844] random: fast init done
[    2.354529] hub 1-1:1.0: USB hub found
[    2.358809] hub 1-1:1.0: 4 ports detected
[    2.393957] ata2: SATA link down (SStatus 0 SControl F300)
[    2.411096] Freeing unused kernel memory: 352K
[    2.415684] This architecture does not have kernel memory protection.
[    4.897081] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    6.415411] NET: Registered protocol family 10
[    6.545232] Segment Routing with IPv6
[    6.693921] systemd[1]: systemd 238 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid)
[    6.716515] systemd[1]: Detected architecture arm.
[    6.808815] systemd[1]: Set hostname to <alarm>.
[    8.553573] systemd[1]: Configuration file /etc/systemd/system/led.service is marked executable. Please remove executable permission bits. Proceeding anyway.
[    8.568345] systemd[1]: /etc/systemd/system/led.service:10: Ignoring unknown escape sequences: "/usr/bin/echo default-on > /sys/class/leds/nsa310\:green\:sys/trigger"
[    8.583474] systemd[1]: /etc/systemd/system/led.service:11: Ignoring unknown escape sequences: "/usr/bin/echo ide-disk > /sys/class/leds/nsa310\:green\:hdd/trigger"
[    8.598406] systemd[1]: /etc/systemd/system/led.service:12: Ignoring unknown escape sequences: "/usr/bin/echo usb-host > /sys/class/leds/nsa310\:green\:usb/trigger"
[    8.613294] systemd[1]: /etc/systemd/system/led.service:13: Ignoring unknown escape sequences: "/usr/bin/echo none > /sys/class/leds/nsa310\:red\:sys/trigger"
[    8.742909] random: systemd: uninitialized urandom read (16 bytes read)
[    8.749939] systemd[1]: Listening on udev Kernel Socket.
[    8.781761] random: systemd: uninitialized urandom read (16 bytes read)
[    8.789376] systemd[1]: Listening on udev Control Socket.
[    8.821442] random: systemd: uninitialized urandom read (16 bytes read)
[   10.899005] Adding 1048572k swap on /swapfile.  Priority:-2 extents:8 across:1261564k 
[   11.232739] systemd-journald[160]: Received request to flush runtime journal from PID 1
[   12.151530] random: crng init done
[   12.154962] random: 7 urandom warning(s) missed due to ratelimiting
[   12.462194] r8169 0000:01:00.0 enp1s0: renamed from eth0
[   12.636179] marvell-cesa f1030000.crypto: CESA device successfully registered
[   13.517050] r8169 0000:01:00.0 enp1s0: link down
[   13.521808] r8169 0000:01:00.0 enp1s0: link down
[   13.526613] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[   15.229814] r8169 0000:01:00.0 enp1s0: link up
[   15.241189] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
I haven't set the netconsole here so this is what I can show you at the moment.
arti,

Where did you find the sensor is adt7475?

The DTS said it is adt7476a

i2c@11000 {
                        status = "okay";

                        adt7476: adt7476a@2e {
                                compatible = "adi,adt7476";
                                reg = <0x2e>;
                        };
                };

And your probe found this sensor at 0x2e.

UPDATE:


I see. The kernel file is adt7475.c.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 05/12/2018 04:35PM by bodhi.
Actually I found similar example of the internet here:
https://archlinuxarm.org/forum/viewtopic.php?f=27&t=3708&start=90#p31201
But you're right - I may have something more LM85 related..
Quote
DTS said it is adt7476a
Maybe I read somewhere that the driver is still adt7475..

There's this yet:
sudo i2cdetect -l
i2c-0	i2c       	mv64xxx_i2c adapter             	I2C adapter



Edited 4 time(s). Last edit at 05/12/2018 04:36PM by arti74.
arti74 Wrote:
-------------------------------------------------------
> Actually I found similar example of the internet
> here:
> https://archlinuxarm.org/forum/viewtopic.php?f=27&t=3708&start=90#p31201
> But you're right - I may have something more LM85
> related..
>
Quote
DTS said it is adt7476a
> Maybe I read somewhere that the driver is still
> adt7475..
>
> There's this yet:
>
> sudo i2cdetect -l
> i2c-0	i2c       	mv64xxx_i2c adapter            
> 	I2C adapter
>

That's OK. adt7476a an d adt7475 use the same driver. But let me take a look at he DTS files again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
arti,

Do you have a Red LED USB?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
To find the module:

find /lib/modules/4.16.8-1-ARCH/kernel  -name 'adt74*'

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
When I connect an USB - the led is green.
No adt74 module found.
arti74 Wrote:
-------------------------------------------------------
> When I connect an USB - the led is green.
> No adt74 module found.

Ah. I think Arch probably compiled it into the kernel, so there is no need to carry separate module like Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I'll try to read yet about this, but now I should go to sleep - from tomorrow I have a work marathon couple days.
I wish I could let the nsa310 stay on from the morning, to have access to it from work, but as I mentioned it's not quiet and my wife probably again doesn't let me.. I should hide it deep so that it won't be heard.
That's why it is important for me to install those sensors.

EDIT: Hiding is not a bad idea - I just found very good place for it - I haven't managed yet to properly set up the wake-on-lane feature, which is necessary in this case..
EDIT: WOL works! :)



Edited 2 time(s). Last edit at 05/12/2018 05:41PM by arti74.
bodhi Wrote:
-------------------------------------------------------
> arti74 Wrote:
> -------------------------------------------------------
> > When I connect an USB - the led is green.
> > No adt74 module found.
>
> Ah. I think Arch probably compiled it into the
> kernel, so there is no need to carry separate
> module like Debian.

Indeed. I'm sure the module was built into Arch kernel. That's why you could not find it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
arti74 Wrote:
-------------------------------------------------------
> I'll try to read yet about this, but now I should
> go to sleep - from tomorrow I have a work marathon
> couple days.
> I wish I could let the nsa310 stay on from the
> morning, to have access to it from work, but as I
> mentioned it's not quiet and my wife probably
> again doesn't let me.. I should hide it deep so
> that it won't be heard.
> That's why it is important for me to install those
> sensors.
>
> EDIT: Hiding is not a bad idea - I just found very
> good place for it - I haven't managed yet to
> properly set up the wake-on-lane feature, which is
> necessary in this case..
> EDIT: WOL works! :)

Cool that WOL works!

Regarding your sensor. The NSA310 is very different from NSA325 and NSA 310S (in these 2 boxes, i2c is accessed directly to read data, using i2cget but no fan control). NSA320 is closer to it where the sensor module is used and can be detected by sensors command.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 05/14/2018 02:03AM by bodhi.
WOL went smooth, I'm afraid those sensors is a tough nut to crack... (at least on my Zyxel)
The commands below shows something (not sure it is much of help though)
[rtorrent@alarm ~]$ sudo i2cdetect 0
[sudo] password for rtorrent:
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 2e --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
[rtorrent@alarm ~]$ sudo i2cdump 0 0x2e
[sudo] password for rtorrent:
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x2e, mode byte
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
20: 00 00 00 00 00 80 80 80 00 00 00 00 00 00 00 00    .....???........
30: ff ff ff 00 00 00 00 00 ff ff ff 00 00 76 41 69    .............vAi
40: 04 00 00 00 00 ff 00 ff 00 ff 00 ff 00 ff 81 7f    ?.............??
50: 81 7f 81 7f ff ff ff ff ff ff ff ff 62 62 62 c4    ????........bbb?
60: c4 c4 00 00 80 80 80 5a 5a 5a 64 64 64 44 40 00    ??..???ZZZdddD@.
70: 00 00 00 00 00 00 00 00 00 00 00 55 01 00 00 00    ...........U?...
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
arti74,

I believe for this box, it is not helpful to look for solution in i2c. There were quite a few users with the NSA310 in this forum, such as StephenP who got his box sensor working in the thread I've posted link above.

Look to see if you have the hardware monitoring device class in the kernel, and what's in it.

ls -l /sys/class/hwmon/hwmon0

UPDATE:

The a version for NSA310 needs both adt7475 and i2c for fancontrol.
The b version for NSA310 needs both lm85 and i2c for fancontrol.

You need to determine which NSA310 box you have:
http://zyxel.nas-central.org/wiki/Category:NSA-310

The 3rd one has Red USB LED.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 05/14/2018 02:10AM by bodhi.
Here is another one by one of our more experienced users, bobafetthotmail:

https://forum.doozan.com/read.php?2,25783,27151#msg-27151

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thank you for this.
ls -l /sys/class/hwmon/hwmon0
I don't have any hwmon file in my system, beside this:
sudo find / -name *hwmon* -print
/usr/lib/modules/4.16.8-1-ARCH/kernel/drivers/hwmon/nsa320-hwmon.ko.gz
[rtorrent@alarm ~]$ ls /usr/lib/modules/4.16.8-1-ARCH/kernel/drivers/hwmon/
hwmon-vid.ko.gz  lm63.ko.gz  lm77.ko.gz  lm90.ko.gz
hwmon.ko.gz      lm75.ko.gz  lm85.ko.gz  nsa320-hwmon.ko.gz

ls /sys/class/
ata_device/   gpio/         mmc_host/     regulator/    ubi/
ata_link/     i2c-adapter/  mtd/          rtc/          vc/
ata_port/     i2c-dev/      net/          scsi_device/  vtconsole/
bdi/          input/        pci_bus/      scsi_disk/    watchdog/
block/        leds/         phy/          scsi_generic/
bsg/          mdio_bus/     power_supply/ scsi_host/
devcoredump/  mem/          pps/          spi_master/
dma/          misc/         ptp/          tty/
Quote
bodhi
You need to determine which NSA310 box you have:
For sure it isn't the rebranded TDC Homedisk. And I don't have red USB led.
So it stays like the nsa310, however there are some differences in /dev/... files when comparing to those from here http://zyxel.nas-central.org/wiki/Category:NSA-310
My files:
[rtorrent@alarm ~]$ cat /proc/cpuinfo
processor       : 0
model name      : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 133.33
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Marvell Kirkwood (Flattened Device Tree)
Revision        : 0000
Serial          : 0000000000000000
[rtorrent@alarm ~]$ cat /proc/meminfo
MemTotal:         248820 kB
MemFree:           12272 kB
MemAvailable:     198848 kB
Buffers:           60652 kB
Cached:            94452 kB
SwapCached:           92 kB
Active:           114508 kB
Inactive:          61804 kB
Active(anon):       9212 kB
Inactive(anon):    12344 kB
Active(file):     105296 kB
Inactive(file):    49460 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       1048572 kB
SwapFree:        1048308 kB
Dirty:                12 kB
Writeback:             0 kB
AnonPages:         21144 kB
Mapped:            45708 kB
Shmem:               348 kB
Slab:              48448 kB
SReclaimable:      39692 kB
SUnreclaim:         8756 kB
KernelStack:         576 kB
PageTables:         1308 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1172980 kB
Committed_AS:     141660 kB
VmallocTotal:     770048 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
Some files and directories in my system:
[rtorrent@alarm ~]$ ls /sys/devices/platform/
'Fixed MDIO bus.0'   gpio_poweroff      ocp@f1000000   serial8250
 alarmtimer          kirkwood-cpufreq   power          uevent
 gpio-leds           kirkwood_cpuidle   reg-dummy
 gpio_keys           mbus@f1000000      regulators
 ls /sys/devices/platform/ocp\@f1000000/
driver_override                f102011c.clock-gating-control/ f1082000.sata-phy/
f1010000.pin-controller/       f1020128.l2-cache/             f1084000.sata-phy/
f1010100.gpio/                 f1020300.timer/                modalias
f1010140.gpio/                 f1020300.watchdog-timer/       of_node/
f1010300.rtc/                  f1030000.crypto/               power/
f1011000.i2c/                  f1050000.ehci/                 subsystem/
f1012000.serial/               f1060800.xor/                  uevent
f1020000.mbus-controller/      f1060900.xor/
f1020000.system-controller/    f1080000.sata/
[rtorrent@alarm ~]$ ls /sys/devices/platform/mbus\@f1000000/
driver_override  f5000000.sa-sram             modalias  power      uevent
f4000000.nand    mbus@f1000000:pcie@82000000  of_node   subsystem
[rtorrent@alarm ~]$ ls /sys/devices/platform/mbus\@f1000000/mbus\@f1000000\:pcie\@82000000/
driver  driver_override  modalias  of_node  pci0000:00  power  subsystem  uevent
[rtorrent@alarm ~]$ ls /sys/firmware/devicetree/base/
'#address-cells'   chosen       gpio-leds       interrupt-parent   model          regulators
'#size-cells'      compatible   gpio_keys       mbus@f1000000      name
 aliases           cpus         gpio_poweroff   memory             ocp@f1000000
[rtorrent@alarm ~]$ ls /sys/firmware/devicetree/base/mbus\@f1000000/
#address-cells     controller         pcie-io-aperture   ranges
#size-cells        name               pcie-mem-aperture  sa-sram@301/
compatible         nand@12f/          pcie@82000000/
[rtorrent@alarm ~]$ ls /sys/firmware/devicetree/base/ocp\@f1000000/
'#address-cells'               ethernet-controller@72000   mvsdio@90000           serial@12100
'#size-cells'                  ethernet-controller@76000   name                   spi@10600
 audio-controller@a0000        gpio@10100                  pin-controller@10000   system-controller@20000
 bridge-interrupt-ctrl@20110   gpio@10140                  ranges                 timer@20300
 clock-gating-control@2011c    i2c@11000                   rtc@10300              watchdog-timer@20300
 compatible                    l2-cache@20128              sata-phy@82000         xor@60800
 core-clocks@10030             main-interrupt-ctrl@20200   sata-phy@84000         xor@60900
 crypto@30000                  mbus-controller@20000       sata@80000
 ehci@50000                    mdio-bus@72004              serial@12000
[rtorrent@alarm ~]$ ls /sys/firmware/devicetree/base/ocp@f1000000/i2c@11000/adt7476a@2e
compatible  name  reg



Edited 3 time(s). Last edit at 05/14/2018 03:54AM by arti74.
arti74,

Try these in order.

1. Your kernel hwmon modules are in

Quote

[rtorrent@alarm ~]$ ls /usr/lib/modules/4.16.8-1-ARCH/kernel/drivers/hwmon/
hwmon-vid.ko.gz lm63.ko.gz lm77.ko.gz lm90.ko.gz
hwmon.ko.gz lm75.ko.gz lm85.ko.gz nsa320-hwmon.ko.gz

Just unzip them all and modprobe the nsa320-hwmon and lm85. See what the kernel detects (lm85 or adt7476).

2. The adt7476 module was compiled in for this kernel. Apparently the wrong assumption must have been that there is only one NSA310 model. We know there are 3. And you are not sure which sensor you have on this box. So I say just try both.

3. For information. Here is my Debian release thread. Scroll down the the section:

Quote

Updated 14 Apr 2018:

Kernel linux-4.16.1-kirkwood-tld-1 package has been uploaded. The following features were added/updated:

- Add GENERIC_CPU_VULNERABILITIES config to track mainline future security reports.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Download at Dropbox:

linux-4.16.1-kirkwood-tld-1-bodhi.tar.bz2

md5:
ac1aff7c9848ff949dfa081cf5ac094c
sha256:
8779493bf8319b712b2f8ed3519305e61abee9e2bcc9630fc28d7c6d1d420bb8


This tarball contains 6 files:

Quote

linux-image-4.16.1-kirkwood-tld-1_1.0_armel.deb
linux-headers-4.16.1-kirkwood-tld-1_1.0_armel.deb
config-4.16.1-kirkwood-tld-1
zImage-4.16.1-kirkwood-tld-1
linux-dtb-4.16.1-kirkwood-tld-1.tar
linux-4.16.1-kirkwood-tld-1.patch

The DTB tarball linux-dtb-4.16.1-kirkwood-tld-1.tar contains all kirkwood DTB files. In this you can find these 3 files for the NSA310:


-rw-r--r-- 1 root root 12150 Apr  9 22:54 /boot/dts/kirkwood-nsa310a.dtb
-rw-r--r-- 1 root root 12282 Apr  9 22:54 /boot/dts/kirkwood-nsa310b-lmsensor-redusbled.dtb
-rw-r--r-- 1 root root 12590 Apr  9 22:54 /boot/dts/kirkwood-nsa310.dtb

You could use these 3 DTBs for testing by copying to your Arch rootfs /boot/dtbs/.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Quote
bodhi
Just unzip them all and modprobe the nsa320-hwmon and lm85. See what the kernel detects (lm85 or adt7476).
It must remain gzipped, otherwise I can not modprobe it. I tried them all:
[rtorrent@alarm hwmon]$ sudo modprobe nsa320-hwmon
[rtorrent@alarm hwmon]$ sudo modprobe lm90
[rtorrent@alarm hwmon]$ sudo modprobe lm85
[rtorrent@alarm hwmon]$ sudo modprobe lm77
[rtorrent@alarm hwmon]$ sudo modprobe lm75
[rtorrent@alarm hwmon]$ sudo modprobe lm63
[rtorrent@alarm hwmon]$ sudo modprobe hwmon
[rtorrent@alarm hwmon]$ sudo modprobe hwmon-vid
[rtorrent@alarm ~]$ lsmod
Module                  Size  Used by
nsa320_hwmon            2464  0
lm90                   15743  0
lm85                   19339  0
lm77                    3660  0
lm75                    8545  0
lm63                   11771  0
hwmon                   7939  6 lm77,lm85,lm75,lm63,lm90,nsa320_hwmon
hwmon_vid               2046  1 lm85
marvell_cesa           30938  0
i2c_mv64xxx             8014  0
ip_tables              11115  0
x_tables               15664  1 ip_tables
ipv6                  396408  34
[rtorrent@alarm ~]$ sudo sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
I tried once again the sensor detect command, but no changes - still no sensors, and after reboot only those modules are active:
[rtorrent@alarm ~]$ lsmod
Module                  Size  Used by
marvell_cesa           30938  0
i2c_mv64xxx             8014  0
ip_tables              11115  0
x_tables               15664  1 ip_tables
ipv6                  396408  34
Maybe the problem is with this:
[rtorrent@alarm ~]$ sudo modprobe adt7476
modprobe: FATAL: Module adt7476 not found in directory /lib/modules/4.16.8-1-ARC
(There's a possibility that this would stick to the i2c_mv64xxx...)

Also doing the copy of these additional .dtb files to /boot/dtbs and reboot gave nothing.



Edited 2 time(s). Last edit at 05/15/2018 04:20AM by arti74.
According to this https://archlinuxarm.org/forum/viewtopic.php?p=31201#p31201
I should have this module: adt7475 - but I haven't.
modprobe adt7475     
modprobe: FATAL: Module adt7475 not found in directory /lib/modules/4.16.8-1-ARCH
From the thread about nsa320:
lsmod
Module                  Size  Used by
i2c_mv64xxx             4654  0
adt7475                13961  0
hwmon_vid               1440  1 adt7475
i2c_core               15605  2 adt7475,i2c_mv64xxx
r8169                  48182  0
ipv6                  265350  14
rt73usb                22348  0
rt2x00usb               7998  1 rt73usb
rt2x00lib              33631  2 rt73usb,rt2x00usb
mac80211              385533  2 rt2x00lib,rt2x00usb
cfg80211              396259  2 mac80211,rt2x00lib
rfkill                 15245  1 cfg80211
crc_itu_t               1105  1 rt73usb
nsa3xx_hwmon            2276  0
hwmon                   1047  2 nsa3xx_hwmon,adt7475
mv_cesa                10696  0
autofs4                22301  2
[root@alarm ~]# modinfo adt7475
filename:       /lib/modules/3.9.1-2-ARCH/kernel/drivers/hwmon/adt7475.ko.gz
license:        GPL
description:    adt7475 driver
author:         Advanced Micro Devices, Inc
alias:          i2c:adt7490
alias:          i2c:adt7476
alias:          i2c:adt7475
alias:          i2c:adt7473
depends:        i2c-core,hwmon-vid,hwmon
intree:         Y
vermagic:       3.9.1-2-ARCH preempt mod_unload modversions ARMv5 p2v8
And I also don't have this: nsa3xx_hwmon - which is likely needed...
arti74,

The nsa3xx_hwmon was obsoleted back in kernel 4.6.

There is a good chance that the Arch kernel that you are running never has full official supports for Zyxel NSA310. So I'm not surpised that you having problem. Let me list my Debian kernel config that users here have been running with the NSA310 and then you could ask Arch developers to include them in the next build.

You can post or send them the 3 DTS files in my patch linux-4.16.1-kirkwood-tld-1.patch (in the tarball).

And also these necessary kernel configs.

CONFIG_SENSORS_NSA320=m

CONFIG_HWMON=y
CONFIG_HWMON_VID=m
# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_THERMAL_HWMON=y

CONFIG_SENSORS_LM85=m
CONFIG_SENSORS_ADT7475=m

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
No wonder! I do not see Zyxel NSA310 on this list:

https://archlinuxarm.org/platforms

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Yes indeed no NSA310 there. It's sad... There's the NSA320 but it's obviously not the same.
So I assume we can do nothing more in this matter, nevertheless I'm greatful for your help with all my problems.
I should find some developers of Arch and ask them to extend support also for this Zyxel device.
Best wishes, Artur.
Artur, you're welcome! Glad to have helped with some issues.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Sensors problem solved! Quick Moonman reaction for my request and in the new 4.16.9-2-ARCH kernel there's the adt7475 driver already.
I modprobed it, I also the i2c-dev (I mention this because I don't remember if I did it before and sensors wasn't working right away after modprobing adt7475)
The results:
Next adapter: mv64xxx_i2c adapter (i2c-0)
Do you want to scan it? (YES/no/selectively):
Client found at address 0x2e
Handled by driver `adt7475' (already loaded), chip type `adt7476'


Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `adt7475':
  * Bus `mv64xxx_i2c adapter'
    Busdriver `i2c_mv64xxx', I2C address 0x2e
    Chip `adt7476' (confidence: 6)

Driver `to-be-written':
  * ISA bus, address 0xca0
    Chip `IPMI BMC KCS' (confidence: 4)
  * ISA bus, address 0xca8
    Chip `IPMI BMC SMIC' (confidence: 4)

Note: there is no driver for IPMI BMC KCS yet.
Check http://www.lm-sensors.org/wiki/Devices for updates.

Do you want to overwrite /etc/conf.d/lm_sensors? (YES/no):
[rtorrent@alarm ~]$ sudo sensors
adt7476-i2c-0-2e
Adapter: mv64xxx_i2c adapter
in0:          +1.82 V  (min =  +0.00 V, max =  +3.31 V)
Vcore:        +1.08 V  (min =  +0.00 V, max =  +2.99 V)
+3.3V:        +3.24 V  (min =  +2.96 V, max =  +3.61 V)
+5V:          +5.12 V  (min =  +4.48 V, max =  +5.50 V)
+12V:        +11.94 V  (min =  +0.00 V, max = +15.69 V)
fan1:        4936 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:           0 RPM  (min =    0 RPM)
temp1:        +34.2 C  (low  = -127.0 C, high = +127.0 C)
                       (crit = +100.0 C, hyst = +96.0 C)
M/B Temp:     +35.0 C  (low  = -127.0 C, high = +127.0 C)
                       (crit = +100.0 C, hyst = +96.0 C)
temp3:        +41.0 C  (low  = -127.0 C, high = +127.0 C)
                       (crit = +100.0 C, hyst = +96.0 C)
cpu0_vid:    +0.000 V
[rtorrent@alarm ~]$ lsmod
Module                  Size  Used by
adt7475                17772  0
hwmon_vid               2046  1 adt7475
hwmon                   7939  1 adt7475
marvell_cesa           30938  0
i2c_mv64xxx             8014  0
ip_tables              11115  0
x_tables               15664  1 ip_tables
ipv6                  396408  34
ses                     6935  0
enclosure               6801  1 ses
:)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: