added oscam, add USB serial kernel modules, improve sd-hotplug script

This commit is contained in:
Jaroslav Kysela
2015-04-08 17:30:03 +02:00
parent 0d9040988d
commit 8557ebb3c9
11 changed files with 1791 additions and 23 deletions

View File

@@ -3,6 +3,21 @@
#
HOSTNAME="satip-axe"
KMODULES="drivers/usb/serial/cp210x.ko drivers/usb/serial/pl2303.ko drivers/usb/serial/ftdi_sio.ko"
#
# ttyUSB names
#
TTYUSB1_DEV="2-1:1.0"
TTYUSB1_NAME="ttyUSBupper"
TTYUSB2_DEV="4-1:1.0"
TTYUSB2_NAME="ttyUSBlower"
TTYUSB3_DEV="1-1.1:1.0" # USB hub port#1 in upper port
TTYUSB3_NAME="ttyUSBupper1"
TTYUSB4_DEV="3-1.2:1.0" # USB hub port#2 in lower port
TTYUSB4_NAME="ttyUSBlower2"
#
# IPV4 config
@@ -34,3 +49,8 @@ DROPBEAR="yes"
#
MINISATIP="yes"
MINISATIP_OPTS=""
#
# oscamd
#
OSCAMD="yes"

33
fs-add/etc/init.d/oscamd Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
test -r /etc/sysconfig/config && . /etc/sysconfig/config
if test "$OSCAMD" != "yes"; then
exit 0
fi
mkdir -p /etc/sysconfig/oscam
if ! test -r /etc/sysconfig/oscam/oscam.conf; then
cat > /etc/sysconfig/oscam/oscam.conf <<EOF
[global]
logfile = /tmp/oscam.log
maxlogsize = 2048
[cache]
[dvbapi]
enabled = 1
au = 1
pmt_mode = 4
listen_port = 9000
user = dvbapi
boxtype = pc-nodmx
[webif]
httpport = 8888
httpuser = oscam
httppwd = satip
httpallowed = 127.0.0.1,0.0.0.0-255.255.255.255
EOF
fi
exec oscamd -c /etc/sysconfig/oscam -u

View File

@@ -24,7 +24,7 @@ echo /sbin/mdev > /proc/sys/kernel/hotplug
mdev -s
# make /tmp as tmpfs
mount -t tmpfs -o size=1M tmpfs /tmp
mount -t tmpfs -o size=4M tmpfs /tmp
mv /var /var.2
mkdir /tmp/var
ln -s /tmp/var /var
@@ -55,6 +55,13 @@ test -r /etc/sysconfig/config && . /etc/sysconfig/config
test -n "$HOSTNAME" && hostname "$HOSTNAME"
test -z "$HOSTNAME" && hostname satip-axe
# modules
if test -n "$KMODULES"; then
for m in $KMODULES; do
insmod "/lib/modules/$m"
done
fi
# basic network
ifconfig lo 127.0.0.1 netmask 255.255.255.0
ifconfig eth0 up

View File

@@ -10,6 +10,8 @@ ttyAS0::askfirst:/bin/sh
::once:/etc/init.d/telnetd
# dropbear
::once:/etc/init.d/dropbear
# oscamd
::once:/etc/init.d/oscamd
# AXE kernel modules and environment
::once:/etc/init.d/axe
# Others

View File

@@ -1,2 +1,2 @@
-sd[a-h][0-9]{1,2} 0:0 660 @/sbin/sd-hotplug.sh
-sd[a-h][0-9]{1,2} 0:0 660 $/sbin/sd-hotunplug.sh
-sd[a-h][0-9]{1,2} 0:0 660 */sbin/sd-hotplug.sh
-ttyUSB[0-9]* 0:0 660 */sbin/tty-hotplug.sh