Sync firmware changes

This commit is contained in:
Viktor
2024-05-01 20:59:05 +02:00
parent 1204f89857
commit 1321b516cc
3 changed files with 0 additions and 110 deletions

View File

@@ -1,70 +0,0 @@
#!/bin/sh
#
# OpenIPC.org | 2024
#
PATH_MODULE=/lib/modules/4.9.84/sigmastar
PATH_SENSOR=${PATH_MODULE}/sensor
SENSOR=$(fw_printenv -n sensor)
detect_sensor() {
insmod ${PATH_SENSOR}/sensor_config.ko
if [ -e /dev/srcfg ]; then
echo srcfg 0 1 0 0 0 0 > /dev/srcfg
rmmod sensor_config
fi
SENSOR=$(ipcinfo -s)
fw_setenv sensor ${SENSOR}
}
set_sensor() {
case ${SENSOR} in
gc2053|imx307|sc3335)
insmod ${PATH_SENSOR}/sensor_${SENSOR}_mipi.ko chmap=1
;;
sc2239|sc2335)
[ "$(fw_printenv -n soc)" = "ssc325de" ] && IFACE=parl
insmod ${PATH_SENSOR}/sensor_${SENSOR}_${IFACE:-mipi}.ko chmap=1
;;
*)
echo -e "\n\e[1;31mUNSUPPORTED sensor - ${SENSOR}\e[0m\n" | logger -s -t OpenIPC
;;
esac
}
insert_ko() {
insmod ${PATH_MODULE}/mhal.ko
insmod ${PATH_MODULE}/mi_common.ko
insmod ${PATH_MODULE}/mi_sys.ko logBufSize=256 default_config_path=/usr/bin
insmod ${PATH_MODULE}/mi_rgn.ko
insmod ${PATH_MODULE}/mi_ai.ko
insmod ${PATH_MODULE}/mi_ao.ko
insmod ${PATH_MODULE}/mi_sensor.ko
insmod ${PATH_MODULE}/mi_shadow.ko
insmod ${PATH_MODULE}/mi_divp.ko
insmod ${PATH_MODULE}/mi_vif.ko
insmod ${PATH_MODULE}/mi_vpe.ko
insmod ${PATH_MODULE}/mi_venc.ko
}
if [ ! -e /sys/module/mhal ]; then
insert_ko
fi
if [ -z ${SENSOR} ]; then
echo -e "\n\e[1;33mAutodetect sensor\e[0m\n" | logger -s -t OpenIPC
detect_sensor
fi
if [ -z ${SENSOR} ]; then
echo -e "\n\e[1;31mSensor parameter MISSING\e[0m\n" | logger -s -t OpenIPC
exit 1
else
echo -e "\n\e[1;32mSensor assigned - ${SENSOR}\e[0m\n" | logger -s -t OpenIPC
if [ -e /sys/module/sensor* ]; then
rmmod $(ls -d /sys/module/sensor* | cut -d/ -f4)
fi
set_sensor
fi
exit 0

View File

@@ -1,40 +0,0 @@
################################################################################
#
# sigmastar-osdrv-infinity6
#
################################################################################
SIGMASTAR_OSDRV_INFINITY6_VERSION =
SIGMASTAR_OSDRV_INFINITY6_SITE =
SIGMASTAR_OSDRV_INFINITY6_LICENSE = MIT
SIGMASTAR_OSDRV_INFINITY6_LICENSE_FILES = LICENSE
SIGMASTAR_OSDRV_INFINITY6_DEPENDENCIES = ipctool
define SIGMASTAR_OSDRV_INFINITY6_BUILD_CMDS
cp -rf $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/src $(@D)
$(TARGET_CC) $(@D)/src/config_tool.c -o $(@D)/config_tool -lipchw -s
endef
define SIGMASTAR_OSDRV_INFINITY6_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/4.9.84/sigmastar
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.84/sigmastar $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/kmod/*
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/4.9.84/sigmastar/sensor
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.84/sigmastar/sensor $(SIGMASTAR_OSDRV_INFINITY6B0_PKGDIR)/files/sensor/kmod/*
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/firmware
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/firmware $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/sensor/firmware/*
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensors
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/sensor/configs/*
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/lib/*
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/config_tool
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/script/*
endef
$(eval $(generic-package))