Skip to content

Commit

Permalink
Packages: add Sigmastar infinity6 sensor source
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda committed Aug 6, 2023
1 parent cac1781 commit 0a3fe1e
Show file tree
Hide file tree
Showing 45 changed files with 36,473 additions and 6 deletions.
1 change: 1 addition & 0 deletions general/package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/rtw-hostapd/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6b0/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6e/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-msc313e/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-sensor/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/ssw101b/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/uacme-openipc/Config.in"
source "$BR2_EXTERNAL_GENERAL_PATH/package/uqmi-openipc/Config.in"
Expand Down
1 change: 1 addition & 0 deletions general/package/sigmastar-osdrv-infinity6b0/Config.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
config BR2_PACKAGE_SIGMASTAR_OSDRV_INFINITY6B0
bool "sigmastar-osdrv-infinity6b0"
select BR2_PACKAGE_SIGMASTAR_OSDRV_SENSOR
help
SigmaStar infinity6b0 kernel modules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

PATH_MODULE=/lib/modules/4.9.84/sigmastar
PATH_SENSOR=${PATH_MODULE}/sensor
SENSOR=$(fw_printenv -n sensor)

detect_sensor() {
Expand All @@ -17,13 +18,13 @@ detect_sensor() {
set_sensor() {
case ${SENSOR} in
gc4653|imx335|sc2239|sc3335)
insmod ${PATH_MODULE}/sensor_${SENSOR}_mipi.ko chmap=1
insmod ${PATH_SENSOR}/sensor_${SENSOR}_mipi.ko chmap=1
;;
gc2053|sc2335)
insmod ${PATH_MODULE}/sensor_${SENSOR}_mipi.ko chmap=1 lane_num=2 hdr_lane_num=2
insmod ${PATH_SENSOR}/sensor_${SENSOR}_mipi.ko chmap=1 lane_num=2 hdr_lane_num=2
;;
imx307)
insmod ${PATH_MODULE}/sensor_${SENSOR}_mipi.ko chmap=1 lane_num=2 hdr_lane_num=2 mclk=37.125M
insmod ${PATH_SENSOR}/sensor_${SENSOR}_mipi.ko chmap=1 lane_num=2 hdr_lane_num=2 mclk=37.125M
;;
*)
echo -e "\n\e[1;31mUNSUPPORTED sensor found - ${SENSOR}\e[0m\n" | logger -s -t OpenIPC
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ SIGMASTAR_OSDRV_INFINITY6B0_LICENSE_FILES = LICENSE
define SIGMASTAR_OSDRV_INFINITY6B0_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_INFINITY6B0_PKGDIR)/files/kmod/*
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.84/sigmastar $(SIGMASTAR_OSDRV_INFINITY6B0_PKGDIR)/files/sensors/kmod/*

$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/firmware
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/firmware $(SIGMASTAR_OSDRV_INFINITY6B0_PKGDIR)/files/sensors/firmware/*
Expand Down
1 change: 1 addition & 0 deletions general/package/sigmastar-osdrv-infinity6e/Config.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
config BR2_PACKAGE_SIGMASTAR_OSDRV_INFINITY6E
bool "sigmastar-osdrv-infinity6e"
select BR2_PACKAGE_SIGMASTAR_OSDRV_SENSOR
help
SigmaStar infinity6e kernel modules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#

PATH_MODULE=/lib/modules/4.9.84/sigmastar
PATH_SENSOR=${PATH_MODULE}/sensor
SENSOR=$(fw_printenv -n sensor)

detect_sensor() {
Expand All @@ -17,7 +18,7 @@ detect_sensor() {
set_sensor() {
case ${SENSOR} in
imx274|imx335|imx347|imx415|sc8235)
insmod ${PATH_MODULE}/sensor_${SENSOR}_mipi.ko chmap=1
insmod ${PATH_SENSOR}/sensor_${SENSOR}_mipi.ko chmap=1
;;
*)
echo -e "\n\e[1;31mUNSUPPORTED sensor found - ${SENSOR}\e[0m\n" | logger -s -t OpenIPC
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ SIGMASTAR_OSDRV_INFINITY6E_LICENSE_FILES = LICENSE
define SIGMASTAR_OSDRV_INFINITY6E_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_INFINITY6E_PKGDIR)/files/kmod/*
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.84/sigmastar $(SIGMASTAR_OSDRV_INFINITY6E_PKGDIR)/files/sensors/kmod/*

$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/firmware
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/firmware $(SIGMASTAR_OSDRV_INFINITY6E_PKGDIR)/files/sensors/firmware/*
Expand Down
5 changes: 5 additions & 0 deletions general/package/sigmastar-osdrv-sensor/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config BR2_PACKAGE_SIGMASTAR_OSDRV_SENSOR
bool "sigmastar-osdrv-sensor"
default n
help
Sigmastar sensor kernel driver
20 changes: 20 additions & 0 deletions general/package/sigmastar-osdrv-sensor/sigmastar-osdrv-sensor.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################################
#
# sigmastar-osdrv-sensor
#
################################################################################

SIGMASTAR_OSDRV_SENSOR_LICENSE = MIT
SIGMASTAR_OSDRV_SENSOR_LICENSE_FILES = LICENSE

define SIGMASTAR_OSDRV_SENSOR_EXTRACT_CMDS
cp -r $(SIGMASTAR_OSDRV_SENSOR_PKGDIR)/src/* $(@D)
endef

SIGMASTAR_OSDRV_SENSOR_MODULE_SUBDIRS = $(OPENIPC_SOC_FAMILY)
SIGMASTAR_OSDRV_SENSOR_MODULE_MAKE_OPTS = \
INSTALL_MOD_DIR=sigmastar \
KSRC=$(LINUX_DIR)

$(eval $(kernel-module))
$(eval $(generic-package))
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
EXTRA_CFLAGS += -I $(PWD)/include -I $(KSRC)/drivers/sstar/include
EXTRA_CFLAGS += -DSENSOR_MODULE_VERSION=$(OPENIPC_SOC_MODEL)-$(OPENIPC_SOC_FAMILY)
obj-m := $(patsubst $(PWD)/%.c, %.o, $(wildcard $(PWD)/sensor/*.c))

modules:
$(MAKE) -C $(KSRC) M=$(PWD) modules

clean:
$(MAKE) -C $(KSRC) M=$(PWD) clean
Loading

0 comments on commit 0a3fe1e

Please sign in to comment.