Commit 8aaefcf5 authored by Mikhail Karpenko's avatar Mikhail Karpenko

Move init script to /etc/elphel393

parent 1d073f8d
SYSCONFDIR=$(DESTDIR)/etc SYSCONFDIR=$(DESTDIR)/etc
INITDIR=$(DESTDIR)/etc/init.d INITDIR=$(DESTDIR)/etc/init.d
MODPROBEDIR=$(SYSCONFDIR)/modprobe.d
DRIVER_NAME=ahci_elphel
CONFDIR=$(SYSCONFDIR)/elphel393
OWN = -o root -g root OWN = -o root -g root
...@@ -17,8 +20,8 @@ install: ...@@ -17,8 +20,8 @@ install:
# below depends on Yocto and the corresponding recipe (meta-core/init/init.bb) # below depends on Yocto and the corresponding recipe (meta-core/init/init.bb)
sed -e 's/192.168.0.9/$(REMOTE_IP)/' $(SCRIPT1) > $(SCRIPT1).tmp sed -e 's/192.168.0.9/$(REMOTE_IP)/' $(SCRIPT1) > $(SCRIPT1).tmp
$(INSTALL) $(OWN) -d $(SYSCONFDIR) $(INSTALL) $(OWN) -d $(CONFDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT1).tmp $(SYSCONFDIR)/$(SCRIPT1) $(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT1).tmp $(CONFDIR)/$(SCRIPT1)
rm $(SCRIPT1).tmp rm $(SCRIPT1).tmp
#INITSTRING default is defined in local.conf, weak default - meta-core/init/init.bb #INITSTRING default is defined in local.conf, weak default - meta-core/init/init.bb
...@@ -26,6 +29,10 @@ install: ...@@ -26,6 +29,10 @@ install:
$(INSTALL) $(OWN) -d $(INITDIR) $(INSTALL) $(OWN) -d $(INITDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT2).tmp $(INITDIR)/$(SCRIPT2) $(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT2).tmp $(INITDIR)/$(SCRIPT2)
rm $(SCRIPT2).tmp rm $(SCRIPT2).tmp
# blacklist AHCI driver to prevent it from loading before FPGA is configured
$(INSTALL) $(OWN) -d $(MODPROBEDIR)
echo "blacklist $(DRIVER_NAME)" >> $(MODPROBEDIR)/blacklist.conf
clean: clean:
@echo "make clean in src" @echo "make clean in src"
...@@ -8,6 +8,7 @@ DESC="extra init scripts" ...@@ -8,6 +8,7 @@ DESC="extra init scripts"
MNTPOINT=/mnt/mmc MNTPOINT=/mnt/mmc
MMCDEV=/dev/mmcblk0p1 MMCDEV=/dev/mmcblk0p1
SOME_SCRIPT=init_elphel393.sh SOME_SCRIPT=init_elphel393.sh
CONFDIR=/etc/elphel393
case "$1" in case "$1" in
start) start)
...@@ -23,7 +24,7 @@ case "$1" in ...@@ -23,7 +24,7 @@ case "$1" in
fi fi
mount $MMCDEV $MNTPOINT mount $MMCDEV $MNTPOINT
/etc/$SOME_SCRIPT $CONFDIR/$SOME_SCRIPT
;; ;;
stop) stop)
echo -n "Stopping $DESC: " echo -n "Stopping $DESC: "
......
...@@ -40,6 +40,13 @@ echo "start white balance daemon" ...@@ -40,6 +40,13 @@ echo "start white balance daemon"
wget -O - "localhost/parsedit.php?immediate&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x1&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x18000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x10000&GAING=0x10000&GAINGB=0x10000&GAINB=0x10000" wget -O - "localhost/parsedit.php?immediate&COMPRESSOR_RUN=2&DAEMON_EN=1&WB_EN=0x1&WB_MASK=0xd&WB_PERIOD=16&WB_WHITELEV=0xfae1&WB_WHITEFRAC=0x028f&WB_SCALE_R=0x10000&WB_SCALE_GB=0x10000&WB_SCALE_B=0x10000&WB_THRESH=500&GAIN_MIN=0x18000&GAIN_MAX=0xfc000&ANA_GAIN_ENABLE=1&GAINR=0x10000&GAING=0x10000&GAINGB=0x10000&GAINB=0x10000"
if [ $SATA_EN -eq 1 ]; then
$PYDIR/x393sata.py
modprobe ahci_elphel &
sleep 2
echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module
fi
echo "/etc/init_elphel393.sh done" echo "/etc/init_elphel393.sh done"
exit 0 exit 0
...@@ -153,11 +160,4 @@ if [ -f /usr/bin/camogm ]; then ...@@ -153,11 +160,4 @@ if [ -f /usr/bin/camogm ]; then
camogm -n $CAMOGM_PIPE -p $CAMOGM_PORT & camogm -n $CAMOGM_PIPE -p $CAMOGM_PORT &
fi fi
if [ $SATA_EN -eq 1 ]; then
$PYDIR/x393sata.py
modprobe ahci_elphel &
sleep 2
echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module
fi
sync sync
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment