linuxOS_D21X/package/third-party/initscripts/init.d/S00_show_boot_time

19 lines
415 B
Plaintext
Raw Normal View History

2024-11-29 08:13:19 +00:00
#!/bin/sh
2024-11-29 08:23:11 +00:00
if [ -f /proc/device-tree/cpus/gtc-base ]; then
GTC_REG=`hexdump -C /proc/device-tree/cpus/gtc-base | awk -F ' ' '{print $2$3}'`
GTC_REG=0x${GTC_REG}0008
else
GTC_REG=0x19050008
fi
GTC_TICK=`devmem $GTC_REG`
2024-11-29 08:13:19 +00:00
BTIME_S=`echo "scale=6;$((GTC_TICK)) / 4000000" | bc`
2025-06-05 06:33:02 +00:00
echo "Startup: $(printf "%.3f" ${BTIME_S}) sec (from Power-On-Reset)"
if [ -f usr/bin/version ]; then
version
fi
2024-11-29 08:13:19 +00:00