mirror of
https://github.com/nikdoof/builder.git
synced 2025-12-13 15:42:20 +00:00
Add support Lenovo snowman 1080p camera (#13)
* add-lenovo-snowman-1080p * Correct flavor from lite to ultimate * Delete devices/hi3518ev200_ultimate_lenovo-snowman-1080p/general/overlay/etc/builder.msg * Delete devices/hi3518ev200_ultimate_lenovo-snowman-1080p/general/overlay/etc/wireless/usb * deleted: bin/load_hisilicon moved changes to firmware * Removal from the list deletion of staging modules because in not build anymore * Delete undeeded option and set wlandev env variable * Delete changes, work at default 30fps * Add mux GPIO 37 for audio speaker * Add lite flavor lenovo snowman 1080p * Cosmetic changes * Removal preset sensor --------- Co-authored-by: andrew <andrew@gradient.ru> Co-authored-by: Signor Pellegrino <68112357+FlyRouter@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
# load vendor specific drivers
|
||||
vendor=$(ipcinfo -v)
|
||||
|
||||
log_vendor() {
|
||||
logger -s -p daemon.info -t ${vendor} "$1"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "${vendor}" = "goke" ] || [ "${vendor}" = "hisilicon" ] && status=$(check_mac)
|
||||
[ -n "${status}" ] && log_vendor "${status}"
|
||||
# mux GPIO37 for speaker
|
||||
devmem 0x200f0068 32 0x0
|
||||
echo -e '\nLoading of kernel modules...'
|
||||
load_${vendor} -i
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
|
||||
GPIO_RED=48
|
||||
GPIO_GREEN=47
|
||||
GPIO_BLUE=49
|
||||
|
||||
help() {
|
||||
echo -e "\n================= LIGHT usage =================\n"
|
||||
echo -e "Set the colour of the status light\n"
|
||||
echo -e "light <off|red|green|blue|yellow|magenta|cyan|white>\n"
|
||||
}
|
||||
|
||||
setRed() {
|
||||
if [ -n "$GPIO_RED" ]; then
|
||||
[ $1 -eq 1 ] && gpio set "$GPIO_RED" || gpio clear "$GPIO_RED"
|
||||
else
|
||||
echo "[INFO] Status Lights: Red GPIO undefined in /usr/sbin/light" > /dev/kmsg
|
||||
fi
|
||||
}
|
||||
|
||||
setGreen() {
|
||||
if [ -n "$GPIO_GREEN" ]; then
|
||||
[ $1 -eq 1 ] && gpio set "$GPIO_GREEN" || gpio clear "$GPIO_GREEN"
|
||||
else
|
||||
echo "[INFO] Status Lights: Green GPIO undefined in /usr/sbin/light" > /dev/kmsg
|
||||
fi
|
||||
}
|
||||
|
||||
setBlue() {
|
||||
if [ -n "$GPIO_BLUE" ]; then
|
||||
[ $1 -eq 1 ] && gpio set "$GPIO_BLUE" || gpio clear "$GPIO_BLUE"
|
||||
else
|
||||
echo "[INFO] Status Lights: Blue GPIO undefined in /usr/sbin/light" > /dev/kmsg
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -n $1 ]; then
|
||||
case $1 in
|
||||
off)
|
||||
setRed 1
|
||||
setGreen 1
|
||||
setBlue 1
|
||||
;;
|
||||
|
||||
red)
|
||||
setRed 0
|
||||
setGreen 1
|
||||
setBlue 1
|
||||
;;
|
||||
|
||||
green)
|
||||
setRed 1
|
||||
setGreen 0
|
||||
setBlue 1
|
||||
;;
|
||||
|
||||
blue)
|
||||
setRed 1
|
||||
setGreen 1
|
||||
setBlue 0
|
||||
;;
|
||||
|
||||
yellow)
|
||||
setRed 0
|
||||
setGreen 0
|
||||
setBlue 1
|
||||
;;
|
||||
|
||||
magenta|purple)
|
||||
setRed 0
|
||||
setGreen 1
|
||||
setBlue 0
|
||||
;;
|
||||
|
||||
cyan)
|
||||
setRed 1
|
||||
setGreen 0
|
||||
setBlue 0
|
||||
;;
|
||||
|
||||
white)
|
||||
setRed 0
|
||||
setGreen 0
|
||||
setBlue 0
|
||||
;;
|
||||
|
||||
*)
|
||||
help
|
||||
;;
|
||||
esac
|
||||
else
|
||||
help
|
||||
fi
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Set Reset switch GPIO
|
||||
GPIO=3
|
||||
|
||||
[ -z $GPIO ] && echo "GPIO pin for resetd is not set" && echo "[resetd] GPIO undefined in /usr/sbin/resetd" > /dev/kmsg && exit
|
||||
|
||||
# Counter for button press until reset
|
||||
count=0
|
||||
|
||||
# prepare the pin
|
||||
if [ ! -d /sys/class/gpio/gpio${GPIO} ]; then
|
||||
echo "${GPIO}" > /sys/class/gpio/export
|
||||
echo "in" > /sys/class/gpio/gpio"${GPIO}"/direction
|
||||
fi
|
||||
|
||||
# continuously monitor current value of reset switch
|
||||
while [ true ]; do
|
||||
if [ "$(cat /sys/class/gpio/gpio"${GPIO}"/value)" -eq 1 ]; then
|
||||
count=0
|
||||
else
|
||||
count=$((count+1))
|
||||
|
||||
# 20 counts =~ 5 seconds @ 0.25 sleep intervals
|
||||
if [ $count -eq 20 ]; then
|
||||
echo 'RESETTING FIRMWARE'
|
||||
firstboot
|
||||
fi
|
||||
fi
|
||||
# This interval uses 1% CPU. Less sleep = more CPU
|
||||
sleep 0.25
|
||||
done
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Perform basic settings on a known IP camera
|
||||
#
|
||||
#
|
||||
# Set custom upgrade url
|
||||
#
|
||||
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/hi3518ev200_ultimate_lenovo-snowman-1080p-nor.tgz'
|
||||
fw_setenv wlandev 'rtl8188eus-hi3518ev200-lenovo'
|
||||
#
|
||||
#
|
||||
# Set custom majestic settings
|
||||
#
|
||||
cli -s .system.staticDir /var/www/majestic
|
||||
cli -s .nightMode.enabled true
|
||||
cli -s .nightMode.irCutPin1 33
|
||||
cli -s .nightMode.irCutSingleInvert true
|
||||
cli -s .nightMode.backlightPin 50
|
||||
cli -s .audio.speakerPin 37
|
||||
|
||||
#
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,52 @@
|
||||
/etc/sensors/ar0130_i2c_720p.ini
|
||||
/etc/sensors/gc1034_i2c_720p.ini
|
||||
/etc/sensors/imx222_i2c_1080p.ini
|
||||
/etc/sensors/imx222_i2c_720p.ini
|
||||
/etc/sensors/imx291_i2c_lvds_1080p.ini
|
||||
/etc/sensors/imx323_i2c_dc_1080p.ini
|
||||
/etc/sensors/imx323_spi_dc_1080p.ini
|
||||
/etc/sensors/jxf22_i2c_1080p.ini
|
||||
/etc/sensors/jxf23_i2c_1080p.ini
|
||||
/etc/sensors/jxh62_i2c_720p.ini
|
||||
/etc/sensors/jxh65_i2c_960p.ini
|
||||
/etc/sensors/ov2735_i2c_1080p.ini
|
||||
/etc/sensors/ov9712_i2c_720p.ini
|
||||
/etc/sensors/ov9732_i2c_720p.ini
|
||||
/etc/sensors/ov9750_i2c_960p.ini
|
||||
/etc/sensors/sc1135_i2c_720p.ini
|
||||
/etc/sensors/sc1145_i2c_720p.ini
|
||||
/etc/sensors/sc1235_i2c_dc_960p.ini
|
||||
/etc/sensors/sc2135_i2c_1080p.ini
|
||||
/etc/sensors/sc2235_i2c_dc_1080p.ini
|
||||
/etc/sensors/ar0237_i2c_dc_1080p.ini
|
||||
#
|
||||
/etc/sensors/iq/ar0230.ini
|
||||
/etc/sensors/iq/imx222.ini
|
||||
/etc/sensors/iq/ov9732.ini
|
||||
/etc/sensors/iq/ov9750.ini
|
||||
#
|
||||
/usr/lib/sensors/libsns_ar0130.so
|
||||
/usr/lib/sensors/libsns_gc1034.so
|
||||
/usr/lib/sensors/libsns_gc2023.so
|
||||
/usr/lib/sensors/libsns_imx122.so
|
||||
/usr/lib/sensors/libsns_imx222.so
|
||||
/usr/lib/sensors/libsns_imx291.so
|
||||
/usr/lib/sensors/libsns_imx323_i2c_dc.so
|
||||
/usr/lib/sensors/libsns_imx323_i2c_dc_v1.so
|
||||
/usr/lib/sensors/libsns_jxf22.so
|
||||
/usr/lib/sensors/libsns_jxf23.so
|
||||
/usr/lib/sensors/libsns_jxh62.so
|
||||
/usr/lib/sensors/libsns_jxh65.so
|
||||
/usr/lib/sensors/libsns_mn34222.so
|
||||
/usr/lib/sensors/libsns_ov2718.so
|
||||
/usr/lib/sensors/libsns_ov2735.so
|
||||
/usr/lib/sensors/libsns_ov9712.so
|
||||
/usr/lib/sensors/libsns_ov9732.so
|
||||
/usr/lib/sensors/libsns_ov9750.so
|
||||
/usr/lib/sensors/libsns_ov9752.so
|
||||
/usr/lib/sensors/libsns_sc1135.so
|
||||
/usr/lib/sensors/libsns_sc1145.so
|
||||
/usr/lib/sensors/libsns_sc1235.so
|
||||
/usr/lib/sensors/libsns_sc2135.so
|
||||
/usr/lib/sensors/libsns_sc2235.so
|
||||
#
|
||||
Reference in New Issue
Block a user