This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

sdk3.00.04 + sytemd services +roots optisation +boot optimization.

Other Parts Discussed in Thread: AM3352, TPS65910

HI All,

we follow so many wiki links.But those links are older  versions.

we are using latest ti-processor sdk-3.00.04 .our boot optimizaiton time is 5 sec.we optimized u-boot and kernel .But we are not optimized rootfs systemd services.our logs below please find the below logs give me idea.

we removed so many systemd services from /lib/systemd/system/.services.

still we need to remove some systemd services.

we plotted our systemd-analyze graph.That graph attached.please give me any idea to reduce my boot optimization time.

1.we register our application scripts.sh in init.d and symlink to rcS.d scripts and created systemd services.

2.we need to load the  driver modules first and then load my wifi application scripts and systemd services?

3.while booting only we need to enable our application scripts in init.d.How to enable in latest sdk rootfs?

4.we removed systemd-services but still we are not reached our boot optimization time.

5.can we  any one solved this rootfs boot optimization.please suggest me how to do this.

please find my below logs

rying to boot from MMC1
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
reading u-boot.img
reading u-boot.img


U-Boot 2016.05 (Jul 29 2016 - 18:50:17 +0530)

       Watchdog enabled
I2C:   ready
DRAM:  256 MiB
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
reading uboot.env
Net:   
Warning: ethernet@4a100000 MAC addresses don't match:
Address in SROM is         68:9e:19:84:3d:f7
Address in environment is  68:9e:19:87:e8:ad
eth0: ethernet@4a100000
Warning: usb_ether MAC addresses don't match:
Address in SROM is         de:ad:be:ef:00:01
Address in environment is  68:9e:19:87:e8:af
, eth1: usb_ether
Press SPACE to abort autoboot in 2 seconds
Unknown command 'iftest' - try 'help'
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
** Unable to read file uEnv.txt **
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading boot.scr
** Unable to read file boot.scr **
reading uEnv.txt
** Unable to read file uEnv.txt **
2121952 bytes read in 154 ms (13.1 MiB/s)
40041 bytes read in 16 ms (2.4 MiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x2060e0 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8ef1d000, end 8ef29c68 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.12-g3639bea54a (veera@FSETBLR1LX046) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #25 PREEMPT Fri Sep 23 14:54:48 IST 2016
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: TI AM335x EVM-SK
[    0.000000] cma: Reserved 24 MiB at 0x8d000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (neon )
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=0008156d-02 rw rootfstype=ext4 rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 228848K/262144K available (4035K kernel code, 148K rwdata, 1296K rodata, 220K init, 212K bss, 8720K reserved, 24576K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc053ce2c   (5332 kB)
[    0.000000]       .init : 0xc053d000 - 0xc0574000   ( 220 kB)
[    0.000000]       .data : 0xc0574000 - 0xc0599018   ( 149 kB)
[    0.000000]        .bss : 0xc059b000 - 0xc05d013c   ( 213 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000014] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000037] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000048] OMAP clocksource: timer1 at 24000000 Hz
[    0.000469] clocksource_probe: no matching clocksources found
[    0.000536] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.000543] This ensures that you still see kernel messages. Please
[    0.000549] update your kernel commandline.
[    0.000566] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
[    0.089083] pid_max: default: 32768 minimum: 301
[    0.089228] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.089241] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.089955] Initializing cgroup subsys io
[    0.089989] Initializing cgroup subsys memory
[    0.090025] Initializing cgroup subsys devices
[    0.090040] Initializing cgroup subsys freezer
[    0.090054] Initializing cgroup subsys perf_event
[    0.090067] Initializing cgroup subsys pids
[    0.090095] CPU: Testing write buffer coherency: ok
[    0.090505] Setting up static identity map for 0x80008200 - 0x80008258
[    0.092659] devtmpfs: initialized
[    0.103998] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.118728] omap_hwmod: debugss: _wait_target_disable failed
[    0.174217] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.176463] pinctrl core: initialized pinctrl subsystem
[    0.177685] NET: Registered protocol family 16
[    0.179963] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.209079] cpuidle: using governor ladder
[    0.239067] cpuidle: using governor menu
[    0.243688] OMAP GPIO hardware version 0.1
[    0.254829] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.287080] edma 49000000.edma: TI EDMA DMA engine driver
[    0.290371] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.290563] pps_core: LinuxPPS API ver. 1 registered
[    0.290572] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.290604] PTP clock support registered
[    0.290618] EDAC MC: Ver: 3.0.0
[    0.291730] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.292667] clocksource: Switched to clocksource timer1
[    0.294831] NET: Registered protocol family 2
[    0.295585] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.295620] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.295648] TCP: Hash tables configured (established 2048 bind 2048)
[    0.295739] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.295759] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.295917] NET: Registered protocol family 1
[    0.296774] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.298699] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.306952] ntfs: driver 2.1.32 [Flags: R/O].
[    0.308912] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.308939] io scheduler noop registered
[    0.308952] io scheduler deadline registered
[    0.309104] io scheduler cfq registered (default)
[    0.310566] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.311389] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    0.314238] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
[    0.846864] console [ttyS0] enabled
[    0.851227] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 159, base_baud = 3000000) is a 8250
[    0.867201] loop: module loaded
[    0.871100] libphy: Fixed MDIO Bus: probed
[    0.932742] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    0.938884] davinci_mdio 4a101000.mdio: detected phy mask ffffffbe
[    0.946623] libphy: 4a101000.mdio: probed
[    0.950670] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8740
[    0.959248] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver SMSC LAN8740
[    0.968383] cpsw 4a100000.ethernet: Detected MACID = 68:9e:19:87:e8:ad
[    0.976019] cpsw 4a100000.ethernet: cpsw: Detected MACID = 68:9e:19:87:e8:af
[    0.983922] PPP generic driver version 2.4.2
[    0.988650] i2c /dev entries driver
[    0.992992] cpuidle: enable-method property 'ti,am3352' found operations
[    0.999903] sdhci: Secure Digital Host Controller Interface driver
[    1.006152] sdhci: Copyright(c) Pierre Ossman
[    1.010948] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.015722] omap_hsmmc 48060000.mmc: Got WP GPIO
[    1.163000] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.172587] nf_conntrack version 0.5.0 (3959 buckets, 15836 max)
[    1.179049] omap_hsmmc 481d8000.mmc: card claims to support voltages below defined range
[    1.187996] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.193552] arp_tables: (C) 2002 David S. Miller
[    1.198364] NET: Registered protocol family 17
[    1.202982] Key type dns_resolver registered
[    1.207375] omap_voltage_late_init: Voltage driver support not added
[    1.214839] ThumbEE CPU extension supported.
[    1.219185] Registering SWP/SWPB emulation handler
[    1.232364] mmc0: queuing unknown CIS tuple 0x91 (3 bytes)
[    1.238657] mmc0: new high speed SDIO card at address 0001
[    1.244337] tps65910 0-002d: No interrupt support, no core IRQ
[    1.273284] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.279429] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.284236] omap_hsmmc 48060000.mmc: Got WP GPIO
[    1.289260] mmc_card_regulator: supplied by vbat
[    1.333211] vdd_mpu: supplied by vbat
[    1.338002] lis3_reg: disabling
[    1.342304] Waiting for root device PARTUUID=0008156d-02...
[    1.584777] mmc1: new high speed SDHC card at address aaaa
[    1.590936] mmcblk0: mmc1:aaaa SU04G 3.69 GiB
[    1.596937]  mmcblk0: p1 p2
[    1.690953] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.699451] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.706708] devtmpfs: mounted
[    1.710666] Freeing unused kernel memory: 220K (c053d000 - c0574000)
[    1.717139] This architecture does not have kernel memory protection.
[    1.973837] systemd[1]: System time before build time, advancing clock.
[    2.036363] random: systemd urandom read with 19 bits of entropy available
[    2.064042] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 )
[    2.083216] systemd[1]: Detected architecture arm.

Welcome to Arago 2016.07!

[    2.114256] systemd[1]: Set hostname to <am335x-evm>.
[    2.755355] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[    2.783517] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    2.813510] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[    2.843653] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    2.873348] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    2.903296] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    2.940628] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[    2.973623] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[    3.003110] systemd[1]: Reached target Paths.
[  OK  ] Reached target Paths.
[    3.023054] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    3.057488] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[    3.088966] systemd[1]: Mounting Temporary Directory...
         Mounting Temporary Directory...
[    3.123328] systemd[1]: Reached target Slices.
[  OK  ] Reached target Slices.
[    3.166162] systemd[1]: Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[    3.198789] systemd[1]: Starting Create list of required static device nodes for the current kernel...
         Starting Create list of required st... nodes for the current kernel...
[    3.255024] systemd[1]: Created slice system-getty.slice.
[  OK  ] Created slice system-getty.slice.
[    3.288960] systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
[    3.328602] systemd[1]: Starting Apply Kernel Variables...
[    3.371978] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
         Starting Apply Kernel Variables...
[    3.414438] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[    3.440051] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[    3.498554] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    3.602314] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[    3.643631] systemd[1]: Mounted Temporary Directory.
[  OK  ] Mounted Temporary Directory.
[    3.684040] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
[  OK  ] Started Create list of required sta...ce nodes for the current kernel.
[FAILED] Failed to start Remount Root and Kernel File Systems.
See 'systemctl status systemd-remount-fs.service' for details.
[  OK  ] Started Apply Kernel Variables.
         Starting udev Coldplug all Devices...
         Starting Create Static Device Nodes in /dev...
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started udev Coldplug all Devices.
[    4.967656] systemd-journald[80]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /media/ram...
         Mounting /var/volatile...
         Starting udev Kernel Device Manager...
[  OK  ] Mounted /var/volatile.
[  OK  ] Mounted /media/ram.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /dev/ttyS3.
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems.
[    7.569020] 47401b00.usb-phy supply vcc not found, using dummy regulator
         Starting Create Volatile Files and Directories...
[    7.652020] usbcore: registered new interface driver usbfs
[    7.720343] usbcore: registered new interface driver hub
[    7.760214] usbcore: registered new device driver usb
[  OK  ] Started Load/Save Random Seed.
[    7.850780] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    7.936041] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[  OK  ] Started Create Volatile Files and Directories.
[    7.986078] hub 1-0:1.0: USB hub found
[    8.013027] hub 1-0:1.0: 1 port detected
[    8.187653] cfg80211: World regulatory domain updated:
[    8.210842] cfg80211:  DFS Master region: unset
[    8.222857] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[    8.243462] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    8.260391] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[    8.292957] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[    8.301030] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[    8.333893] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
         Starting Update UTMP about System Boot/Shutdown...
[    8.360996] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
         Starting Network Time Synchronization...[    8.400315] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)

[    8.462896] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[    8.501888] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[  OK  ] Started Network Time Synchronization.
[    8.653661] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[    8.786258] usbcore: registered new interface driver usbserial
[    8.806241] wlcore: loaded
[    8.851463] usbcore: registered new interface driver option
[    8.907730] usbcore: registered new interface driver cdc_wdm
[    8.925124] usbserial: USB Serial support registered for GSM modem (1-port)
[    8.963449] option 1-1:1.0: GSM modem (1-port) converter detected
[    8.984046] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[    8.995758] qmi_wwan 1-1:1.5: cdc-wdm0: USB WDM device
[    9.001741] qmi_wwan 1-1:1.5 wwan0: register 'qmi_wwan' at usb-musb-hdrc.1.auto-1, WWAN/QMI device, 76:87:2d:4e:9c:87
[  OK  ] Reached target System Time Synchronized.[    9.025011] option 1-1:1.1: GSM modem (1-port) converter detected

[    9.038225] usbcore: registered new interface driver qmi_wwan
[    9.052071] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[    9.069659] option 1-1:1.2: GSM modem (1-port) converter detected
         Starting Synchronize System and HW clocks...
[    9.093838] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[    9.125379] option 1-1:1.3: GSM modem (1-port) converter detected
[    9.155255] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[    9.173812] option 1-1:1.4: GSM modem (1-port) converter detected
[FAILED] Failed to start Synchronize System and HW clocks.[    9.185150] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4

See 'systemctl status sync-clocks.service' for details.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started Kernel Logging Service.
         Starting Permit User Sessions...
[  OK  ] Started System Logging Service.
         Starting Network Name Resolution...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Network Name Resolution.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Serial Getty on ttyS3.

 _____                    _____           _         _   
|  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
|     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
|__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
              |___|                    |___|            

Arago Project http://arago-project.org am335x-evm ttyS0

Arago 2016.07 am335x-evm ttyS0

am335x-evm login: [   52.406241] random: nonblocking pool is initialized

we checked with systemd-analyze blame

4.507s dev-mmcblk0p2.device
           799ms systemd-logind.service
           618ms systemd-journal-flush.service
           564ms systemd-udev-trigger.service
           563ms tmp.mount
           558ms dev-mqueue.mount
           535ms systemd-remount-fs.service
           482ms systemd-sysctl.service
           456ms kmod-static-nodes.service
           317ms user@0.service
           315ms systemd-journald.service
           276ms systemd-tmpfiles-setup.service
           262ms systemd-update-utmp.service
           242ms systemd-user-sessions.service
           240ms systemd-update-utmp-runlevel.service
           206ms systemd-resolved.service
           201ms systemd-udevd.service
           188ms systemd-tmpfiles-setup-dev.service
           182ms media-ram.mount
           134ms var-volatile.mount
           129ms systemd-random-seed.service
           127ms systemd-timesyncd.service
            71ms sync-clocks.service

Thanks

veera

  • I will forward this to the software team. They will respond directly here.
  • Hi,

    1.we register our application scripts.sh in init.d and symlink to rcS.d scripts and created systemd services.

    2.we need to load the driver modules first and then load my wifi application scripts and systemd services?

    3.while booting only we need to enable our application scripts in init.d.How to enable in latest sdk rootfs?


    In order to add your init scripts to systemd, you need to create a .service file with the bellow content:
    [Unit]
    Description=Myinit scripts

    [Service]
    ExecStart=/etc/init.d/myinitscript.sh

    [Install]
    WantedBy=multi-user.target

    Or something similar.. see the following thread: e2e.ti.com/.../1985794

    4.we removed systemd-services but still we are not reached our boot optimization time.

    5.can we any one solved this rootfs boot optimization.please suggest me how to do this.


    You can remove the autoboot time: "Press SPACE to abort autoboot in 2 seconds", this will save you a couple of seconds. You can also remove the dmesg prints on bootup.

    Best Regards,
    Yordan
  • Hi all,

    we are using latest ti-processor sdk 3.00.00.04.

    Hi Yordan,

    we removed so many services.But we enable our application services wifi,wwan  and all.But we are not getting wwan0 and wifi messages ,unable to get wifi signal and ip addresses on my mobile.

    means wifi ifconfig -a logs are not getting before root. .My doubt is which systemd service loaded the driver modules ?After that we need to run my application service.

    we removed systemd-modules-loaded.service file .Then how the driver modules loaded while booting?

    please can any body knows explain.

    veera:====>U-Boot SPL 2016.05 (Sep 27 2016 - 16:02:08)
    veera:===>Trying to boot from MMC1
    reading args
    spl_load_image_fat_os: error reading image args, err - -1
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img


    U-Boot 2016.05 (Sep 27 2016 - 16:02:08 +0530)

    Watchdog enabled
    I2C: ready
    DRAM: 256 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

    Hit any key to stop autoboot: 0 
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    switch to partitions #0, OK
    mmc0 is current device
    Scanning mmc 0:1...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    ** Unable to read file uEnv.txt **
    1838336 bytes read in 130 ms (13.5 MiB/s)
    40041 bytes read in 17 ms (2.2 MiB/s)
    Kernel image @ 0x82000000 [ 0x000000 - 0x1c0d00 ]
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ef3b000, end 8ef47c68 ... OK

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Initializing cgroup subsys cpu
    [ 0.000000] Initializing cgroup subsys cpuacct
    [ 0.000000] Linux version 4.4.12-g3639bea54a (veera@FSETBLR1LX046) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #4 PREEMPT Tue Sep 27 15:53:55 IST 2016
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] Machine model: TI AM335x EVM-SK
    [ 0.000000] cma: Reserved 24 MiB at 0x8d000000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (neon )
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64960
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=0008156d-02 rw rootfstype=ext4 rootwait
    [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [ 0.000000] Memory: 229484K/262144K available (3519K kernel code, 140K rwdata, 1204K rodata, 204K init, 210K bss, 8084K reserved, 24576K cma-reserved, 0K highmem)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc04a4e34 (4724 kB)
    [ 0.000000] .init : 0xc04a5000 - 0xc04d8000 ( 204 kB)
    [ 0.000000] .data : 0xc04d8000 - 0xc04fb298 ( 141 kB)
    [ 0.000000] .bss : 0xc04fd000 - 0xc0531a34 ( 211 kB)
    [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] Build-time adjustment of leaf fanout to 32.
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000015] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.000040] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.000051] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000548] clocksource_probe: no matching clocksources found
    [ 0.000590] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.000597] This ensures that you still see kernel messages. Please
    [ 0.000603] update your kernel commandline.
    [ 0.000624] Calibrating delay loop... 795.44 BogoMIPS (lpj=3977216)
    [ 0.088985] pid_max: default: 32768 minimum: 301
    [ 0.089134] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.089147] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.089895] Initializing cgroup subsys io
    [ 0.089927] Initializing cgroup subsys memory
    [ 0.089966] Initializing cgroup subsys devices
    [ 0.089984] Initializing cgroup subsys freezer
    [ 0.089999] Initializing cgroup subsys pids
    [ 0.090032] CPU: Testing write buffer coherency: ok
    [ 0.090457] Setting up static identity map for 0x80008200 - 0x80008258
    [ 0.092733] devtmpfs: initialized
    [ 0.105217] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.119951] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.175740] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [ 0.177939] pinctrl core: initialized pinctrl subsystem
    [ 0.179267] NET: Registered protocol family 16
    [ 0.181558] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.208983] cpuidle: using governor ladder
    [ 0.238971] cpuidle: using governor menu
    [ 0.243744] OMAP GPIO hardware version 0.1
    [ 0.287122] edma 49000000.edma: TI EDMA DMA engine driver
    [ 0.289926] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [ 0.290117] pps_core: LinuxPPS API ver. 1 registered
    [ 0.290127] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 0.290162] PTP clock support registered
    [ 0.291182] clocksource: Switched to clocksource timer1
    [ 0.293441] NET: Registered protocol family 2
    [ 0.294284] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.294322] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.294349] TCP: Hash tables configured (established 2048 bind 2048)
    [ 0.294440] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.294460] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [ 0.294627] NET: Registered protocol family 1
    [ 0.297060] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.305472] ntfs: driver 2.1.32 [Flags: R/O].
    [ 0.307604] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
    [ 0.307639] io scheduler noop registered
    [ 0.307654] io scheduler deadline registered
    [ 0.307843] io scheduler cfq registered (default)
    [ 0.309006] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 0.309807] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
    [ 0.312821] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [ 0.817486] console [ttyS0] enabled
    [ 0.821955] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 159, base_baud = 3000000) is a 8250
    [ 0.831987] libphy: Fixed MDIO Bus: probed
    [ 0.901237] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 0.907376] davinci_mdio 4a101000.mdio: detected phy mask ffffffbe
    [ 0.915101] libphy: 4a101000.mdio: probed
    [ 0.919151] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8740
    [ 0.927721] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver SMSC LAN8740
    [ 0.936860] cpsw 4a100000.ethernet: Detected MACID = 68:9e:19:84:3d:f7
    [ 0.944565] cpsw 4a100000.ethernet: cpsw: Detected MACID = 68:9e:19:84:3d:f9
    [ 0.952658] i2c /dev entries driver
    [ 0.956894] cpuidle: enable-method property 'ti,am3352' found operations
    [ 0.963922] sdhci: Secure Digital Host Controller Interface driver
    [ 0.970132] sdhci: Copyright(c) Pierre Ossman
    [ 0.974963] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 0.979695] omap_hsmmc 48060000.mmc: Got WP GPIO
    [ 1.131540] sdhci-pltfm: SDHCI platform and OF driver helper
    [ 1.141286] nf_conntrack version 0.5.0 (3969 buckets, 15876 max)
    [ 1.148462] ip_tables: (C) 2000-2006 Netfilter Core Team
    [ 1.154051] arp_tables: (C) 2002 David S. Miller
    [ 1.158735] omap_hsmmc 481d8000.mmc: card claims to support voltages below defined range
    [ 1.167035] NET: Registered protocol family 17
    [ 1.171612] Key type dns_resolver registered
    [ 1.175980] omap_voltage_late_init: Voltage driver support not added
    [ 1.183477] ThumbEE CPU extension supported.
    [ 1.187827] Registering SWP/SWPB emulation handler
    [ 1.202497] mmc0: queuing unknown CIS tuple 0x91 (3 bytes)
    [ 1.208709] mmc0: new high speed SDIO card at address 0001
    [ 1.214396] tps65910 0-002d: No interrupt support, no core IRQ
    [ 1.244109] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 1.250230] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 1.255034] omap_hsmmc 48060000.mmc: Got WP GPIO
    [ 1.260087] mmc_card_regulator: supplied by vbat
    [ 1.301764] vdd_mpu: supplied by vbat
    [ 1.306719] lis3_reg: disabling
    [ 1.311050] Waiting for root device PARTUUID=0008156d-02...
    [ 1.563862] mmc1: new high speed SDHC card at address aaaa
    [ 1.570074] mmcblk0: mmc1:aaaa SU04G 3.69 GiB 
    [ 1.576202] mmcblk0: p1 p2
    [ 1.698505] EXT4-fs (mmcblk0p2): recovery complete
    [ 1.705100] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 1.713435] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 1.720708] devtmpfs: mounted
    [ 1.724669] Freeing unused kernel memory: 204K (c04a5000 - c04d8000)
    [ 1.731068] This architecture does not have kernel memory protection.
    [ 1.989613] systemd[1]: System time before build time, advancing clock.
    [ 2.048795] random: systemd urandom read with 21 bits of entropy available
    [ 2.073406] systemd[1]: systemd 229 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 )

    Welcome to Arago 2016.07!

    [ 2.092887] systemd[1]: Set hostname to <am335x-evm>.
    [ 2.668884] systemd[1]: Listening on Journal Socket.
    [ OK ] Listening on Journal Socket.
    [ 2.692040] systemd[1]: Listening on udev Kernel Socket.
    [ OK ] Listening on udev Kernel Socket.
    [ 2.726388] systemd[1]: Created slice System Slice.
    [ OK ] Created slice System Slice.
    [ 2.754254] systemd[1]: Created slice system-serial\x2dgetty.slice.
    [ OK ] Created slice system-serial\x2dgetty.slice.
    [ 2.784281] systemd[1]: Created slice system-getty.slice.
    [ OK ] Created slice system-getty.slice.
    [ 2.813068] systemd[1]: Listening on Journal Socket (/dev/log).
    [ OK ] Listening on Journal Socket (/dev/log).
    [ 2.852141] systemd[1]: Listening on udev Control Socket.
    [ OK ] Listening on udev Control Socket.
    [ 2.881726] systemd[1]: Reached target Sockets.
    [ OK ] Reached target Sockets.
    [ 2.907108] systemd[1]: Starting udev Coldplug all Devices...
    Starting udev Coldplug all Devices...
    [ 2.947873] systemd[1]: Starting udev Kernel Device Manager...
    Starting udev Kernel Device Manager...
    [ 3.035790] systemd[1]: Starting Journal Service...
    Starting Journal Service...
    [ 3.340746] systemd[1]: Started udev Kernel Device Manager.
    [ OK ] Started udev Kernel Device Manager.
    [ 3.455881] systemd[1]: Started Journal Service.
    [ OK ] Started Journal Service.
    [ OK ] Started udev Coldplug all Devices.
    [ OK ] Found device /dev/ttyS0.
    [ 5.779645] usbcore: registered new interface driver usbfs
    [ 5.787853] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [ 5.831808] usbcore: registered new interface driver hub
    [ 5.885500] usbcore: registered new device driver usb
    [ OK ] Found device /dev/ttyS3.
    [ OK ] Reached target System Initialization.
    [ OK ] Reached target Basic System.
    [ OK ] Started Serial Getty on ttyS0.
    [ 6.019682] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    [ OK ] Started Serial Getty on ttyS3.
    [ 6.110339] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
    [ OK ] Started wifi application scripts.
    [ 6.189145] hub 1-0:1.0: USB hub found
    Starting Network Service...
    [ 6.222741] hub 1-0:1.0: 1 port detected
    [ 6.469427] cfg80211: World regulatory domain updated:
    [ 6.497189] cfg80211: DFS Master region: unset
    [ 6.516272] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    [ 6.542112] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
    [ 6.557747] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
    [ 6.566090] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
    [ 6.575499] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
    [ 6.586049] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
    [ 6.596069] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
    [ 6.606052] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
    [ 6.617520] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
    [ 6.628311] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
    [ 6.671380] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [ 6.683212] net eth1: initializing cpsw version 1.12 (0)
    [ OK ] Started Network Service.[ 6.694513] net eth0: initialized cpsw ale version 1.4

    [ 6.714176] net eth1: phy found : id is : 0x7c111
    [ OK ] Reached target Network.
    [ 6.754342] net eth0: initializing cpsw version 1.12 (0)
    [ 6.793200] net eth0: phy found : id is : 0x7c111
    [ 6.867287] wlcore: loaded
    [ 7.044874] usbcore: registered new interface driver usbserial
    [ 7.099124] usbcore: registered new interface driver option
    [ 7.110790] usbcore: registered new interface driver cdc_wdm
    [ 7.136223] usbserial: USB Serial support registered for GSM modem (1-port)
    [ 7.161585] qmi_wwan 1-1:1.5: cdc-wdm0: USB WDM device
    [ 7.491666] wlcore: PHY firmware version: Rev 8.2.0.0.237
    [ 7.604776] wlcore: firmware booted (Rev 8.9.0.0.70)
    [ 7.633108] qmi_wwan 1-1:1.5 wwan0: register 'qmi_wwan' at usb-musb-hdrc.1.auto-1, WWAN/QMI device, 22:76:f8:42:39:9f
    [ 7.658447] option 1-1:1.0: GSM modem (1-port) converter detected
    [ 7.668856] usbcore: registered new interface driver qmi_wwan
    [ 7.681972] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
    [ 7.697311] option 1-1:1.1: GSM modem (1-port) converter detected
    [ 7.706690] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
    [ 7.718205] option 1-1:1.2: GSM modem (1-port) converter detected
    [ 7.732461] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
    [ 7.744347] option 1-1:1.3: GSM modem (1-port) converter detected
    [ 7.757055] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
    [ 7.765856] option 1-1:1.4: GSM modem (1-port) converter detected
    [ 7.779733] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
    [ 7.871895] wlcore: down
    [ 8.031313] random: nonblocking pool is initialized
    [ 8.761611] wlcore: down

    root@am335x-evm:~#

    vi /home/start.sh

    #!/bin/sh
    echo "hello world\n"
    qmicli -d /dev/cdc-wdm0 --wds-start-network=="www" --client-no-release-cid
    udhcpc -i wwan0
    ifconfig -a
    sh /etc/ip_tables.sh
    echo "iptables loaded"
    cd /usr/share/wl18xx/
    sh ap_start.sh
    ifconfig -a
    echo "wifi modules loaded "
    #ping www.google.com
    echo ""
    #sh /usr/share/wl18xx/ap_stop

    cd /lib/systemd/system

    vi our-application.service

    [Unit]
    Description=tbox scripts
    Before=sysinit.target shutdown.target systemd-modules-load.service

    [Service]
    ExecStart=/home/start.sh

    [Install]
    WantedBy=multi-user.target
    #StandardOutput=journal+console
    ~

  • Hi,

    Sorry for the late reply.

    From the log, you share I don't see your start.sh executed (no "wifi modules loaded" message). This could be the reason for not getting the wifi module to work...

    In the [Unit] section try to configure an "After=" ordering.
    Also when you created your service file, did you set the correct permissions, i.e.:
    touch /lib/systemd/system/our-application.service
    chmod 664 /lib/systemd/system/our-application.service

    then enable your service:
    daemon reload
    systemctl enable /lib/systemd/system/our-application.service

    Best Regards,
    Yordan