Merge branch 'master' of github:OpenIPC/firmware

pull/282/head
Igor Zalatov (from Citadel PC) 2022-07-27 15:10:46 +03:00
commit b222a6cee8
5 changed files with 26 additions and 6 deletions

View File

@ -1,8 +1,12 @@
#!/bin/sh
#
# OpenIPC.org | v.20220722
# OpenIPC.org | v.20220727
#
scr_version=1.0.1
args=" $@"
set -e
echo_c() {
@ -106,6 +110,25 @@ free_resources() {
sync; echo 3 > /proc/sys/vm/drop_caches
}
self_update() {
if echo "${args}" | grep "rootfs" || echo "${args}" | grep "kernel" || echo "${args}" | grep -- "-n" > /dev/null 2>&1; then
echo -e "\nOffline upgrade or Overlay clean, skip sysupgrade version check."
else
echo -e "\nOnline upgrade, checking sysupgrade version..."
curl -s -k -L -o /tmp/sysupgrade "https://raw.githubusercontent.com/OpenIPC/firmware/master/general/overlay/usr/sbin/sysupgrade"
dstv=`grep scr_version /tmp/sysupgrade | head -1 | cut -f 2 -d '='`
if ! [ "${scr_version}" = "${dstv}" ]; then
echo "A new version is available, trying to update..."
chmod +x /tmp/sysupgrade
echo -e "Done. Restarting...\n"
exec /tmp/sysupgrade ${args}
exit 1
else
echo "Ok, version match."
fi
fi
}
create_lock() {
[ -f /tmp/sysupgrade.lock ] && echo -e "\e[1;31m\nAnother sysupgrade process is already running!\e[0m\n" && exit 1
touch /tmp/sysupgrade.lock
@ -249,8 +272,8 @@ print_sysinfo
echo_c 97 "\nTry '$(basename "$0") --help' for options." && \
exit 0
self_update
create_lock
free_resources
[ "$remote_update" -eq 1 ] && download_firmware
[ "$update_kernel" -eq 1 ] && do_update_kernel "$kernel_file"

View File

@ -76,7 +76,7 @@ insert_osal()
if [ -z "$MMZ" ]; then
insmod hi_osal.ko anony=1 mmz_allocator=hisi mmz=anonymous,0,$mmz_start,$mmz_size || report_error
else
insmod cma_osal.ko anony=1 mmz_allocator=cma mmz=$MMZ || report_error
insmod hi_osal.ko anony=1 mmz_allocator=cma mmz=$MMZ || report_error
fi
}
@ -98,7 +98,6 @@ remove_detect()
rmmod -w hi3516ev200_isp
rmmod -w hi3516ev200_base
rmmod -w hi_osal
rmmod -w cma_osal
rmmod -w sys_config.ko
}
@ -229,7 +228,6 @@ remove_ko()
rmmod -w hi3516ev200_sys
rmmod -w hi3516ev200_base
rmmod -w hi_osal
rmmod -w cma_osal
rmmod -w sys_config
}

View File

@ -26,7 +26,6 @@ define HISILICON_OSDRV_HI3516EV300_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/4.9.37/hisilicon
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.37/hisilicon $(BR2_EXTERNAL_HISILICON_PATH)/package/hisilicon-osdrv-hi3516ev300/files/kmod/camhi-motor.ko
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.37/hisilicon $(BR2_EXTERNAL_HISILICON_PATH)/package/hisilicon-osdrv-hi3516ev300/files/kmod/cma_osal.ko
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.37/hisilicon $(BR2_EXTERNAL_HISILICON_PATH)/package/hisilicon-osdrv-hi3516ev300/files/kmod/hi3516ev200_acodec.ko
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.37/hisilicon $(BR2_EXTERNAL_HISILICON_PATH)/package/hisilicon-osdrv-hi3516ev300/files/kmod/hi3516ev200_adec.ko
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.37/hisilicon $(BR2_EXTERNAL_HISILICON_PATH)/package/hisilicon-osdrv-hi3516ev300/files/kmod/hi3516ev200_aenc.ko