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/PROCESSOR-SDK-AM335X: Board not turning off with shutdown -h now

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi Community Members,

I am using latest TI-SDK  ti-processor-sdk-linux-am335x-evm-03.02.00.05 with a custom AM335x board.

The issue is that the board is not getting powered off with shutdown -h now . Also it is not getting reboot with the init 6. Due to this issue rtcwake is also not working.

root@ngt:~# shutdown -h now
INIT: Sending processes the TERM signal
INIT: SendiStopping telnet daemon.
Stopping system message bus: [   34.477141] ***omap_rtc_alarm_irq_enable***
hwclock: RTC_SET_TIME: Invalid argument
Error opening /dev/fb0: No such file or directory
Stopping syslogd/klogd: no syslogd found; none killed
Stopping thttpd.
ALSA: Storing mixer settings...
/usr/sbin/alsactl: /usr/lib/libasound.so.2: no version information available (required by /usr/sbin/alsactl)
Deconfiguring network interfaces... ifdown: interface lo not configured
ifdown: interface eth0 not configured
done.
[   35.548679] wlcore: using inverted interrupt logic: 8
[   35.616986] wlcore: PHY firmware version: Rev 8.2.0.0.224
[   35.719342] wlcore: firmware booted (Rev 8.9.0.0.31)
[   35.735367] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...
It stucks over here.
We are using TPS650250QRHBRQ pmic which is hardware controlled.
Can anyone let me know what can be the issue.
Thanks
Deep

 

  • Hi Deep,

    I am using latest TI-SDK  ti-processor-sdk-linux-am335x-evm-03.02.00.05 with a custom AM335x board.

    Latest TI-SDK is ti-processor-sdk-linux-am335x-evm-03.03.00.04

    The issue is that the board is not getting powered off with shutdown -h now

    Do you use the default rootfs that comes with PSDK 3.02 (tisdk-rootfs-image-am335x-evm) ? This shutdown command is working fine on the AM335xTI EVM with PSDK 3.02, see the log file attached.

    1526.shutdown_log.txt

    hwclock: RTC_SET_TIME: Invalid argument

    See if the below e2e thread will be in help:

    We are using TPS650250QRHBRQ pmic

    make sure you have follow the below doc:

    See also:

    Regards,
    Pavel

  • Hi Pavel,

    Thanks for reply. It is working with the rootfs of new SDK.We were using the rootfs of the old sdk 7.
    Can you at least tell me how to prevent this "Sending Discover..." logs.
    I need to make shutdown work with old SDK rootfs.

    Thanks
    Deep
  • deep ter said:
    [   35.735367] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    udhcpc (v1.24.1) started
    Sending discover...
    Sending discover...
    Sending discover...
    It stucks over here.

    For some reason DHCP is started and your AM335x board can not get valid IP address from the DHCP server. In PSDK 3.02 we have just stopping DHCP, but not send new DHCP request, as you have in SDK7

    Stopping busybox-udhcpd.service...

    [  OK  ] Stopped busybox-udhcpd.service.

     

    Do you use the default SDK7 rootfs or you made some changes? Do you use kernel from PSDK 3.02 with rootfs from SDK7?

    Can you get IP address from the DHCP server successful during boot up or later in user space?

    When AM335x board is connected to AP (Access Point) over WLAN, and this AP has a DHCP server, we can obtain an IP address from it using the udhcpc command:

    #udhcpc -i wlan0

    The result of the above command would be:

    udhcpc (v1.23.1) started
    Sending discover...
    Sending select for 192.168.1.4...
    Lease of 192.168.1.4 obtained, lease time 172800
    /etc/udhcpc.d/50default: Adding DNS 192.168.1.1


    We can see that the obtained IP address above is 192.168.1.4. In order to verify the obtained IP address, use the command ifconfig and look at the inet addr field of wlan0 interface. Also the AP IP address is 192.168.1.1 (from "adding dns" line).

    I do not think that DHCP request should be send when running shutdown command. See also the below e2e thread:

    Regards,
    Pavel

     

     

  • Hi Pavel,

    Yes Pavel,we have made changes in SDK 7 rootfs..We have removed all the services as we needed quick boot. In SDK 7 it was working for us.

    Also right now we are using PSDK 3.02 Kernel and uboot with SDK 7 rootfs as this was the client requirement.
    In SDK 7 rootfs, while poweroff we are not getting any udhcpc logs. So I am not able to understand without changing the rootfs why am I getting this log.

    We get IP address from the DHCP server successful during boot up or later in user space while connecting to WiFi.

    In the thread e2e.ti.com/.../509889 it is mentioned that we can manually edit the networking and interfaces file to mention that you are using static IP but I cannot do that.

    Thanks
    Deep
  • Deep,

    deep ter said:
    Yes Pavel,we have made changes in SDK 7 rootfs..We have removed all the services as we needed quick boot.

    have you made any changes in SDK7 regarding ethernet, wifi, dhcp?

    deep ter said:
    Also right now we are using PSDK 3.02 Kernel and uboot with SDK 7 rootfs as this was the client requirement.

    This is not recommended. Can you try with u-boot, kernel and rootfs from SDK7, do you have the same DHCP issue?

    Regards,
    Pavel

  • Hi Pavel,

    When we use u-boot and kernel of sdk 7..it shutdowns easily.

    With SDK 7... Old kernel and u-boot


    root@ngt:~# shutdown -h now
    INIT: Switching to runlevel: 0
    INIT: Sending processes the TERM signal
    INIT: Sending proStopping telnet daemon.
    Stopping system message bus: [ 25.911817] ***omap_rtc_set_time***
    [ 25.915759] ***tm2bcd***
    [ 25.918509] ***rtc_wait_not_busy***
    [ 25.922360] ***omap_rtc_read_time***
    [ 25.926335] ***rtc_wait_not_busy***
    [ 25.930120] ****bcd2tm****
    [ 25.933056] ***omap_rtc_alarm_irq_enable***
    [ 25.937614] ***rtc_wait_not_busy***
    [ 25.941393] ***rtc_wait_not_busy***
    Error opening /dev/fb0: No such file or directory
    Stopping syslogd/klogd: no syslogd found; none killed
    Stopping thttpd.
    ALSA: Storing mixer settings...
    /usr/sbin/alsactl: /usr/lib/libasound.so.2: no version information available (required by /usr/sbin/alsactl)
    Deconfiguring network interfaces... ifdown: interface lo not configured
    ifdown: interface eth0 not configured
    done.
    ifconfig: SIOCGIFFLAGS: No such device
    gpio/set-value: No such file or directory
    Sending all processes the TERM signal...
    Sending all processes the KILL signal...
    Unmounting remote filesystems...
    Deactivating swap...
    Unmounting local filesystems...
    [ 33.041665] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
    [ 35.167754] ***omap_rtc_shutdown***
    [ 35.171688] reboot: System halted

    Old Rootfs...new u -boot and kernel

    root@ngt:~# shutdown -h now
    INIT: Sending processes the TERM signal
    INIT: SendiStopping telnet daemon.
    Stopping system message bus: [ 34.477141] ***omap_rtc_alarm_irq_enable***
    hwclock: RTC_SET_TIME: Invalid argument
    Error opening /dev/fb0: No such file or directory
    Stopping syslogd/klogd: no syslogd found; none killed
    Stopping thttpd.
    ALSA: Storing mixer settings...
    /usr/sbin/alsactl: /usr/lib/libasound.so.2: no version information available (required by /usr/sbin/alsactl)
    Deconfiguring network interfaces... ifdown: interface lo not configured
    ifdown: interface eth0 not configured
    done.
    [ 35.548679] wlcore: using inverted interrupt logic: 8
    [ 35.616986] wlcore: PHY firmware version: Rev 8.2.0.0.224
    [ 35.719342] wlcore: firmware booted (Rev 8.9.0.0.31)
    [ 35.735367] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    udhcpc (v1.24.1) started
    Sending discover...
    Sending discover...
    Sending discover...

    I have not changed anything related to wifi..or ethernet... Not understanding how does the wifi wlcore logs are coming.
    Thanks

    Deep
  • Deep,

    Using old kernel with new rootfs is NOT recommended, and you can see yourself what the result is. Starting from PSDK 3.00, we have migrated from SysVinit to systemd for user space initialization.

    If you still need to adjust this setup, you should check why and where shutdown command initiate DHCP request (execute udhcpc command) and remove this from the shutdown flow.

    Regards,
    Pavel
  • See also if the below link will be in help:

    processors.wiki.ti.com/.../TI81XX_PSP_User_Guide

    Regards,
    Pavel
  • Hi Pavel,

    Thanks for your support. We will try to modify the new SDK rootfs and will use new kernel with new rootfs.

    Can you please provide me links so that I can reduce my rootfs size from the existing size of tisdk-rootfs-image-am335x-evm(1.2GB )to 250Mb.

    We need small rootfs size as we are booting from NAND..We need 7s boot time.

    Thanks Deep
  • Deep,

    deep ter said:
    Can you please provide me links so that I can reduce my rootfs size from the existing size of tisdk-rootfs-image-am335x-evm(1.2GB )to 250Mb.

    We need small rootfs size as we are booting from NAND..We need 7s boot time.

    Please open new e2e thread regarding this new request.

    Regards,
    Pavel