Files
NANOKVM-LicheeRV-Nano-Build…/buildroot/board/cvitek/SG200X/overlay/etc/init.d/S02devicekey
2025-01-11 15:35:19 +08:00

12 lines
265 B
Bash
Executable File

#!/bin/sh
if [ "$1" = "start" ]
then
str_value=$(cat /sys/class/cvi-base/base_uid | awk '{print $2}')
first_uint=$(echo $str_value | cut -d'_' -f1)
second_uint=$(echo $str_value | cut -d'_' -f2)
result="$first_uint$second_uint"
echo $result > /device_key
fi