Welcome! Log In Create A New Profile

Advanced

Help with installing 2016.05 U-Boot Kirkwood for NSA310

Posted by Stephen P 
Stephen P
Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 24, 2017 01:13PM
I am trying to get the latest u-boot running on my NSA 310 (old version). My intention is to move to Debian, but I want to take things one step at a time:

    [1] Get serial console and kwboot working
    [2] kwbooot latest uboot
    [3] ensure kwbooted uboot can boot stock kernel
    [4] flash latest uboot
    [5] ensure new uboot can still boot stock kernel
    [6] set-up partition Debian on GPT hard drive
    [7] Get uboot to boot Debian from hard-drive

I have managed 1 and 2. However, no matter what env vars I set in u-boot, my kernel gets stuck at 'done, booting the kernel'. Console parameters seem ok, I've tried different machid and arcNumber parameters; they seem to be useless.

Please help!



Edited 1 time(s). Last edit at 10/24/2017 04:07PM by bodhi.
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 24, 2017 04:12PM
Stephen P,

Kwboot again. Interrupt serial console, and execute:

printenv

And proceed to try booting as you did before. I need to see what envs you attempted to set, in order to point out the errors and suggest what to do to get more information if necessary.

Post the entire serial console log, from kwboot banner until the kernel stuck at "done, booting the kernel".

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thanks bodhi. I would have posted the envs and log before but I have tried so many different permutations, it was difficult to know which to post.

Since my original post I have successfully set up your Debian image to boot from /dev/sda2, which works, but as a result the envs are a bit of a hybrid. Currently:
stock u-boot + these variables + stock firmware boots ok automatically.
stock u-boot + any variables + Debian will not work because drive is GPT etc.
kw u-boot + these variables + Debian boots ok via manual boot command.
kw u-boot + these variables + stock firmware hangs as shown - this is what I want to fix.

 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:59:20 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


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
Hit any key to stop autoboot:  0 
NSA310> printenv
CASset=min
CONTRY_TYPE=FF
FEATURE_BIT=00
MODEL_ID=A203
PRODUCT_NAME=NSA-310
VENDOR_NAME=ZyXEL Communications Corp.
arcNumber=4402
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 init=/bin/systemd
bootargs_end=:::DB88FXX81:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=nand read.e 0x2000000 $kernel_addr 0xA00000; bootm 0x2000000
bootdelay=20
bootdev=ide
console=console=ttyS0,115200
device=0:2
disL2Cache=no
disL2Prefetch=yes
disaMvPnp=no
dtb_file=/boot/dts/kirkwood-nsa310b-lmsensor-redusbled.dtb
enaAutoRecovery=yes
enaCpuStream=no
enaDCPref=yes
enaICPref=yes
enaMonExt=no
enaWrAllo=no
eth1addr=00:19:CB:00:51:82
ethact=egiga0
ethaddr=00:19:CB:00:51:82
fileaddr=1100000
filesize=6e8f80
ipaddr=10.4.50.165
kernel_addr=0xC80000
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
loads_echo=0
machid.bak=118f
mainlineLinux=yes
mtddevname=key_store
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
nandEcc=1bit
netmask=255.255.255.0
partition=nand0,2
root=/dev/sda2
rootdelay=10
rootfstype=ext2
rootpath=/mnt/ARM_FS/
run_diag=yes
sata_boot=mw 0x800000 0 1; run sata_load_uimage; if run sata_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
sata_init=ide reset
sata_load_uimage=ext2load ide $device 0x800000 /boot/uImage
sata_load_uinitrd=ext2load ide $device 0x1100000 /boot/uInitrd
sata_root=/dev/sda2
serverip=10.4.50.5
set_bootargs_sata=setenv bootargs console=$console root=$sata_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$rootdelay rootfstype=$rootfstype $mtdparts
stderr=serial
stdin=serial
stdout=serial
uenv_import=echo importing envs ...; env import -t 0x810000
uenv_load=usb start; setenv uenv_loaded 0; for devtype in usb; do for disknum in 0; do run uenv_read_disk; done; done
uenv_loaded=0
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x810000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if $devtype part $disknum; then run uenv_read; fi
usb_boot=mw 0x800000 0 1; run usb_load_uimage; if run usb_load_uinitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_init=usb start
usb_load_uimage=ext2load usb $device 0x800000 /boot/uImage
usb_load_uinitrd=ext2load usb $device 0x1100000 /boot/uInitrd
usb_root=/dev/sda1

Environment size: 3211/131068 bytes
NSA310> boot

NAND read: device 0 offset 0xc80000, size 0xa00000
 10485760 bytes read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-2.6.31.8
   Created:      2013-10-01   8:39:59 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5697948 Bytes = 5.4 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux............................................................................................................................................................................................................................................................................ done, booting the kernel.
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 25, 2017 05:17PM
Stephen P,

> stock u-boot + these variables + stock firmware
> boots ok automatically.

> stock u-boot + any variables + Debian will not
> work because drive is GPT etc.

Expected.

> kw u-boot + these variables + Debian boots ok via
> manual boot command.

Expected.

> kw u-boot + these variables + stock firmware hangs
> as shown - this is what I want to fix.

No, you cannot boot stock FW with new u-boot (which is running when you kwboot).

At least this is a "not yet" available option. It is doable but it is low prirority for me to making it work (nobody cares about booting stock, except as a rescue system).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
It was primarily for rescue purposes, as well as reference for replicating stock functionality.
After some investigation into board_info, it seems that with u-boot and the kernel, the tail wags the dog so to speak - the kernel has to be compiled to support the version of u-boot you are using, not so much the other way round.
I can boot Debian reliably now, so I will try installing the new u-boot to nand as per your tutorial. I'll just have to cross a lot of fingers!
P.S. How do I get the leds working in Debian please? I've tried all three dtbs but no luck...
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 27, 2017 05:29PM
Stephen P Wrote:
-------------------------------------------------------
> P.S. How do I get the leds working in Debian
> please? I've tried all three dtbs but no luck...

Look at the /etc/rc.local in your rootfs for example how to set LEDS.

You need to identify which NSA310 model do you have and use the correct DTB. After that, see the names of the LEDs in

ls -l /sys/class/leds/

I have not incorporates the NSA310 LEDs control in the rootfs like for others. So you will need to try them, and then put the echo statements in /etc/rc.local.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Well everything was going swimmingly - I was trying to get the leds to behave, when the fw_setenv started complaining bitterly and now in u-boot I am getting:
NSA310> saveenv     
Saving Environment to NAND...
Erasing NAND...
Skipping bad block at  0x000c0000                                          

Writing to NAND... FAILED!
help? please?
OK, I think I rescued this and found a cause.
Cause seems to have been overheating - I'd fitted a semi permanent console cable to the box and inadvertently fouled the fan. Fan is working now. did a nand scrub to 'recover' the bad block -that *seems* to have worked. Need to get the stupid thing to shutdown when it gets too hot. I will google, but any pointers would be helpful.

Thanks for all your support in this bodhi, and all the work you do in configuring compiling and patching, you are a star.
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 29, 2017 06:55PM
Stephen P,

> did a nand scrub to 'recover' the bad block -that
> *seems* to have worked.

Cool! great that you have scrubbed and recovered that bad block. The bad block is exactly at the envs location 0x000c0000 :)

So now you need to watch that block. And it goes bad again, then the boot log will show:

*** Warning - bad CRC, using default environment

Then you will have trouble booting. Then you know that you will need to use the uEnv.txt to populate the correct envs to allow booting. What you can do to prepare:

- Create the uEnv.txt file with the current content of the envs:

fw_printenv > /boot/uEnv.backup.txt

When the block goes bad again: Take the rootfs offline and rename that uEnv.backup.txt to uEnv.txt, and boot.

> Need to get the stupid
> thing to shutdown when it gets too hot. I will
> google, but any pointers would be helpful.
>

We need to identify the exact box model. These are the 3 variants:

kirkwood-nsa310.dts

   This variant is the "original"

kirkwood-nsa310a.dts

   This variant does not have the red USB Led.

kirkwood-nsa310b-lmsensor-redusbled.dts

   There are at least three different NSA310 designs. This 3rd variant has lm85 sensor
   and red USB Led.

If it is the 3rd variant then you can install lmsensor to monitor it. I'm not sure about the other 2. I would need to look at the DTS source to see if the sensor can be activated and reports the temperature (A script can be written run a cron job to monitor the temperature).

At NAS central, I recall, there are several scripts, or daemons that were developed for the 310 box. You can find fan/temperature tools quicker there:

http://forum.nas-central.org/viewforum.php?f=249

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



Edited 2 time(s). Last edit at 10/29/2017 07:00PM by bodhi.
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 29, 2017 07:08PM
kirkwood-nsa310.dts

This variant is the "original". This has the sensor adt7476:

i2c@11000 {
                        status = "okay";

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


kirkwood-nsa310a.dts

This variant does not have the red USB Led. This 2nd variant has lm85 sensor (same as the 3rd one).

i2c@11000 {
                        status = "okay";

                        lm85: lm85@2e {
                                compatible = "national,lm85";
                                reg = <0x2e>;
                        };
                };




kirkwood-nsa310b-lmsensor-redusbled.dts

There are at least three different NSA310 designs. This 3rd variant has lm85 sensor and red USB Led.

i2c@11000 {
                        status = "okay";

                        lm85: lm85@2e {
                                compatible = "national,lm85";
                                reg = <0x2e>;
                        };
                };

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I cannot figure out which variant I have. How do I tell?

The variant I have has five LEDs. I've tried all three dtbs. I can get red and green from both HDD and SYS, but otherwise nothing. I am testing by simply setting all the triggers to heartbeat:

for a in /sys/class/leds/*; do echo heartbeat > $a/trigger; done

I get two flashing lights, no more. Is there something else I am missing?

I could try poking around the free pins via the gpio interface, but who knows what might break!
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 31, 2017 12:23AM
Check to see you have which of these 2 boxes:

http://zyxel.nas-central.org/wiki/Category:NSA-310

And If you have a red USB LED then it's the 3rd variant.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thanks for that - I'd found those before but looking a second time I saw what I'd missed the first time. Assuming that ZyXel did not reuse old parts on the newer models, I have a rebranded TDC. Is that the NSA310 rather than the NS310a?
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 31, 2017 04:08PM
Stephen P,

IIRC, the rebrand TDC is NSA310a. But you have to try it to verify. It should boot with either one. But the correct one will give you the right sensor. Boot with the NSA310a DTB and then post the bootlog here.

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

U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:59:20 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


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
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: ST3320620AS  Firm: 3.AAE  Ser#: 9QF1Q7M7
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
Unknown command 'mmc' - try 'help'

no USB devices available

Partition Map for IDE device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x000fb800      0x03b9e7ff      "rootfs"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   49e23deb-ecf2-43a3-81f8-ca959791d670
  2     0x24c2e800      0x2542ea8e      "emergency"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   6759cc38-bfb8-42b4-801d-7d77bb19cb8e
  3     0x0000003f      0x000fb7ff      "system"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   11522420-4034-494c-ba02-ab6dd370e2bb
loading envs from ide 0 ...
32 bytes read in 42 ms (0 Bytes/s)
Unknown command 'mmc' - try 'help'
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3320620AS  Firm: 3.AAE  Ser#: 9QF1Q7M7
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
device ide 0:1
1 bytes read in 49 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
3848064 bytes read in 600 ms (6.1 MiB/s)
loading uInitrd ...
7753113 bytes read in 1212 ms (6.1 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310a.dtb ...
12458 bytes read in 47 ms (258.8 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   linux-4.13.5-kirkwood-tld-1
   Created:      2017-10-24  22:18:01 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3848000 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.13.5-kirkwood-tld-1
   Created:      2017-10-25   0:27:07 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7753049 Bytes = 7.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f3ad000, end 0fb11d59 ... OK
   Loading Device Tree to 0f3a6000, end 0f3ac0a9 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.5-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #1 PREEMPT Fri Oct 6 23:54:39 PDT 2017
[    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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 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) init=/bin/systemd
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    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: 238872K/262144K available (8192K kernel code, 713K rwdata, 2008K rodata, 1024K init, 284K bss, 23272K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db2744   ( 714 kB)
[    0.000000]        .bss : 0xc0db91bc - 0xc0e001d4   ( 285 kB)
[    0.000000] random: get_random_u32 called from cache_alloc_refill+0x378/0x8dc with crng_init=0
[    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.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000043] Switching to timer-based delay loop, resolution 5ns
[    0.000508] Console: colour dummy device 80x30
[    0.000540] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000563] pid_max: default: 32768 minimum: 301
[    0.000750] Security Framework initialized
[    0.000887] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000909] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001744] CPU: Testing write buffer coherency: ok
[    0.002777] Setting up static identity map for 0x100000 - 0x100058
[    0.003066] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.003323] Hierarchical SRCU implementation.
[    0.006664] devtmpfs: initialized
[    0.010995] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011023] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.011399] prandom: seed boundary self test passed
[    0.015584] prandom: 100 self tests passed
[    0.015597] pinctrl core: initialized pinctrl subsystem
[    0.016670] NET: Registered protocol family 16
[    0.017135] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.018604] cpuidle: using governor ladder
[    0.018672] cpuidle: using governor menu
[    0.019183] Feroceon L2: Enabling L2
[    0.019229] Feroceon L2: Cache support initialised.
[    0.024511] No ATAGs?
[    0.034067] vgaarb: loaded
[    0.034390] SCSI subsystem initialized
[    0.034884] usbcore: registered new interface driver usbfs
[    0.034961] usbcore: registered new interface driver hub
[    0.035042] usbcore: registered new device driver usb
[    0.036222] clocksource: Switched to clocksource orion_clocksource
[    0.126037] VFS: Disk quotas dquot_6.6.0
[    0.126121] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.136550] NET: Registered protocol family 2
[    0.137288] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.137327] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.137358] TCP: Hash tables configured (established 2048 bind 2048)
[    0.137438] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.137462] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.137640] NET: Registered protocol family 1
[    0.138055] RPC: Registered named UNIX socket transport module.
[    0.138068] RPC: Registered udp transport module.
[    0.138075] RPC: Registered tcp transport module.
[    0.138082] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.138333] Unpacking initramfs...
[    0.824362] Freeing initrd memory: 7572K
[    0.824542] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.825472] audit: initializing netlink subsys (disabled)
[    0.825986] Initialise system trusted keyrings
[    0.826036] Key type blacklist registered
[    0.826130] audit: type=2000 audit(0.819:1): state=initialized audit_enabled=0 res=1
[    0.826215] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    0.826358] zbud: loaded
[    0.827276] NFS: Registering the id_resolver key type
[    0.827304] Key type id_resolver registered
[    0.827313] Key type id_legacy registered
[    0.827332] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.827342] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.827554] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.827752] fuse init (API version 7.26)
[    0.828114] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.828323] orangefs_init: module version upstream loaded
[    0.828334] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.556228] random: fast init done
[    6.752738] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    6.753543] Key type asymmetric registered
[    6.753556] Asymmetric key parser 'x509' registered
[    6.753620] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    6.753632] io scheduler noop registered
[    6.753641] io scheduler deadline registered
[    6.753720] io scheduler cfq registered (default)
[    6.754963] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.757267] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    6.757289] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    6.757304] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    6.757318] pci_bus 0000:00: root bus resource [bus 00-ff]
[    6.757678] PCI: bus0: Fast back to back transfers disabled
[    6.757703] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.786302] PCI: bus1: Fast back to back transfers disabled
[    6.786373] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    6.786390] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    6.786410] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    6.786428] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    6.786452] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    6.786475] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    6.786491] pci 0000:00:01.0: PCI bridge to [bus 01]
[    6.786504] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    6.786519] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    6.786632] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    6.787157] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.847005] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.847236] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.906989] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.907436] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.908816] console [ttyS0] disabled
[    6.908883] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    7.649757] console [ttyS0] enabled
[    7.660751] loop: module loaded
[    7.664480] sata_mv f1080000.sata: slots 32 ports 2
[    7.672160] scsi host0: sata_mv
[    7.675766] scsi host1: sata_mv
[    7.679216] ata1: SATA max UDMA/133 irq 32
[    7.683335] ata2: SATA max UDMA/133 irq 32
[    7.688248] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    7.694715] nand: Samsung NAND 128MiB 3,3V 8-bit
[    7.699385] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.707017] Scanning device for bad blocks
[    7.809831] 9 cmdlinepart partitions found on MTD device orion_nand
[    7.816130] Creating 9 MTD partitions on "orion_nand":
[    7.821319] 0x000000000000-0x000000100000 : "uboot"
[    7.827436] 0x000000100000-0x000000180000 : "uboot_env"
[    7.833820] 0x000000180000-0x000000200000 : "key_store"
[    7.840291] 0x000000200000-0x000000280000 : "info"
[    7.846150] 0x000000280000-0x000000c80000 : "etc"
[    7.851964] 0x000000c80000-0x000001680000 : "kernel_1"
[    7.858219] 0x000001680000-0x000004640000 : "rootfs1"
[    7.864637] 0x000004640000-0x000005040000 : "kernel_2"
[    7.870995] 0x000005040000-0x000008000000 : "rootfs2"
[    7.878770] libphy: Fixed MDIO Bus: probed
[    7.883778] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.890395] ehci-pci: EHCI PCI platform driver
[    7.894933] ehci-orion: EHCI orion driver
[    7.899199] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.904738] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.912671] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    7.946247] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.952569] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    7.959441] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.966741] usb usb1: Product: EHCI Host Controller
[    7.971646] usb usb1: Manufacturer: Linux 4.13.5-kirkwood-tld-1 ehci_hcd
[    7.978415] usb usb1: SerialNumber: f1050000.ehci
[    7.983800] hub 1-0:1.0: USB hub found
[    7.987665] hub 1-0:1.0: 1 port detected
[    7.992241] usbcore: registered new interface driver usb-storage
[    7.998665] mousedev: PS/2 mouse device common for all mice
[    8.004839] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    8.011954] i2c /dev entries driver
[    8.018509] hidraw: raw HID events driver (C) Jiri Kosina
[    8.024293] drop_monitor: Initializing network drop monitor service
[    8.030933] NET: Registered protocol family 17
[    8.035472] Key type dns_resolver registered
[    8.040605] registered taskstats version 1
[    8.044725] Loading compiled-in X.509 certificates
[    8.049629] zswap: loaded using pool lzo/zbud
[    8.075567] Key type big_key registered
[    8.089268] Key type encrypted registered
[    8.094689] rtc-mv f1010300.rtc: setting system clock to 2017-11-01 00:38:48 UTC (1509496728)
[    8.186274] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl F300)
[    8.256299] ata1.00: native sectors (586072368) is smaller than sectors (625142448)
[    8.264041] ata1.00: ATA-7: ST3320620AS, 3.AAE, max UDMA/133
[    8.269757] ata1.00: 625142448 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    8.336305] ata1.00: configured for UDMA/133
[    8.346255] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.353388] scsi 0:0:0:0: Direct-Access     ATA      ST3320620AS      E    PQ: 0 ANSI: 5
[    8.363098] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    8.370993] sd 0:0:0:0: [sda] Write Protect is off
[    8.375965] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.432972]  sda: sda1 sda2 sda3
[    8.438380] sd 0:0:0:0: [sda] Attached SCSI disk
[    8.557930] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    8.564682] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    8.571885] usb 1-1: Product: USB2.0 Hub
[    8.576776] hub 1-1:1.0: USB hub found
[    8.580927] hub 1-1:1.0: 4 ports detected
[    8.697822] ata2: SATA link down (SStatus 0 SControl F300)
[    8.716481] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    9.142620] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    9.174622] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[    9.201148] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0xd0d4f000, 00:00:00:00:00:30, XID 083000c0 IRQ 35
[    9.257725] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    9.615668] r8169 0000:01:00.0 enp1s0: renamed from eth0
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sda1] fsck.ext4 -a -C0 /dev/sda1 
rootfs: clean, 19130/1925120 files, 611353/7685632 blocks
done.
[   20.189396] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[   21.151460] NET: Registered protocol family 10
[   21.157085] Segment Routing with IPv6
[   21.190757] ip_tables: (C) 2000-2006 Netfilter Core Team
[   21.255942] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[   21.274700] systemd[1]: Detected architecture arm.

Welcome to Debian GNU/Linux 9 (stretch)!

[   21.323332] systemd[1]: Set hostname to <mhs1.homead.mainscreen.com>.
[   22.300362] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[   22.337257] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[   22.376714] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[   22.416829] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[   22.456637] systemd[1]: Listening on fsck to fsckd communication Socket.
[  OK  ] Listening on fsck to fsckd communication Socket.
[   22.497366] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[  OK  ] Set up automount Arbitrary Executab…rmats File System Automount Point.
[   22.536498] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[  OK  ] Listening on Journal Audit Socket.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-getty.slice.
         Mounting POSIX Message Queue File System...
         Starting Load Kernel Modules...
[  OK  ] Reached target Slices.
         Starting Remount Root and Kernel File Systems...
         Mounting Debug File System...
         Starting Create list of required st…ce nodes for the current kernel...
[  OK  ] Created slice system-serial\x2dgetty.slice.
         [   23.070847] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
Starting Journal Service...
         Mounting RPC Pipe File System...
         Mounting NFSD configuration filesystem...
[  OK  ] Mounted NFSD configuration filesystem.
[  OK  ] Mounted RPC Pipe File System.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
[  OK  ] Started Journal Service.
         Starting Create Static Device Nodes in /dev...
         Starting Load/Save Random Seed...
         Starting udev Coldplug all Devices...
         Starting Flush Journal to Persistent Storage...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
         Starting pNFS block layout mapping daemon...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started pNFS block layout mapping daemon.
[  OK  ] Started Create Static Device Nodes in /dev.
[   23.997669] systemd-journald[171]: Received request to flush runtime journal from PID 1
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /tmp...
         Starting udev Kernel Device Manager...
[  OK  ] Mounted /tmp.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Reached target Local File Systems.
         Starting Raise network interfaces...
         Starting Create Volatile Files and Directories...
         Starting Preprocess NFS configuration...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Preprocess NFS configuration.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Reached target System Time Synchronized.
         Starting RPC bind portmap service...
         Starting NFSv4 ID-name mapping service...
[  OK  ] Reached target NFS client services.
[  OK  ] Started NFSv4 ID-name mapping service.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[   25.130717] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started D-Bus System Message Bus.
[   25.560699] marvell-cesa f1030000.crypto: CESA device successfully registered
[   25.628753] orion_wdt: Initial timeout 21 sec
         Starting Login Service...
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started RPC bind portmap service.
[  OK  ] Found device /dev/ttyS0.
[   25.817445] hwmon_vid: Unknown VRM version of your CPU
[  OK  ] Started Login Service.
[   25.883652] lm85 0-002e: Starting monitoring
[  OK  ] Reached target RPC Port Mapper.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[   26.027787] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   27.297626] r8169 0000:01:00.0 enp1s0: link down
[   27.302286] r8169 0000:01:00.0 enp1s0: link down
[   27.312039] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[   27.491964] random: crng init done
[   30.115691] r8169 0000:01:00.0 enp1s0: link up
[   30.120217] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
         Starting NFS Mount Daemon...
[  OK  ] Reached target Network is Online.
         Starting /etc/rc.local Compatibility...
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started NFS Mount Daemon.
         Starting NFS server and services...
[   31.332222] NFSD: starting 90-second grace period (net c0d93330)
[  OK  ] Started NFS server and services.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
         Starting Permit User Sessions...
         Starting LSB: Start NTP daemon...
         Starting LSB: Starts syslogd...
[  OK  ] Started Permit User Sessions.
[   31.687666] r8169 0000:01:00.0 enp1s0: link down
[   31.692346] r8169 0000:01:00.0 enp1s0: link down
[   31.708464] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[  OK  ] Started LSB: Starts syslogd.
[  OK  ] Started LSB: Start NTP daemon.
         Starting LSB: Starts klogd...
[  OK  ] Started LSB: Starts klogd.
[   34.524230] r8169 0000:01:00.0 enp1s0: link up
[   34.528750] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 mhs1.homead.mainscreen.com ttyS0

mhs1 login: 

Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
October 31, 2017 08:58PM
Stephen,

I did not see any sensor here. Please reboot without systemd. And post serial bootlog.

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



Edited 1 time(s). Last edit at 10/31/2017 08:59PM by bodhi.
I hope log below is better?

I cannot find any refs to sensors either, which is odd because lm85 shows up in lsmod and playing around with the sensors command I can get readings and using the sysfs interface I can poke fan speeds, so I guess it's working?

I can get the automatic fan speed working up to a point, but I cannot control the temps it trips at; the sysfs interface in the kernel docs does not fully match the docs here, nor does it match stuff others have posted.

That just leaves the blessed LEDs; I get no network activity at the back and no esata, copy or usb at the front. I can get sys and hdd to go either green or red, so not a total loss, bit I'd like to get the other working too.

U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:59:20 -0700)
ZyXEL NSA310 1-Bay Power Media Server 


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
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: ST3320620AS  Firm: 3.AAE  Ser#: 9QF1Q7M7
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
Unknown command 'mmc' - try 'help'

no USB devices available

Partition Map for IDE device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x000fb800      0x03b9e7ff      "rootfs"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   49e23deb-ecf2-43a3-81f8-ca959791d670
  2     0x24c2e800      0x2542ea8e      "emergency"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   6759cc38-bfb8-42b4-801d-7d77bb19cb8e
  3     0x0000003f      0x000fb7ff      "system"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   11522420-4034-494c-ba02-ab6dd370e2bb
loading envs from ide 0 ...
65 bytes read in 48 ms (1000 Bytes/s)
Unknown command 'mmc' - try 'help'
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3320620AS  Firm: 3.AAE  Ser#: 9QF1Q7M7
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
device ide 0:1
1 bytes read in 49 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
3848064 bytes read in 600 ms (6.1 MiB/s)
loading uInitrd ...
7753113 bytes read in 1196 ms (6.2 MiB/s)
loading DTB /boot/dts/kirkwood-nsa310a.dtb ...
12458 bytes read in 47 ms (258.8 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   linux-4.13.5-kirkwood-tld-1
   Created:      2017-10-24  22:18:01 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3848000 Bytes = 3.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.13.5-kirkwood-tld-1
   Created:      2017-10-25   0:27:07 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7753049 Bytes = 7.4 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f3ad000, end 0fb11d59 ... OK
   Loading Device Tree to 0f3a6000, end 0f3ac0a9 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.13.5-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #1 PREEMPT Fri Oct 6 23:54:39 PDT 2017
[    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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 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) init=/sbin/init
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    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: 238872K/262144K available (8192K kernel code, 713K rwdata, 2008K rodata, 1024K init, 284K bss, 23272K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0900000   (9184 kB)
[    0.000000]       .init : 0xc0c00000 - 0xc0d00000   (1024 kB)
[    0.000000]       .data : 0xc0d00000 - 0xc0db2744   ( 714 kB)
[    0.000000]        .bss : 0xc0db91bc - 0xc0e001d4   ( 285 kB)
[    0.000000] random: get_random_u32 called from cache_alloc_refill+0x378/0x8dc with crng_init=0
[    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.000008] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000043] Switching to timer-based delay loop, resolution 5ns
[    0.000508] Console: colour dummy device 80x30
[    0.000540] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000563] pid_max: default: 32768 minimum: 301
[    0.000750] Security Framework initialized
[    0.000887] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000909] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001744] CPU: Testing write buffer coherency: ok
[    0.002777] Setting up static identity map for 0x100000 - 0x100058
[    0.003066] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.003323] Hierarchical SRCU implementation.
[    0.006663] devtmpfs: initialized
[    0.011008] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011036] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.011421] prandom: seed boundary self test passed
[    0.015606] prandom: 100 self tests passed
[    0.015620] pinctrl core: initialized pinctrl subsystem
[    0.016696] NET: Registered protocol family 16
[    0.017160] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.018632] cpuidle: using governor ladder
[    0.018702] cpuidle: using governor menu
[    0.019215] Feroceon L2: Enabling L2
[    0.019261] Feroceon L2: Cache support initialised.
[    0.024542] No ATAGs?
[    0.034091] vgaarb: loaded
[    0.034413] SCSI subsystem initialized
[    0.034907] usbcore: registered new interface driver usbfs
[    0.034984] usbcore: registered new interface driver hub
[    0.035065] usbcore: registered new device driver usb
[    0.036245] clocksource: Switched to clocksource orion_clocksource
[    0.126071] VFS: Disk quotas dquot_6.6.0
[    0.126155] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.136590] NET: Registered protocol family 2
[    0.137326] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.137365] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.137396] TCP: Hash tables configured (established 2048 bind 2048)
[    0.137477] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.137501] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.137681] NET: Registered protocol family 1
[    0.138101] RPC: Registered named UNIX socket transport module.
[    0.138114] RPC: Registered udp transport module.
[    0.138122] RPC: Registered tcp transport module.
[    0.138129] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.138379] Unpacking initramfs...
[    0.824450] Freeing initrd memory: 7572K
[    0.824629] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.825565] audit: initializing netlink subsys (disabled)
[    0.826079] Initialise system trusted keyrings
[    0.826131] Key type blacklist registered
[    0.826228] audit: type=2000 audit(0.819:1): state=initialized audit_enabled=0 res=1
[    0.826439] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    0.826508] zbud: loaded
[    0.827403] NFS: Registering the id_resolver key type
[    0.827434] Key type id_resolver registered
[    0.827443] Key type id_legacy registered
[    0.827461] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.827471] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.827682] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.827882] fuse init (API version 7.26)
[    0.828242] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.828449] orangefs_init: module version upstream loaded
[    0.828460] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.556253] random: fast init done
[    6.753021] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    6.753826] Key type asymmetric registered
[    6.753840] Asymmetric key parser 'x509' registered
[    6.753905] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    6.753917] io scheduler noop registered
[    6.753925] io scheduler deadline registered
[    6.754006] io scheduler cfq registered (default)
[    6.755252] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.757562] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    6.757585] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    6.757599] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    6.757614] pci_bus 0000:00: root bus resource [bus 00-ff]
[    6.757974] PCI: bus0: Fast back to back transfers disabled
[    6.757998] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.786327] PCI: bus1: Fast back to back transfers disabled
[    6.786399] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    6.786416] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    6.786437] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[    6.786454] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[    6.786478] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[    6.786500] pci 0000:01:00.0: BAR 0: assigned [io  0x10000-0x100ff]
[    6.786517] pci 0000:00:01.0: PCI bridge to [bus 01]
[    6.786530] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    6.786546] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    6.786660] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    6.787186] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.847028] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.847260] mv_xor f1060900.xor: Marvell shared XOR driver
[    6.907018] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    6.907464] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.908844] console [ttyS0] disabled
[    6.908913] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    7.649613] console [ttyS0] enabled
[    7.660602] loop: module loaded
[    7.664326] sata_mv f1080000.sata: slots 32 ports 2
[    7.672010] scsi host0: sata_mv
[    7.675609] scsi host1: sata_mv
[    7.679065] ata1: SATA max UDMA/133 irq 32
[    7.683180] ata2: SATA max UDMA/133 irq 32
[    7.688100] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    7.694572] nand: Samsung NAND 128MiB 3,3V 8-bit
[    7.699240] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    7.706873] Scanning device for bad blocks
[    7.809705] 9 cmdlinepart partitions found on MTD device orion_nand
[    7.816003] Creating 9 MTD partitions on "orion_nand":
[    7.821190] 0x000000000000-0x000000100000 : "uboot"
[    7.827321] 0x000000100000-0x000000180000 : "uboot_env"
[    7.833699] 0x000000180000-0x000000200000 : "key_store"
[    7.840167] 0x000000200000-0x000000280000 : "info"
[    7.846020] 0x000000280000-0x000000c80000 : "etc"
[    7.851830] 0x000000c80000-0x000001680000 : "kernel_1"
[    7.858090] 0x000001680000-0x000004640000 : "rootfs1"
[    7.864507] 0x000004640000-0x000005040000 : "kernel_2"
[    7.870865] 0x000005040000-0x000008000000 : "rootfs2"
[    7.878642] libphy: Fixed MDIO Bus: probed
[    7.883648] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    7.890266] ehci-pci: EHCI PCI platform driver
[    7.894796] ehci-orion: EHCI orion driver
[    7.899061] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.904603] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.912533] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    7.946271] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    7.952587] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    7.959453] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    7.966752] usb usb1: Product: EHCI Host Controller
[    7.971657] usb usb1: Manufacturer: Linux 4.13.5-kirkwood-tld-1 ehci_hcd
[    7.978428] usb usb1: SerialNumber: f1050000.ehci
[    7.983822] hub 1-0:1.0: USB hub found
[    7.987687] hub 1-0:1.0: 1 port detected
[    7.992265] usbcore: registered new interface driver usb-storage
[    7.998694] mousedev: PS/2 mouse device common for all mice
[    8.004870] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    8.011985] i2c /dev entries driver
[    8.018536] hidraw: raw HID events driver (C) Jiri Kosina
[    8.024325] drop_monitor: Initializing network drop monitor service
[    8.030958] NET: Registered protocol family 17
[    8.035500] Key type dns_resolver registered
[    8.040632] registered taskstats version 1
[    8.044744] Loading compiled-in X.509 certificates
[    8.049650] zswap: loaded using pool lzo/zbud
[    8.075585] Key type big_key registered
[    8.089328] Key type encrypted registered
[    8.094750] rtc-mv f1010300.rtc: setting system clock to 2017-11-01 11:28:20 UTC (1509535700)
[    8.186297] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl F300)
[    8.256321] ata1.00: native sectors (586072368) is smaller than sectors (625142448)
[    8.264062] ata1.00: ATA-7: ST3320620AS, 3.AAE, max UDMA/133
[    8.269775] ata1.00: 625142448 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    8.336329] ata1.00: configured for UDMA/133
[    8.346278] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    8.353409] scsi 0:0:0:0: Direct-Access     ATA      ST3320620AS      E    PQ: 0 ANSI: 5
[    8.363123] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[    8.371016] sd 0:0:0:0: [sda] Write Protect is off
[    8.375992] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.433127]  sda: sda1 sda2 sda3
[    8.438537] sd 0:0:0:0: [sda] Attached SCSI disk
[    8.558042] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    8.564789] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    8.571996] usb 1-1: Product: USB2.0 Hub
[    8.576887] hub 1-1:1.0: USB hub found
[    8.581037] hub 1-1:1.0: 4 ports detected
[    8.697850] ata2: SATA link down (SStatus 0 SControl F300)
[    8.716462] Freeing unused kernel memory: 1024K
Loading, please wait...
starting version 232
[    9.142746] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    9.177471] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[    9.184158] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0xd0d4f000, 00:00:00:00:00:30, XID 083000c0 IRQ 35
[    9.249100] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    9.621122] r8169 0000:01:00.0 enp1s0: renamed from eth0
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sda1] fsck.ext4 -a -C0 /dev/sda1 
rootfs: clean, 18540/1925120 files, 609171/7685632 blocks
done.
[   20.106092] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Setting hostname to 'mhs1.homead.mainscreen.com'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[ ok ] Synthesizing the initial hotplug events...[   22.585798] input: gpio_keys as /devices/platform/gpio_keys/input/input0
done.
[....] Waiting for /dev to be fully populated...[   22.912883] hwmon_vid: Unknown VRM version of your CPU
[   22.939203] orion_wdt: Initial timeout 21 sec
[   23.079916] marvell-cesa f1030000.crypto: CESA device successfully registered
[   23.095762] sd 0:0:0:0: Attached scsi generic sg0 type 0
done.
[ ok ] Activating swap:.
[   24.456425] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[ ok ] Will now activate lvm and md swap:done.
[info] Will now check all file systems.
fsck from util-linux 2.29.2
Checking all file systems.
LABEL=rootfs is mounted
[....] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that[ ok tion is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables...done.
[ ok ] Initializing random number generator...done.
[   26.899405] random: crng init done
[   27.257651] r8169 0000:01:00.0 enp1s0: link down
[   27.262314] r8169 0000:01:00.0 enp1s0: link down
[   28.136656] NET: Registered protocol family 10
[   28.144694] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[   28.151034] Segment Routing with IPv6
[   29.588553] r8169 0000:01:00.0 enp1s0: link up
[   29.593048] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
[ ok ] Configuring network interfaces...done.
[ ok ] Starting RPC port mapper daemon: rpcbind.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1278 (syslogd)
. ok 
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting system message bus: dbus.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[ ok ] Starting NTP server: ntpd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1276 (klogd)
. ok 
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Running local boot scripts (/etc/rc.local)[   34.787618] r8169 0000:01:00.0 enp1s0: link down
[   34.792284] r8169 0000:01:00.0 enp1s0: link down
[   34.798189] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[   37.585149] r8169 0000:01:00.0 enp1s0: link up
[   37.589674] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready
. ok 

Debian GNU/Linux 9 mhs1.homead.mainscreen.com ttyS0

mhs1 login: 
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
November 01, 2017 03:47PM
Stephen,

> I cannot find any refs to sensors either, which is
> odd because lm85 shows up in lsmod and playing
> around with the sensors command I can get readings
> and using the sysfs interface I can poke fan
> speeds, so I guess it's working?

Yes it is working as expected. I forgot this sensor driver is a loaded module :) So you are OK. Now we know you have lm85. So that narrow it down to either

kirkwood-nsa310a.dts 
kirkwood-nsa310b-lmsensor-redusbled.dts

> network activity at the back and no esata, copy or
> usb at the front. I can get sys and hdd to go
> either green or red, so not a total loss, bit I'd
> like to get the other working too.

What is your output of

ls -l /sys/class/leds

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
As below. Everything *looks* right...
root@mhs1:~# ls -l /sys/class/leds
total 0
drwxr-xr-x  2 root root 0 Nov  1 22:05 .
drwxr-xr-x 41 root root 0 Nov  1 14:06 ..
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:green:copy -> ../../devices/platform/gpio-leds/leds/nsa310:green:copy
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:green:esata -> ../../devices/platform/gpio-leds/leds/nsa310:green:esata
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:green:hdd -> ../../devices/platform/gpio-leds/leds/nsa310:green:hdd
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:green:sys -> ../../devices/platform/gpio-leds/leds/nsa310:green:sys
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:green:usb -> ../../devices/platform/gpio-leds/leds/nsa310:green:usb
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:red:copy -> ../../devices/platform/gpio-leds/leds/nsa310:red:copy
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:red:esata -> ../../devices/platform/gpio-leds/leds/nsa310:red:esata
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:red:hdd -> ../../devices/platform/gpio-leds/leds/nsa310:red:hdd
lrwxrwxrwx  1 root root 0 Nov  1 14:06 nsa310:red:sys -> ../../devices/platform/gpio-leds/leds/nsa310:red:sys
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
November 01, 2017 08:32PM
So you dont have a Red USB LED?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I don't think mine has a red USB led but I did not use the USB much before upgrading, so I am not 100% certain. I have no easy way of telling; if I could boot the stock firmware I could check but as previously discussed the new u-boot won't boot the old firmware. I tried the "red led" dtb, but with the same result.

I tried setting all the accessible gpio pins to 1 and then to 0 - that did not light any further leds, so I am thinking the gpio numbers in the dts are maybe correct but that there is possibly a mask somewhere not set correctly.
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
November 02, 2017 10:07PM
Stephen P Wrote:
-------------------------------------------------------
> I don't think mine has a red USB led but I did not
> use the USB much before upgrading, so I am not
> 100% certain. I have no easy way of telling; if I
> could boot the stock firmware I could check but as
> previously discussed the new u-boot won't boot the
> old firmware. I tried the "red led" dtb, but with
> the same result.
>
> I tried setting all the accessible gpio pins to 1
> and then to 0 - that did not light any further
> leds, so I am thinking the gpio numbers in the dts
> are maybe correct but that there is possibly a
> mask somewhere not set correctly.

Look at this thread to see if you can find out how to identify your NSA310 box model:
https://forum.doozan.com/read.php?2,25783,26005#msg-26005

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
OK, now I feel really, really stupid.
I tried all three variations of the nsa310 dtb files.
All three work to the same degree. I can get the fans to work, to start or stop or run automatically by temperature. I can get the HDD/SYS leds to light up either red or green and respond to system activity.

Whatever fan / temperature electronics are actually inside this NSA310, it seems to co-operate with either the lm85 or ADT7475 driver. however the sysfs commands for driving the fans are different in each case. I have added to rc.local code to handle both cases:

root@mhs1:~# diff -u /etc/rc.local.orig /etc/rc.local
--- /etc/rc.local.orig  2017-10-31 19:08:06.013243388 +0000
+++ /etc/rc.local       2017-11-03 16:49:47.344333640 +0000
@@ -11,6 +11,54 @@
 #
 # By default this script does nothing.
 
+# turn on fan control
+if [ -d /sys/class/hwmon/hwmon0/device ]; then
+       # We appear to have an adt7475 chip / driver
+       if [ -f /sys/class/hwmon/hwmon0/device/temp1_auto_point1_temp ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/device/temp1_auto_point1_temp
+               echo 50000 > /sys/class/hwmon/hwmon0/device/temp1_auto_point2_temp
+               echo 80000 > /sys/class/hwmon/hwmon0/device/temp1_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/device/temp2_auto_point1_temp ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/device/temp2_auto_point1_temp
+               echo 50000 > /sys/class/hwmon/hwmon0/device/temp2_auto_point2_temp
+               echo 80000 > /sys/class/hwmon/hwmon0/device/temp2_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/device/temp3_auto_point1_temp ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/device/temp3_auto_point1_temp
+               echo 50000 > /sys/class/hwmon/hwmon0/device/temp3_auto_point2_temp
+               echo 80000 > /sys/class/hwmon/hwmon0/device/temp3_crit
+       fi
+       echo 2 >   /sys/class/hwmon/hwmon0/device/pwm1_enable
+       echo 0 >   /sys/class/hwmon/hwmon0/device/pwm1_auto_point1_pwm
+       echo 255 >   /sys/class/hwmon/hwmon0/device/pwm1_auto_point2_pwm
+       echo 0 > /sys/class/hwmon/hwmon0/device/pwm1_stall_disable
+       echo 7 > /sys/class/hwmon/hwmon0/device/pwm1_auto_channels_temp
+elif [ -f /sys/class/hwmon/hwmon0/pwm1_enable ]; then
+       # We appear to have an LM85 chip / driver
+       echo 2 >   /sys/class/hwmon/hwmon0/pwm1_enable
+       echo 0 >   /sys/class/hwmon/hwmon0/pwm1_auto_pwm_minctl
+       echo 123 > /sys/class/hwmon/hwmon0/pwm1_auto_channels
+       if [ -f /sys/class/hwmon/hwmon0/temp1_auto_temp_off ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_off
+               echo 35000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_min
+               echo 50000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_max
+               echo 80000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/temp2_auto_temp_off ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_off
+               echo 35000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_min
+               echo 50000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_max
+               echo 80000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/temp3_auto_temp_off ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_off
+               echo 35000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_min
+               echo 50000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_max
+               echo 80000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_crit
+       fi
+fi
+
 # turn on LED
 
 if [ -d /sys/class/leds/status:green:health ]; then
@@ -70,4 +118,24 @@
    echo usb-host > /sys/class/leds/nsa325\:green\:usb/trigger
 fi
 
+if [ -d /sys/class/leds/nsa310:green:sys ]; then
+   echo default-on > /sys/class/leds/nsa310\:green\:sys/trigger
+fi
+
+if [ -d /sys/class/leds/nsa310:green:hdd ]; then
+   echo disk-activity > /sys/class/leds/nsa310\:green\:hdd/trigger
+fi
+
+if [ -d /sys/class/leds/nsa310:green:usb ]; then
+   echo usb-host > /sys/class/leds/nsa310\:green\:usb/trigger
+fi
+
+if [ -d /sys/class/leds/nsa310:green:esata ]; then
+   echo ide-disk2 > /sys/class/leds/nsa310\:green\:esata/trigger
+fi
+
+ifdown enp1s0
+/sbin/ifconfig enp1s0 hw ether `fw_printenv -n ethaddr`
+ifup enp1s0
+
 exit 0

This (crudely) sets the fans to spin up at 30 degrees C and max at 50 degrees C. It seems to work fairly well.

Why do I feel stupid? I could not get the other LEDs to light up. This may have something to do with the fact THERE ARE NO OTHER LEDS. The unit is very deceptive; inside the case it has space for five LEDS. The manual shows five LEDS. However, if you look very, very closely at the front fascia, there are actually only two symbols. Duh!

Sorry for wasting your time on this Bodhi. I hope somebody finds the script edit above useful. The only outstanding issues seem to be:
  1. There is a long period during which no lights how because the the system has not hit rc.local yet. I'd like to get them working earlier in the boot cycle.
  2. The network lights still do not show activity.
Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
November 03, 2017 05:21PM
Stephen P,

> Why do I feel stupid? I could not get the other
> LEDs to light up. This may have something to do
> with the fact THERE ARE NO OTHER LEDS. The unit is
> very deceptive; inside the case it has space for
> five LEDS. The manual shows five LEDS. However, if
> you look very, very closely at the front fascia,
> there are actually only two symbols. Duh!

:) it means you have the version without the red USB LED.

> There is a long period during which no lights how because the the system has not hit rc.local yet. I'd like to get them working earlier in the boot cycle.

I will tak a look at the DTS to see if some more adjustment needed. Usually LED is green right away after the kernel booted. We set it in rc.local as a fallback to know that the whole init system is done booting.


> The network lights still do not show activity.

I will also take a look at u-boot to see if something is missing. These LEDs can also be set in the kernel DTS, too, but oftently it is simpler in u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Thanks again for all the help bodhi.

Quote
bodhi
I will also take a look at u-boot to see if something is missing. These LEDs can also be set in the kernel DTS, too, but oftently it is simpler in u-boot.

The network lights work fine when u-boot is active - they go out partway through the kernel init process. I can't get to the serial console just now, but when I can I'll try and sport roughly when. I think I saw something on one google search about the leds working for 100Mb but not 1Gb. My connections here are 1Gb.
P.S. I made a mistake in my earlier script. The channels have to set before enable:
root@mhs1:~# diff -u /etc/rc.local.orig /etc/rc.local                                        
--- /etc/rc.local.orig  2017-10-31 19:08:06.013243388 +0000
+++ /etc/rc.local       2017-11-04 00:50:20.066909958 +0000
@@ -11,6 +11,54 @@
 #
 # By default this script does nothing.
 
+# turn on fan control
+if [ -d /sys/class/hwmon/hwmon0/device ]; then
+       # We appear to have an adt7475 chip / driver
+       if [ -f /sys/class/hwmon/hwmon0/device/temp1_auto_point1_temp ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/device/temp1_auto_point1_temp
+               echo 50000 > /sys/class/hwmon/hwmon0/device/temp1_auto_point2_temp
+               echo 80000 > /sys/class/hwmon/hwmon0/device/temp1_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/device/temp2_auto_point1_temp ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/device/temp2_auto_point1_temp
+               echo 50000 > /sys/class/hwmon/hwmon0/device/temp2_auto_point2_temp
+               echo 80000 > /sys/class/hwmon/hwmon0/device/temp2_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/device/temp3_auto_point1_temp ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/device/temp3_auto_point1_temp
+               echo 50000 > /sys/class/hwmon/hwmon0/device/temp3_auto_point2_temp
+               echo 80000 > /sys/class/hwmon/hwmon0/device/temp3_crit
+       fi
+       echo 7 > /sys/class/hwmon/hwmon0/device/pwm1_auto_channels_temp
+       echo 2 >   /sys/class/hwmon/hwmon0/device/pwm1_enable
+       echo 0 >   /sys/class/hwmon/hwmon0/device/pwm1_auto_point1_pwm
+       echo 255 >   /sys/class/hwmon/hwmon0/device/pwm1_auto_point2_pwm
+       echo 0 > /sys/class/hwmon/hwmon0/device/pwm1_stall_disable
+elif [ -f /sys/class/hwmon/hwmon0/pwm1_enable ]; then
+       # We appear to have an LM85 chip / driver
+       echo 2 >   /sys/class/hwmon/hwmon0/pwm1_enable
+       echo 0 >   /sys/class/hwmon/hwmon0/pwm1_auto_pwm_minctl
+       echo 123 > /sys/class/hwmon/hwmon0/pwm1_auto_channels
+       if [ -f /sys/class/hwmon/hwmon0/temp1_auto_temp_off ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_off
+               echo 35000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_min
+               echo 50000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_max
+               echo 80000 > /sys/class/hwmon/hwmon0/temp1_auto_temp_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/temp2_auto_temp_off ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_off
+               echo 35000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_min
+               echo 50000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_max
+               echo 80000 > /sys/class/hwmon/hwmon0/temp2_auto_temp_crit
+       fi
+       if [ -f /sys/class/hwmon/hwmon0/temp3_auto_temp_off ]; then
+               echo 30000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_off
+               echo 35000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_min
+               echo 50000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_max
+               echo 80000 > /sys/class/hwmon/hwmon0/temp3_auto_temp_crit
+       fi
+fi
+
 # turn on LED
 
 if [ -d /sys/class/leds/status:green:health ]; then
@@ -70,4 +118,24 @@
    echo usb-host > /sys/class/leds/nsa325\:green\:usb/trigger
 fi
 
+if [ -d /sys/class/leds/nsa310:green:sys ]; then
+   echo default-on > /sys/class/leds/nsa310\:green\:sys/trigger
+fi
+
+if [ -d /sys/class/leds/nsa310:green:hdd ]; then
+   echo disk-activity > /sys/class/leds/nsa310\:green\:hdd/trigger
+fi
+
+if [ -d /sys/class/leds/nsa310:green:usb ]; then
+   echo usb-host > /sys/class/leds/nsa310\:green\:usb/trigger
+fi
+
+if [ -d /sys/class/leds/nsa310:green:esata ]; then
+   echo ide-disk2 > /sys/class/leds/nsa310\:green\:esata/trigger
+fi
+
+ifdown enp1s0
+/sbin/ifconfig enp1s0 hw ether `fw_printenv -n ethaddr`
+ifup enp1s0
+
 exit 0

Re: Help with installing 2016.05 U-Boot Kirkwood for NSA310
November 03, 2017 08:50PM
Stephen P Wrote:

> The network lights work fine when u-boot is active
> - they go out partway through the kernel init
> process.

That's interesting! meaning the kernel has reset the LEDs while it was already correct. This is going to be hairy! usually need some setting for some register values, which I don't have any info for the NSA310. But that might be found by reading u-boot code.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Some additional information that might help:

The network LED ceases to function as the line speed changes from 100Mb to 1Gb; this presumably happens as the kernel network driver loads? Could this be an r8168 versus r8169 issue?

During the original installation, I installed the realtek firmware:

root@mhs1:~# apt list --installed | grep -i firmware-realtek

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

firmware-realtek/stable,now 20161130-3 all [installed]

...which I built it into the uInitrd
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.13.5-kirkwood-tld-1 -d initrd.img-4.13.5-kirkwood-tld-1 uInitrd

root@mhs1:~# fw_printenv dtb_file
dtb_file=/boot/dts/kirkwood-nsa310.dtb

root@mhs1:~# lsmod | grep ^r
r8169                  69632  0

root@mhs1:~# lshw -c network
  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: enp1s0
       version: 03
       serial: 50:67:f0:69:a7:32
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8168d-2.fw ip=192.168.1.128 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:35 ioport:10000(size=256) memory:e0014000-e0014fff memory:e0010000-e0013fff memory:e0000000-e000ffff
Also, dmesg says I have an r8168d:
[    6.867955] pci 0000:01:00.0: [10ec:8168] type 00 class 0x020000
[    6.868161] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    9.263807] r8169 0000:01:00.0: assign IRQ: got 35
[    9.263820] r8169 0000:01:00.0: assigning IRQ 35
[    9.263832] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    9.294709] r8169 0000:01:00.0: enabling device (0140 -> 0143)
[    9.322395] r8169 0000:01:00.0: enabling Mem-Wr-Inval
[    9.322566] r8169 0000:01:00.0: enabling bus mastering
[    9.323245] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0xd0d4f000, 00:00:00:00:00:30, XID 083000c0 IRQ 35
[    9.367453] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    9.751249] r8169 0000:01:00.0 enp1s0: renamed from eth0
[   29.967937] r8169 0000:01:00.0 enp1s0: link down
[   29.972594] r8169 0000:01:00.0 enp1s0: link down
[   29.981668] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready
[   32.806395] r8169 0000:01:00.0 enp1s0: link up
[   42.367974] r8169 0000:01:00.0 enp1s0: link down
[   42.372981] r8169 0000:01:00.0 enp1s0: link down
[   45.196829] r8169 0000:01:00.0 enp1s0: link up
According to the kernel source, some 8168x family chips have a LED frequency that is controlled by the driver, but the 8168d does not. Could the chip be being incorrectly identified? The driver identifies the chipset from the MAC config, so could that relate to the screwy 00:00:00:00:00:30 MAC address the NIC gets by default?
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: