added oscam, add USB serial kernel modules, improve sd-hotplug script
This commit is contained in:
parent
0d9040988d
commit
8557ebb3c9
41
Makefile
41
Makefile
@ -15,12 +15,24 @@ EXTRA_AXE_MODULES=axe_dmx.ko axe_dmxts.ko axe_fe.ko axe_fp.ko axe_i2c.ko \
|
||||
|
||||
ORIG_FILES=main_axe.out mknodes.out
|
||||
|
||||
KMODULES = drivers/usb/serial/cp210x.ko \
|
||||
drivers/usb/serial/pl2303.ko \
|
||||
drivers/usb/serial/spcp8x5.ko \
|
||||
drivers/usb/serial/io_ti.ko \
|
||||
drivers/usb/serial/ti_usb_3410_5052.ko \
|
||||
drivers/usb/serial/io_edgeport.ko \
|
||||
drivers/usb/serial/ftdi_sio.ko \
|
||||
drivers/usb/serial/oti6858.ko
|
||||
|
||||
BUSYBOX=busybox-1.23.2
|
||||
|
||||
DROPBEAR=dropbear-2015.67
|
||||
DROPBEAR_SBIN_FILES=dropbear
|
||||
DROPBEAR_BIN_FILES=dbclient dropbearconvert dropbearkey scp
|
||||
|
||||
# 10087?
|
||||
OSCAM_REV=10619
|
||||
|
||||
define GIT_CLONE
|
||||
@mkdir -p apps/
|
||||
git clone $(1) apps/$(2)
|
||||
@ -51,12 +63,13 @@ dist:
|
||||
# create CPIO
|
||||
#
|
||||
|
||||
fs.cpio: minisatip
|
||||
fs.cpio: kernel-modules busybox dropbear minisatip oscam
|
||||
fakeroot tools/do_min_fs.py \
|
||||
-r "$(VERSION)" \
|
||||
-b "bash strace" \
|
||||
$(foreach m,$(EXTRA_AXE_MODULES), -e "$(EXTRA_AXE_MODULES_DIR)/$(m):lib/modules/$(m)") \
|
||||
$(foreach m,$(ORIG_FILES), -e "$(EXTRA_AXE_MODULES_DIR)/../$(m):root") \
|
||||
$(foreach m,$(KMODULES), -e "kernel/$(m):lib/modules/$(m)") \
|
||||
-e "apps/$(BUSYBOX)/busybox:bin/busybox" \
|
||||
$(foreach f,$(DROPBEAR_SBIN_FILES), -e "apps/$(DROPBEAR)/$(f):sbin/$(f)") \
|
||||
$(foreach f,$(DROPBEAR_BIN_FILES), -e "apps/$(DROPBEAR)/$(f):usr/bin/$(f)") \
|
||||
@ -64,7 +77,8 @@ fs.cpio: minisatip
|
||||
-e "apps/minisatip/icons/lr.jpg:usr/share/minisatip/icons/lr.jpg" \
|
||||
-e "apps/minisatip/icons/lr.png:usr/share/minisatip/icons/lr.png" \
|
||||
-e "apps/minisatip/icons/sm.jpg:usr/share/minisatip/icons/sm.jpg" \
|
||||
-e "apps/minisatip/icons/sm.png:usr/share/minisatip/icons/sm.png"
|
||||
-e "apps/minisatip/icons/sm.png:usr/share/minisatip/icons/sm.png" \
|
||||
-e "apps/oscam-svn/Distribution/oscam-1.20-unstable_svn$(OSCAM_REV)-sh4-linux:sbin/oscamd"
|
||||
|
||||
.PHONY: fs-list
|
||||
fs-list:
|
||||
@ -104,14 +118,20 @@ out/satip-axe-$(VERSION).fw: kernel/arch/sh/boot/uImage.gz
|
||||
#
|
||||
|
||||
kernel/.config: toolchain/4.5.3-99/opt/STM/STLinux-2.4/devkit/sh4/bin/sh4-linux-gcc-4.5.3
|
||||
cp patches/kernel.config ./kernel/arch/sh/configs/idl4k_defconfig
|
||||
make -C kernel -j $(CPUS) ARCH=sh CROSS_COMPILE=$(TOOLCHAIN_KERNEL)/bin/sh4-linux- idl4k_defconfig
|
||||
|
||||
kernel/arch/sh/boot/uImage.gz: toolchain/4.5.3-99/opt/STM/STLinux-2.4/devkit/sh4/bin/sh4-linux-gcc-4.5.3 kernel/.config fs.cpio
|
||||
mv fs.cpio kernel/rootfs-idl4k.cpio
|
||||
kernel/drivers/usb/serial/cp210x.ko: toolchain/4.5.3-99/opt/STM/STLinux-2.4/devkit/sh4/bin/sh4-linux-gcc-4.5.3 kernel/.config
|
||||
make -C kernel -j $(CPUS) ARCH=sh CROSS_COMPILE=$(TOOLCHAIN_KERNEL)/bin/sh4-linux- modules
|
||||
|
||||
kernel/arch/sh/boot/uImage.gz: kernel/drivers/usb/serial/cp210x.ko fs.cpio
|
||||
mv fs.cpio kernel/rootfs-idl4k.cpio
|
||||
make -C kernel -j ${CPUS} PATH="$(PATH):$(TOOLPATH)" \
|
||||
ARCH=sh CROSS_COMPILE=$(TOOLCHAIN_KERNEL)/bin/sh4-linux- uImage.gz
|
||||
|
||||
.PHONY: kernel-modules
|
||||
kernel-modules: kernel/drivers/usb/serial/cp210x.ko
|
||||
|
||||
.PHONY: kernel
|
||||
kernel: kernel/arch/sh/boot/uImage.gz
|
||||
|
||||
@ -240,6 +260,19 @@ apps/$(DROPBEAR)/dropbear: apps/$(DROPBEAR)/configure
|
||||
.PHONY: dropbear
|
||||
dropbear: apps/$(DROPBEAR)/dropbear
|
||||
|
||||
#
|
||||
# oscam
|
||||
#
|
||||
|
||||
apps/oscam-svn/config.sh:
|
||||
cd apps && svn checkout http://www.streamboard.tv/svn/oscam/trunk oscam-svn -r $(OSCAM_REV)
|
||||
|
||||
apps/oscam-svn/Distribution/oscam-1.20-unstable_svn$(OSCAM_REV)-sh4-linux: apps/oscam-svn/config.sh
|
||||
make -C apps/oscam-svn CROSS_DIR=$(TOOLCHAIN)/bin/ CROSS=sh4-linux-
|
||||
|
||||
.PHONY: oscam
|
||||
oscam: apps/oscam-svn/Distribution/oscam-1.20-unstable_svn$(OSCAM_REV)-sh4-linux
|
||||
|
||||
#
|
||||
# clean all
|
||||
#
|
||||
|
@ -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
33
fs-add/etc/init.d/oscamd
Executable 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
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
add() {
|
||||
|
||||
BLKID=$(/sbin/blkid /dev/$MDEV)
|
||||
eval ${BLKID#*:}
|
||||
if [ -n "$LABEL" ]; then
|
||||
@ -24,3 +26,27 @@ for fs_type in ext4 ext3 ext2 ; do
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
remove() {
|
||||
|
||||
logger -p local0.notice "Unmounting $MDEV"
|
||||
|
||||
for MOUNT_POINT in /media/* ; do
|
||||
if test -d "$MOUNT_POINT"; then
|
||||
d=$(mountpoint -n "$MOUNT_POINT" 2> /dev/null | cut -d ' ' -f 1)
|
||||
if test "$d" = "$MDEV" -o "$d" = "UNKNOWN"; then
|
||||
logger -p local0.notice "Unmounting $MDEV : $MOUNT_POINT"
|
||||
umount -f "$MOUNT_POINT"
|
||||
rmdir "$MOUNT_POINT"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
case "$ACTION" in
|
||||
add) add ;;
|
||||
remove) remove ;;
|
||||
esac
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
logger -p local0.notice "Unmounting $MDEV"
|
||||
|
||||
for MOUNT_POINT in /media/* ; do
|
||||
if test -d "$MOUNT_POINT"; then
|
||||
d=$(mountpoint -n "$MOUNT_POINT" 2> /dev/null | cut -d ' ' -f 1)
|
||||
if test "$d" = "$MDEV" -o "$d" = "UNKNOWN"; then
|
||||
logger -p local0.notice "Unmounting $MDEV : $MOUNT_POINT"
|
||||
umount -f "$MOUNT_POINT"
|
||||
rmdir "$MOUNT_POINT"
|
||||
fi
|
||||
fi
|
||||
done
|
45
fs-add/sbin/tty-hotplug.sh
Executable file
45
fs-add/sbin/tty-hotplug.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
add() {
|
||||
|
||||
test -r /etc/sysconfig/config && . /etc/sysconfig/config
|
||||
|
||||
DEVID1=${DEVPATH%:*}
|
||||
DEVID2=${DEVPATH##*:}
|
||||
DEVID=${DEVID1##*/}:${DEVID2%%/*}
|
||||
|
||||
logger -p local0.notice "$MDEV device attached '$DEVID'"
|
||||
|
||||
if test -n "$DEVID"; then
|
||||
ln -sf "$MDEV" "/dev/ttyUSB${DEVID}"
|
||||
fi
|
||||
if test "$DEVID" = "$TTYUSB1_DEV" -a -n "$TTYUSB1_NAME"; then
|
||||
ln -sf "$MDEV" "/dev/${TTYUSB1_NAME}"
|
||||
fi
|
||||
if test "$DEVID" = "$TTYUSB2_DEV" -a -n "$TTYUSB2_NAME"; then
|
||||
ln -sf "$MDEV" "/dev/${TTYUSB2_NAME}"
|
||||
fi
|
||||
if test "$DEVID" = "$TTYUSB3_DEV" -a -n "$TTYUSB3_NAME"; then
|
||||
ln -sf "$MDEV" "/dev/${TTYUSB3_NAME}"
|
||||
fi
|
||||
if test "$DEVID" = "$TTYUSB4_DEV" -a -n "$TTYUSB4_NAME"; then
|
||||
ln -sf "$MDEV" "/dev/${TTYUSB4_NAME}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
remove() {
|
||||
|
||||
for d in /dev/ttyUSB*; do
|
||||
s=$(readlink "$d")
|
||||
if test "$s" = "$MDEV"; then
|
||||
rm "$d"
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
case "$ACTION" in
|
||||
add) add ;;
|
||||
remove) remove ;;
|
||||
esac
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.32.42
|
||||
# Thu Jan 26 12:43:21 2012
|
||||
# Wed Apr 8 14:52:06 2015
|
||||
#
|
||||
CONFIG_SUPERH=y
|
||||
CONFIG_SUPERH32=y
|
||||
@ -1049,7 +1049,54 @@ CONFIG_USB_STORAGE=y
|
||||
#
|
||||
# USB port drivers
|
||||
#
|
||||
# CONFIG_USB_SERIAL is not set
|
||||
CONFIG_USB_SERIAL=y
|
||||
# CONFIG_USB_SERIAL_CONSOLE is not set
|
||||
# CONFIG_USB_EZUSB is not set
|
||||
CONFIG_USB_SERIAL_GENERIC=y
|
||||
# CONFIG_USB_SERIAL_AIRCABLE is not set
|
||||
# CONFIG_USB_SERIAL_ARK3116 is not set
|
||||
# CONFIG_USB_SERIAL_BELKIN is not set
|
||||
# CONFIG_USB_SERIAL_CH341 is not set
|
||||
# CONFIG_USB_SERIAL_WHITEHEAT is not set
|
||||
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
|
||||
CONFIG_USB_SERIAL_CP210X=m
|
||||
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
|
||||
# CONFIG_USB_SERIAL_EMPEG is not set
|
||||
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||
# CONFIG_USB_SERIAL_FUNSOFT is not set
|
||||
# CONFIG_USB_SERIAL_VISOR is not set
|
||||
# CONFIG_USB_SERIAL_IPAQ is not set
|
||||
# CONFIG_USB_SERIAL_IR is not set
|
||||
CONFIG_USB_SERIAL_EDGEPORT=m
|
||||
CONFIG_USB_SERIAL_EDGEPORT_TI=m
|
||||
# CONFIG_USB_SERIAL_GARMIN is not set
|
||||
# CONFIG_USB_SERIAL_IPW is not set
|
||||
# CONFIG_USB_SERIAL_IUU is not set
|
||||
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
|
||||
# CONFIG_USB_SERIAL_KEYSPAN is not set
|
||||
# CONFIG_USB_SERIAL_KLSI is not set
|
||||
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
|
||||
# CONFIG_USB_SERIAL_MCT_U232 is not set
|
||||
# CONFIG_USB_SERIAL_MOS7720 is not set
|
||||
# CONFIG_USB_SERIAL_MOS7840 is not set
|
||||
# CONFIG_USB_SERIAL_MOTOROLA is not set
|
||||
# CONFIG_USB_SERIAL_NAVMAN is not set
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
CONFIG_USB_SERIAL_OTI6858=m
|
||||
# CONFIG_USB_SERIAL_QUALCOMM is not set
|
||||
CONFIG_USB_SERIAL_SPCP8X5=m
|
||||
# CONFIG_USB_SERIAL_HP4X is not set
|
||||
# CONFIG_USB_SERIAL_SAFE is not set
|
||||
# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
|
||||
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
|
||||
# CONFIG_USB_SERIAL_SYMBOL is not set
|
||||
CONFIG_USB_SERIAL_TI=m
|
||||
# CONFIG_USB_SERIAL_CYBERJACK is not set
|
||||
# CONFIG_USB_SERIAL_XIRCOM is not set
|
||||
# CONFIG_USB_SERIAL_OPTION is not set
|
||||
# CONFIG_USB_SERIAL_OMNINET is not set
|
||||
# CONFIG_USB_SERIAL_OPTICON is not set
|
||||
# CONFIG_USB_SERIAL_DEBUG is not set
|
||||
|
||||
#
|
||||
# USB Miscellaneous drivers
|
||||
|
1569
patches/kernel.config
Normal file
1569
patches/kernel.config
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user