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.

Linux/DRA77P: Fastboot not achieved

Part Number: DRA77P

Tool/software: Linux

Hi,

In our custom board, we were trying to fastboot following the guide

But due to unavailability of dfu, I manually did the following steps of partitioning and flashing to qpsi and emmc respectively.

On booting, still i see some scripts such as services started. How do I disable the scripts shown by them ?

To verify the optimiazation, I applied loglevel=0 in the sd card bootargs, and was able to see same results as that in qpsi boot.

What am I missing ?

Regards,
Padmesh

  • Hi Padmesh,

    do you refer to systemd services started at later stages of the boot process?
    You should be able to use "systemctl disable <service>" command to disable unused services, you can refer this document for detailed explanation:
    docs.fedoraproject.org/.../index.html

    Regards,
    Yordan
  • Hi Yordan,

    Sorry for the misunderstanding, I do not want to disable the services, i wanted to disable the scripts shown by them.

    This is the log I get.

    U-Boot SPL 2016.05-dirty (May 31 2019 - 11:52:49)
    DRA762-GP ES1.0
    ---CAN1_EN is set to HIGH---
    ---CAN1_STBn is set to HIGH---
    ---EXT_BAT_DISABLE is set to LOW---
    ---INT_BAT_DISABLE is set to LOW---
    ---SOC_GPIO_INT_BAT_EN is set to HIGH---
    ---BT_CHGR_EN is set to HIGH---
    ---SATA_LED is set to HIGH---
    ---SATA_LED is set to HIGH---
    ---ETH RST is set to HIGH---
    ---LTE_RESETn is set to LOW---
    ---LTE_PWR_ON  is set to LOW---
    ---GNSS_RSTn  is set to HIGH---
    ---SOC_GPIO_BATT_CHARGE is set to INPUT MODE---
    ---SOC_GPIO_BATT_FAULT is set to INPUT MODE---
    ---BT_WAKE2SOC_3V3 is set to INPUT MODE---
    ---BT_WAKE_3V3 is set to HIGH---
    ---WIFI_WAKE2SOC_3V3 is set to INPUT MODE---
    ---WIFI_WAKE_3V3 is set to HIGH---
    ---WIFIBT_LED_EN is set to HIGH---
    ---WIFIBT_EN_3V3 is set to HIGH---
    ---I2C_EEPROM_WP  is set to HIGH---
    ---usb4_ulpi_cs  is set to HIGH---
    ---usb3_ulpi_cs is set to HIGH---
    ---AM_FM_RST is set to HIGH---
    Trying to boot from SPI
    
    Welcome to [1mArago 2016.12[0m!
    
    [[0;1;31m SKIP [0m] Ordering cycle found, skipping alignment.service
    [[0;32m  OK  [0m] Started Forward Password Requests to Wall Directory Watch.
    [[0;32m  OK  [0m] Created slice User and Session Slice.
    [[0;32m  OK  [0m] Listening on /dev/initctl Compatibility Named Pipe.
    [[0;32m  OK  [0m] Listening on udev Control Socket.
    [[0;32m  OK  [0m] Created slice System Slice.
    [[0;32m  OK  [0m] Listening on Journal Socket (/dev/log).
    [[0;32m  OK  [0m] Reached target Remote File Systems.
    [[0;32m  OK  [0m] Listening on udev Kernel Socket.
    [[0;32m  OK  [0m] Listening on Syslog Socket.
    [[0;32m  OK  [0m] Reached target Swap.
    [[0;32m  OK  [0m] Started Dispatch Password Requests to Console Directory Watch.
    [[0;32m  OK  [0m] Reached target Paths.
    [[0;32m  OK  [0m] Reached target Slices.
    [[0;32m  OK  [0m] Created slice system-getty.slice.
    [[0;32m  OK  [0m] Listening on Network Service Netlink Socket.
    [[0;32m  OK  [0m] Listening on Journal Socket.
             Starting Setup Virtual Console...
             Starting Remount Root and Kernel File Systems...
             Mounting POSIX Message Queue File System...
             Starting Create list of required st... nodes for the current kernel...
             Mounting Temporary Directory...
    [[0;32m  OK  [0m] Created slice system-serial\x2dgetty.slice.
             Starting Journal Service...
             Starting Load Kernel Modules...
    [[0;32m  OK  [0m] Mounted POSIX Message Queue File System.
    [[0;32m  OK  [0m] Mounted Temporary Directory.
    [[0;32m  OK  [0m] Started Journal Service.
    [[0;32m  OK  [0m] Started Setup Virtual Console.
    [[0;32m  OK  [0m] Started Remount Root and Kernel File Systems.
    [[0;32m  OK  [0m] Started Create list of required sta...ce nodes for the current kernel.
    [[0;1;31mFAILED[0m] Failed to start Load Kernel Modules.
    See 'systemctl status systemd-modules-load.service' for details.
             Starting Apply Kernel Variables...
             Starting Create Static Device Nodes in /dev...
             Starting udev Coldplug all Devices...
             Starting Flush Journal to Persistent Storage...
    [[0;32m  OK  [0m] Started Apply Kernel Variables.
    [[0;32m  OK  [0m] Started Create Static Device Nodes in /dev.
    [[0;32m  OK  [0m] Started Flush Journal to Persistent Storage.
    [[0;32m  OK  [0m] Reached target Local File Systems (Pre).
             Mounting /media/ram...
             Mounting /var/volatile...
             Starting udev Kernel Device Manager...
    [[0;32m  OK  [0m] Mounted /var/volatile.
    [[0;32m  OK  [0m] Mounted /media/ram.
    [[0;32m  OK  [0m] Started udev Kernel Device Manager.
    [[0;32m  OK  [0m] Started udev Coldplug all Devices.
    [[0;32m  OK  [0m] Reached target Local File Systems.
             Starting Create Volatile Files and Directories...
             Starting Load/Save Random Seed...
    [[0;32m  OK  [0m] Started Load/Save Random Seed.
    [[0;32m  OK  [0m] Started Create Volatile Files and Directories.
    [[0;32m  OK  [0m] Found device /dev/ttyS0.
             Starting Network Time Synchronization...
             Starting Update UTMP about System Boot/Shutdown...
    [[0;32m  OK  [0m] Started Network Time Synchronization.
    [[0;32m  OK  [0m] Started Update UTMP about System Boot/Shutdown.
    [[0;32m  OK  [0m] Reached target System Time Synchronized.
             Starting Synchronize System and HW clocks...
    [[0;32m  OK  [0m] Started Synchronize System and HW clocks.
    [[0;32m  OK  [0m] Reached target System Initialization.
    [[0;32m  OK  [0m] Listening on dropbear.socket.
    [[0;32m  OK  [0m] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [[0;32m  OK  [0m] Listening on RPCbind Server Activation Socket.
    [[0;32m  OK  [0m] Listening on D-Bus System Message Bus Socket.
    [[0;32m  OK  [0m] Reached target Sockets.
    [[0;32m  OK  [0m] Reached target Basic System.
    [[0;32m  OK  [0m] Started Kernel Logging Service.
             Starting Print notice about GPLv3 packages...
             Starting uim-sysfs.service...
    [[0;32m  OK  [0m] Started System Logging Service.
             Starting Login Service...
             Starting Avahi mDNS/DNS-SD Stack...
             Starting Telephony service...
    [[0;32m  OK  [0m] Started D-Bus System Message Bus.
    [[0;32m  OK  [0m] Started Telephony service.
    [[0;32m  OK  [0m] Started Avahi mDNS/DNS-SD Stack.
    [[0;32m  OK  [0m] Started strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
             Starting TI MultiCore Tools Daemon...
    [[0;32m  OK  [0m] Started Daily Cleanup of Temporary Directories.
    [[0;32m  OK  [0m] Reached target Timers.
             Starting Network Service...
             Starting Save/Restore Sound Card State...
             Starting Permit User Sessions...
    [[0;32m  OK  [0m] Started Permit User Sessions.
    [[0;32m  OK  [0m] Started Network Service.
    [[0;1;31mFAILED[0m] Failed to start TI MultiCore Tools Daemon.
    See 'systemctl status ti-mct-daemon.service' for details.
    [[0;32m  OK  [0m] Started Save/Restore Sound Card State.
    [[0;32m  OK  [0m] Reached target Sound Card.
    [[0;32m  OK  [0m] Reached target Network.
             Starting Lightning Fast Webserver With Light System Requirements...
             Starting Network Name Resolution...
    [[0;32m  OK  [0m] Started Getty on tty1.
    [[0;32m  OK  [0m] Started Serial Getty on ttyS0.
    [[0;32m  OK  [0m] Started Login Service.
    [[0;32m  OK  [0m] Started Lightning Fast Webserver With Light System Requirements.
    [[0;32m  OK  [0m] Started Network Name Resolution.
    [[0;32m  OK  [0m] Started uim-sysfs.service.
             Starting rc.pvr.service...
    ***************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
    	autoconf
    	binutils-dev
    	binutils
    	bison-dev
    	bison
    	cpp-symlinks
    	cpp
    	dosfstools
    	g++-symlinks
    	g++
    	gawk-dev
    	gawk
    	gcc-symlinks
    	gcc
    	gdb
    	gdbc6x
    	gdbserver
    	gstreamer1.0-libav
    	libcairo-perf-utils
    	libgmp10
    	libidn11
    	libmpc3
    	libmpfr4
    	m4-dev
    	m4
    	make
    	nettle
    	parted
    	swig-dev
    	swig
    
    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution.  This can be done using
    the opkg remove command.  i.e.:
        opkg remove <package>
    Where <package> is the name printed in the list above
    
    NOTE: If the package is a dependency of another package you
          will be notified of the dependent packages.  You should
          use the --force-removal-of-dependent-packages option to
          also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
    [[0;32m  OK  [0m] Started rc.pvr.service.
    [[0;32m  OK  [0m] Started Print notice about GPLv3 packages.
             Starting weston.service...
    [[0;32m  OK  [0m] Started weston.service.
             Starting telnetd.service...
             Starting tiipclad-daemon.service...
    [[0;32m  OK  [0m] Started telnetd.service.
    [[0;32m  OK  [0m] Started tiipclad-daemon.service.
             Starting thttpd.service...
    [[0;32m  OK  [0m] Started thttpd.service.
             Starting rng-tools.service...
    [[0;32m  OK  [0m] Started rng-tools.service.
             Starting gdbserverproxy.service...
    [[0;32m  OK  [0m] Started gdbserverproxy.service.
             Starting Hostname Service...
             Starting thermal-zone-init.service...
    [[0;32m  OK  [0m] Started thermal-zone-init.service.
    [[0;32m  OK  [0m] Started Hostname Service.
    
    
     _____                    _____           _         _   
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_ 
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|  
                  |___|                    |___|            
    
    Arago Project http://arago-project.org dra7xx-evm ttyS0
    
    Arago 2016.12 dra7xx-evm ttyS0
    
    dra7xx-evm login: 

    What do i do to silence them ? By this have I achieved the kernel fastboot ?



    Regards,
    Padmesh

  • Hi Padmesh,

    I think you should be able to disable services output by adding "StandardOutput=null" to the corresponding *.service files located in /lib/systemd/system directory of the rootfs.
    Note that the Application Report you referred focuses on optimizing only to the u-boot and kernel execution times, not the userspace services. In the document you can find a way to measure boot times with and without optimization patches applieda and compare them.

    Regards,
    Yordan
  • Hi Yordan,

    Thanks for the guidance, I was able to disable prints by the services.

    The thing I am facing is that, am not able to run ./list-boot-times.sh.  The following is displayed,

    ls: m-*: No such file or directory
    
    ls: k-*: No such file or directory
    
    ls: u-*: No such file or directory
    
    cat: can't open '/tmp/m-kernelstart-time': No such file or directory
    cat: can't open '/tmp/k-start-time': No such file or directory
    Kernel Decompression time,0
    cat: can't open '/tmp/k-user-space-entry-time': No such file or directory
    Kernel Exec time,0
    

    What am I missing here ? I have followed the patches. I am not able measure the performance parameters.

    On applying the patches, I found that the eth0 is not able not showing IP address. Is there anything preventing it.

  • Hi,

    The readproc utility described in section 5.1 reads the measurements from the chosen node of the device tree and dumps them into /tmp. Please check the files under "/proc/device-tree/chosen".

    if the ethernet module is converted into a module, eth0 may not show an IP address. Please check the kernel configuration.

    regards,

    Venkat

  • Hi Venkat,

    Under /proc/device-tree/chosen, I am able to see the timing parameters.

    I changed the directory to /proc/device-tree/chosen and was able to see the following:

    Are there any ways to optimize after the kernel execution ?

    Regards,

    Padmesh

  • Hi,

    Can you confirm that you are using single stage boot mode and the device tree has the required entries as shown in

    review.omapzoom.org/

    For optimizing after kernel boot, there are a number of documents online. One for example below.

    bootlin.com/.../boot-time-slides.pdf

    regards,

    Venkat

  • Thanks Venkat,

    I was able to solve the issue, currently I'm looking into further optimizations in user space.

    Regards,

    Padmesh

  • Hi Padmesh,

    Glad to know it worked out.

    Could you indicate where the application note was unclear or lacking in content ? It will help me in improving it for other users.

    thanks and regards,

    Venkat

  • Hi Venkat,

    I used the fdtput command with bootargs on the required dtb and placed it in qspi flash as well in the emmc.

    Also I cleaned up the filesystem and added it again.