Commit 2bd46655 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

initial

parent 3957dae7
This diff is collapsed.
# Runs 'make', 'make install', and 'make clean' in specified subdirectories
SUBDIRS := src/php_top src/python_tests src/debugfs-webgui # src1
INSTALLDIRS = $(SUBDIRS:%=install-%)
CLEANDIRS = $(SUBDIRS:%=clean-%)
#TARGETDIR=$(DESTDIR)/www/pages
all: $(SUBDIRS)
@echo "make all top"
$(SUBDIRS):
$(MAKE) -C $@
install: $(INSTALLDIRS)
echo "make install top"
$(INSTALLDIRS):
$(MAKE) -C $(@:install-%=%) install
clean: $(CLEANDIRS)
@echo "make clean top"
$(CLEANDIRS):
$(MAKE) -C $(@:clean-%=%) clean
.PHONY: all install clean $(SUBDIRS) $(INSTALLDIRS) $(CLEANDIRS)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="0.1221820363">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1221820363" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1221820363" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
<folderInfo id="0.1221820363." name="/" resourcePath="">
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1043274217" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1043274217.1071800033" name=""/>
<builder arguments="init" command="${workspace_loc:/elphel-init/run_bitbake.sh}" enableCleanBuild="false" enabledIncrementalBuild="true" id="org.eclipse.cdt.build.core.settings.default.builder.365026764" incrementalBuildTarget="-c install -f" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.785882741" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.982996495" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.8554647" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.480226500" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1347472659" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1686385332" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.716913472" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.559915258" name="LLVM bytecode assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1886099197" languageId="org.eclipse.cdt.managedbuilder.llvm.ui.llvmAssembly" languageName="LLVM bytecode assembly" sourceContentType="org.eclipse.cdt.managedbuilder.llvm.ui.llvmAssemblySource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1960214219" name="UPC" superClass="org.eclipse.cdt.build.core.settings.holder">
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1593701683" languageId="org.eclipse.cdt.core.parser.upc.upc" languageName="UPC" sourceContentType="org.eclipse.cdt.core.parser.upc.upcSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="elphel-init.null.1071524317" name="elphel-init"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="0.1221820363">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/elphel-init"/>
</configuration>
</storageModule>
</cproject>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/elphel-init/run_bitbake.sh}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="init -c target_scp -f"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>elphel-init</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/SCP init to target.launch</value>
</dictionary>
<dictionary>
<key>incclean</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
#!/bin/bash
args="$@"
while (( "$#" )); do
shift
done
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Launching bitbake $args"
cd $DIR/../../poky
. ./oe-init-build-env
bitbake $args | sed -u 's@| @@'
exit 0
SYSCONFDIR=$(DESTDIR)/etc
INITDIR=$(DESTDIR)/etc/init.d
OWN = -o root -g root
INSTALL = install
INSTMODE = 0755
SCRIPT1=init_elphel393.sh
SCRIPT2=init_elphel393
all:
@echo "make all in src"
install:
@echo "make install in src"
# 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
$(INSTALL) $(OWN) -d $(SYSCONFDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT1).tmp $(SYSCONFDIR)/$(SCRIPT1)
rm $(SCRIPT1).tmp
sed -e 's/init_elphel393.sh/$(INITSTRING)/' $(SCRIPT2) > $(SCRIPT2).tmp
$(INSTALL) $(OWN) -d $(INITDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(SCRIPT2).tmp $(INITDIR)/$(SCRIPT2)
rm $(SCRIPT2).tmp
clean:
@echo "make clean in src"
#!/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/init_elphel393
NAME=init_elphel393
DESC="extra init scripts"
MNTPOINT=/mnt/mmc
MMCDEV=/dev/mmcblk0p1
SOME_SCRIPT=init_elphel393.sh
case "$1" in
start)
echo -n "Starting $DESC: "
echo "$NAME:"
#add commands here
#mount here
echo " Mounting Memory Card to $MNTPOINT"
if [ ! -d $MNTPOINT ]; then
mkdir -p $MNTPOINT
fi
mount $MMCDEV $MNTPOINT
if [ -f /etc/$SOME_SCRIPT ]; then
echo " Launching /etc/$SOME_SCRIPT"
/etc/$SOME_SCRIPT
else
echo " $SOME_SCRIPT not found. Nothing to launch."
fi
;;
stop)
echo -n "Stopping $DESC: "
echo "$NAME."
;;
restart)
echo -n "Restarting $DESC: "
echo "$NAME."
;;
status)
echo -n "$NAME status:"
if [ -f /var/run/$NAME ]; then
echo -n "Running"
else
echo -n "Not running"
fi
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0
#/bin/sh
#ifconfig eth0 down
#ifconfig eth0 hw ether 00:0e:64:10:00:02 192.168.0.7
# select sensor type: 5 Mpx (set 5) or 14 Mpx (set 14)
# 14MPix does not work with framepars & parsedit!!!
SENSOR_TYPE=5
# imgsrv port number
IMGSRV_PORT=2323
# camogm port number
CAMOGM_PORT=3456
# camogm command pipe name
CAMOGM_PIPE=/var/volatile/camogm_cmd
# enable SATA, set this to 1 if camera is equipped with SSD drive
SATA_EN=1
#for andrey:
ifconfig eth0 192.168.0.9
PYDIR=/usr/local/bin
VERILOG_DIR=/usr/local/verilog
$PYDIR/test_mcntrl.py @${VERILOG_DIR}/hargs
echo imgsrv -p 2323
imgsrv -p 2323
#restart PHP - it can get errors while opening/mmaping at startup, then some functions fail
killall lighttpd; /usr/sbin/lighttpd -f /etc/lighttpd.conf
/www/pages/exif.php init=/etc/Exif_template.xml
echo "init sensor port"
wget -qO- "localhost/framepars.php?sensor_port=0&cmd=init" > /dev/null 2>&1
autoexposure -p 0 -c 0 -b 0 -d 1 >> /dev/null 2>&1 &
echo "start autoexposure daemon"
wget -qO- "localhost/parsedit.php?immediate&COMPRESSOR_RUN=2&DAEMON_EN=1&AUTOEXP_ON=1&AEXP_FRACPIX=0xff80&AEXP_LEVEL=0xf800&AE_PERIOD=4&AE_THRESH=500&HIST_DIM_01=0x0a000a00&HIST_DIM_23=0x0a000a00&EXP_AHEAD=3" > /dev/null 2>&1
echo "start white balance daemon"
wget -qO- "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" > /dev/null 2>&1
echo "/etc/init_elphel393.sh done"
exit 0
#mkdir /tmp/local
#cp -r /usr/local/bin $PYDIR
cd /usr/local/verilog/
if [ $SENSOR_TYPE -eq 5 ]; then
ln -sf x393_parallel.bit x393.bit
$PYDIR/test_mcntrl.py @startup5 >> /dev/null 2>&1 &
else
ln -sf x393_hispi.bit x393.bit
$PYDIR/test_mcntrl.py @startup14 >> /dev/null 2>&1 &
fi
sleep 10
sync
$PYDIR/test_mcntrl.py @includes -c compressor_control all 1 None None None None None
$PYDIR/test_mcntrl.py @includes -c compressor_control all 0 None None None None None
# create circular buffer files
if [ ! -e /dev/circbuf0 ]; then
mknod /dev/circbuf0 c 135 32
fi
if [ ! -e /dev/circbuf1 ]; then
mknod /dev/circbuf1 c 135 33
fi
if [ ! -e /dev/circbuf2 ]; then
mknod /dev/circbuf2 c 135 34
fi
if [ ! -e /dev/circbuf3 ]; then
mknod /dev/circbuf3 c 135 35
fi
if [ ! -e /dev/jpeghead0 ]; then
mknod /dev/jpeghead0 c 135 48
fi
if [ ! -e /dev/jpeghead1 ]; then
mknod /dev/jpeghead1 c 135 49
fi
if [ ! -e /dev/jpeghead2 ]; then
mknod /dev/jpeghead2 c 135 50
fi
if [ ! -e /dev/jpeghead3 ]; then
mknod /dev/jpeghead3 c 135 51
fi
# create exif files and send template to driver
if [ ! -e /dev/exif_exif0 ]; then
mknod /dev/exif_exif0 c 125 16
fi
if [ ! -e /dev/exif_exif1 ]; then
mknod /dev/exif_exif1 c 125 17
fi
if [ ! -e /dev/exif_exif2 ]; then
mknod /dev/exif_exif2 c 125 18
fi
if [ ! -e /dev/exif_exif3 ]; then
mknod /dev/exif_exif3 c 125 19
fi
if [ ! -e /dev/exif_meta0 ]; then
mknod /dev/exif_meta0 c 125 32
fi
if [ ! -e /dev/exif_meta1 ]; then
mknod /dev/exif_meta1 c 125 33
fi
if [ ! -e /dev/exif_meta2 ]; then
mknod /dev/exif_meta2 c 125 34
fi
if [ ! -e /dev/exif_meta3 ]; then
mknod /dev/exif_meta3 c 125 35
fi
if [ ! -e /dev/exif_template ]; then
mknod /dev/exif_template c 125 2
fi
if [ ! -e /dev/exif_metadir ]; then
mknod /dev/exif_metadir c 125 3
fi
/www/pages/exif.php init=/etc/Exif_template.xml
# debug code follows, should be removed later
# inable interrupts
echo 1 > /dev/circbuf0
# set quality, frame size and bayer shift
echo "3 80" > /dev/circbuf0
if [ $SENSOR_TYPE -eq 5 ]; then
echo "6 2592:1936" > /dev/circbuf0
echo "7 3" > /dev/circbuf0
else
echo "6 4384:3280" > /dev/circbuf0
echo "7 2" > /dev/circbuf0
fi
# turn off debug output
echo file circbuf.c -pfl > /sys/kernel/debug/dynamic_debug/control
echo file sensor_common.c -pfl > /sys/kernel/debug/dynamic_debug/control
echo file jpeghead.c -pfl > /sys/kernel/debug/dynamic_debug/control
# end of debug code
$PYDIR/test_mcntrl.py @includes -c compressor_control all 3 None None None None None
cd ~
if [ -f /usr/bin/imgsrv ]; then
imgsrv -p $IMGSRV_PORT &
fi
if [ -f /usr/bin/camogm ]; then
camogm -n $CAMOGM_PIPE -p $CAMOGM_PORT &
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
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