#!/bin/sh . /etc/profile . /etc/init.d/functions . /etc/init.d/globals SHOWINFO "start" # system directories SHOWINFO "creating system directories ..." mount -t proc proc /proc mount -t sysfs sys /sys mount -t tmpfs tmp /tmp mount -t tmpfs media /media mount -t tmpfs mnt /mnt for dir in epg movies music pictures streaming autofs plugins; do mkdir -p /mnt/${dir} done mount -t tmpfs srv /srv mkdir -p /dev/pts mount -t devpts devpts /dev/pts mkdir -p /dev/shm/usb mount -t usbfs none /proc/bus/usb mkdir -p /var/lib/nfs mount -t tmpfs nfs /var/lib/nfs mkdir -p /var/samba mount -t tmpfs samba /var/samba dmesg -n 1 # set dummy date date -s "%(YEAR)-01-01 00:00" # directory for wireless drivers mkdir -p /var/run/wpa_supplicant # create nodes # makedevs /dev << EONODES watchdog c 644 0 0 10 130 cnxt d 755 0 0 cnxt/cnxt_gen_drv c 644 0 0 102 0 notifyq c 644 0 0 102 1 user_kal c 644 0 0 102 2 display c 644 0 0 238 0 cs_control c 644 0 0 249 0 input d 755 0 0 input/nevis_ir c 644 0 0 240 0 input/event0_uinput c 644 0 0 10 223 input/mouse c 644 0 0 13 32 0 1 4 input/event2 c 644 0 0 13 66 input/event3 c 644 0 0 13 67 EONODES ln -sf nevis_ir /dev/input/event0 ln -sf nevis_ir /dev/input/input0 service hostname start # logging as much as possible service syslogd start LOGINFO "init frontpanel ..." # Frontpanel insmod cs_frontpanel.ko # update if [ -x /etc/init.d/stb_update.sh ]; then /etc/init.d/stb_update.sh fi # update system if [ -x /etc/init.d/sys_update.sh ]; then /etc/init.d/sys_update.sh fi ## mdev coldplug for node permissions LOGINFO "mdev coldplug ..." echo >/dev/mdev.seq echo $(which mdev) > /proc/sys/kernel/hotplug mdev -s # mdev -s does not poke usb devices, so we need to do it here. LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug" for i in /sys/bus/usb/devices/*; do case "${i##*/}" in *-*:1.0) LOGINFO "usb device $i found" echo add >$i/uevent ;; esac done # initialize hardware LOGINFO "init hardware ..." dt -t"INIT HARDWARE" insmod cnxt_kal.ko insmod cnxt_base.ko init=1 if [ -e /var/etc/.scart_osd_fix ]; then insmod cnxt_fb.ko cnxtfb_standalone=1 cnxtfb_width=720 cnxtfb_height=576 #PAL elif [ -e /var/etc/.scart_osd_fix_wide ]; then insmod cnxt_fb.ko cnxtfb_standalone=1 cnxtfb_width=1024 cnxtfb_height=576 #PAL widescreen else insmod cnxt_fb.ko cnxtfb_standalone=1 cnxtfb_width=1280 cnxtfb_height=720 #HDTV fi insmod cnxt_lnx.ko insmod cnxt_alsa.ko if [ -e /var/etc/.hddpower ]; then insmod cs_control.ko hdd_power=1 else insmod cs_control.ko fi insmod cnxt_i2c.ko insmod cnxt_sata_drv.ko LOGINFO "init drivers ..." dt -t"INIT DRIVERS" ## fire up network/wlan insmod 8712u.ko insmod 8192cu.ko insmod rt2870sta.ko service networking start service ntpdate start # load rest of modules insmod cifs.ko insmod fuse.ko insmod usbserial.ko insmod ftdi_sio.ko insmod tun.ko insmod pl2303.ko insmod stv6110.ko verbose=0 insmod stv090x.ko verbose=0 insmod tda10023.ko insmod avl2108.ko insmod max2112.ko insmod cs_frontend_prop.ko insmod dvb-core.ko insmod cs_frontend.ko # say hi to everyone dt -ls01 dt -ls02 dt -c dt -t"BOOT NI-IMAGE" # change default core pattern echo "/tmp/core.%e.%p.%t" > /proc/sys/kernel/core_pattern # starting services and daemons in order of the symlink names LOGINFO "run initscripts start ..." run_initscripts start SHOWINFO "done"