Welcome! Log In Create A New Profile

Advanced

NSA325 - How to boot with systemd

Posted by lille 
Re: NSA325 - How to boot with ststemd
January 17, 2018 04:04AM
For some reason, the uEnv.txt loading did not occur at all.

Log into Debian.

List the partitions

fdisk -l

And set the ide as the first type of device, and remove mmc from the list of device types.

fw_setenv devices 'ide usb'

And reboot, interrupt serial console,

printenv
boot

Please the entire log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 17, 2018 05:57AM
still no systemd boot, PID 1 still on init



U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
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
arcNumber=4495
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then boo                                                                                                                                                             tm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_a                                                                                                                                                             ddr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr -                                                                                                                                                              $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi                                                                                                                                                             ; sleep 3
bootdelay=10
bootdev=usb
device=0:1
devices=ide usb
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
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 $d                                                                                                                                                             tb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /b                                                                                                                                                             oot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /bo                                                                                                                                                             ot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_stor                                                                                                                                                             e),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(ke                                                                                                                                                             rnel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";                                                                                                                                                               setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices                                                                                                                                                             ; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for di                                                                                                                                                             sknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1;                                                                                                                                                              if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo                                                                                                                                                              Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev                                                                                                                                                              $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10                                                                                                                                                              $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; se                                                                                                                                                             tenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  se                                                                                                                                                             tenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;                                                                                                                                                               do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknu                                                                                                                                                             m:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_re                                                                                                                                                             ad;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2964/131068 bytes
NSA325> boot

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ATP Velocity SII SSD Firm: 1002_0.4 Ser#: 9902610112900023
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)
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

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            31275184        cc74c377-01     83
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ATP Velocity SII SSD Firm: 1002_0.4 Ser#: 9902610112900023
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)
device ide 0:1
1 bytes read in 6 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
3821592 bytes read in 576 ms (6.3 MiB/s)
loading uInitrd ...
7245696 bytes read in 1084 ms (6.4 MiB/s)
loading DTB /boot/dts/kirkwood-nsa325.dtb ...
14548 bytes read in 17 ms (835 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 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 1f424000, end 1fb0cf40 ... OK
   Loading Device Tree to 1f41d000, end 1f4238d3 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 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 NSA325
[    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=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)
[    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: 499256K/524288K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 25032K 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 : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 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 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000006] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000035] Switching to timer-based delay loop, resolution 5ns
[    0.000418] Console: colour dummy device 80x30
[    0.000446] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000465] pid_max: default: 32768 minimum: 301
[    0.000629] Security Framework initialized
[    0.000726] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000741] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001456] CPU: Testing write buffer coherency: ok
[    0.002325] Setting up static identity map for 0x100000 - 0x100058
[    0.002560] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.005223] devtmpfs: initialized
[    0.009378] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009401] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.009719] prandom: seed boundary self test passed
[    0.012577] prandom: 100 self tests passed
[    0.012592] pinctrl core: initialized pinctrl subsystem
[    0.013568] NET: Registered protocol family 16
[    0.013915] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.015284] cpuidle: using governor ladder
[    0.015345] cpuidle: using governor menu
[    0.015705] Feroceon L2: Enabling L2
[    0.015743] Feroceon L2: Cache support initialised.
[    0.016042] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.020259] No ATAGs?
[    0.027493] vgaarb: loaded
[    0.027746] SCSI subsystem initialized
[    0.028133] usbcore: registered new interface driver usbfs
[    0.028183] usbcore: registered new interface driver hub
[    0.028224] usbcore: registered new device driver usb
[    0.028997] clocksource: Switched to clocksource orion_clocksource
[    0.098057] VFS: Disk quotas dquot_6.6.0
[    0.098130] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.106310] NET: Registered protocol family 2
[    0.106915] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.106972] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.107024] TCP: Hash tables configured (established 4096 bind 4096)
[    0.107091] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.107113] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.107260] NET: Registered protocol family 1
[    0.107609] RPC: Registered named UNIX socket transport module.
[    0.107618] RPC: Registered udp transport module.
[    0.107624] RPC: Registered tcp transport module.
[    0.107629] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.107821] Unpacking initramfs...
[    0.608483] Freeing initrd memory: 7076K
[    0.608600] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.609397] audit: initializing netlink subsys (disabled)
[    0.609761] Initialise system trusted keyrings
[    0.609804] Key type blacklist registered
[    0.609878] audit: type=2000 audit(0.600:1): state=initialized audit_enabled=0 res=1
[    0.609959] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.610015] zbud: loaded
[    0.610777] NFS: Registering the id_resolver key type
[    0.610798] Key type id_resolver registered
[    0.610805] Key type id_legacy registered
[    0.610823] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.610832] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.610994] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.611145] fuse init (API version 7.26)
[    0.611418] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.611584] orangefs_init: module version upstream loaded
[    0.611592] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.559001] random: fast init done
[    4.970010] Key type asymmetric registered
[    4.970024] Asymmetric key parser 'x509' registered
[    4.970080] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.970088] io scheduler noop registered
[    4.970095] io scheduler deadline registered
[    4.970166] io scheduler cfq registered (default)
[    4.971166] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.972650] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    4.972667] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    4.972677] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    4.972688] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.972945] PCI: bus0: Fast back to back transfers disabled
[    4.972964] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.999095] PCI: bus1: Fast back to back transfers disabled
[    4.999264] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    4.999280] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    4.999301] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.999314] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    4.999390] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    4.999469] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    4.999895] mv_xor f1060800.xor: Marvell shared XOR driver
[    5.059562] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    5.059754] mv_xor f1060900.xor: Marvell shared XOR driver
[    5.119564] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    5.119949] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.121039] console [ttyS0] disabled
[    5.121097] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    5.814527] console [ttyS0] enabled
[    5.824523] loop: module loaded
[    5.828163] sata_mv f1080000.sata: slots 32 ports 2
[    5.835249] scsi host0: sata_mv
[    5.838768] scsi host1: sata_mv
[    5.842162] ata1: SATA max UDMA/133 irq 32
[    5.846274] ata2: SATA max UDMA/133 irq 32
[    5.851049] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    5.857500] nand: Eon NAND 128MiB 3,3V 8-bit
[    5.861817] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.869437] Scanning device for bad blocks
[    5.878372] Bad eraseblock 100 at 0x000000c80000
[    5.886939] Bad eraseblock 182 at 0x0000016c0000
[    5.892448] Bad eraseblock 200 at 0x000001900000
[    5.936406] 9 cmdlinepart partitions found on MTD device orion_nand
[    5.942714] Creating 9 MTD partitions on "orion_nand":
[    5.947877] 0x000000000000-0x000000100000 : "uboot"
[    5.953837] 0x000000100000-0x000000180000 : "uboot_env"
[    5.960145] 0x000000180000-0x000000200000 : "key_store"
[    5.966333] 0x000000200000-0x000000280000 : "info"
[    5.972026] 0x000000280000-0x000000c80000 : "etc"
[    5.977665] 0x000000c80000-0x000001680000 : "kernel_1"
[    5.983818] 0x000001680000-0x000004640000 : "rootfs1"
[    5.990096] 0x000004640000-0x000005040000 : "kernel_2"
[    5.996268] 0x000005040000-0x000008000000 : "rootfs2"
[    6.003501] libphy: Fixed MDIO Bus: probed
[    6.008213] libphy: orion_mdio_bus: probed
[    6.016342] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    6.119454] mv643xx_eth: Set the PHY to fix link down
[    6.120051] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    6.134017] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.140626] ehci-pci: EHCI PCI platform driver
[    6.145135] ehci-orion: EHCI orion driver
[    6.149365] orion-ehci f1050000.ehci: EHCI Host Controller
[    6.154922] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    6.162771] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    6.189016] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    6.195233] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    6.202073] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.209337] usb usb1: Product: EHCI Host Controller
[    6.214231] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    6.220978] usb usb1: SerialNumber: f1050000.ehci
[    6.226209] hub 1-0:1.0: USB hub found
[    6.230053] hub 1-0:1.0: 1 port detected
[    6.234464] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    6.239781] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    6.247522] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x00000004
[    6.256146] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    6.262991] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.270255] usb usb2: Product: xHCI Host Controller
[    6.275149] usb usb2: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    6.281895] usb usb2: SerialNumber: 0000:01:00.0
[    6.287028] hub 2-0:1.0: USB hub found
[    6.290865] hub 2-0:1.0: 2 ports detected
[    6.295292] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    6.300595] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    6.308103] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.316375] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    6.323209] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.330476] usb usb3: Product: xHCI Host Controller
[    6.335370] usb usb3: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    6.342191] usb usb3: SerialNumber: 0000:01:00.0
[    6.347331] hub 3-0:1.0: USB hub found
[    6.351155] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    6.357800] ata1.00: ATA-8: ATP Velocity SII SSD, 1002_0.4, max UDMA/133
[    6.357805] ata1.00: 31277232 sectors, multi 1: LBA48 NCQ (depth 31/32)
[    6.371699] ata1.00: configured for UDMA/133
[    6.376443] scsi 0:0:0:0: Direct-Access     ATA      ATP Velocity SII _0.4 PQ: 0 ANSI: 5
[    6.384620] hub 3-0:1.0: 2 ports detected
[    6.389659] sd 0:0:0:0: [sda] 31277232 512-byte logical blocks: (16.0 GB/14.9 GiB)
[    6.398297] usbcore: registered new interface driver usb-storage
[    6.404533] sd 0:0:0:0: [sda] Write Protect is off
[    6.404652] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.410707]  sda: sda1
[    6.412039] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.428467] mousedev: PS/2 mouse device common for all mice
[    6.434373] i2c /dev entries driver
[    6.444310] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    6.453775] hidraw: raw HID events driver (C) Jiri Kosina
[    6.459538] drop_monitor: Initializing network drop monitor service
[    6.466014] NET: Registered protocol family 17
[    6.470572] Key type dns_resolver registered
[    6.475441] registered taskstats version 1
[    6.479580] Loading compiled-in X.509 certificates
[    6.484440] zswap: loaded using pool lzo/zbud
[    6.496651] Key type big_key registered
[    6.508318] Key type encrypted registered
[    6.514780] rtc-pcf8563 0-0051: setting system clock to 2018-01-17 11:55:17 UTC (1516190117)
[    6.589024] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    6.730451] ata2: SATA link down (SStatus 0 SControl F300)
[    6.748990] Freeing unused kernel memory: 1024K
Loading, please wait...
[    6.781172] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    6.787933] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    6.804144] usb 1-1: Product: USB2.0 Hub
[    6.816585] hub 1-1:1.0: USB hub found
[    6.824531] hub 1-1:1.0: 4 ports detected
starting version 232
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.
Warning: fsck not present, so skipping root file system
[   17.606941] 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 'nws'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok
[   18.896797] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ ok                                             done.
[....] Waiting for /dev to be fully populated...[   19.123552] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[   19.338326] marvell-cesa f1030000.crypto: CESA device successfully registered
[   19.354917] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   19.402066] orion_wdt: Initial timeout 21 sec
done.
[ ok ] Activating swap:.
[   20.649903] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -y -C0 /dev/sda1
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 20086/979200 files, 275340/3909398 blocks
. ok
[   20.832518] 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
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location 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.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[   22.991059] mv643xx_eth: Set the PHY back to auto-negotiation mode
[   26.147661] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   30.669071] random: crng init done
[   30.694272] NET: Registered protocol family 10
[   30.700653] Segment Routing with IPv6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPREQUEST of 10.2.0.51 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 10.2.0.51 from 10.2.0.173
DHCPACK of 10.2.0.51 from 10.2.0.173
bound to 10.2.0.51 -- renewal in 38472 seconds.
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...
1346 (syslogd)
. ok
[ ok ] Starting system message bus: dbus.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1344 (klogd)
. ok
Making sure that Logitech Media Server is not running first: No process in pidfile '/var/run/logitechmediaserver.pid' found running; none killed.
Starting Logitech Media Server.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 nws ttyS0

nws login: root
Password:
Last login: Wed Jan 17 03:52:14 PST 2018 on ttyS0
Linux nws 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@nws:~# head /boot/uEnv.txt
custom_params=init=/bin/systemd
root@nws:~# ps --no-headers -o comm 1
init
root@nws:~#

should I try to set

bootdev=usb

to

bootdev=ide to have the uEnv.txt loaded while booting?



Edited 1 time(s). Last edit at 01/17/2018 06:04AM by lille.
Re: NSA325 - How to boot with ststemd
January 17, 2018 06:43AM
List the partitions

fdisk -l

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 17, 2018 06:48AM
sorry

root@nws:~# fdisk -l
Disk /dev/mtdblock0: 1 MiB, 1048576 bytes, 2048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum[ 3159.909477] __nand_correct_data: uncorrectable ECC error
/optimal): 512 b[ 3159.916131] __nand_correct_data: uncorrectable ECC error
ytes / 512 bytes[ 3159.923226] blk_update_request: I/O error, dev mtdblock5, sector 0



Disk /[ 3159.930892] __nand_correct_data: uncorrectable ECC error
dev/mtdblock1: 5[ 3159.937254] __nand_correct_data: uncorrectable ECC error
12 KiB, 524288 b[ 3159.944208] blk_update_request: I/O error, dev mtdblock5, sector 0
[ 3159.951592] Buffer I/O error on dev mtdblock5, logical block 0, async page read
ytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock2: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock3: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock4: 10 MiB, 10485760 bytes, 20480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes




Disk /dev/mtdblock6: 47.8 MiB, 50069504 bytes, 97792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock7: 10 MiB, 10485760 bytes, 20480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock8: 47.8 MiB, 50069504 bytes, 97792 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 14.9 GiB, 16013942784 bytes, 31277232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcc74c377

Device     Boot Start      End  Sectors  Size Id Type
/dev/sda1        2048 31277231 31275184 14.9G 83 Linux
root@nws:~#

Re: NSA325 - How to boot with ststemd
January 17, 2018 06:48AM
Also, your listing was cut off, please relist:

uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  se                                                                                                                                                             tenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;                                                                                                                                                               do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknu                                                                                                                                                             m:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_re                                                                                                                                                             ad;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 17, 2018 06:53AM
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2964/131068 bytes

Re: NSA325 - How to boot with ststemd
January 17, 2018 06:55AM
lille,

Power up, interrupt serial console and

run bootcmd_uenv

See if the loading occurs at all.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 17, 2018 07:19AM
with run bootcmd_uenv it doesn´t boot up

NSA325> run bootcmd_uenv

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ATP Velocity SII SSD Firm: 1002_0.4 Ser#: 9902610112900023
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            31275184        cc74c377-01     83
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **
NSA325>


Re: NSA325 - How to boot with ststemd
January 17, 2018 08:01AM
That is strange certainly.

Let’s eliminate that error for now. And revisit it later.

In Debian,

fw_setenv devices ide

And reboot. See if the uEnv.txt file is now loaded.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 17, 2018 08:26AM
still no systemd

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
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
arcNumber=4495
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
device=0:1
devices=ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
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
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=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)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2960/131068 bytes
NSA325>




U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server

SoC:   Kirkwood 88F6282_A1
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

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ATP Velocity SII SSD Firm: 1002_0.4 Ser#: 9902610112900023
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            31275184        cc74c377-01     83
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ATP Velocity SII SSD Firm: 1002_0.4 Ser#: 9902610112900023
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)
device ide 0:1
1 bytes read in 6 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
3821592 bytes read in 576 ms (6.3 MiB/s)
loading uInitrd ...
7245696 bytes read in 1085 ms (6.4 MiB/s)
loading DTB /boot/dts/kirkwood-nsa325.dtb ...
14548 bytes read in 17 ms (835 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 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 1f424000, end 1fb0cf40 ... OK
   Loading Device Tree to 1f41d000, end 1f4238d3 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version                                                                                                                                                              4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397                                                                                                                                                             f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: ZyXEL NSA325
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pag                                                                                                                                                             es: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootd                                                                                                                                                             elay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store                                                                                                                                                             ),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(ker                                                                                                                                                             nel_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: 499256K/524288K available (8192K kernel code, 716K rwdata                                                                                                                                                             , 1972K rodata, 1024K init, 288K bss, 25032K 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 : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 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 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xff                                                                                                                                                             ffffff, max_idle_ns: 9556302233 ns
[    0.000006] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737                                                                                                                                                             418237ns
[    0.000035] Switching to timer-based delay loop, resolution 5ns
[    0.000418] Console: colour dummy device 80x30
[    0.000446] Calibrating delay loop (skipped), value calculated using timer fr                                                                                                                                                             equency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000465] pid_max: default: 32768 minimum: 301
[    0.000625] Security Framework initialized
[    0.000725] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000741] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001451] CPU: Testing write buffer coherency: ok
[    0.002322] Setting up static identity map for 0x100000 - 0x100058
[    0.002557] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.005224] devtmpfs: initialized
[    0.009385] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma                                                                                                                                                             x_idle_ns: 19112604462750000 ns
[    0.009407] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.009728] prandom: seed boundary self test passed
[    0.012586] prandom: 100 self tests passed
[    0.012601] pinctrl core: initialized pinctrl subsystem
[    0.013573] NET: Registered protocol family 16
[    0.013920] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.015287] cpuidle: using governor ladder
[    0.015350] cpuidle: using governor menu
[    0.015711] Feroceon L2: Enabling L2
[    0.015749] Feroceon L2: Cache support initialised.
[    0.016048] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet                                                                                                                                                             0-port@0: local-mac-address is not set
[    0.020274] No ATAGs?
[    0.027495] vgaarb: loaded
[    0.027749] SCSI subsystem initialized
[    0.028134] usbcore: registered new interface driver usbfs
[    0.028183] usbcore: registered new interface driver hub
[    0.028224] usbcore: registered new device driver usb
[    0.029001] clocksource: Switched to clocksource orion_clocksource
[    0.098068] VFS: Disk quotas dquot_6.6.0
[    0.098141] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.106323] NET: Registered protocol family 2
[    0.106932] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.106988] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.107040] TCP: Hash tables configured (established 4096 bind 4096)
[    0.107107] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.107129] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.107277] NET: Registered protocol family 1
[    0.107627] RPC: Registered named UNIX socket transport module.
[    0.107637] RPC: Registered udp transport module.
[    0.107642] RPC: Registered tcp transport module.
[    0.107648] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.107840] Unpacking initramfs...
[    0.608562] Freeing initrd memory: 7076K
[    0.608677] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.609466] audit: initializing netlink subsys (disabled)
[    0.609828] Initialise system trusted keyrings
[    0.609871] Key type blacklist registered
[    0.609946] audit: type=2000 audit(0.600:1): state=initialized audit_enabled=                                                                                                                                                             0 res=1
[    0.610026] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.610080] zbud: loaded
[    0.610842] NFS: Registering the id_resolver key type
[    0.610867] Key type id_resolver registered
[    0.610873] Key type id_legacy registered
[    0.610892] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.610900] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.611063] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.611215] fuse init (API version 7.26)
[    0.611488] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.611654] orangefs_init: module version upstream loaded
[    0.611663] SGI XFS with ACLs, security attributes, realtime, no debug enable                                                                                                                                                             d
[    2.559006] random: fast init done
[    4.970067] Key type asymmetric registered
[    4.970081] Asymmetric key parser 'x509' registered
[    4.970137] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2                                                                                                                                                             49)
[    4.970145] io scheduler noop registered
[    4.970152] io scheduler deadline registered
[    4.970222] io scheduler cfq registered (default)
[    4.971218] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driv                                                                                                                                                             er
[    4.972696] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridg                                                                                                                                                             e to bus 0000:00
[    4.972715] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    4.972725] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    4.972736] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.972992] PCI: bus0: Fast back to back transfers disabled
[    4.973011] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), rec                                                                                                                                                             onfiguring
[    4.999099] PCI: bus1: Fast back to back transfers disabled
[    4.999269] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    4.999284] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bi                                                                                                                                                             t]
[    4.999305] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.999318] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    4.999392] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    4.999471] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    4.999896] mv_xor f1060800.xor: Marvell shared XOR driver
[    5.059569] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg i                                                                                                                                                             ntr )
[    5.059759] mv_xor f1060900.xor: Marvell shared XOR driver
[    5.119567] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg i                                                                                                                                                             ntr )
[    5.119949] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.121040] console [ttyS0] disabled
[    5.121098] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud =                                                                                                                                                              12500000) is a 16550A
[    5.814526] console [ttyS0] enabled
[    5.824523] loop: module loaded
[    5.828166] sata_mv f1080000.sata: slots 32 ports 2
[    5.835244] scsi host0: sata_mv
[    5.838756] scsi host1: sata_mv
[    5.842152] ata1: SATA max UDMA/133 irq 32
[    5.846264] ata2: SATA max UDMA/133 irq 32
[    5.851030] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    5.857481] nand: Eon NAND 128MiB 3,3V 8-bit
[    5.861799] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB siz                                                                                                                                                             e: 64
[    5.869420] Scanning device for bad blocks
[    5.878356] Bad eraseblock 100 at 0x000000c80000
[    5.886922] Bad eraseblock 182 at 0x0000016c0000
[    5.892429] Bad eraseblock 200 at 0x000001900000
[    5.936385] 9 cmdlinepart partitions found on MTD device orion_nand
[    5.942696] Creating 9 MTD partitions on "orion_nand":
[    5.947860] 0x000000000000-0x000000100000 : "uboot"
[    5.953828] 0x000000100000-0x000000180000 : "uboot_env"
[    5.960140] 0x000000180000-0x000000200000 : "key_store"
[    5.966320] 0x000000200000-0x000000280000 : "info"
[    5.972018] 0x000000280000-0x000000c80000 : "etc"
[    5.977649] 0x000000c80000-0x000001680000 : "kernel_1"
[    5.983796] 0x000001680000-0x000004640000 : "rootfs1"
[    5.990077] 0x000004640000-0x000005040000 : "kernel_2"
[    5.996252] 0x000005040000-0x000008000000 : "rootfs2"
[    6.003483] libphy: Fixed MDIO Bus: probed
[    6.008197] libphy: orion_mdio_bus: probed
[    6.016375] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    6.119451] mv643xx_eth: Set the PHY to fix link down
[    6.120046] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address                                                                                                                                                              52:3b:20:9c:11:51
[    6.134007] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.140615] ehci-pci: EHCI PCI platform driver
[    6.145126] ehci-orion: EHCI orion driver
[    6.149354] orion-ehci f1050000.ehci: EHCI Host Controller
[    6.154913] orion-ehci f1050000.ehci: new USB bus registered, assigned bus nu                                                                                                                                                             mber 1
[    6.162759] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    6.189021] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    6.195234] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    6.202072] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=                                                                                                                                                             1
[    6.209337] usb usb1: Product: EHCI Host Controller
[    6.214231] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    6.220977] usb usb1: SerialNumber: f1050000.ehci
[    6.226210] hub 1-0:1.0: USB hub found
[    6.230054] hub 1-0:1.0: 1 port detected
[    6.234476] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    6.239795] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus numbe                                                                                                                                                             r 2
[    6.247529] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 qui                                                                                                                                                             rks 0x00000004
[    6.256146] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    6.262991] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=                                                                                                                                                             1
[    6.270254] usb usb2: Product: xHCI Host Controller
[    6.275149] usb usb2: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    6.281895] usb usb2: SerialNumber: 0000:01:00.0
[    6.287032] hub 2-0:1.0: USB hub found
[    6.290873] hub 2-0:1.0: 2 ports detected
[    6.295300] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    6.300604] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus numbe                                                                                                                                                             r 3
[    6.308108] usb usb3: We don't know the algorithms for LPM for this host, dis                                                                                                                                                             abling LPM.
[    6.316382] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    6.323217] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=                                                                                                                                                             1
[    6.330484] usb usb3: Product: xHCI Host Controller
[    6.335378] usb usb3: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    6.342199] usb usb3: SerialNumber: 0000:01:00.0
[    6.347338] hub 3-0:1.0: USB hub found
[    6.351154] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    6.357799] ata1.00: ATA-8: ATP Velocity SII SSD, 1002_0.4, max UDMA/133
[    6.357805] ata1.00: 31277232 sectors, multi 1: LBA48 NCQ (depth 31/32)
[    6.371698] ata1.00: configured for UDMA/133
[    6.376443] scsi 0:0:0:0: Direct-Access     ATA      ATP Velocity SII _0.4 PQ                                                                                                                                                             : 0 ANSI: 5
[    6.384617] hub 3-0:1.0: 2 ports detected
[    6.389654] sd 0:0:0:0: [sda] 31277232 512-byte logical blocks: (16.0 GB/14.9                                                                                                                                                              GiB)
[    6.398290] usbcore: registered new interface driver usb-storage
[    6.404525] sd 0:0:0:0: [sda] Write Protect is off
[    6.404645] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does                                                                                                                                                             n't support DPO or FUA
[    6.410699]  sda: sda1
[    6.412037] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.428466] mousedev: PS/2 mouse device common for all mice
[    6.434373] i2c /dev entries driver
[    6.444295] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    6.453767] hidraw: raw HID events driver (C) Jiri Kosina
[    6.459528] drop_monitor: Initializing network drop monitor service
[    6.466003] NET: Registered protocol family 17
[    6.470561] Key type dns_resolver registered
[    6.475416] registered taskstats version 1
[    6.479555] Loading compiled-in X.509 certificates
[    6.484412] zswap: loaded using pool lzo/zbud
[    6.496681] Key type big_key registered
[    6.508359] Key type encrypted registered
[    6.514825] rtc-pcf8563 0-0051: setting system clock to 2018-01-17 14:22:33 U                                                                                                                                                             TC (1516198953)
[    6.589028] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    6.730453] ata2: SATA link down (SStatus 0 SControl F300)
[    6.749035] Freeing unused kernel memory: 1024K
Loading, please wait...
[    6.780962] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    6.787725] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    6.804250] usb 1-1: Product: USB2.0 Hub
[    6.816711] hub 1-1:1.0: USB hub found
[    6.823414] hub 1-1:1.0: 4 ports detected
starting version 232
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.
Warning: fsck not present, so skipping root file system
[   17.576769] 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 'nws'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok
[ ok ] Synthesizing the initial hotplug events...[   18.883342] input: gpio_keys                                                                                                                                                              as /devices/platform/gpio_keys/input/input0
done.
[....] Waiting for /dev to be fully populated...[   19.110409] (NULL device *):                                                                                                                                                              hwmon_device_register() is deprecated. Please convert the driver to use hwmon_de                                                                                                                                                             vice_register_with_info().
[   19.279070] marvell-cesa f1030000.crypto: CESA device successfully registered
[   19.296075] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   19.317944] orion_wdt: Initial timeout 21 sec
done.
[ ok ] Activating swap:.
[   20.230551] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -y -C0 /dev/sda1
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 20087/979200 files, 275367/3909398 blocks
. ok
[   20.413319] 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                                                                                                                                                             [ ok hat location 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.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client                                                                                                                                                              4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[   22.581096] mv643xx_eth: Set the PHY back to auto-negotiation mode
[   26.894459] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, ful                                                                                                                                                             l duplex, flow control disabled
[   30.621044] NET: Registered protocol family 10
[   30.626753] Segment Routing with IPv6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11
DHCPREQUEST of 10.2.0.51 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 10.2.0.51 from 10.2.0.173
DHCPACK of 10.2.0.51 from 10.2.0.173
bound to 10.2.0.51 -- renewal in 42572 seconds.
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.                                                                                                                                                             ..
1336 (syslogd)
. ok
[ ok ] Starting system message bus: dbus.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1334 (klogd)
. ok
Making sure that Logitech Media Server is not running first: No process in pidfi                                                                                                                                                             le '/var/run/logitechmediaserver.pid' found running; none killed.
Starting Logitech Media Server.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 nws ttyS0

nws login: root
Password:
Last login: Wed Jan 17 06:20:53 PST 2018 on ttyS0
Linux nws 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@nws:~# ps --no-headers -o comm 1
init
root@nws:~# top
top - 06:23:39 up 1 min,  1 user,  load average: 0.61, 0.17, 0.06
Tasks:  82 total,   1 running,  81 sleeping,   0 stopped,   0 zombie
%Cpu(s): 14.6 us, 17.1 sy,  0.0 ni, 67.8 id,  0.3 wa,  0.0 hi,  0.2 si,  0.0 st
KiB Mem :   507356 total,   445468 free,    14716 used,    47172 buff/cache
KiB Swap:        0 total,        0 free,        0 used.   482064 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 1630 root      20   0    6432   2860   2420 R 11.8  0.6   0:00.05 top
    1 root      20   0    3336   1668   1536 S  0.0  0.3   0:01.97 init
    2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0
    4 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
    5 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kworker/u2:0
    6 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 mm_percpu_wq
    7 root      20   0       0      0      0 S  0.0  0.0   0:00.03 ksoftirqd/0
    8 root      20   0       0      0      0 S  0.0  0.0   0:00.05 rcu_preempt
    9 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_sched
   10 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh
   11 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 watchdog/0
   12 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kdevtmpfs
   13 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 netns
   14 root      20   0       0      0      0 S  0.0  0.0   0:00.07 kworker/0:1
   15 root      20   0       0      0      0 S  0.0  0.0   0:00.00 khungtaskd
   16 root      20   0       0      0      0 S  0.0  0.0   0:00.00 oom_reaper
root@nws:~# [   89.759084] random: crng init done

root@nws:~# fw_printenv
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootdelay=10
bootdev=usb
device=0:1
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=4495
mtdparts=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)
ethaddr=52:3b:20:9c:11:51
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
devices=ide
root@nws:~#



Edited 1 time(s). Last edit at 01/17/2018 08:33AM by lille.
Re: NSA325 - How to boot with ststemd
January 17, 2018 04:56PM
lille,

Power up, interrupt serial console and

run bootcmd_uenv

See if the loading occurs at all.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 17, 2018 07:55PM
lille,

Something in your envs that are not right. I'm not at home, so let table it for another day.

In the mean time, you don't need to use uEnv.txt to boot with systemd. Set it directly in bootargs as follow:

- Remove or rename the uEnv.xt to something else.

- Power up, interrupt serial console and,

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 18, 2018 01:23AM
as you could see, the

set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd

change is reflected in the U-Boot environment.

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:42:03 -0700)
ZyXEL NSA325 2-Bay Power Media Server
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
NSA325> printenv
arcNumber=4495
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
bootdelay=10
bootdev=usb
device=0:1
devices=ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
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
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=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)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2963/131068 bytes
NSA325>

after I made the change i booted with the uBoot boot command (and no, I do NOT have turned my box off and cleared the RAM!)

but there ist still no systemd (installed it again with apt-get install systemd by the way)

start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2963/131068 bytes
NSA325> boot

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ATP Velocity SII SSD Firm: 1002_0.4 Ser#: 9902610112900023
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            31275184        cc74c377-01     83
running scan_disk ...
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: ATP Velocity SII SSD Firm: 1002_0.4 Ser#: 9902610112900023
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 15272.0 MB = 14.9 GB (31277232 x 512)
device ide 0:1
1 bytes read in 6 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
3821592 bytes read in 576 ms (6.3 MiB/s)
loading uInitrd ...
7245696 bytes read in 1083 ms (6.4 MiB/s)
loading DTB /boot/dts/kirkwood-nsa325.dtb ...
14548 bytes read in 17 ms (835 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 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 1f424000, end 1fb0cf40 ... OK
   Loading Device Tree to 1f41d000, end 1f4238d3 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.12.1-kirkwood-tld-1 (root@tldDebian) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jul 15 21:40:50 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 NSA325
[    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=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: 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: 499256K/524288K available (8192K kernel code, 716K rwdata, 1972K rodata, 1024K init, 288K bss, 25032K 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 : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 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 - 0xc0db3274   ( 717 kB)
[    0.000000]        .bss : 0xc0db9b9c - 0xc0e01e60   ( 289 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000006] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000036] Switching to timer-based delay loop, resolution 5ns
[    0.000420] Console: colour dummy device 80x30
[    0.000448] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000466] pid_max: default: 32768 minimum: 301
[    0.000628] Security Framework initialized
[    0.000727] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000742] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001450] CPU: Testing write buffer coherency: ok
[    0.002322] Setting up static identity map for 0x100000 - 0x100058
[    0.002557] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.005195] devtmpfs: initialized
[    0.009391] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009414] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.009738] prandom: seed boundary self test passed
[    0.012595] prandom: 100 self tests passed
[    0.012610] pinctrl core: initialized pinctrl subsystem
[    0.013591] NET: Registered protocol family 16
[    0.013951] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.015316] cpuidle: using governor ladder
[    0.015376] cpuidle: using governor menu
[    0.015751] Feroceon L2: Enabling L2
[    0.015785] Feroceon L2: Cache support initialised.
[    0.016077] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.020119] No ATAGs?
[    0.027131] vgaarb: loaded
[    0.027375] SCSI subsystem initialized
[    0.027741] usbcore: registered new interface driver usbfs
[    0.027787] usbcore: registered new interface driver hub
[    0.027825] usbcore: registered new device driver usb
[    0.028584] clocksource: Switched to clocksource orion_clocksource
[    0.096854] VFS: Disk quotas dquot_6.6.0
[    0.096927] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.104617] NET: Registered protocol family 2
[    0.105206] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.105262] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.105314] TCP: Hash tables configured (established 4096 bind 4096)
[    0.105378] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.105399] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.105538] NET: Registered protocol family 1
[    0.105867] RPC: Registered named UNIX socket transport module.
[    0.105876] RPC: Registered udp transport module.
[    0.105882] RPC: Registered tcp transport module.
[    0.105887] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.106068] Unpacking initramfs...
[    0.594096] Freeing initrd memory: 7076K
[    0.594224] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.594903] audit: initializing netlink subsys (disabled)
[    0.595249] Initialise system trusted keyrings
[    0.595289] Key type blacklist registered
[    0.595359] audit: type=2000 audit(0.586:1): state=initialized audit_enabled=0 res=1
[    0.595434] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.595487] zbud: loaded
[    0.596223] NFS: Registering the id_resolver key type
[    0.596243] Key type id_resolver registered
[    0.596250] Key type id_legacy registered
[    0.596267] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.596275] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.596431] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.596575] fuse init (API version 7.26)
[    0.596836] orangefs_debugfs_init: called with debug mask: :none: :0:
[    0.596997] orangefs_init: module version upstream loaded
[    0.597005] SGI XFS with ACLs, security attributes, realtime, no debug enabled
[    2.558589] random: fast init done
[    4.954256] Key type asymmetric registered
[    4.954270] Asymmetric key parser 'x509' registered
[    4.954324] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    4.954333] io scheduler noop registered
[    4.954339] io scheduler deadline registered
[    4.954407] io scheduler cfq registered (default)
[    4.955377] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    4.956801] mvebu-pcie mbus@f1000000:pcie-controller@82000000: PCI host bridge to bus 0000:00
[    4.956818] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    4.956829] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    4.956839] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.957089] PCI: bus0: Fast back to back transfers disabled
[    4.957107] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.978648] PCI: bus1: Fast back to back transfers disabled
[    4.978812] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    4.978827] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    4.978847] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.978859] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    4.978932] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    4.979005] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    4.979422] mv_xor f1060800.xor: Marvell shared XOR driver
[    5.039141] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    5.039327] mv_xor f1060900.xor: Marvell shared XOR driver
[    5.099134] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy sg intr )
[    5.099509] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    5.100566] console [ttyS0] disabled
[    5.100622] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    5.795598] console [ttyS0] enabled
[    5.805325] loop: module loaded
[    5.809019] sata_mv f1080000.sata: slots 32 ports 2
[    5.815906] scsi host0: sata_mv
[    5.819441] scsi host1: sata_mv
[    5.822783] ata1: SATA max UDMA/133 irq 32
[    5.826893] ata2: SATA max UDMA/133 irq 32
[    5.831653] nand: device found, Manufacturer ID: 0x92, Chip ID: 0xf1
[    5.838095] nand: Eon NAND 128MiB 3,3V 8-bit
[    5.842402] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.850024] Scanning device for bad blocks
[    5.858959] Bad eraseblock 100 at 0x000000c80000
[    5.867506] Bad eraseblock 182 at 0x0000016c0000
[    5.873013] Bad eraseblock 200 at 0x000001900000
[    5.916963] 9 cmdlinepart partitions found on MTD device orion_nand
[    5.923270] Creating 9 MTD partitions on "orion_nand":
[    5.928434] 0x000000000000-0x000000100000 : "uboot"
[    5.934355] 0x000000100000-0x000000180000 : "uboot_env"
[    5.940625] 0x000000180000-0x000000200000 : "key_store"
[    5.946775] 0x000000200000-0x000000280000 : "info"
[    5.952428] 0x000000280000-0x000000c80000 : "etc"
[    5.958028] 0x000000c80000-0x000001680000 : "kernel_1"
[    5.964131] 0x000001680000-0x000004640000 : "rootfs1"
[    5.970368] 0x000004640000-0x000005040000 : "kernel_2"
[    5.976496] 0x000005040000-0x000008000000 : "rootfs2"
[    5.983663] libphy: Fixed MDIO Bus: probed
[    5.988349] libphy: orion_mdio_bus: probed
[    5.996359] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    6.099071] mv643xx_eth: Set the PHY to fix link down
[    6.099650] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    6.113598] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.120204] ehci-pci: EHCI PCI platform driver
[    6.124707] ehci-orion: EHCI orion driver
[    6.128928] orion-ehci f1050000.ehci: EHCI Host Controller
[    6.134481] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    6.142323] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    6.168602] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    6.174802] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    6.181644] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.188907] usb usb1: Product: EHCI Host Controller
[    6.193804] usb usb1: Manufacturer: Linux 4.12.1-kirkwood-tld-1 ehci_hcd
[    6.200549] usb usb1: SerialNumber: f1050000.ehci
[    6.205758] hub 1-0:1.0: USB hub found
[    6.209595] hub 1-0:1.0: 1 port detected
[    6.214003] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    6.219312] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    6.227039] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x00000004
[    6.235643] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[    6.242483] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.249747] usb usb2: Product: xHCI Host Controller
[    6.254644] usb usb2: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    6.261388] usb usb2: SerialNumber: 0000:01:00.0
[    6.266509] hub 2-0:1.0: USB hub found
[    6.270344] hub 2-0:1.0: 2 ports detected
[    6.274749] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    6.280041] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    6.287538] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.295793] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[    6.302631] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    6.309898] usb usb3: Product: xHCI Host Controller
[    6.314794] usb usb3: Manufacturer: Linux 4.12.1-kirkwood-tld-1 xhci-hcd
[    6.321608] usb usb3: SerialNumber: 0000:01:00.0
[    6.326726] hub 3-0:1.0: USB hub found
[    6.330541] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    6.337175] ata1.00: ATA-8: ATP Velocity SII SSD, 1002_0.4, max UDMA/133
[    6.337180] ata1.00: 31277232 sectors, multi 1: LBA48 NCQ (depth 31/32)
[    6.351052] ata1.00: configured for UDMA/133
[    6.355784] scsi 0:0:0:0: Direct-Access     ATA      ATP Velocity SII _0.4 PQ: 0 ANSI: 5
[    6.363963] hub 3-0:1.0: 2 ports detected
[    6.368923] sd 0:0:0:0: [sda] 31277232 512-byte logical blocks: (16.0 GB/14.9 GiB)
[    6.377517] usbcore: registered new interface driver usb-storage
[    6.383730] sd 0:0:0:0: [sda] Write Protect is off
[    6.383844] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.389811]  sda: sda1
[    6.391054] sd 0:0:0:0: [sda] Attached SCSI disk
[    6.407468] mousedev: PS/2 mouse device common for all mice
[    6.413364] i2c /dev entries driver
[    6.423258] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc0
[    6.432631] hidraw: raw HID events driver (C) Jiri Kosina
[    6.438336] drop_monitor: Initializing network drop monitor service
[    6.444853] NET: Registered protocol family 17
[    6.449403] Key type dns_resolver registered
[    6.454254] registered taskstats version 1
[    6.458368] Loading compiled-in X.509 certificates
[    6.463242] zswap: loaded using pool lzo/zbud
[    6.475157] Key type big_key registered
[    6.486424] Key type encrypted registered
[    6.492851] rtc-pcf8563 0-0051: setting system clock to 2018-01-18 07:12:55 UTC (1516259575)
[    6.568609] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    6.710000] ata2: SATA link down (SStatus 0 SControl F300)
[    6.728539] Freeing unused kernel memory: 1024K
Loading, please wait...
[    6.760725] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    6.767478] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    6.788715] usb 1-1: Product: USB2.0 Hub
[    6.797009] hub 1-1:1.0: USB hub found
[    6.805607] hub 1-1:1.0: 4 ports detected
starting version 232
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.
Warning: fsck not present, so skipping root file system
[   17.522983] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
run-init: /bin/systemd: No such file or directory
Target filesystem doesn't have requested /bin/systemd.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Setting hostname to 'nws'...done.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[ ok [   18.769892] input: gpio_keys as /devices/platform/gpio_keys/input/input0
                                                 done.
[....] Waiting for /dev to be fully populated...[   18.999503] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
[   19.171993] marvell-cesa f1030000.crypto: CESA device successfully registered
[   19.209453] orion_wdt: Initial timeout 21 sec
[   19.219030] sd 0:0:0:0: Attached scsi generic sg0 type 0
done.
[ ok ] Activating swap:.
[   20.060686] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Will now check root file system:fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /] fsck.ext4 -y -C0 /dev/sda1
e2fsck 1.43.4 (31-Jan-2017)
rootfs: clean, 29187/979200 files, 540908/3909398 blocks
. ok 
[   20.237521] 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
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location 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.
[   22.320655] mv643xx_eth: Set the PHY back to auto-negotiation mode
[   25.132324] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[   33.098851] NET: Registered protocol family 10
[   33.105486] Segment Routing with IPv6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPREQUEST of 192.168.178.38 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.178.38 from 192.168.178.1
DHCPACK of 192.168.178.38 from 192.168.178.1
bound to 192.168.178.38 -- renewal in 17236 seconds.
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...
1337 (syslogd)
. ok 
[ ok ] Starting system message bus: dbus.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1340 (klogd)
. ok 
Making sure that Logitech Media Server is not running first: No process in pidfile '/var/run/logitechmediaserver.pid' found running; none killed.
Starting Logitech Media Server.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 nws ttyS0

nws login: root
Password:
Last login: Wed Jan 17 22:49:19 PST 2018 on ttyS0
Linux nws 4.12.1-kirkwood-tld-1 #1 PREEMPT Sat Jul 15 21:40:50 PDT 2017 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@nws:~# ps --no-headers -o comm 1
init
root@nws:~#

If I do a a fw_printenv within debian I got

root@nws:~# fw_printenv
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootdelay=10
bootdev=usb
device=0:1
disks=0 1 2 3
ethact=egiga0
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
mainlineLinux=yes
mtdids=nand0=orion_nand
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=4495
mtdparts=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)
ethaddr=52:3b:20:9c:11:51
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3
dtb_file=/boot/dts/kirkwood-nsa325.dtb
devices=ide
root@nws:~#

why is in debian after the boot process the set_bootargs variable again set to $custom_params ? is the fw_printenv command printing the environment settings of the persistent storage only ( not reflecting the changes I made before with the uBoot setenv command into RAM)?



Edited 1 time(s). Last edit at 01/18/2018 01:24AM by lille.
Re: NSA325 - How to boot with ststemd
January 19, 2018 05:13AM
Begin: Running /scripts/init-bottom ... done.
run-init: /bin/systemd: No such file or directory
Target filesystem doesn't have requested /bin/systemd.
INIT: version 2.88 booting

Looks like systemd location has changed in the latest version.

Quote

why is in debian after the boot process the set_bootargs variable again set to $custom_params ? is the fw_printenv command printing the environment settings of the persistent storage only ( not reflecting the changes I made before with the uBoot setenv command into RAM)?

setenv only sets u-boot env to some value during that boot session. fw_setenv will set the value permanently.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA325 - How to boot with ststemd
January 19, 2018 05:34AM
installed systemd again.

with

setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts init=/bin/systemd'
boot

it now boots with systemd

root@nws:~# ps --no-headers -o comm 1
systemd

I´ll try to use the uEnv.txt mehtod with the custom_params=init=/bin/systemd variable
Re: NSA325 - How to boot with ststemd
January 19, 2018 05:43AM
No chance with the the uEnv.txt method. Tried it again. Still boots with sysVinit.
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: