Welcome! Log In Create A New Profile

Advanced

Linux Kernel 5.4.2 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 05, 2015 09:36AM
bodhi,

Just tried the latest rootfs with the 3.17 kernel and the dtb for the nsa325 and only 1 (the first) of the sata ports appears to be working when debian is booted (the first sata port). The second port does not register the drive connected. Both drive's are the same make and model.

just had a look in the patch and seen this:

+		sata1_power: regulator@3 {
+			compatible = "regulator-fixed";
+			reg = <3>;
+			regulator-name = "SATA1 Power";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			regulator-always-on;
+			regulator-boot-on;
+			enable-active-high;
+			gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+		};

should there not be a similar section for the second sata?

edit:

I see this on the serial while booting:
[    8.622750] ata2: link is slow to respond, please be patient (ready=0)
[   13.122748] ata2: SRST failed (errno=-16)
[   18.672746] ata2: link is slow to respond, please be patient (ready=0)
[   23.172748] ata2: SRST failed (errno=-16)

edit 2:

Adding the serial output from boot looks like sata2 isnt being powered up.
Also it appears that the error mentioned above is no longer there in that serial output.



Edited 3 time(s). Last edit at 01/05/2015 10:01AM by Buttzy10169.
Attachments:
open | download - nsa325.txt (22.8 KB)
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 05, 2015 10:01AM
Thanks Buttzy! I'll take a closer look. My NSA325 has only one HDD installed, so I might have missed this.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 05, 2015 11:04AM
bastel Wrote:
-------------------------------------------------------
> I posted it in the u-boot thread, but now I think
> it rather belongs here:
> http://forum.doozan.com/read.php?3,12381,19091#msg
> -19091
> I have the same problem, usb is not powered after
> kernel start, thus usb boot device is missing.

If you have serial console log, please post here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 05, 2015 12:19PM
Buttzy,

I looked at the DTS. This looks OK (is actually HDD2_POWER, GPIO 47)
> +		sata1_power: regulator@3 {
> +			compatible = "regulator-fixed";
> +			reg = <3>;
> +			regulator-name = "SATA1 Power";
> +			regulator-min-microvolt = <5000000>;
> +			regulator-max-microvolt = <5000000>;
> +			regulator-always-on;
> +			regulator-boot-on;
> +			enable-active-high;
> +			gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
> +		};
>

Based on your updated serial boot log, which is OK now, you might have had other problem previously..

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 01/05/2015 12:20PM by bodhi.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 05, 2015 12:31PM
Bodhi,

But even with the boot that I got that boot log from the second sata is not showing up in Debian.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 05, 2015 12:57PM
Buttzy10169 Wrote:
-------------------------------------------------------
> Bodhi,
>
> But even with the boot that I got that boot log
> from the second sata is not showing up in Debian.

Ah, I see. This is all you got:

[    2.942640] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    2.982679] ata1.00: ATA-8: Hitachi HDS722020ALA330, JKAOA28A, max UDMA/133
[    2.989672] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.052664] ata1.00: configured for UDMA/133
[    3.072900] scsi 0:0:0:0: Direct-Access     ATA      Hitachi HDS72202 A28A PQ: 0 ANSI: 5
[    3.582632] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)

Let's look at your output of:
ls -lR /proc/device-tree

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 05, 2015 01:05PM
bodhi,

Yeah after a reboot its like it doesnt even try to detect the second sata drive.

im attaching the output of the "ls -lR /proc/device-tree/" command.

edit:

At first look from me theres a:

/proc/device-tree/ocp@f1000000/pin-controller@10000/pmx-pwr-sata1:
for sata 1 but none for sata 0



Edited 1 time(s). Last edit at 01/05/2015 01:08PM by Buttzy10169.
Attachments:
open | download - devtree.txt (55.1 KB)
U-Boot 2011.12 (May 03 2012 - 17:04:23)
ZyXEL NSA320 2-Bay Power Media Server

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
No link on egiga0
ping failed; host 192.168.1.11 is not alive
Hit any key to stop autoboot:  0
NSA320> mw.l f1010100 0020c000

HDD powering on

NSA320> usb start
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 4 USB Device(s) found
       scanning bus for storage devices... 2 Storage Device(s) found
NSA320> run usb_load_uimage
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
2835406 bytes read
NSA320> run set_bootargs_usb
NSA320> printenv
arcNumber=3956
baudrate=115200
boot_sata1=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts; ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
boot_sata2=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rootdelay=10 $mtdparts; ide reset; ext2load ide 1:1 0x800000 /boot/uImage; ext2load ide 1:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
bootargs=console=ttyS0,115200 root=LABEL=USBROOT rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
bootcmd=run bootcmd_usb; run boot_sata1; run boot_sata2; run bootcmd_rescue; reset
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=EC:43:F6:BE:6C:BB
filesize=2B43CE
if_netconsole=ping $serverip
ipaddr=192.168.1.253
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
netmask=255.255.255.0
partition=nand0,2
preboot=run if_netconsole start_netconsole
serverip=192.168.1.11
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start; sleep 5; usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=LABEL=USBROOT
usb_rootdelay=10
usb_rootfstype=ext3

Environment size: 1966/131068 bytes
NSA320> run usb_boot
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
6114335 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.17.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2835342 Bytes = 2.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.17.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6114271 Bytes = 5.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

HDD emergency head park due to powerloss

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.17.0-kirkwood-tld-1 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #4 PREEMPT Wed Oct 22 00:55:17 PDT 2014
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Zyxel NSA320
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=USBROOT rootdelay=10 rootfstype=ext3 mtdparts=orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 505316K/524288K available (5553K kernel code, 358K rwdata, 1892K rodata, 262K init, 302K bss, 18972K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc074d83c   (7447 kB)
[    0.000000]       .init : 0xc074e000 - 0xc078f90c   ( 263 kB)
[    0.000000]       .data : 0xc0790000 - 0xc07e998c   ( 359 kB)
[    0.000000]        .bss : 0xc07e998c - 0xc08352dc   ( 303 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000015] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474836475ns
[    0.000362] Console: colour dummy device 80x30
[    0.000391] Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
[    0.090109] pid_max: default: 32768 minimum: 301
[    0.090232] Security Framework initialized
[    0.090303] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090325] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091032] Initializing cgroup subsys devices
[    0.091065] Initializing cgroup subsys freezer
[    0.091089] Initializing cgroup subsys net_cls
[    0.091110] Initializing cgroup subsys blkio
[    0.091199] CPU: Testing write buffer coherency: ok
[    0.091635] Setting up static identity map for 0x542138 - 0x542190
[    0.091951] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.094233] devtmpfs: initialized
[    0.096576] prandom: seed boundary self test passed
[    0.100666] prandom: 100 self tests passed
[    0.100698] pinctrl core: initialized pinctrl subsystem
[    0.101201] regulator-dummy: no parameters
[    0.106374] NET: Registered protocol family 16
[    0.106832] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.107955] cpuidle: using governor ladder
[    0.107980] cpuidle: using governor menu
[    0.108410] Feroceon L2: Enabling L2
[    0.108456] Feroceon L2: Cache support initialised.
[    0.108869] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.113904] No ATAGs?
[    0.141729] vgaarb: loaded
[    0.142132] usbcore: registered new interface driver usbfs
[    0.142218] usbcore: registered new interface driver hub
[    0.142348] usbcore: registered new device driver usb
[    0.143475] Switched to clocksource orion_clocksource
[    0.182109] NET: Registered protocol family 2
[    0.183058] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.183118] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.183170] TCP: Hash tables configured (established 4096 bind 4096)
[    0.183238] TCP: reno registered
[    0.183252] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.183274] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.183469] NET: Registered protocol family 1
[    0.183850] RPC: Registered named UNIX socket transport module.
[    0.183863] RPC: Registered udp transport module.
[    0.183871] RPC: Registered tcp transport module.
[    0.183878] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.184175] Unpacking initramfs...
[    0.691736] Freeing initrd memory: 5964K (c1101000 - c16d4000)
[    0.691872] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.693227] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.693261] Initialise system trusted keyring
[    0.693362] audit: initializing netlink subsys (disabled)
[    0.693417] audit: type=2000 audit(0.680:1): initialized
[    0.694293] zpool: loaded
[    0.694311] zbud: loaded
[    0.694594] VFS: Disk quotas dquot_6.5.2
[    0.694646] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.695186] NFS: Registering the id_resolver key type
[    0.695229] Key type id_resolver registered
[    0.695238] Key type id_legacy registered
[    0.695267] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.695283] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.695454] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.695780] msgmni has been set to 998
[    0.695952] Key type big_key registered
[    0.698261] alg: No test for stdrng (krng)
[    0.698370] bounce: pool size: 64 pages
[    0.698430] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.698447] io scheduler noop registered
[    0.698460] io scheduler deadline registered
[    0.698495] io scheduler cfq registered (default)
[    0.699795] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.700460] irq: Cannot allocate irq_descs @ IRQ34, assuming pre-allocated
[    0.700866] irq: Cannot allocate irq_descs @ IRQ66, assuming pre-allocated
[    0.701718] mvebu-pcie mbus:pcie-controller: PCI host bridge to bus 0000:00
[    0.701736] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.701750] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.701763] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.702093] PCI: bus0: Fast back to back transfers disabled
[    0.702109] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.702278] PCI: bus1: Fast back to back transfers enabled
[    0.702327] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.702619] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.733563] mv_xor f1060800.xor: Marvell XOR: ( xor cpy )
[    0.773546] mv_xor f1060800.xor: Marvell XOR: ( xor cpy )
[    0.773732] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.813543] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[    0.853543] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[    0.853969] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.855310] console [ttyS0] disabled
[    0.855371] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 27, base_baud = 12500000) is a 16550A
[    1.504789] console [ttyS0] enabled
[    1.509710] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.516130] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.520771] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    1.526482] Scanning device for bad blocks
[    1.629192] 9 cmdlinepart partitions found on MTD device orion_nand
[    1.635508] Creating 9 MTD partitions on "orion_nand":
[    1.640675] 0x000000000000-0x000000100000 : "u-boot"
[    1.646099] 0x000000100000-0x000000180000 : "uboot_env"
[    1.651736] 0x000000180000-0x000000200000 : "key_store"
[    1.657393] 0x000000200000-0x000000280000 : "info"
[    1.662570] 0x000000280000-0x000000c80000 : "etc"
[    1.667732] 0x000000c80000-0x000001680000 : "kernel_1"
[    1.673287] 0x000001680000-0x000004640000 : "rootfs1"
[    1.678836] 0x000004640000-0x000005040000 : "kernel_2"
[    1.684428] 0x000005040000-0x000008000000 : "rootfs2"
[    1.690859] libphy: Fixed MDIO Bus: probed
[    1.695326] libphy: orion_mdio_bus: probed
[    1.706621] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.714700] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address ec:43:f6:be:6c:bb
[    1.723816] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.730379] ehci-pci: EHCI PCI platform driver
[    1.734973] ehci-orion: EHCI orion driver
[    1.739167] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.744762] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.752594] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    1.773512] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.779733] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.786584] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.793858] usb usb1: Product: EHCI Host Controller
[    1.798758] usb usb1: Manufacturer: Linux 3.17.0-kirkwood-tld-1 ehci_hcd
[    1.805507] usb usb1: SerialNumber: f1050000.ehci
[    1.810991] hub 1-0:1.0: USB hub found
[    1.814840] hub 1-0:1.0: 1 port detected
[    1.819719] mousedev: PS/2 mouse device common for all mice
[    1.826029] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.833117] i2c /dev entries driver
[    1.842830] rtc-pcf8563 0-0051: chip found, driver version 0.4.3
[    1.854092] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc1
[    1.863015] hidraw: raw HID events driver (C) Jiri Kosina
[    1.868882] drop_monitor: Initializing network drop monitor service
[    1.875459] TCP: cubic registered
[    1.878797] NET: Registered protocol family 17
[    1.883393] Key type dns_resolver registered
[    1.888436] Loading compiled-in X.509 certificates
[    1.893282] registered taskstats version 1
[    1.898449] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    1.909037] Freeing unused kernel memory: 260K (c074e000 - c078f000)
Loading, please wait...
[    1.984425] udevd[57]: starting version 175
[    2.133655] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.295493] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    2.302257] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.323616] usb 1-1: Product: USB2.0 Hub
[    2.331408] hub 1-1:1.0: USB hub found
[    2.339622] hub 1-1:1.0: 4 ports detected
[    2.390198] SCSI subsystem initialized
[    2.471406] sata_mv f1080000.sata: slots 32 ports 2
[    2.514466] scsi host0: sata_mv
[    2.533647] scsi host1: sata_mv
[    2.537183] ata1: SATA max UDMA/133 irq 33
[    2.541301] ata2: SATA max UDMA/133 irq 33
[    2.923523] ata1: SATA link down (SStatus 0 SControl F300)
[    3.293517] ata2: SATA link down (SStatus 0 SControl F300)
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Waiting for root file system ... done.
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/disk/by-label/USBROOT does not exist.  Dropping to a shell!
modprobe: module i8042 not found in modules.dep
[   23.670294] uhci_hcd: USB Universal Host Controller Interface driver
[   23.686759] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   23.703864] usbcore: registered new interface driver usbhid
[   23.709464] usbhid: USB HID core driver


BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs) [  187.908328] random: nonblocking pool is initialized
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 06, 2015 11:00PM
bastel,

Problem is with USB dirve, make sure you have USBROOT label correctly on USB rootfs partition.

-bodhi
===========================
Forum Wiki
bodhi's corner
Yeah USBROOT is the label. But without electricity the usb chip in the drive enclosure won't work and the drive can't spin, and that's why the drive isn't even visible in the usb detection log (nor is another usb stick plugged in). I can try to power the drive externally (it has one of those small holes to supply 5 volts), but that's not really what I want.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 07, 2015 05:14AM
bastel,

I see you're booting with USB connect HDD. Have you tried with a USB thumb drive?

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/07/2015 05:25AM by bodhi.
No, but I had one connected, that's why u-boot finds 2 storage devices, while linux finds neither.
I will try (later today) to supply external power to the hdd and see if it boots then (depends if the 5v power both usb and hdd or just hdd). Maybe a powered hub in between will work, too. Apparently the usb circuit is not shut down, just the power lines (also interesting: when power is enabled for usb, the nsa320 fan suddenly speeds up)
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 07, 2015 07:38AM
bastel Wrote:
-------------------------------------------------------
> No, but I had one connected, that's why u-boot
> finds 2 storage devices, while linux finds
> neither.
> I will try (later today) to supply external power
> to the hdd and see if it boots then (depends if
> the 5v power both usb and hdd or just hdd). Maybe
> a powered hub in between will work, too.
> Apparently the usb circuit is not shut down, just
> the power lines (also interesting: when power is
> enabled for usb, the nsa320 fan suddenly speeds
> up)

Perhaps you can try booting these different variations:

1. Solely with the USB stick, since it draws less power. Just to see whether there is not enough power to the USB port.
2. And try booting with the 3.16 rootfs instead of 3.17, to see if the NSA320 DTS was the problem.
3. If 2 is the culprit, then boot new NSA320 u-boot with UART and 3.17 rootfs

-bodhi
===========================
Forum Wiki
bodhi's corner
- External power did work, it also powers the fan (basically something is very wrong with the fan control, it's like they add voltages from X and usb together, i.e. the fan will run without the NSA320 connected to the power supply if I connect the externally powered hdd)
1) skipped

2) 3.16 root fs with tld2 kernel does work, the drive gets shut down on kernel boot but the kernel re-enables it (and it comes up fast enough to be there on usb detection. But just barely)

3) I flashed uboot.2013.10-tld-1.nsa320.mtd0.kwb. Now the fan runs full speed after turning on. And the usb power is there. HDD gets shut down gracefully once during boot (like on the dockstar).

So for proper usb boot one needs old u-boot and 3.16 or new u-boot and 3.17.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 07, 2015 10:35PM
bastel Wrote:
-------------------------------------------------------
> - External power did work, it also powers the fan
> (basically something is very wrong with the fan
> control, it's like they add voltages from X and
> usb together, i.e. the fan will run without the
> NSA320 connected to the power supply if I connect
> the externally powered hdd)
> 1) skipped
>
> 2) 3.16 root fs with tld2 kernel does work, the
> drive gets shut down on kernel boot but the kernel
> re-enables it (and it comes up fast enough to be
> there on usb detection. But just barely)
>
> 3) I flashed uboot.2013.10-tld-1.nsa320.mtd0.kwb.
> Now the fan runs full speed after turning on. And
> the usb power is there. HDD gets shut down
> gracefully once during boot (like on the
> dockstar).
>
> So for proper usb boot one needs old u-boot and
> 3.16 or new u-boot and 3.17.

Thanks for confirming. But I think problem probably occurs only with USB HDD. Others have booted USB stick and no one has reported this.

In any case, with the new u-boot you can solve this once for all.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 13, 2015 07:48AM
Just a note... The ntp-daemon doesn't autostart with Debian on the 3.16 and 3.17 rootfs.

You can start in manually. Tried some stuff recommended by others on different forums to make it work but didn't succeed.

I have had to reinstall it to make it work with "dpkg --purge ntp & apt-get install ntp"...
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 13, 2015 07:53AM
Also, since we all use the exact same rootfs with the same SSH-keys in common, it's recommended to regenerate these.

# /bin/rm -v /etc/ssh/ssh_host_*
# dpkg-reconfigure openssh-server

Sample output:
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Restarting OpenBSD Secure Shell server: sshd.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 13, 2015 09:09AM
JohnW Wrote:
-------------------------------------------------------
> Just a note... The ntp-daemon doesn't autostart
> with Debian on the 3.16 and 3.17 rootfs.
>
> You can start in manually. Tried some stuff
> recommended by others on different forums to make
> it work but didn't succeed.
>
> I have had to reinstall it to make it work with
> "dpkg --purge ntp & apt-get install ntp"...

That's strange! It always works for me in rootfs booting tests.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 13, 2015 10:16AM
Hi,

Correction! Reinstallationen of ntp did not fix it, i had to uninstall ntpdate to make it work!

I had this problem on two Pogoplugs (V4/Mobile) running 3.16 in October. I tried a bunch of things and thought the reinstallation of ntp did the trick.

But this didn't help on my new third 3.17 installation, so i took a look at the others which didn't have ntpdate installed.

So after uninstalling ntpdate on my newest one i got it to work!
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 13, 2015 10:40AM
JohnW,

Again, I did not need to do anything extra. System time just works out of the box. I am not sure why it was necessary for you to remove ntpdate, either.

Anybody else has similar experience with the latest rootfs? if so, please post your observation..

If your ntpd is not running, start it, and it wiil be automatically run during reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/13/2015 01:47PM by bodhi.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 13, 2015 10:42AM
Exactly, if others could check if they got "ntp" running after boot...

ps -ax|grep ntp
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 13, 2015 05:53PM
Hi, trust me somethings wierd. I started off with a fresh 3.17 rootfs and ntp started OK manually.

I rebooted 5-6 times after trying some update-rc.d-stuff, but the service wouldn't start automatically.

"S01ntp" existed in "/etc/rc5.d/", so that's fine. Hmm. I can install ntpdate again and look if i can find wierd in the logs!
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 14, 2015 01:14AM
File linux-3.17.0-kirkwood-tld-1.patch

arch/arm/boot/dts/Makefile

kirkwood-nsa310a.dtb \
+ kirkwood-nsa320.dtb \

perhaps skipped ?

+ kirkwood-nsa325.dtb \
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 14, 2015 07:25AM
balbes150,

Thanks! Looks like I've missed this during the patch creation (it was created after the dtbs were compiled). One more line should be added:

arch/arm/boot/dts/Makefile
+        kirkwood-nsa320.dtb \
+        kirkwood-nsa325.dtb \

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 2 time(s). Last edit at 01/14/2015 12:50PM by bodhi.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 15, 2015 05:25AM
Hi,

I can confirm that NTPd is not running after system startup.

root@debian:~# ps aux | grep ntp
root      2066  0.0  0.2   2020  1172 ttyS0    S+   03:23   0:00 grep ntp
root@debian:~# /etc/init.d/ntp stop
[....] Stopping NTP server: ntpdstart-stop-daemon: warning: failed to kill 1903: No such process
. ok 
root@debian:~# /etc/init.d/ntp start
[ ok ] Starting NTP server: ntpd.
root@debian:~# ps aux | grep ntp
ntp       2107  0.5  0.7   5672  4040 ?        Ss   03:23   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:106
root      2126  0.0  0.2   2020  1132 ttyS0    S+   03:23   0:00 grep ntp
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 15, 2015 05:40AM
Working here on 2 plugs and one goflex net:

pogoplug-1 ~ # uptime 
 12:39:58 up 1 min,  1 user,  load average: 1.40, 0.41, 0.14
pogoplug-1 ~ # ps aux | grep ntp
ntp       1917  0.3  3.3   5676  4060 ?        Ss   12:39   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:106
root      2105  0.0  1.0   2024  1228 pts/0    S+   12:40   0:00 grep --colour=auto ntp
pogoplug-1 ~ #
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 15, 2015 05:56AM
I forgot to mention details:

- ZyXEL NSA-325v2
- Debian-3.16.0-kirkwood-tld-2-rootfs-bodhi.tar.bz2

Tomas
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 15, 2015 06:23AM
Doe any one know if there is a procedure how to build kirkwood (in my case NSA-325v2) kernel on debian with all the patches that Bodhi kernel has?

I would like to build kernel with RAID1 support for root=/dev/md0 as I am unsuccessful to add RAID1 support via initrd.

Thanks,

Tomas
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 15, 2015 06:36AM
@safarik:

You can find some of the info here:

https://github.com/davidedg/NAS-NSA325-mod

This is my personal project on this nas, which uses Bodhi's patches for kernel.
Under /kernel/, you will find the same patch from Bodhi and instructions on how to apply to vanilla kernel 3.17.7

My kernel .config is very slim, though, and is specifically designed to work with my initramfs and rootfs - I do not know if it will work with Bodhi's rootfs, but I do no think it will.
You may try to use Bodhi's .config (which is a more general purpose one) and make sure that you configure with:
CONFIG_TMPFS=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

As for MDADM/RAID, there are a couple of gotchas to make it work.
I explained some of them in another nas project, the Lacie NS2MAX:
https://github.com/davidedg/NAS-NS2MAX-mod/tree/master/initramfs
and https://github.com/davidedg/NAS-NS2MAX-mod/tree/master/install

This is a modified version of my initramfs that includes:
- instructions to build mdadm statically
- scripts to include in the initramfs to mount MD devices
- partition and volume layout to let u-boot recognize MD /boot (metadata=0.90).
- u-boot conditional booting with "||" scripting.


I'm not sure it's strictly required, but I think you will need to update your u-boot to make it all this work.
Pay very attention on this, as it's the only really dangerous part.
For the rest, feel free to ask :D

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod



Edited 1 time(s). Last edit at 01/15/2015 06:37AM by davidedg.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
January 16, 2015 06:50AM
bodhi Wrote:
-------------------------------------------------------
> balbes150,
>
> Thanks! Looks like I've missed this during the
> patch creation (it was created after the dtbs were
> compiled). One more line should be added:
>
> arch/arm/boot/dts/Makefile
>
> +        kirkwood-nsa320.dtb \
> +        kirkwood-nsa325.dtb \
>


If possible, please make changes to the .config file to fully support booting from USB and I2O

1793c1793,1799
< # CONFIG_I2O is not set
---
> CONFIG_I2O=m
> CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
> CONFIG_I2O_EXT_ADAPTEC=y
> CONFIG_I2O_BUS=m
> CONFIG_I2O_BLOCK=m
> CONFIG_I2O_SCSI=m
> CONFIG_I2O_PROC=m
4134c4140
< # CONFIG_USB_EHCI_HCD_PLATFORM is not set
---
> CONFIG_USB_EHCI_HCD_PLATFORM=y
4142,4146c4148,4151
< CONFIG_USB_OHCI_HCD=m
< CONFIG_USB_OHCI_HCD_PCI=m
< # CONFIG_USB_OHCI_HCD_SSB is not set
< # CONFIG_USB_OHCI_HCD_PLATFORM is not set
< CONFIG_USB_UHCI_HCD=m
---
> CONFIG_USB_OHCI_HCD=y
> CONFIG_USB_OHCI_HCD_PCI=y
> CONFIG_USB_OHCI_HCD_PLATFORM=y
> CONFIG_USB_UHCI_HCD=y
Sorry, you can't reply to this topic. It has been closed.