Welcome! Log In Create A New Profile

Advanced

How to use systemd using uEnv.txt

Posted by hkguy 
How to use systemd using uEnv.txt
May 24, 2018 10:50PM
bodhi,

I need your help.
I followed the instructions to bring up my Pogoplug Pro.
I installed these binaries uboot.2015.10-tld-2, linux-4.4.124-oxnas-tld-1and Debian-4.4.54-oxnas-tld-1-rootfs to my pogo box.
I want to use systemd to boot the box using uEnv.txt. u-boot reads the uEnv.txt for sure because the console log shows that 32 bytes read in 124 ms. However, it just did not take effect.
If I use "setenv custom_params init=/bin/systemd" in u-boot prompt and then saveenv and boot. systemd works just fine.
Any idea?

Thank you,
hkguy

uEnv.txt
root@debian:~# cat /boot/uEnv.txt 
custom_params=init=/bin/systemd

u-boot Env:
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_stock; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi; fi
bootcmd_stock=setenv autoload n; setenv bootargs_stock "root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M"; setenv poweroutage yes; setenv boot "bootm 60500000"; setenv bootcmd_stock_fw "run set_bootargs_stock; run boot_nand"; setenv boot bootm 60500000; setenv boot_nand "run load_nand boot || run load_nand2 boot"; setenv kernflmode s; setenv load_nand2 "nboot 60500000 0 800000"; setenv load_nand "nboot 60500000 0 200000"; setenv set_bootargs_stock "setenv bootargs $bootargs_stock"; setenv mainlinelinux no; run bootcmd_stock_fw
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/ox820-pogoplug-pro.dtb
ethact=dwmac.40400000
if_netconsole=ping $serverip
ipaddr=192.168.0.222
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device 0x62c00000 $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
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 0x60500000 /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_import=echo importing envs ...; env import -t 0x60510000  $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 0x60500000 /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_custom_params=zswap.enabled=1
usb_ready_retry=15


This is the console log when the box is booting up:
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: SATA PHY not ready for device 0
ide_preinit failed

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7667776         00000000-01     83 Boot
loading envs from usb 0 ...
32 bytes read in 124 ms (0 Bytes/s)

no IDE devices available
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 134 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4119448 bytes read in 426 ms (9.2 MiB/s)
loading uInitrd ...
4596824 bytes read in 472 ms (9.3 MiB/s)
loading DTB /boot/dts/ox820-pogoplug-pro.dtb ...
7067 bytes read in 194 ms (35.2 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.4.124-oxnas-tld-1
   Created:      2018-05-23   3:45:34 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4119384 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.4.124-oxnas-tld-1
   Created:      2018-05-23   5:43:30 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4596760 Bytes = 4.4 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 679c4000, end 67e26418 ... OK
   Loading Device Tree to 679bf000, end 679c3b9a ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.124-oxnas-tld-1 (root@tldDebian) (gcc version 8
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cd
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructie
[    0.000000] Machine model: Pogoplug V3 Pro
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logicap
[    0.000000] PERCPU: Embedded 12 pages/cpu @c7eda000 s17612 r8192 d23348 u4912
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa2
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs root)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 117264K/131072K available (5693K kernel code, 285K rwdat)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc071f858   (7263 kB)
[    0.000000]       .init : 0xc0720000 - 0xc0758000   ( 224 kB)
[    0.000000]       .data : 0xc0758000 - 0xc079f638   ( 286 kB)
[    0.000000]        .bss : 0xc079f638 - 0xc07dc4d8   ( 244 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:160
[    0.000000] clocksource: rps_clocksource_timer: mask: 0xffffff max_cycles: 0s
[    0.000010] sched_clock: 24 bits at 390kHz, resolution 2560ns, wraps every 2s
[    0.000153] Console: colour dummy device 80x30
[    0.000184] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.050017] pid_max: default: 32768 minimum: 301
[    0.050183] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050204] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051025] Initializing cgroup subsys net_cls
[    0.051110] CPU: Testing write buffer coherency: ok
[    0.051532] Setting up static identity map for 0x60008220 - 0x60008258
[    0.190138] Brought up 2 CPUs
[    0.190161] SMP: Total of 2 processors activated (678.29 BogoMIPS).
[    0.190950] devtmpfs: initialized
[    0.195648] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ms
[    0.195688] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.195998] prandom: seed boundary self test passed
[    0.200409] prandom: 100 self tests passed
[    0.200437] pinctrl core: initialized pinctrl subsystem
[    0.201254] NET: Registered protocol family 16
[    0.201799] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.230018] cpuidle: using governor ladder
[    0.260011] cpuidle: using governor menu
[    0.265126] gpio-oxnas 44000000.gpio: at address c8848000
[    0.265525] gpio-oxnas 44100000.gpio: at address c884a000
[    0.266094] pinctrl-oxnas pinctrl: initialized OX820 pinctrl driver
[    0.387584] oxnas-pcie 47c00000.pcie-controller: PCIe version/deviceID 0x8255
[    0.387663] oxnas-pcie 47c00000.pcie-controller: link up
[    0.387988] oxnas-pcie 47c00000.pcie-controller: PCI host bridge to bus 00000
[    0.388011] pci_bus 0000:00: root bus resource [mem 0x48000000-0x49ffffff]
[    0.388032] pci_bus 0000:00: root bus resource [mem 0x4a000000-0x4bdfffff pr]
[    0.388047] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    0.388067] pci_bus 0000:00: root bus resource [bus 00-7f]
[    0.388574] PCI: bus0: Fast back to back transfers disabled
[    0.388659] pci 0000:00:00.0: BAR 0: assigned [mem 0x48000000-0x4800ffff]
[    0.389107] vgaarb: loaded
[    0.389578] SCSI subsystem initialized
[    0.390530] usbcore: registered new interface driver usbfs
[    0.390635] usbcore: registered new interface driver hub
[    0.390809] usbcore: registered new device driver usb
[    0.391027] pps_core: LinuxPPS API ver. 1 registered
[    0.391040] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giom>
[    0.391083] PTP clock support registered
[    0.392337] clocksource: Switched to clocksource rps_clocksource_timer
[    0.410122] NET: Registered protocol family 2
[    0.411189] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.411233] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.411266] TCP: Hash tables configured (established 1024 bind 1024)
[    0.411368] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.411409] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.411663] NET: Registered protocol family 1
[    0.412136] RPC: Registered named UNIX socket transport module.
[    0.412157] RPC: Registered udp transport module.
[    0.412167] RPC: Registered tcp transport module.
[    0.412177] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.412574] Unpacking initramfs...
[    0.885688] Freeing initrd memory: 4492K
[    0.887121] Initialise system trusted keyring
[    0.900300] zbud: loaded
[    0.905392] NFS: Registering the id_resolver key type
[    0.905451] Key type id_resolver registered
[    0.905466] Key type id_legacy registered
[    0.905512] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.905536] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.906452] fuse init (API version 7.23)
[    0.908416] Key type big_key registered
[    0.989596] Key type asymmetric registered
[    0.989629] Asymmetric key parser 'x509' registered
[    0.989757] Block layer SCSI generic (bsg) driver version 0.4 loaded (major )
[    0.989788] io scheduler noop registered
[    0.989808] io scheduler deadline registered
[    0.989870] io scheduler cfq registered (default)
[    0.990630] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.992107] console [ttyS0] disabled
[    0.992204] 44200000.uart: ttyS0 at MMIO 0x44200000 (irq = 6, base_baud = 39A
[    1.574891] console [ttyS0] enabled
[    1.589465] loop: module loaded
[    1.594588] scsi host0: sata_oxnas
[    1.598412] ata1: SATA max UDMA/133 irq 7
[    1.602542] sata_oxnas: resetting SATA core
[    1.603635] nand: Could not find valid ONFI parameter page; aborting
[    1.603678] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    1.603683] nand: Hynix NAND 128MiB 3,3V 8-bit
[    1.603691] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB si4
[    1.603706] Scanning device for bad blocks
[    1.685396] 2 cmdlinepart partitions found on MTD device 41000000.nand
[    1.691939] Creating 2 MTD partitions on "41000000.nand":
[    1.697315] 0x000000000000-0x000000e00000 : "boot"
[    1.704064] 0x000000e00000-0x000008000000 : "data"
[    1.711385] oxnas-gmac 40400000.ethernet: no reset control found
[    1.717370] stmmac - user ID: 0x12, Synopsys ID: 0x35
[    1.722442]  Ring mode enabled
[    1.725480]  DMA HW capability register supported
[    1.730001]  Enhanced/Alternate descriptors
[    1.734333]  Enabled extended descriptors
[    1.738316]  RX Checksum Offload Engine supported (type 2)
[    1.743790]  TX Checksum insertion supported
[    1.748037]  Wake-Up On Lan supported
[    1.751690]  Enable RX Mitigation via HW Watchdog Timer
[    1.784729] libphy: stmmac: probed
[    1.788126] eth%d: PHY ID 001cc914 at 0 IRQ POLL (stmmac-0:00) active
[    1.794588] eth%d: PHY ID 001cc914 at 3 IRQ POLL (stmmac-0:03)
[    1.801346] PPP generic driver version 2.4.2
[    1.805923] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.812528] ehci-pci: EHCI PCI platform driver
[    1.817331] oxnas-ehci 40200100.ehci: EHCI Host Controller
[    1.822894] oxnas-ehci 40200100.ehci: new USB bus registered, assigned bus n1
[    1.830748] oxnas-ehci 40200100.ehci: irq 10, io mem 0x40200100
[    1.850012] oxnas-ehci 40200100.ehci: USB 2.0 started, EHCI 1.00
[    1.856320] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.863137] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber1
[    1.870356] usb usb1: Product: EHCI Host Controller
[    1.875210] usb usb1: Manufacturer: Linux 4.4.124-oxnas-tld-1 ehci_hcd
[    1.881735] usb usb1: SerialNumber: 40200100.ehci
[    1.887357] hub 1-0:1.0: USB hub found
[    1.891212] hub 1-0:1.0: 2 ports detected
[    1.896230] usbcore: registered new interface driver cdc_wdm
[    1.902103] usbcore: registered new interface driver usb-storage
[    1.908252] usbcore: registered new interface driver usbserial
[    1.914168] usbcore: registered new interface driver usbserial_generic
[    1.920770] usbserial: USB Serial support registered for generic
[    1.927198] mousedev: PS/2 mouse device common for all mice
[    1.932971] i2c /dev entries driver
[    1.937692] hidraw: raw HID events driver (C) Jiri Kosina
[    1.943370] usbcore: registered new interface driver usbhid
[    1.948917] usbhid: USB HID core driver
[    1.954792] NET: Registered protocol family 10
[    1.960627] sit: IPv6 over IPv4 tunneling driver
[    1.966231] NET: Registered protocol family 17
[    1.970892] Key type dns_resolver registered
[    1.976465] registered taskstats version 1
[    1.980638] Loading compiled-in X.509 certificates
[    1.985530] zswap: loaded using pool lzo/zbud
[    1.990164] ata1: SATA link down (SStatus 0 SControl 310)
[    2.008939] Key type encrypted registered
[    2.013870] hctosys: unable to open rtc device (rtc0)
[    2.021237] Freeing unused kernel memory: 224K
Loading, please wait...
starting version 232
[    2.197473] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.208028] random: udevadm: uninitialized urandom read (16 bytes read, 0 bi)
[    2.208463] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.208688] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    2.236587] usb 1-1: new high-speed USB device number 2 using oxnas-ehci
[    2.245826] random: udevadm: uninitialized urandom read (16 bytes read, 0 bi)
[    2.255418] random: udevadm: uninitialized urandom read (16 bytes read, 0 bi)
[    2.265615] random: udevadm: uninitialized urandom read (16 bytes read, 0 bi)
[    2.275937] random: udevadm: uninitialized urandom read (16 bytes read, 0 bi)
[    2.289139] random: udevadm: uninitialized urandom read (16 bytes read, 0 bi)
[    2.299374] random: udevadm: uninitialized urandom read (16 bytes read, 0 bi)
[    2.392058] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    2.398735] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.420101] usb 1-1: Product: USB2.0 Hub
[    2.425651] hub 1-1:1.0: USB hub found
[    2.430292] hub 1-1:1.0: 4 ports detected
[    2.720186] usb 1-1.4: new high-speed USB device number 3 using oxnas-ehci
[    2.844848] usb 1-1.4: New USB device found, idVendor=0930, idProduct=6545
[    2.854412] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumbe3
[    2.864453] usb 1-1.4: Product: DT 101 G2
[    2.868533] usb 1-1.4: Manufacturer: Kingston
[    2.875522] usb 1-1.4: SerialNumber: 001D0F0C73C3EBB165540023
[    2.890652] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    2.910394] scsi host1: usb-storage 1-1.4:1.0
[    2.946432] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[    3.912389] scsi 1:0:0:0: Direct-Access     Kingston DT 101 G2        PMAP PS
[    3.928709] sd 1:0:0:0: [sda] 7669824 512-byte logical blocks: (3.93 GB/3.66)
[    3.939381] sd 1:0:0:0: [sda] Write Protect is off
[    3.947568] sd 1:0:0:0: [sda] No Caching mode page found
[    3.953049] sd 1:0:0:0: [sda] Assuming drive cache: write through
[    3.966753]  sda: sda1
[    3.976499] sd 1:0:0:0: [sda] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sda1] fsck.ext4 -a -C0 /dev/sda1 
rootfs: clean, 14399/240000 files, 169435/958472 blocks
done.
[   13.390423] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:)
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.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[....] Synthesizing the initial hotplug events...done.
[   16.277091] rt2800pci 0000:00:00.0: enabling device (0140 -> 0142)
[   16.311662] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3090, rev 3213 d
[   16.350955] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[....] Waiting for /dev to be fully populated...[   16.558704] rt2800pci 0000:00
done.
[....] Activating swap...done.
[   17.614599] random: nonblocking pool is initialized
[   17.671027] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[....] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.29.2
done.
[....] Loading kernel modules...done.
[....] Cleaning up temporary files... /tmp. ok 
[....] Mounting local filesystems...done.
[....] Activating swapfile swap...done.
[....] Cleaning up temporary files.... ok 
[....] Setting kernel variables...done.
[   21.204766] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmw'
[   21.217164] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware dete0
[   21.440824] IPv6: ADDRCONF(NETDEV_UP): wlp0s0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlp0s0/48:5d:60:4b:7a:5c
Sending on   LPF/wlp0s0/48:5d:60:4b:7a:5c
Sending on   Socket/fallback
DHCPREQUEST of 192.168.2.107 on wlp0s0 to 255.255.255.255 port 67
[   24.324101] wlp0s0: authenticate with 64:66:b3:d3:27:5e
[   24.400419] wlp0s0: send auth to 64:66:b3:d3:27:5e (try 1/3)
[   24.408184] wlp0s0: authenticated
[   24.420037] wlp0s0: associate with 64:66:b3:d3:27:5e (try 1/3)
[   24.432665] wlp0s0: RX AssocResp from 64:66:b3:d3:27:5e (capab=0x411 status=)
[   24.440885] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s0: link becomes ready
[   24.447418] wlp0s0: associated
DHCPREQUEST of 192.168.2.107 on wlp0s0 to 255.255.255.255 port 67
DHCPACK of 192.168.2.107 from 192.168.2.1
bound to 192.168.2.107 -- renewal in 36694 seconds.
ifup: waiting for lock on /run/network/ifstate.eth0
ifup: interface eth0 already configured
done.
[....] Starting RPC port mapper daemon: rpcbind. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Cleaning up temporary files.... ok 
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd.
1373 (syslogd)
. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Starting system message bus: dbus. ok 
[....] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. ok 
[....] Starting OpenBSD Secure Shell server: sshd. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1371 (klogd)
. ok 
[....] Starting NTP server: ntpd. ok 

Debian GNU/Linux 9 debian ttyS0

debian login:



Edited 1 time(s). Last edit at 05/24/2018 11:01PM by hkguy.
Re: How to use systemd using uEnv.txt
May 24, 2018 11:03PM
hkguy,

Please post the log again, your log got cut off on the right side. The bold line is important to see.


[    0.000000] Linux version 4.4.124-oxnas-tld-1 (root@tldDebian) (gcc version 8
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cd
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructie
[    0.000000] Machine model: Pogoplug V3 Pro
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logicap
[    0.000000] PERCPU: Embedded 12 pages/cpu @c7eda000 s17612 r8192 d23348 u4912
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa2
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs root)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 117264K/131072K available (5693K kernel code, 285K rwdat)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: How to use systemd using uEnv.txt
May 24, 2018 11:31PM
bodhi,
Here is the log.

Thanks,
hkguy

U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: SATA PHY not ready for device 0
ide_preinit failed

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7667776         00000000-01     83 Boot
loading envs from usb 0 ...
32 bytes read in 124 ms (0 Bytes/s)

no IDE devices available
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 134 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4119448 bytes read in 426 ms (9.2 MiB/s)
loading uInitrd ...
4596824 bytes read in 471 ms (9.3 MiB/s)
loading DTB /boot/dts/ox820-pogoplug-pro.dtb ...
7067 bytes read in 194 ms (35.2 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.4.124-oxnas-tld-1
   Created:      2018-05-23   3:45:34 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4119384 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.4.124-oxnas-tld-1
   Created:      2018-05-23   5:43:30 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4596760 Bytes = 4.4 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 679c4000, end 67e26418 ... OK
   Loading Device Tree to 679bf000, end 679c3b9a ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.124-oxnas-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP PREEMPT Wed Mar 28 22:46:38 PDT 2018
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Pogoplug V3 Pro
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] PERCPU: Embedded 12 pages/cpu @c7eda000 s17612 r8192 d23348 u49152
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=41000000.nand:14m(boot),-(data)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 117264K/131072K available (5693K kernel code, 285K rwdata, 1568K rodata, 224K init, 243K bss, 13808K 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 : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc071f858   (7263 kB)
[    0.000000]       .init : 0xc0720000 - 0xc0758000   ( 224 kB)
[    0.000000]       .data : 0xc0758000 - 0xc079f638   ( 286 kB)
[    0.000000]        .bss : 0xc079f638 - 0xc07dc4d8   ( 244 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:160
[    0.000000] clocksource: rps_clocksource_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 19112603332 ns
[    0.000007] sched_clock: 24 bits at 390kHz, resolution 2560ns, wraps every 21474835200ns
[    0.000148] Console: colour dummy device 80x30
[    0.000179] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.050019] pid_max: default: 32768 minimum: 301
[    0.050193] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050211] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051038] Initializing cgroup subsys net_cls
[    0.051120] CPU: Testing write buffer coherency: ok
[    0.051553] Setting up static identity map for 0x60008220 - 0x60008258
[    0.190136] Brought up 2 CPUs
[    0.190159] SMP: Total of 2 processors activated (678.29 BogoMIPS).
[    0.190952] devtmpfs: initialized
[    0.195601] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.195645] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.195942] prandom: seed boundary self test passed
[    0.200353] prandom: 100 self tests passed
[    0.200378] pinctrl core: initialized pinctrl subsystem
[    0.201218] NET: Registered protocol family 16
[    0.201766] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.230016] cpuidle: using governor ladder
[    0.260011] cpuidle: using governor menu
[    0.264965] gpio-oxnas 44000000.gpio: at address c8848000
[    0.265351] gpio-oxnas 44100000.gpio: at address c884a000
[    0.265896] pinctrl-oxnas pinctrl: initialized OX820 pinctrl driver
[    0.387409] oxnas-pcie 47c00000.pcie-controller: PCIe version/deviceID 0x82510b5
[    0.387491] oxnas-pcie 47c00000.pcie-controller: link up
[    0.387822] oxnas-pcie 47c00000.pcie-controller: PCI host bridge to bus 0000:00
[    0.387847] pci_bus 0000:00: root bus resource [mem 0x48000000-0x49ffffff]
[    0.387865] pci_bus 0000:00: root bus resource [mem 0x4a000000-0x4bdfffff pref]
[    0.387880] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    0.387896] pci_bus 0000:00: root bus resource [bus 00-7f]
[    0.388410] PCI: bus0: Fast back to back transfers disabled
[    0.388495] pci 0000:00:00.0: BAR 0: assigned [mem 0x48000000-0x4800ffff]
[    0.388951] vgaarb: loaded
[    0.389422] SCSI subsystem initialized
[    0.390343] usbcore: registered new interface driver usbfs
[    0.390446] usbcore: registered new interface driver hub
[    0.390617] usbcore: registered new device driver usb
[    0.390835] pps_core: LinuxPPS API ver. 1 registered
[    0.390848] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.390894] PTP clock support registered
[    0.392148] clocksource: Switched to clocksource rps_clocksource_timer
[    0.410088] NET: Registered protocol family 2
[    0.411164] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.411207] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.411243] TCP: Hash tables configured (established 1024 bind 1024)
[    0.411348] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.411392] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.411642] NET: Registered protocol family 1
[    0.412124] RPC: Registered named UNIX socket transport module.
[    0.412144] RPC: Registered udp transport module.
[    0.412154] RPC: Registered tcp transport module.
[    0.412165] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.412567] Unpacking initramfs...
[    0.886097] Freeing initrd memory: 4492K
[    0.887534] Initialise system trusted keyring
[    0.912558] zbud: loaded
[    0.931351] NFS: Registering the id_resolver key type
[    0.931422] Key type id_resolver registered
[    0.931435] Key type id_legacy registered
[    0.931476] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.931499] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.932390] fuse init (API version 7.23)
[    0.934328] Key type big_key registered
[    1.015508] Key type asymmetric registered
[    1.015541] Asymmetric key parser 'x509' registered
[    1.015667] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    1.015695] io scheduler noop registered
[    1.015713] io scheduler deadline registered
[    1.015772] io scheduler cfq registered (default)
[    1.016409] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    1.017896] console [ttyS0] disabled
[    1.017994] 44200000.uart: ttyS0 at MMIO 0x44200000 (irq = 6, base_baud = 390625) is a 16550A
[    1.600811] console [ttyS0] enabled
[    1.615385] loop: module loaded
[    1.620464] scsi host0: sata_oxnas
[    1.624296] ata1: SATA max UDMA/133 irq 7
[    1.628385] sata_oxnas: resetting SATA core
[    1.629468] nand: Could not find valid ONFI parameter page; aborting
[    1.629509] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    1.629514] nand: Hynix NAND 128MiB 3,3V 8-bit
[    1.629524] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.629557] Scanning device for bad blocks
[    1.713576] 2 cmdlinepart partitions found on MTD device 41000000.nand
[    1.720112] Creating 2 MTD partitions on "41000000.nand":
[    1.725498] 0x000000000000-0x000000e00000 : "boot"
[    1.732183] 0x000000e00000-0x000008000000 : "data"
[    1.739402] oxnas-gmac 40400000.ethernet: no reset control found
[    1.745425] stmmac - user ID: 0x12, Synopsys ID: 0x35
[    1.750466]  Ring mode enabled
[    1.753502]  DMA HW capability register supported
[    1.758005]  Enhanced/Alternate descriptors
[    1.762350]  Enabled extended descriptors
[    1.766338]  RX Checksum Offload Engine supported (type 2)
[    1.771809]  TX Checksum insertion supported
[    1.776051]  Wake-Up On Lan supported
[    1.779691]  Enable RX Mitigation via HW Watchdog Timer
[    1.799784] libphy: stmmac: probed
[    1.803240] eth%d: PHY ID 001cc914 at 0 IRQ POLL (stmmac-0:00) active
[    1.809656] eth%d: PHY ID 001cc914 at 3 IRQ POLL (stmmac-0:03)
[    1.816314] PPP generic driver version 2.4.2
[    1.820940] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.827450] ehci-pci: EHCI PCI platform driver
[    1.832337] oxnas-ehci 40200100.ehci: EHCI Host Controller
[    1.837834] oxnas-ehci 40200100.ehci: new USB bus registered, assigned bus number 1
[    1.845672] oxnas-ehci 40200100.ehci: irq 10, io mem 0x40200100
[    1.870133] oxnas-ehci 40200100.ehci: USB 2.0 started, EHCI 1.00
[    1.876426] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.883220] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.890426] usb usb1: Product: EHCI Host Controller
[    1.895275] usb usb1: Manufacturer: Linux 4.4.124-oxnas-tld-1 ehci_hcd
[    1.901785] usb usb1: SerialNumber: 40200100.ehci
[    1.907386] hub 1-0:1.0: USB hub found
[    1.911249] hub 1-0:1.0: 2 ports detected
[    1.916272] usbcore: registered new interface driver cdc_wdm
[    1.922137] usbcore: registered new interface driver usb-storage
[    1.928304] usbcore: registered new interface driver usbserial
[    1.934233] usbcore: registered new interface driver usbserial_generic
[    1.940820] usbserial: USB Serial support registered for generic
[    1.947238] mousedev: PS/2 mouse device common for all mice
[    1.953018] i2c /dev entries driver
[    1.957713] hidraw: raw HID events driver (C) Jiri Kosina
[    1.963366] usbcore: registered new interface driver usbhid
[    1.968911] usbhid: USB HID core driver
[    1.974804] NET: Registered protocol family 10
[    1.980733] sit: IPv6 over IPv4 tunneling driver
[    1.986337] NET: Registered protocol family 17
[    1.991050] Key type dns_resolver registered
[    1.996579] registered taskstats version 1
[    2.000734] Loading compiled-in X.509 certificates
[    2.005624] zswap: loaded using pool lzo/zbud
[    2.020080] ata1: SATA link down (SStatus 0 SControl 310)
[    2.025111] Key type encrypted registered
[    2.040660] hctosys: unable to open rtc device (rtc0)
[    2.047900] Freeing unused kernel memory: 224K
Loading, please wait...
starting version 232
[    2.223667] random: systemd-udevd: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.233492] usb 1-1: new high-speed USB device number 2 using oxnas-ehci
[    2.235123] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.237255] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.237565] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.238553] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.239603] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.243696] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.244648] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.245591] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.246760] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.472663] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    2.479344] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.510182] usb 1-1: Product: USB2.0 Hub
[    2.522880] hub 1-1:1.0: USB hub found
[    2.531112] hub 1-1:1.0: 4 ports detected
[    2.830213] usb 1-1.4: new high-speed USB device number 3 using oxnas-ehci
[    2.954460] usb 1-1.4: New USB device found, idVendor=0930, idProduct=6545
[    2.961346] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.968619] usb 1-1.4: Product: DT 101 G2
[    2.972625] usb 1-1.4: Manufacturer: Kingston
[    2.976957] usb 1-1.4: SerialNumber: 001D0F0C73C3EBB165540023
[    2.983941] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    2.990853] scsi host1: usb-storage 1-1.4:1.0
[    3.012846] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[    3.992450] scsi 1:0:0:0: Direct-Access     Kingston DT 101 G2        PMAP PQ: 0 ANSI: 0 CCS
[    4.008046] sd 1:0:0:0: [sda] 7669824 512-byte logical blocks: (3.93 GB/3.66 GiB)
[    4.023075] sd 1:0:0:0: [sda] Write Protect is off
[    4.029043] sd 1:0:0:0: [sda] No Caching mode page found
[    4.040225] sd 1:0:0:0: [sda] Assuming drive cache: write through
[    4.056527]  sda: sda1
[    4.068065] sd 1:0:0:0: [sda] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sda1] fsck.ext4 -a -C0 /dev/sda1 
rootfs: clean, 14401/240000 files, 169440/958472 blocks
done.
[   13.458383] 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.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[....] Synthesizing the initial hotplug events...[   16.352002] rt2800pci 0000:00:00.0: enabling device (0140 -> 0142)
[   16.383406] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3090, rev 3213 detected
done.
[   16.447700] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[....] Waiting for /dev to be fully populated...[   16.669967] rt2800pci 0000:00:00.0 wlp0s0: renamed from wlan0
done.
[....] Activating swap...done.
[   17.754206] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[....] Creating compatibility symlink from /etc/mtab to /proc/mounts. ... (warning).
[   17.928780] random: nonblocking pool is initialized
[....] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.29.2
done.
[....] Loading kernel modules...done.
[....] Cleaning up temporary files... /tmp. ok 
[....] Mounting local filesystems...done.
[....] Activating swapfile swap...done.
[....] Cleaning up temporary files.... ok 
[....] Setting kernel variables...done.
[   22.295559] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'
[   22.307978] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.40
[   22.530603] IPv6: ADDRCONF(NETDEV_UP): wlp0s0: link is not ready
[....] 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/wlp0s0/48:5d:60:4b:7a:5c
Sending on   LPF/wlp0s0/48:5d:60:4b:7a:5c
Sending on   Socket/fallback
DHCPREQUEST of 192.168.2.107 on wlp0s0 to 255.255.255.255 port 67
[   25.433973] wlp0s0: authenticate with 64:66:b3:d3:27:5e
[   25.510653] wlp0s0: send auth to 64:66:b3:d3:27:5e (try 1/3)
[   25.518184] wlp0s0: authenticated
[   25.530204] wlp0s0: associate with 64:66:b3:d3:27:5e (try 1/3)
[   25.539399] wlp0s0: RX AssocResp from 64:66:b3:d3:27:5e (capab=0x411 status=0 aid=2)
[   25.547586] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s0: link becomes ready
[   25.554094] wlp0s0: associated
DHCPREQUEST of 192.168.2.107 on wlp0s0 to 255.255.255.255 port 67
DHCPACK of 192.168.2.107 from 192.168.2.1
bound to 192.168.2.107 -- renewal in 41863 seconds.
ifup: waiting for lock on /run/network/ifstate.eth0
ifup: interface eth0 already configured
done.
[....] Starting RPC port mapper daemon: rpcbind. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Cleaning up temporary files.... ok 
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1424 (syslogd)
. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Starting system message bus: dbus. ok 
[....] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. ok 
[....] Starting OpenBSD Secure Shell server: sshd. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1419 (klogd)
. ok 
[....] Starting NTP server: ntpd. ok 

Debian GNU/Linux 9 debian ttyS0


Re: How to use systemd using uEnv.txt
May 25, 2018 01:01AM
hkguy,

Strange, everything looks fine. So let's debug this step by step. Put these envs settings in uEnv.txt and boot with it.

cat /boot/uEnv.txt
custom_params=init=/bin/systemd
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
bootcmd_exec=printenv custom_params; printenv bootargs; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi; fi

And post serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: How to use systemd using uEnv.txt
May 25, 2018 07:13PM
bodhi,

Here is the console log. Hmm... the parameters in uEnv.txt just do not come to effect.

Thanks,
hkguy

U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12)
  Boot device: NAND
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set


U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700)
OXNAS OX820

DRAM:  128 MiB
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   dwmac.40400000
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: SATA PHY not ready for device 0
ide_preinit failed

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7667776         00000000-01     83 Boot
loading envs from usb 0 ...
424 bytes read in 124 ms (2.9 KiB/s)

no IDE devices available
importing envs ...
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 134 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4119448 bytes read in 426 ms (9.2 MiB/s)
loading uInitrd ...
4596824 bytes read in 472 ms (9.3 MiB/s)
loading DTB /boot/dts/ox820-pogoplug-pro.dtb ...
7067 bytes read in 194 ms (35.2 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.4.124-oxnas-tld-1
   Created:      2018-05-23   3:45:34 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4119384 Bytes = 3.9 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
   Image Name:   initramfs-4.4.124-oxnas-tld-1
   Created:      2018-05-23   5:43:30 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    4596760 Bytes = 4.4 MiB
   Load Address: 60000000
   Entry Point:  60000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
   Booting using the fdt blob at 0x62c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 679c4000, end 67e26418 ... OK
   Loading Device Tree to 679bf000, end 679c3b9a ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.124-oxnas-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP PREEMPT Wed Mar 28 22:46:38 PDT 2018
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Pogoplug V3 Pro
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] PERCPU: Embedded 12 pages/cpu @c7eda000 s17612 r8192 d23348 u49152
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=41000000.nand:14m(boot),-(data)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 117264K/131072K available (5693K kernel code, 285K rwdata, 1568K rodata, 224K init, 243K bss, 13808K 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 : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc071f858   (7263 kB)
[    0.000000]       .init : 0xc0720000 - 0xc0758000   ( 224 kB)
[    0.000000]       .data : 0xc0758000 - 0xc079f638   ( 286 kB)
[    0.000000]        .bss : 0xc079f638 - 0xc07dc4d8   ( 244 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:160
[    0.000000] clocksource: rps_clocksource_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 19112603332 ns
[    0.000010] sched_clock: 24 bits at 390kHz, resolution 2560ns, wraps every 21474835200ns
[    0.000148] Console: colour dummy device 80x30
[    0.000181] Calibrating delay loop... 339.14 BogoMIPS (lpj=1695744)
[    0.050019] pid_max: default: 32768 minimum: 301
[    0.050193] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050211] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051038] Initializing cgroup subsys net_cls
[    0.051118] CPU: Testing write buffer coherency: ok
[    0.051540] Setting up static identity map for 0x60008220 - 0x60008258
[    0.190136] Brought up 2 CPUs
[    0.190159] SMP: Total of 2 processors activated (678.29 BogoMIPS).
[    0.190958] devtmpfs: initialized
[    0.195673] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.195717] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.196021] prandom: seed boundary self test passed
[    0.200435] prandom: 100 self tests passed
[    0.200463] pinctrl core: initialized pinctrl subsystem
[    0.201295] NET: Registered protocol family 16
[    0.201840] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.230023] cpuidle: using governor ladder
[    0.260016] cpuidle: using governor menu
[    0.264985] gpio-oxnas 44000000.gpio: at address c8848000
[    0.265367] gpio-oxnas 44100000.gpio: at address c884a000
[    0.265907] pinctrl-oxnas pinctrl: initialized OX820 pinctrl driver
[    0.387468] oxnas-pcie 47c00000.pcie-controller: PCIe version/deviceID 0x82510b5
[    0.387550] oxnas-pcie 47c00000.pcie-controller: link up
[    0.387870] oxnas-pcie 47c00000.pcie-controller: PCI host bridge to bus 0000:00
[    0.387896] pci_bus 0000:00: root bus resource [mem 0x48000000-0x49ffffff]
[    0.387914] pci_bus 0000:00: root bus resource [mem 0x4a000000-0x4bdfffff pref]
[    0.387929] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff]
[    0.387947] pci_bus 0000:00: root bus resource [bus 00-7f]
[    0.388451] PCI: bus0: Fast back to back transfers disabled
[    0.388538] pci 0000:00:00.0: BAR 0: assigned [mem 0x48000000-0x4800ffff]
[    0.388989] vgaarb: loaded
[    0.389457] SCSI subsystem initialized
[    0.390389] usbcore: registered new interface driver usbfs
[    0.390494] usbcore: registered new interface driver hub
[    0.390666] usbcore: registered new device driver usb
[    0.390883] pps_core: LinuxPPS API ver. 1 registered
[    0.390899] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.390942] PTP clock support registered
[    0.392220] clocksource: Switched to clocksource rps_clocksource_timer
[    0.409899] NET: Registered protocol family 2
[    0.411025] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.411069] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.411105] TCP: Hash tables configured (established 1024 bind 1024)
[    0.411212] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.411256] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.411512] NET: Registered protocol family 1
[    0.411980] RPC: Registered named UNIX socket transport module.
[    0.412001] RPC: Registered udp transport module.
[    0.412011] RPC: Registered tcp transport module.
[    0.412024] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.412423] Unpacking initramfs...
[    0.884687] Freeing initrd memory: 4492K
[    0.886115] Initialise system trusted keyring
[    0.899128] zbud: loaded
[    0.904279] NFS: Registering the id_resolver key type
[    0.904340] Key type id_resolver registered
[    0.904353] Key type id_legacy registered
[    0.904396] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.904419] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.905315] fuse init (API version 7.23)
[    0.907207] Key type big_key registered
[    0.996403] Key type asymmetric registered
[    0.996436] Asymmetric key parser 'x509' registered
[    0.996564] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.996592] io scheduler noop registered
[    0.996610] io scheduler deadline registered
[    0.996669] io scheduler cfq registered (default)
[    0.997319] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.998789] console [ttyS0] disabled
[    0.998876] 44200000.uart: ttyS0 at MMIO 0x44200000 (irq = 6, base_baud = 390625) is a 16550A
[    1.581568] console [ttyS0] enabled
[    1.596262] loop: module loaded
[    1.601379] scsi host0: sata_oxnas
[    1.605199] ata1: SATA max UDMA/133 irq 7
[    1.609287] sata_oxnas: resetting SATA core
[    1.610411] nand: Could not find valid ONFI parameter page; aborting
[    1.610455] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    1.610460] nand: Hynix NAND 128MiB 3,3V 8-bit
[    1.610470] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.610485] Scanning device for bad blocks
[    1.692372] 2 cmdlinepart partitions found on MTD device 41000000.nand
[    1.698874] Creating 2 MTD partitions on "41000000.nand":
[    1.704279] 0x000000000000-0x000000e00000 : "boot"
[    1.711011] 0x000000e00000-0x000008000000 : "data"
[    1.718220] oxnas-gmac 40400000.ethernet: no reset control found
[    1.724259] stmmac - user ID: 0x12, Synopsys ID: 0x35
[    1.729282]  Ring mode enabled
[    1.732341]  DMA HW capability register supported
[    1.736844]  Enhanced/Alternate descriptors
[    1.741189]  Enabled extended descriptors
[    1.745177]  RX Checksum Offload Engine supported (type 2)
[    1.750653]  TX Checksum insertion supported
[    1.754895]  Wake-Up On Lan supported
[    1.758535]  Enable RX Mitigation via HW Watchdog Timer
[    1.794672] libphy: stmmac: probed
[    1.798072] eth%d: PHY ID 001cc914 at 0 IRQ POLL (stmmac-0:00) active
[    1.804538] eth%d: PHY ID 001cc914 at 3 IRQ POLL (stmmac-0:03)
[    1.811243] PPP generic driver version 2.4.2
[    1.815818] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.822428] ehci-pci: EHCI PCI platform driver
[    1.827220] oxnas-ehci 40200100.ehci: EHCI Host Controller
[    1.832783] oxnas-ehci 40200100.ehci: new USB bus registered, assigned bus number 1
[    1.840640] oxnas-ehci 40200100.ehci: irq 10, io mem 0x40200100
[    1.860014] oxnas-ehci 40200100.ehci: USB 2.0 started, EHCI 1.00
[    1.866334] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.873149] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.880368] usb usb1: Product: EHCI Host Controller
[    1.885222] usb usb1: Manufacturer: Linux 4.4.124-oxnas-tld-1 ehci_hcd
[    1.891750] usb usb1: SerialNumber: 40200100.ehci
[    1.897387] hub 1-0:1.0: USB hub found
[    1.901245] hub 1-0:1.0: 2 ports detected
[    1.906280] usbcore: registered new interface driver cdc_wdm
[    1.912151] usbcore: registered new interface driver usb-storage
[    1.918297] usbcore: registered new interface driver usbserial
[    1.924211] usbcore: registered new interface driver usbserial_generic
[    1.930808] usbserial: USB Serial support registered for generic
[    1.937249] mousedev: PS/2 mouse device common for all mice
[    1.943014] i2c /dev entries driver
[    1.947727] hidraw: raw HID events driver (C) Jiri Kosina
[    1.953418] usbcore: registered new interface driver usbhid
[    1.958965] usbhid: USB HID core driver
[    1.964812] NET: Registered protocol family 10
[    1.990151] ata1: SATA link down (SStatus 0 SControl 310)
[    1.990545] sit: IPv6 over IPv4 tunneling driver
[    1.991546] NET: Registered protocol family 17
[    1.991723] Key type dns_resolver registered
[    2.001082] registered taskstats version 1
[    2.001126] Loading compiled-in X.509 certificates
[    2.001249] zswap: loaded using pool lzo/zbud
[    2.035786] Key type encrypted registered
[    2.060518] hctosys: unable to open rtc device (rtc0)
[    2.067781] Freeing unused kernel memory: 224K
Loading, please wait...
[    2.220131] usb 1-1: new high-speed USB device number 2 using oxnas-ehci
starting version 232
[    2.241510] random: systemd-udevd: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.252705] random: systemd-udevd: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.252989] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.255221] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.255503] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.256478] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.257515] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.261514] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.262446] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.263395] random: udevadm: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    2.422446] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    2.429130] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.442536] usb 1-1: Product: USB2.0 Hub
[    2.456550] hub 1-1:1.0: USB hub found
[    2.470287] hub 1-1:1.0: 4 ports detected
[    2.770211] usb 1-1.4: new high-speed USB device number 3 using oxnas-ehci
[    2.934425] usb 1-1.4: New USB device found, idVendor=0930, idProduct=6545
[    2.941329] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.948602] usb 1-1.4: Product: DT 101 G2
[    2.952642] usb 1-1.4: Manufacturer: Kingston
[    2.956979] usb 1-1.4: SerialNumber: 001D0F0C73C3EBB165540023
[    2.963944] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    2.970862] scsi host1: usb-storage 1-1.4:1.0
[    2.993072] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[    3.972410] scsi 1:0:0:0: Direct-Access     Kingston DT 101 G2        PMAP PQ: 0 ANSI: 0 CCS
[    3.989053] sd 1:0:0:0: [sda] 7669824 512-byte logical blocks: (3.93 GB/3.66 GiB)
[    3.997120] sd 1:0:0:0: [sda] Write Protect is off
[    4.003015] sd 1:0:0:0: [sda] No Caching mode page found
[    4.012623] sd 1:0:0:0: [sda] Assuming drive cache: write through
[    4.027399]  sda: sda1
[    4.039019] sd 1:0:0:0: [sda] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/sda1] fsck.ext4 -a -C0 /dev/sda1 
rootfs: clean, 14401/240000 files, 169445/958472 blocks
done.
[   13.461486] 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.
[....] Starting the hotplug events dispatcher: systemd-udevdstarting version 232
. ok 
[....] Synthesizing the initial hotplug events...done.
[   16.396231] rt2800pci 0000:00:00.0: enabling device (0140 -> 0142)
[   16.410496] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3090, rev 3213 detected
[   16.442298] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[....] Waiting for /dev to be fully populated...[   16.665653] rt2800pci 0000:00:00.0 wlp0s0: renamed from wlan0
done.
[....] Activating swap...done.
[   17.777866] random: nonblocking pool is initialized
[   17.834160] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[....] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.29.2
done.
[....] Loading kernel modules...done.
[....] Cleaning up temporary files... /tmp. ok 
[....] Mounting local filesystems...done.
[....] Activating swapfile swap...done.
[....] Cleaning up temporary files.... ok 
[....] Setting kernel variables...done.
[   22.656261] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2860.bin'
[   22.668689] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.40
[   24.930526] IPv6: ADDRCONF(NETDEV_UP): wlp0s0: link is not ready
[....] Configuring network interfaces...[   27.812490] wlp0s0: authenticate with 64:66:b3:d3:27:5e
[   27.890649] wlp0s0: send auth to 64:66:b3:d3:27:5e (try 1/3)
[   27.899704] wlp0s0: authenticated
[   27.910164] wlp0s0: associate with 64:66:b3:d3:27:5e (try 1/3)
[   27.921484] wlp0s0: RX AssocResp from 64:66:b3:d3:27:5e (capab=0x411 status=0 aid=3)
[   27.929338] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s0: link becomes ready
[   27.935823] wlp0s0: associated
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/wlp0s0/48:5d:60:4b:7a:5c
Sending on   LPF/wlp0s0/48:5d:60:4b:7a:5c
Sending on   Socket/fallback
DHCPREQUEST of 192.168.2.107 on wlp0s0 to 255.255.255.255 port 67
DHCPREQUEST of 192.168.2.107 on wlp0s0 to 255.255.255.255 port 67
DHCPACK of 192.168.2.107 from 192.168.2.1
bound to 192.168.2.107 -- renewal in 36068 seconds.
ifup: waiting for lock on /run/network/ifstate.eth0
ifup: interface eth0 already configured
done.
[....] Starting RPC port mapper daemon: rpcbind. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Cleaning up temporary files.... ok 
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1375 (syslogd)
. ok 
[....] Starting NFS common utilities: statd idmapd. ok 
[....] Starting system message bus: dbus. ok 
[....] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. ok 
[....] Not starting NFS kernel daemon: no exports. ... (warning).
[....] Starting OpenBSD Secure Shell server: sshd. ok 
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1374 (klogd)
. ok 
[....] Starting NTP server: ntpd. ok 

Debian GNU/Linux 9 debian ttyS0

debian login:
Debian GNU/Linux 9 debian ttyS0

debian login: root
Password: 
Last login: Fri May 25 18:08:01 PDT 2018 on ttyS0
Linux debian 4.4.124-oxnas-tld-1 #1 SMP PREEMPT Wed Mar 28 22:46:38 PDT 2018 armv6l

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@debian:~# cat /boot/uEnv.txt 
custom_params=init=/bin/systemd
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
bootcmd_exec=printenv custom_params; printenv bootargs; run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x605000
00 - 0x62c00000; else bootm 0x60500000; fi; fi
root@debian:~#



Edited 1 time(s). Last edit at 05/25/2018 07:14PM by hkguy.
Re: How to use systemd using uEnv.txt
May 25, 2018 08:41PM
hkguy,

Now we know it happened that nothing got loaded, even after it was reporting
importing envs ...


Let's debug it further.

Interrup serial console at countdown

Hit any key to stop autoboot:  0

and

run bootcmd_uenv
printenv filesize
printenv
See if the new definitions from uEnv.txt even got populated. And then we'll go to a deeper level in each action.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: How to use systemd using uEnv.txt
May 25, 2018 09:32PM
bodhi,

Here is the log...

Thanks,
hkguy

OX820> 
OX820> printenv 
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_stock; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi;
 fi
bootcmd_stock=setenv autoload n; setenv bootargs_stock "root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M"; setenv poweroutage yes; setenv boot "bootm 60500000"
; setenv bootcmd_stock_fw "run set_bootargs_stock; run boot_nand"; setenv boot bootm 60500000; setenv boot_nand "run load_nand boot || run load_nand2 boot"; setenv kernflmode s; setenv load_nand2 "nboot 60500000 0 800000"; setenv load_nand
 "nboot 60500000 0 200000"; setenv set_bootargs_stock "setenv bootargs $bootargs_stock"; setenv mainlinelinux no; run bootcmd_stock_fw
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/ox820-pogoplug-pro.dtb
ethact=dwmac.40400000
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.222
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device 0x62c00000 $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
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 d
isknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 0x60500000 /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_import=echo importing envs ...; env import -t 0x60510000  $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 0x60500000 /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_custom_params=zswap.enabled=1
usb_ready_retry=15

Environment size: 3354/131068 bytes
OX820> 
OX820> run bootcmd_uenv 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Reset IDE: SATA PHY not ready for device 0
ide_preinit failed

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

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7667776         00000000-01     83 Boot
loading envs from usb 0 ...
424 bytes read in 124 ms (2.9 KiB/s)

no IDE devices available
importing envs ...
OX820> printenv filesize 
filesize=1a8
OX820> printenv 
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_stock; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi;
 fi
bootcmd_stock=setenv autoload n; setenv bootargs_stock "root=ubi0:rootfs ubi.mtd=2,512 rootfstype=ubifs console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 mem=128M"; setenv poweroutage yes; setenv boot "bootm 60500000"
; setenv bootcmd_stock_fw "run set_bootargs_stock; run boot_nand"; setenv boot bootm 60500000; setenv boot_nand "run load_nand boot || run load_nand2 boot"; setenv kernflmode s; setenv load_nand2 "nboot 60500000 0 800000"; setenv load_nand
 "nboot 60500000 0 200000"; setenv set_bootargs_stock "setenv bootargs $bootargs_stock"; setenv mainlinelinux no; run bootcmd_stock_fw
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/ox820-pogoplug-pro.dtb
ethact=dwmac.40400000
ethaddr=52:3b:20:9c:11:51
filesize=1a8
if_netconsole=ping $serverip
init_ide=ide reset
init_mmc=mmc rescan
init_usb=usb start
ipaddr=192.168.0.222
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device 0x62c00000 $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage
mainlineLinux=yes
mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)
preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi
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 d
isknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 0x60500000 /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_import=echo importing envs ...; env import -t 0x60510000  $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_loaded=1
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /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_custom_params=zswap.enabled=1
usb_ready_retry=15

Environment size: 3449/131068 bytes
Re: How to use systemd using uEnv.txt
May 26, 2018 02:11AM
Hi hkguy,

Thanks for reporting this problem. It is indeed there is a typo in the default envs (my mistake) :) I'm surprised noboday has reported this before! Apparently uEnv.txt was not used by a lot of users.

To fix this problem, boot into Debian as normal with sysvinit, and then

fw_setenv uenv_import 'echo importing envs ...; env import -t 0x60500000  $filesize'

After this the uEnv.txt will work, as you wanted to boot systemd:

root@debian:~# cat /boot/uEnv.txt 
custom_params=init=/bin/systemd

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: How to use systemd using uEnv.txt
May 26, 2018 05:56PM
bodhi,
Thanks for the info.
I'm happy now systemd is working in my pogo box.

hkguy
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: