Welcome! Log In Create A New Profile

Advanced

Linux Kernel 4.19.0 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 11, 2015 10:50PM
Hey everybody,

Please try to post a new different Debian topic if you can (but of course do post here if you think it is something to do with this kernel). I lost track of which post that I have not answered (there is no way of marking a post as unread :) Thanks.

-bodhi
===========================
Forum Wiki
bodhi's corner
jfp
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 12, 2015 07:29AM
@bodhi,

after removing systemd by

apt-get install sysvinit-core sysvinit sysvinit-utils
apt-get remove --purge --auto-remove systemd
echo -e 'Package: systemd\nPin: origin ""\nPin-Priority: -1' > /etc/apt/preferences.d/systemd


syslogd is putting still similar messages into the log.

...
...
Mar 12 13:35:58 zn325-1 vmunix: [   26.736289] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: acl,user_xattr
Mar 12 13:35:58 zn325-1 vmunix: [   28.738680] NET: Registered protocol family 10
Mar 12 13:35:58 zn325-1 vmunix: [   28.743943] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 12 13:35:58 zn325-1 vmunix: [   31.602656] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Mar 12 13:35:58 zn325-1 vmunix: [   31.612565] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar 12 13:37:03 zn325-1 vmunix: [   93.394399] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
Mar 12 13:37:03 zn325-1 vmunix: [   93.400372] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Mar 12 13:42:03 zn325-1 vmunix: [  392.839109] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
Mar 12 13:42:03 zn325-1 vmunix: [  392.845119] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Mar 12 13:47:13 zn325-1 vmunix: [  703.125392] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
Mar 12 13:47:13 zn325-1 vmunix: [  703.131366] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Mar 12 13:52:24 zn325-1 vmunix: [ 1013.529310] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
Mar 12 13:52:24 zn325-1 vmunix: [ 1013.535572] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Mar 12 13:52:24 zn325-1 vmunix: [ 1013.545482] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Mar 12 13:57:24 zn325-1 vmunix: [ 1313.697585] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
Mar 12 13:57:24 zn325-1 vmunix: [ 1313.703847] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Mar 12 13:57:24 zn325-1 vmunix: [ 1313.713763] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
...

The constant intervalls are noticeable.

Do you have any ideas ?

BTW: I already replaced the cable as well as I changed the switch port.

With best Regards,
Joe
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 12, 2015 02:12PM
@Joe,

I have no idea why. Perhaps you could post the entire dmesg log? I don't see this behavior on my NSA325v2.

BTW, I'm running sysvinit, but left systemd intact:
apt-get install sysvinit-core sysvinit sysvinit-utils
and add this to the kernel bootargs when I want to boot with systemd:
init=/bin/systemd

-bodhi
===========================
Forum Wiki
bodhi's corner
jfp
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 12, 2015 02:45PM
@bodhi,

here my bootlog from dmesg:

root@zn325-1:~# dmesg 
[    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.18.5-kirkwood-tld-1 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 PREEMPT Thu Feb 5 17:58:07 PST 2015
[    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 NSA325
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c0802d40, node_mem_map dfbfa000
[    0.000000]   DMA zone: 1024 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 131072 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: 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) rw rootwait loglevel=8 root=root=/dev/mapper/vgmd0-root
[    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: 502072K/524288K available (5640K kernel code, 365K rwdata, 1920K rodata, 268K init, 305K bss, 22216K reserved)
[    0.000000] Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
    vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc076a240   (7561 kB)
      .init : 0xc076b000 - 0xc07ae000   ( 268 kB)
      .data : 0xc07ae000 - 0xc08096fc   ( 366 kB)
       .bss : 0xc08096fc - 0xc0855d84   ( 306 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474836475ns
[    0.000349] Console: colour dummy device 80x30
[    0.000374] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[    0.090083] pid_max: default: 32768 minimum: 301
[    0.090203] Security Framework initialized
[    0.090290] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090307] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090902] Initializing cgroup subsys devices
[    0.090930] Initializing cgroup subsys freezer
[    0.090957] Initializing cgroup subsys net_cls
[    0.090974] Initializing cgroup subsys blkio
[    0.091062] CPU: Testing write buffer coherency: ok
[    0.091434] Setting up static identity map for 0x557418 - 0x557470
[    0.091700] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.093742] devtmpfs: initialized
[    0.095938] prandom: seed boundary self test passed
[    0.098938] prandom: 100 self tests passed
[    0.098954] pinctrl core: initialized pinctrl subsystem
[    0.099358] regulator-dummy: no parameters
[    0.103924] NET: Registered protocol family 16
[    0.104272] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.130098] cpuidle: using governor ladder
[    0.160096] cpuidle: using governor menu
[    0.160458] Feroceon L2: Enabling L2
[    0.160492] Feroceon L2: Cache support initialised.
[    0.160806] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.164457] No ATAGs?
[    0.191369] vgaarb: loaded
[    0.191653] usbcore: registered new interface driver usbfs
[    0.191715] usbcore: registered new interface driver hub
[    0.191763] usbcore: registered new device driver usb
[    0.192590] Switched to clocksource orion_clocksource
[    0.221504] NET: Registered protocol family 2
[    0.222099] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.222155] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.222206] TCP: Hash tables configured (established 4096 bind 4096)
[    0.222258] TCP: reno registered
[    0.222269] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.222288] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.222450] NET: Registered protocol family 1
[    0.222785] RPC: Registered named UNIX socket transport module.
[    0.222795] RPC: Registered udp transport module.
[    0.222800] RPC: Registered tcp transport module.
[    0.222806] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.222822] PCI: CLS 0 bytes, default 32
[    0.223019] Unpacking initramfs...
[    0.791578] Freeing initrd memory: 9076K (df25e000 - dfb3b000)
[    0.791697] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.792841] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.792869] Initialise system trusted keyring
[    0.792946] audit: initializing netlink subsys (disabled)
[    0.792993] audit: type=2000 audit(0.790:1): initialized
[    0.793624] zpool: loaded
[    0.793637] zbud: loaded
[    0.793867] VFS: Disk quotas dquot_6.5.2
[    0.793917] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.794366] NFS: Registering the id_resolver key type
[    0.794400] Key type id_resolver registered
[    0.794406] Key type id_legacy registered
[    0.794426] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.794436] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.794605] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.794852] msgmni has been set to 998
[    0.794973] Key type big_key registered
[    0.797119] alg: No test for stdrng (krng)
[    0.797151] Key type asymmetric registered
[    0.797163] Asymmetric key parser 'x509' registered
[    0.797234] bounce: pool size: 64 pages
[    0.797310] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.797328] io scheduler noop registered
[    0.797339] io scheduler deadline registered
[    0.797382] io scheduler cfq registered (default)
[    0.798405] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.798909] irq: Cannot allocate irq_descs @ IRQ33, assuming pre-allocated
[    0.799216] irq: Cannot allocate irq_descs @ IRQ65, assuming pre-allocated
[    0.799842] mvebu-pcie mbus:pcie-controller: PCI host bridge to bus 0000:00
[    0.799858] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.799868] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.799878] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.799907] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    0.800123] PCI: bus0: Fast back to back transfers disabled
[    0.800135] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.800267] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    0.800306] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    0.800419] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.800652] PCI: bus1: Fast back to back transfers disabled
[    0.800665] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.800733] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    0.800748] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    0.800772] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.800784] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    0.800855] pci 0000:00:01.0: enabling device (0140 -> 0142)
[    0.800874] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    0.801093] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.832645] mv_xor f1060800.xor: Marvell XOR: ( xor cpy )
[    0.872638] mv_xor f1060800.xor: Marvell XOR: ( xor cpy )
[    0.872766] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.912637] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[    0.952634] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[    0.952959] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.953966] console [ttyS0] disabled
[    0.954014] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 27, base_baud = 12500000) is a 16550A
[    1.716610] console [ttyS0] enabled
[    1.721222] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    1.727632] nand: Eon NAND 128MiB 3,3V 8-bit
[    1.731922] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    1.737618] Scanning device for bad blocks
[    1.746558] Bad eraseblock 100 at 0x000000c80000
[    1.755964] Bad eraseblock 200 at 0x000001900000
[    1.805004] libphy: Fixed MDIO Bus: probed
[    1.809375] libphy: orion_mdio_bus: probed
[    1.817369] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.825202] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 10:7b:ef:xx:xx:xx
[    1.834156] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.840717] ehci-pci: EHCI PCI platform driver
[    1.845298] ehci-orion: EHCI orion driver
[    1.849452] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.855019] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.862849] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    1.882609] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.888783] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.895618] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.902883] usb usb1: Product: EHCI Host Controller
[    1.907780] usb usb1: Manufacturer: Linux 3.18.5-kirkwood-tld-1 ehci_hcd
[    1.914523] usb usb1: SerialNumber: f1050000.ehci
[    1.919812] hub 1-0:1.0: USB hub found
[    1.923642] hub 1-0:1.0: 1 port detected
[    1.928245] mousedev: PS/2 mouse device common for all mice
[    1.934137] i2c /dev entries driver
[    1.941484] rtc-pcf8563 0-0051: chip found, driver version 0.4.3
[    1.951248] rtc (null): invalid alarm value: 2015-3-12 51:43:0
[    1.957340] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    1.965950] hidraw: raw HID events driver (C) Jiri Kosina
[    1.971641] drop_monitor: Initializing network drop monitor service
[    1.978156] TCP: cubic registered
[    1.981494] NET: Registered protocol family 17
[    1.986093] Key type dns_resolver registered
[    1.990972] Loading compiled-in X.509 certificates
[    1.995840] registered taskstats version 1
[    2.001965] rtc-pcf8563 0-0051: setting system clock to 2015-03-12 12:35:24 UTC (1426163724)
[    2.011350] PM: Hibernation image not present or could not be loaded.
[    2.018859] Freeing unused kernel memory: 268K (c076b000 - c07ae000)
[    2.203223] systemd-udevd[66]: starting version 215
[    2.209778] random: systemd-udevd urandom read with 4 bits of entropy available
[    2.242712] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.314269] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    2.319541] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    2.341714] orion_wdt: Initial timeout 21 sec
[    2.359541] SCSI subsystem initialized
[    2.378053] USB Power: 5000 mV 
[    2.391174] SATA1 Power: 5000 mV 
[    2.394709] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    2.401538] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.414378] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    2.421127] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.441074] usb 1-1: Product: USB2.0 Hub
[    2.449560] hub 1-1:1.0: USB hub found
[    2.457377] hub 1-1:1.0: 4 ports detected
[    2.462772] libata version 3.00 loaded.
[    2.468232] sata_mv f1080000.sata: version 1.28
[    2.499353] usb usb2: Product: xHCI Host Controller
[    2.513813] sata_mv f1080000.sata: slots 32 ports 2
[    2.529328] usb usb2: Manufacturer: Linux 3.18.5-kirkwood-tld-1 xhci-hcd
[    2.554409] scsi host0: sata_mv
[    2.561140] usb usb2: SerialNumber: 0000:01:00.0
[    2.573400] scsi host1: sata_mv
[    2.583478] ata1: SATA max UDMA/133 irq 32
[    2.587632] ata2: SATA max UDMA/133 irq 32
[    2.594003] hub 2-0:1.0: USB hub found
[    2.600358] hub 2-0:1.0: 2 ports detected
[    2.605772] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    2.611033] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    2.618811] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    2.625687] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.632969] usb usb3: Product: xHCI Host Controller
[    2.637870] usb usb3: Manufacturer: Linux 3.18.5-kirkwood-tld-1 xhci-hcd
[    2.644617] usb usb3: SerialNumber: 0000:01:00.0
[    2.650225] hub 3-0:1.0: USB hub found
[    2.654068] hub 3-0:1.0: 2 ports detected
[    2.752986] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[    2.863600] usb 1-1.2: New USB device found, idVendor=0781, idProduct=556b
[    2.870513] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.877890] usb 1-1.2: Product: Cruzer Edge
[    2.882092] usb 1-1.2: Manufacturer: SanDisk
[    2.886395] usb 1-1.2: SerialNumber: 20042907911B3350CD3F
[    2.899071] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[    2.905726] scsi host2: usb-storage 1-1.2:1.0
[    2.911392] usbcore: registered new interface driver usb-storage
[    2.919804] usbcore: registered new interface driver uas
[    3.092631] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.112833] ata1.00: ATA-9: WDC WD30EFRX-68xxxxx, 8X.00A8X, max UDMA/133
[    3.119564] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.142819] ata1.00: configured for UDMA/133
[    3.162895] scsi 0:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68X 0A8X PQ: 0 ANSI: 5
[    3.672623] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.712654] ata2.00: ATA-9: WDC WD30EFRX-68xxxxx, 8X.00A8X, max UDMA/133
[    3.719386] ata2.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.762652] ata2.00: configured for UDMA/133
[    3.782857] scsi 1:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68X 0A8X PQ: 0 ANSI: 5
[    3.801381] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[    3.812537] sd 1:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[    3.821499] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    3.826819] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    3.832323] sd 0:0:0:0: [sda] Write Protect is off
[    3.837355] sd 1:0:0:0: [sdb] Write Protect is off
[    3.842166] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.847269] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.852417] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.861596] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.903427] scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Edge      1.26 PQ: 0 ANSI: 6
[    3.917254] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    3.923421] sd 1:0:0:0: Attached scsi generic sg1 type 0
[    3.929036] sd 2:0:0:0: [sdc] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[    3.936895] sd 2:0:0:0: Attached scsi generic sg2 type 0
[    3.943030]  sda: sda1 sda2
[    3.946178]  sdb: sdb1 sdb2
[    3.952579] sd 1:0:0:0: [sdb] Attached SCSI disk
[    3.957466] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.968406] sd 2:0:0:0: [sdc] Write Protect is off
[    3.976880] sd 2:0:0:0: [sdc] Mode Sense: 43 00 00 00
[    3.986254] sd 2:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    4.000617]  sdc: sdc1 sdc2 sdc3
[    4.014143] sd 2:0:0:0: [sdc] Attached SCSI disk
[    4.226815] md: bind<sdb1>
[    4.247106] md: bind<sda1>
[    4.261188] md: raid1 personality registered for level 1
[    4.267983] md/raid1:md0: active with 2 out of 2 mirrors
[    4.273571] md0: detected capacity change from 0 to 2998308962304
[    4.310836]  md0: unknown partition table
[    4.411917] device-mapper: uevent: version 1.0.3
[    4.418063] device-mapper: ioctl: 4.28.0-ioctl (2014-09-17) initialised: dm-devel@redhat.com
[    4.606351] EXT4-fs (sdc1): mounted filesystem without journal. Opts: (null)
[    4.922336] NET: Registered protocol family 38
[    5.556219] random: nonblocking pool is initialized
[    6.413979] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
[    8.059710] systemd-udevd[389]: starting version 215
[    8.389809] input: gpio_keys as /devices/gpio_keys/input/input0
[   21.243272] EXT4-fs (dm-1): re-mounted. Opts: (null)
[   21.781310] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro
[   25.583151] Adding 2096120k swap on /dev/mapper/cr_swp.  Priority:-1 extents:1 across:2096120k FS
[   26.504158] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)
[   26.701762] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: acl,user_xattr
[   26.736289] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: acl,user_xattr
[   28.738680] NET: Registered protocol family 10
[   28.743943] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   31.602656] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   31.612565] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   93.394399] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[   93.400372] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[  392.839109] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[  392.845119] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[  703.125392] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[  703.131366] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 1013.529310] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 1013.535572] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 1013.545482] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 1313.697585] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 1313.703847] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 1313.713763] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 1624.001710] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 1624.007713] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 1934.379342] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 1934.385604] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 1934.395515] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 2234.659288] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 2234.665464] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 2234.675374] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 2544.956452] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 2544.962654] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 2544.972539] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[ 2855.238862] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down
[ 2855.244872] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
...
...

Hope this helps.

Thanks and best Regards,
Joe
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 12, 2015 04:31PM
@Joe,

It looks normal. And you've already swapped the cable and switch port. So I think could it be other software you have running in your system? Are there daemons running that could have been monitoring the network status, i.e. errounously brought the link down? 5 minutes interval is very suspected.

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



Edited 1 time(s). Last edit at 03/12/2015 04:32PM by bodhi.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 13, 2015 03:27AM
Dear Bodhi,

Here I attach the boot log (via serial port) for both wireless card. May be you can suggest something to enable Atheros support.. (Ralink works as expected).
Attachments:
open | download - Atheros.txt (17.1 KB)
open | download - RALINK.txt (17.8 KB)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 13, 2015 04:25PM
@tanya,

I don't see the card being detected at all in serial boot log either. It seems to point to a HW problem, i.e. it's incompatible. However, I will have to verify that. When I have sometime, I'll plug in my Atheros card and see what happen. Usually even if the kernel does not have driver for it (this kernel does), the device is stil detected by the kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 14, 2015 07:37AM
davidedg Wrote:
-------------------------------------------------------
> @safarik:
>
> You can find some of the info here:
>
> ht
> tps://github.com/davidedg/NAS-NSA325-mod


@davidedg

I tried to cross compile linux kernel for NSA-325v2 on my notebook accroding to instructions in the repo. But it fails with following error:
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
kernel/Makefile:133: *** No X.509 certificates found ***
  CC [M]  fs/coda/psdev.o
In file included from include/linux/coda.h:64:0,
                 from fs/coda/psdev.c:45:
include/uapi/linux/coda.h:221:2: error: unknown type name 'u_quad_t'
include/uapi/linux/coda.h:229:2: error: unknown type name 'u_quad_t'
include/uapi/linux/coda.h:230:2: error: unknown type name 'u_quad_t'
scripts/Makefile.build:257: recipe for target 'fs/coda/psdev.o' failed
make[2]: *** [fs/coda/psdev.o] Error 1
scripts/Makefile.build:402: recipe for target 'fs/coda' failed
make[1]: *** [fs/coda] Error 2
Makefile:937: recipe for target 'fs' failed
make: *** [fs] Error 2

I tried to use config-3.18.5-kirkwood-tld-1 as .config from bodhis package. I even tried to compile without applying linux-3.18.5-kirkwood-tld-1.patch. I am running
root@ts-n:/home/safarik/zyxel/vanilla/linux-3.18.5# export PATH=/root/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin:$PATH
root@ts-n:/home/safarik/zyxel/vanilla/linux-3.18.5# make ARCH=arm CROSS_COMPILE=arm-none-eabi- uImage LOADADDR=0x00008000 modules kirkwood-nsa325.dtb

Any one could help me find what I am doing wrong?

Any have idea if I could use gcc-arm-none-eabi package for cross compiling from debian testing I use instead of Sourcery_CodeBench_Lite_for_ARM_EABI?

I am doing this to compile RAID1 support into the kernel not as a module to be able to load system from linux RAID device. (And have some fun of course :) I found documentation that linux kernel should be able to do it using md= boot parameter according to https://www.kernel.org/doc/Documentation/md.txt. So if you think am going wrong direction please stop me.

Thanks

Tomas
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 14, 2015 09:51AM
safarik Wrote:
-------------------------------------------------------

> I tried to use config-3.18.5-kirkwood-tld-1 as .config from bodhis package.

I confirm to have same problem here.
My instructions (git repo) were tested just with my .config, which is a very minimal one.
Since problem is with CODA, I tried to fix it with (basically excluding that feature):
sed --in-place 's/CONFIG_CODA_FS=m/CONFIG_CODA_FS=n/g' .config

It now compiles correctly - I did not try to use it, though!

As for CodeSourcery, when I started with my first mod (reflash
my custom-compiled u-boot version on DLINK DNS325), I just felt
confident to use that compiler, because I read somewhere that it was rock solid.

But I guess it's perfectly fine to use another one.
Indeed, I also use crosstool-ng for other parts of the project.

> I am doing this to compile RAID1 support into the
> kernel not as a module to be able to load system
> from linux RAID device. (And have some fun of
> course :) I found documentation that linux kernel
> should be able to do it using md= boot parameter
> according to
> https://www.kernel.org/doc/Documentation/md.txt.

You know what, I've never succeeded in having recent kernels auto-mount MD devices.
I've also read somewhere that it's actually no longer supported and that the way to go is initramfs/initrd.
And that's basically what I've done in my other project for Lacie NS2MAX:

https://github.com/davidedg/NAS-NS2MAX-mod/blob/master/initramfs/mdadm-static-compile.txt

I don't know if Bodhi's initrd has MDADM support, but I think it could be easily extended.
@bodhi: if it is not supported, you may consider this script as a starting point to include it?
https://github.com/davidedg/NAS-NS2MAX-mod/blob/master/initramfs/stage/scripts/init-top/mdadm

Only little gotcha is that you want to have a /boot partition on a MD device with metadata = 0.90, so that U-boot can recognize it.
( https://github.com/davidedg/NAS-NS2MAX-mod/blob/master/install/install-on-hdd_mdadm.txt )

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
jfp
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 14, 2015 09:58AM
@bodhi,

I booted another NSA325v2 using flashdisk and HDD's from the setup shown above.
Despite of the fact that the ethernet interface name has been changed due to the different MAC address everything went fine.

Meanwhile it seems that the serial console at my first device passed away which indicates that I most probably run into that trouble due to a HW problem.

Thanks a lot!

Joe
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 14, 2015 12:58PM
@Davide,

> I don't know if Bodhi's initrd has MDADM support,
> but I think it could be easily extended.
> @bodhi: if it is not supported, you may consider
> this script as a starting point to include it?

I'll take a look and include it if it's not.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 14, 2015 02:16PM
t00 Wrote:
-------------------------------------------------------
> Hello.
> http://hajduk.one.pl/Netgear%20Stora%20MS2000%20MS
> 2110%20kernel%203.18/kernel-3.18-netgear_stora_ms2
> 000_ms2110.patch
> This patch adds support for FDT for Stora.
> Found it at:
> http://hajduk.one.pl/Netgear%20Stora%20MS2000%20MS
> 2110%20kernel%203.18/

Thanks t00.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 14, 2015 02:23PM
@Davide,

The kernel has MDADM supports, but as Toms mentioned, it's loaded as module.

@Tomas,

Have you tried to load it as earlier as possible (i.e. in /etc/initramfs-tools/modules)? would that work (are your uImage and uInitrd in a normal Ext partition)?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 12:40AM
@davidedg Wrote:
-------------------------------------------------------
> I confirm to have same problem here.

I wonder how bodhi is able to compile the kernel with this config?

>
> It now compiles correctly - I did not
> try to use it, though!


OK, I tried to disable it as well but it fails at the .dtb part:

make[1]: *** No rule to make target 'arch/arm/boot/dts/kirkwood-nsa325.dtb'.  Stop.
arch/arm/Makefile:312: recipe for target 'kirkwood-nsa325.dtb' failed
make: *** [kirkwood-nsa325.dtb] Error 2

> But I guess it's perfectly fine to use another
> one.

Thanks, I will try it when I succeed with the CodeSourcery as it is tested.

> You know what, I've never succeeded in having
> recent kernels auto-mount MD devices.
> I've also read somewhere that it's actually no
> longer supported and that the way to go is
> initramfs/initrd.

I hope that documentation on the kernel.org is not outdated. And honestly static compiling of mdadm and including it in initramfs sounds very complicated to me. So I would like to try the "kernel way".

@bodhi Wrote:
-------------------------------------------------------
> Have you tried to load it as earlier as possible (i.e. in /etc/initramfs-tools/modules)? would that work (are your uImage and uInitrd in a normal Ext partition)?

Yes I tried it. My uImage and uInitrd are on small /boot parition that is not RAID device. Also the documentation explicitly says it won't work:
Boot time autodetection of RAID arrays
--------------------------------------

When md is compiled into the kernel (not as module), partitions of
type 0xfd are scanned and automatically assembled into RAID arrays.
This autodetection may be suppressed with the kernel parameter
"raid=noautodetect".  As of kernel 2.6.9, only drives with a type 0
superblock can be autodetected and run at boot time.
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 02:14AM
@Tomas,

> Yes I tried it. My uImage and uInitrd are on small
> /boot parition that is not RAID device. Also the
> documentation explicitly says it won't work:

It is not clearly say that it won't work even if you loaded the module early enough in initrd.

In any case, I thought that's what davidedg meant to say above:

Quote

I don't know if Bodhi's initrd has MDADM support, but I think it could be easily extended.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 02:53AM
@bodhi

I understand but I was unable to do it. Of course I might be doing something wrong.

How it that you don not have problem with compiling CODA?
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 04:31AM
@Tomas,

I don't know, never had problem with compiling CODA. The errors you've listed did not ring any bell for me.
include/uapi/linux/coda.h:221:2: error: unknown type name 'u_quad_t'

According to Davide said above, MD works in his initrd. Perhaps you should look at your log to see how you set it up in initrramfs? Also since Davide got it working, may be we should see his dmesg to see when it is loaded.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 09:41AM
bodhi Wrote:
-------------------------------------------------------
> I don't know, never had problem with compiling CODA.

@Thomas, @Bodhi,
Never had a problem with CodeSourcery ( I use it for U-boot, which I consider the most critical part)
Still - it may very well be that CodeSourcery has problems with CODA source code, I'm no expert in this field.
If you don't need CODA, just disable it for now, we'll get to that problem later.

> According to Davide said above, MD works in his
> initrd. Perhaps you should look at your log to see
> how you set it up in initrramfs? Also since Davide
> got it working, may be we should see his dmesg to
> see when it is loaded.

My initramfs is custom built, loosely based on Debian's one but simplified.

At cost of being overly verbose, a little clarification to fully understand the boot process (before going into mdadm):

1. U-boot starts, reads its environment, runs bootcmd instructions
2. Kernel uImage, uInitrd/uInitramfs and DTB get loaded (only uImage is strictly mandatory for UBoot)
3. Kernel starts and initializes.

4a. If there is NO initramfs, kernel must have an env like "root=/dev/sda1" (pointing to an existing block device),
that is, a device which can be recognized by built-in drivers (ext3, ext4, etc).
These drivers must NOT be compiled as modules but as built-in.
The reason is pretty simple: since those modules' files are on the /lib/ dir on rootfs and rootfs is still not mounted, that would result in a chicken-egg problem.

4b. With a Initramfs/Initrd, the kernel mounts a temporary rootfs with the content of the initrd and then loads the init script inside it.
The purpose of initrd is then to:
- identify the rootfs (this gives flexibility to use LABELS for example).
- load required modules to access the rootfs.
- mount the rootfs into a tempdir of the temporary rootfs
- call the switch_root passing the "real" init script inside the "real" rootfs.

5. Init script of the real rootfs gets called and rest of boot process (sysv/systemd/upstart/etc.) takes place.


Now on MDADM:

If you want to use MD device only for DATA, of course no problem, as rootfs is already up and running.
This means that, for simplicity, you may want to use a small partition just for root (say, 5GB) and 1 for DATA in MD.

If, instead, you want to use MD for /boot or /root, then things complicate a little:

- U-boot cannot recognize MD, so, to be able to access /boot (uImage and uInitrd):
-> either you use a separate /boot partition not on MD - as Thomas is doing - but you won't benefit from mirroring,
-> or you use metadata=0.90 during mdadm create, which basically means that U-boot can still see the ext fs on top of md dev.

Next step, for rootfs partition: when kernel is loaded, before rootfs can be identified, its underlying MD device must be started.
As I said, I've never succeeded in using CONFIG_MD_AUTODETECT=Y so I just used mdadm in initramfs.

@Thomas: building static mdadm binary has indeed been a pain, and was actually needed only for my custom initramfs.
But the point is: if you stick to Bodhi's initrd, you quite certainly don't need to compile your own.

--> You just need to re-generate initrd with mdadm support. <--

To do this, you can install the mdadm package, which will install
the proper hooks into initramfs package and call update-initramfs for you.

The resulting (regenerated) initrd will have several new files supporting MD:
- scripts/local-top/mdadm
- the Kernel Module (md-mod.ko)
- configuration files


One potential problem you may face, though, is that your system is missing mdadm.conf
Looking at mdadm script, it seems to create one (with --examine --scan > /etc/mdadm/mdadm.conf)


If you followed me till now, you may be asking yourself HOW can you install mdadm package if your system cannot boot yet.
I personally use QEMU-user-mode and chroot into the rootfs structure (from my pc) and apt-get install mdadm from there.
Another option is to first install the NAS without MD, let it boot, then regenerate initrd by installing mdadm.
Then save that initrd and try reinstall with root on MD.


If you want to go ALL MD (everything protected), I strongly suggest to have separate /boot, / and data
/boot can be on MD, but, to be recognized by UBoot, MD device MUST be created with non-default settings (metadata 0.90)
Then have a rootfs "/" on it separate MD device.
Lastly I like having the DATA partition on its own MD, so that if I want to experiment with newer systems, data can be left untouched.


Sorry for so long post :D

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 12:23PM
@DavideDG,

Thanks for the helpful description!

> Still - it may very well be that CodeSourcery has
> problems with CODA source code, I'm no expert in
> this field.

It might be the case. I'm compiling natively with distcc.

> Another option is to first install the NAS without
> MD, let it boot, then regenerate initrd by
> installing mdadm.
> Then save that initrd and try reinstall with root
> on MD.
>

That's how I would approach in solving this.

-bodhi
===========================
Forum Wiki
bodhi's corner
jfp
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 03:34PM
@tomas,

hoping that I catched the task correctly I'll step in. I'm running LVM on LUKS on RAID based on bodhis prepwork provided bye his root filesystem mentioned above.

After booting from the flash disk you need to install the missing subsystems and their utilities (i.e. mdadm, lvm2 , maybe also cryptsetup).
Next you will prepare the disks ( eventually partitioning, create a mirror/raid, create the volume group/lvm's) so you finally will have mounted your target roofs. copy the rootfs currently used onto it and chroot into it.
Adjust /etc/fstab, /etc/mdadm/mdadm.conf, /etc/initramfs-tools/modules (and, if relevant, /etc/crypttab).
Run "update-initramfs.d -u" followed by a mkimage as described at start of the thread.
The resulting uInitrd should be put on the flash disk .

Before you are booting you need to ensure that uboot's "bootarg" commandline contains the "root="-parameter pointing to the new root file system.

Because - in my case - the flash disk also contains the file containing the key to unlock the LUKS encrypted partition it works as a kind of dongle.

hope this helps,

Regards Joe
Re: Linux Kernel 3.17 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 15, 2015 05:39PM
@Joe,

Thank you also. It's a very helpful description of the process.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 16, 2015 05:26AM
@jfp Thanks for you part. I plan to boot from disks and LVM seem unnecessary complication for two physical and no option to add more.

@davidedg Thanks for you verbose description it helped me to clear out how some of the things work. I hope I understand it correctly when I think that with correct kernel configuration I should be able to use /root system on RAID1 without initramfs (and mdadm) at all?

Most interesting part for me is that you say that metadata 0.90 RAID device should be readable for u-boot. So I cloud also have /boot on RAID. That would be better that copy kernel image manually to second disk.

Still I would like to try to build my own kernel. So I need solve issue with "make: *** [kirkwood-nsa325.dtb] Error 2".

Thanks to all.

Tomas
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 16, 2015 06:38AM
safarik Wrote:
-------------------------------------------------------

> I hope I understand it correctly when I
> think that with correct kernel configuration I
> should be able to use /root system on RAID1
> without initramfs (and mdadm) at all?

As I said, I did not suceed in it without mdadm/initrd, but I'm using mdev and not udev, so maybe it's just a problem of my setup. If I find time I try to replicate on a debian vm.
But, initrd functionality is good anyway to have: eg: ability to use "LABEL=" in kernel boot envs. AFAIK you can't use "init=LABEL=myrootfslabel" if you don't use initrd.

> Most interesting part for me is that you say that
> metadata 0.90 RAID device should be readable for
> u-boot.
I can definitely confirm it. If you need instructions on this:
https://github.com/davidedg/NAS-NS2MAX-mod/blob/master/install/install-on-hdd_mdadm.txt#L62
(keep in mind that example uses GPT, but it works fine for MBR, too).



> Still I would like to try to build my own kernel.
> So I need solve issue with "make: ***
> [kirkwood-nsa325.dtb] Error 2".

What version of CodeSourcery are you using ?
I'm using 2013.05-23 (cfr: https://github.com/davidedg/NAS-NSA325-mod/blob/master/cross-compile/codesourcery-lite.txt )

Maybe it's obvious, but keep in mind that you must apply Bodhi's patches to vanilla kernel source code (because NSA325 is not mainlined yet).

HTH.

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 16, 2015 02:22PM
@Tomas,

> Still I would like to try to build my own kernel.
> So I need solve issue with "make: ***
> [kirkwood-nsa325.dtb] Error 2".

You have not applied the patch correctly if you see this error.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 19, 2015 04:41AM
@bodhi

you are right thank you. After applying the patch correctly it builds just fine.

Tomas
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 19, 2015 05:59AM
So I can compile the kernel without problems now, but I got stuck when booting it. Does anyone have idea what do I have wrong?

U-Boot 2013.10-tld-1 (Aug 29 2014 - 22:07:26)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_??
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
NSA325> printenv
baudrate=115200
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
ethact=egiga0
ethaddr=00:50:43:00:02:02
machid=ffffffff
mainlineLinux=yes
stderr=serial
stdin=serial
stdout=serial

Environment size: 314/131068 bytes
NSA325> mw.l f1010100 0020c000
NSA325> usb reset
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
NSA325> ext2load usb 0:1 1200000 /boot/uImage.raid1
3049984 bytes read in 584 ms (5 MiB/s)
NSA325> setenv bootargs 'console=ttyS0,115200 earlyprintk root=/dev/md0 rw rootwait loglevel=8 print_fatal_signals=1 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)'
NSA325> bootm 0x1200000
## Booting kernel from Legacy Image at 01200000 ...
   Image Name:   Linux-3.18.5-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3049920 Bytes = 2.9 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0xffffffff from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    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.18.5-kirkwood-tld-1 (root@ts-n) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-23) ) #2 PREEMPT Thu Mar 19 11:43:29 CET 2015
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Generic DT based system
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c0845700, node_mem_map dfbfa000
[    0.000000]   DMA zone: 1024 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 131072 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/md0 rw rootwait loglevel=8 print_fatal_signals=1 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)
[    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: 510944K/524288K available (5792K kernel code, 368K rwdata, 2024K rodata, 276K init, 310K bss, 13344K 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 - 0xc07aa2ec   (7817 kB)
[    0.000000]       .init : 0xc07ab000 - 0xc07f0000   ( 276 kB)
[    0.000000]       .data : 0xc07f0000 - 0xc084c0bc   ( 369 kB)
[    0.000000]        .bss : 0xc084c0bc - 0xc089998c   ( 311 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource_of_init: no matching clocksources found
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836480000000ns
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Calibrating delay loop... 
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 19, 2015 06:01AM
@bodhi,

what does "tld" stands for? I cannot figure it out. :)

Thanks,

Tomas
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 19, 2015 11:10AM
safarik Wrote:
-------------------------------------------------------
> [    0.000000] Console: colour dummy device 80x30
> [    0.000000] Calibrating delay loop...

It should proceed with:
[    0.000207] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[    0.040068] pid_max: default: 32768 minimum: 301

I'd say post your .config, maybe it's something to do with CPU/Power management.

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
March 19, 2015 11:12AM
safarik Wrote:
-------------------------------------------------------

[    0.000000] Linux version 3.18.5-kirkwood-tld-1 (root@ts-n) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-23) ) #2 PREEMPT Thu Mar 19 11:43:29

Did you need to disable CODAFS to compile with CodeBench, btw ?

--
DavideDG
My NAS userspace configs
My Zyxel NSA325 mod
My D-Link DNS325 mod
My Lacie NS2MAX mod
Sorry, you can't reply to this topic. It has been closed.