update flashable pkg example on boot.img, bypass version check to suit CP1 and RP1

This commit is contained in:
HappyZ 2018-12-21 11:06:23 -06:00
parent d8c9188426
commit e766bb7187
20 changed files with 19 additions and 18 deletions

View File

@ -0,0 +1 @@
1867e8378c68753224677f8e00f81aad

View File

@ -12,23 +12,24 @@ ${UPDATER_BASE}/animation.sh $LOG_FP &
ANIM_PID=$!
sleep 2
# version check
${UPDATER_BASE}/chkver.sh ${UPDATER_BASE}/version $LOG_FP
if [ "$?" -eq 0 ]
then
echo "[updater.sh] version check OK" >> $LOG_FP
else
echo "[updater.sh] version check NG (TBD)" >> $LOG_FP
# strange version Package, so we must be install this package !!
exit 0;
fi
sync
# bypass version check
# # version check
# ${UPDATER_BASE}/chkver.sh ${UPDATER_BASE}/version $LOG_FP
# if [ "$?" -eq 0 ]
# then
# echo "[updater.sh] version check OK" >> $LOG_FP
# else
# echo "[updater.sh] version check NG (TBD)" >> $LOG_FP
# # strange version Package, so we must not install this package !!
# exit 0;
# fi
# sync
# flash customized boot img
echo "[updater.sh] writing boot.img.." >> $LOG_FP
if [ -f ${UPDATER_BASE}/boot-1.4.01.16100-mod-181118.img ] ;
if [ -f ${UPDATER_BASE}/boot-1.4.01.16100-mod-181214.img ] ;
then
dd if=${UPDATER_BASE}/boot-1.4.01.16100-mod-181118.img of=/dev/mmcblk0p8 bs=4M
dd if=${UPDATER_BASE}/boot-1.4.01.16100-mod-181214.img of=/dev/mmcblk0p8 bs=4M
sync
else
echo "[updater.sh] desired boot.img not exit; nothing did to boot partition" >> $LOG_FP

View File

@ -5,11 +5,11 @@ echo 3 > /proc/sys/vm/drop_caches
LOG_FP=$2
BOOT_IMG_SIZE=`stat -c%s $1/boot-1.4.01.16100-mod-181118.img`
BOOT_IMG_SIZE=`stat -c%s $1/boot-1.4.01.16100-mod-181214.img`
BLK8_MD5=`dd if=/dev/mmcblk0p8 bs=$BOOT_IMG_SIZE count=1 | md5sum | cut -d " " -f1`
BOOT_MD5=`cat $1/boot-1.4.01.16100-mod-181118.img.md5`
BOOT_MD5=`cat $1/boot-1.4.01.16100-mod-181214.img.md5`
echo "BLK08=$BLK8_MD5" >> $LOG_FP
echo " BOOT=$BOOT_MD5" >> $LOG_FP
@ -21,6 +21,6 @@ echo "Verify OK" >> $LOG_FP
exit 0;
fi
echo "Verify NG" >> $LOG_FP
exit 1;
exit 127;