#!/bin/sh
umount /var/tmp/mnt 2> /dev/null
rm -rf /var/tmp/mnt 2> /dev/null

from=/var/tmp/mnt/Display001_4_2020.dtb
to=/var/tmp/mnt/Display001.dtb

such="root=/dev/mmcblk1"
grep -q $such /proc/cmdline
if [ $? == 0 ]
then
	bootpart="/dev/mmcblk1p1"
else
	bootpart="/dev/mmcblk0p1"
fi  

echo "Bootpart == $bootpart"
                
mkdir /var/tmp/mnt
mount $bootpart /var/tmp/mnt

if [ -e $from ]
then
	echo "copy $from --> $to"
	cp $from $to
	sync
	echo "pls. reboot !!"
else
	echo " no such file $from"
fi

umount /var/tmp/mnt 2> /dev/null
rm -rf /var/tmp/mnt 2> /dev/null

