Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meta-elphel393
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
meta-elphel393
Commits
f3c5db5d
Commit
f3c5db5d
authored
Jul 22, 2016
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Elphel/meta-elphel393
parents
af102a1c
1aeb6d8c
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
97 additions
and
63 deletions
+97
-63
elphel-misc.bbclass
classes/elphel-misc.bbclass
+27
-0
camogm.js
recipes-core/apps-web/files/camogm.js
+3
-3
camogm.php
recipes-core/apps-web/files/camogm.php
+4
-4
core-image-elphel393-initramfs.bb
recipes-core/images/core-image-elphel393-initramfs.bb
+4
-0
init_elphel393
recipes-core/init-elphel393/files/init_elphel393
+1
-1
init_elphel393.sh
recipes-core/init-elphel393/files/init_elphel393.sh
+8
-6
init-elphel393_1.0.bb
recipes-core/init-elphel393/init-elphel393_1.0.bb
+10
-2
init-live.sh
recipes-core/initrdscripts/files/init-live.sh
+29
-28
overlay_sync
recipes-core/overlay-sync/files/overlay_sync
+1
-13
overlay_syncd
recipes-core/overlay-sync/files/overlay_syncd
+6
-2
90-elphel-automount.rules
recipes-core/udev-rules/files/90-elphel-automount.rules
+4
-4
No files found.
classes/elphel-misc.bbclass
0 → 100644
View file @
f3c5db5d
# Well
# returns string - based on file
def version_update(path,file,evr):
for line in open(path+'/'+file):
line = line.strip()
if (line[0]!="#"):
break
arr = line.split('.')
try:
arr[evr]
except IndexError:
if (evr==1): res = 0
if (evr==2): res = revision_update(path,file)
else:
res = arr[evr]
return res
def revision_update(path,file):
import subprocess
cmd = "cd "+path+"; git rev-list --count $(git log -1 --pretty=format:\"%H\" "+file+")..HEAD"
try:
res = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
except subprocess.CalledProcessError as e:
res = "error_"+e.returncode
res = res.strip(' \t\n\r')
return res
recipes-core/apps-web/files/camogm.js
View file @
f3c5db5d
...
@@ -59,7 +59,7 @@ function init(){
...
@@ -59,7 +59,7 @@ function init(){
ct2
=
$
(
"<div style='padding-top:20px;'>"
);
ct2
=
$
(
"<div style='padding-top:20px;'>"
);
tmpstr
=
"Absolute path: <input id='abspath' style='text' value='/
tmp/
mnt/sda1' class='ap' />"
;
tmpstr
=
"Absolute path: <input id='abspath' style='text' value='/mnt/sda1' class='ap' />"
;
ct2
.
html
(
tmpstr
);
ct2
.
html
(
tmpstr
);
$
(
"#controls"
).
append
(
ct2
);
$
(
"#controls"
).
append
(
ct2
);
...
@@ -212,14 +212,14 @@ function get_files(){
...
@@ -212,14 +212,14 @@ function get_files(){
function
init_path
(){
function
init_path
(){
$
.
ajax
({
$
.
ajax
({
url
:
"camogm.php?cmd=list&path=/
tmp/
mnt"
,
url
:
"camogm.php?cmd=list&path=/mnt"
,
complete
:
function
(
data
){
complete
:
function
(
data
){
var
xml
=
data
.
responseXML
;
var
xml
=
data
.
responseXML
;
var
dirs
=
$
(
xml
).
find
(
"d"
);
var
dirs
=
$
(
xml
).
find
(
"d"
);
var
res
=
false
;
var
res
=
false
;
for
(
var
i
=
0
;
i
<
dirs
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
dirs
.
length
;
i
++
){
var
tmp
=
$
(
dirs
[
i
]).
text
();
var
tmp
=
$
(
dirs
[
i
]).
text
();
if
(
tmp
==
"/
tmp/
mnt/sda1"
)
{
if
(
tmp
==
"/mnt/sda1"
)
{
$
(
"#abspath"
).
val
(
tmp
);
$
(
"#abspath"
).
val
(
tmp
);
res
=
true
;
res
=
true
;
}
}
...
...
recipes-core/apps-web/files/camogm.php
View file @
f3c5db5d
...
@@ -71,9 +71,9 @@ if ($cmd=="create_symlink"){
...
@@ -71,9 +71,9 @@ if ($cmd=="create_symlink"){
if
(
isset
(
$_GET
[
'path'
]))
{
if
(
isset
(
$_GET
[
'path'
]))
{
$path
=
$_GET
[
'path'
];
$path
=
$_GET
[
'path'
];
if
(
is_dir
(
$path
)){
if
(
is_dir
(
$path
)){
//
exec("ln -sf $path /www/pages/video;sync");
exec
(
"ln -sf
$path
/www/pages/video;sync"
);
if
(
file_exists
(
"/tmp/video"
))
unlink
(
"/tmp/video"
);
//
if (file_exists("/tmp/video")) unlink("/tmp/video");
exec
(
"ln -sf
$path
/tmp/video"
);
//
exec("ln -sf $path /tmp/video");
}
}
}
}
}
}
...
@@ -90,7 +90,7 @@ if ($cmd=="start"){
...
@@ -90,7 +90,7 @@ if ($cmd=="start"){
fprintf
(
$fcmd
,
"exit;
\n
"
);
fprintf
(
$fcmd
,
"exit;
\n
"
);
exec
(
'sync'
);
exec
(
'sync'
);
}
else
if
(
$cmd
==
"default"
){
}
else
if
(
$cmd
==
"default"
){
fprintf
(
$fcmd
,
"format=mov;exif=0;prefix=/
tmp/
mnt/sda1/;
\n
"
);
fprintf
(
$fcmd
,
"format=mov;exif=0;prefix=/mnt/sda1/;
\n
"
);
}
else
{
}
else
{
fprintf
(
$fcmd
,
"
$cmd
\n
"
);
fprintf
(
$fcmd
,
"
$cmd
\n
"
);
//exec('sync');
//exec('sync');
...
...
recipes-core/images/core-image-elphel393-initramfs.bb
View file @
f3c5db5d
...
@@ -20,3 +20,7 @@ IMAGE_ROOTFS_SIZE = "8192"
...
@@ -20,3 +20,7 @@ IMAGE_ROOTFS_SIZE = "8192"
BAD_RECOMMENDATIONS += "busybox-syslog"
BAD_RECOMMENDATIONS += "busybox-syslog"
do_compile_append(){
echo "VIRTUAL-RUNTIME_base-utils= ${VIRTUAL-RUNTIME_base-utils}"
echo "ROOTFS_BOOTSTRAP_INSTALL= ${ROOTFS_BOOTSTRAP_INSTALL}"
}
\ No newline at end of file
recipes-core/init-elphel393/files/init_elphel393
View file @
f3c5db5d
...
@@ -5,7 +5,7 @@ DAEMON=/usr/sbin/init_elphel393
...
@@ -5,7 +5,7 @@ DAEMON=/usr/sbin/init_elphel393
NAME
=
init_elphel393
NAME
=
init_elphel393
DESC
=
"extra init scripts"
DESC
=
"extra init scripts"
MNTPOINT
=
/
tmp/
mnt/mmc
MNTPOINT
=
/mnt/mmc
MMCDEV
=
/dev/mmcblk0p1
MMCDEV
=
/dev/mmcblk0p1
SOME_SCRIPT
=
init_elphel393.sh
SOME_SCRIPT
=
init_elphel393.sh
...
...
recipes-core/init-elphel393/files/init_elphel393.sh
View file @
f3c5db5d
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
SENSOR_TYPE
=
14
SENSOR_TYPE
=
14
# imgsrv port number
# imgsrv port number
IMGSRV_PORT
=
2323
IMGSRV_PORT
=
2323
# camogm port number
CAMOGM_PORT
=
3456
# camogm command pipe name
# camogm command pipe name
CAMOGM_PIPE
=
/var/volatile/camogm_cmd
CAMOGM_PIPE
=
/var/volatile/camogm_cmd
# enable SATA, set this to 1 if camera is equipped with SSD drive
# enable SATA, set this to 1 if camera is equipped with SSD drive
...
@@ -13,19 +15,19 @@ SATA_EN=1
...
@@ -13,19 +15,19 @@ SATA_EN=1
ifconfig eth0 192.168.0.9
ifconfig eth0 192.168.0.9
PYDIR
=
/
tmp
/local/bin
PYDIR
=
/
usr
/local/bin
mkdir
/tmp/local
#
mkdir /tmp/local
cp
-r
/usr/local/bin
$PYDIR
#
cp -r /usr/local/bin $PYDIR
cd
/usr/local/verilog/
cd
/usr/local/verilog/
if
[
$SENSOR_TYPE
-eq
5
]
;
then
if
[
$SENSOR_TYPE
-eq
5
]
;
then
ln
-sf
x393_parallel.bit x393.bit
$PYDIR
/test_mcntrl.py @startup5
>>
/dev/null 2>&1 &
$PYDIR
/test_mcntrl.py @startup5
>>
/dev/null 2>&1 &
ln
-sf
/usr/local/verilog/x393_parallel.bit /tmp/x393.bit
else
else
ln
-sf
x393_hispi.bit x393.bit
$PYDIR
/test_mcntrl.py @startup14
>>
/dev/null 2>&1 &
$PYDIR
/test_mcntrl.py @startup14
>>
/dev/null 2>&1 &
ln
-sf
/usr/local/verilog/x393_hispi.bit /tmp/x393.bit
fi
fi
sleep
10
sleep
10
...
@@ -122,7 +124,7 @@ if [ -f /usr/bin/imgsrv ]; then
...
@@ -122,7 +124,7 @@ if [ -f /usr/bin/imgsrv ]; then
imgsrv
-p
$IMGSRV_PORT
&
imgsrv
-p
$IMGSRV_PORT
&
fi
fi
if
[
-f
/usr/bin/camogm
]
;
then
if
[
-f
/usr/bin/camogm
]
;
then
camogm
$CAMOGM_PIPE
&
camogm
-n
$CAMOGM_PIPE
-p
$CAMOGM_PORT
&
fi
fi
if
[
$SATA_EN
-eq
1
]
;
then
if
[
$SATA_EN
-eq
1
]
;
then
...
...
recipes-core/init-elphel393/init-elphel393_1.0.bb
View file @
f3c5db5d
...
@@ -13,8 +13,16 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293
...
@@ -13,8 +13,16 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293
SRCDATE = "20131202"
SRCDATE = "20131202"
PV = "${SRCDATE}"
#PV = "${SRCDATE}"
PR = "r0"
#PR = "r0"
# PV,PR update
inherit elphel-misc
VPATH = "${TOPDIR}/../../fpga-elphel/x393"
VFILE = "VERSION"
PE = "${@version_update('${VPATH}','${VFILE}',0)}"
PV = "${@version_update('${VPATH}','${VFILE}',1)}"
PR = "${@version_update('${VPATH}','${VFILE}',2)}"
RDEPENDS_${PN} += "\
RDEPENDS_${PN} += "\
python-core \
python-core \
...
...
recipes-core/initrdscripts/files/init-live.sh
View file @
f3c5db5d
...
@@ -166,6 +166,11 @@ read_args
...
@@ -166,6 +166,11 @@ read_args
mount_and_boot
()
{
mount_and_boot
()
{
mkdir
$ROOT_MOUNT
mkdir
$ROOT_MOUNT
if
!
mount
-t
$ROOT_FSTYPE
-o
rw,noatime
$ROOT_DEVICE
$ROOT_MOUNT
;
then
fatal
"Could not mount rootfs device (not
$ROOT_FSTYPE
?)"
fi
if
[
"
$ROOT_FSTYPE
"
=
"ubifs"
]
;
then
#mknod /dev/loop0 b 7 0 2>/dev/null
#mknod /dev/loop0 b 7 0 2>/dev/null
#if [ "$ROOT_FSTYPE" = "ubifs" ]; then
#if [ "$ROOT_FSTYPE" = "ubifs" ]; then
...
@@ -174,10 +179,6 @@ mount_and_boot() {
...
@@ -174,10 +179,6 @@ mount_and_boot() {
#ubiattach /dev/ubi_ctrl -m $ROOT_UBIVOL
#ubiattach /dev/ubi_ctrl -m $ROOT_UBIVOL
#fi
#fi
if
!
mount
-t
$ROOT_FSTYPE
-o
rw,noatime
$ROOT_DEVICE
$ROOT_MOUNT
;
then
fatal
"Could not mount rootfs device (not
$ROOT_FSTYPE
?)"
fi
# always 'overlay'
# always 'overlay'
TMP
=
/var/volatile/tmp
TMP
=
/var/volatile/tmp
mkdir
-p
/var/volatile
mkdir
-p
/var/volatile
...
@@ -199,7 +200,7 @@ mount_and_boot() {
...
@@ -199,7 +200,7 @@ mount_and_boot() {
#mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro
#mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro
#mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw
#mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw
fi
fi
fi
boot_live_root
boot_live_root
#commenting out old lines
#commenting out old lines
...
...
recipes-core/overlay-sync/files/overlay_sync
View file @
f3c5db5d
#!/bin/sh
#!/bin/sh
rsync
-av
\
echo
$@
>
/tmp/overlay_sync
--exclude
'*.pyc'
\
--exclude
'.python-history*'
\
--exclude
'etc/udev-cache.tar.gz'
\
--exclude
'etc/udev'
\
--exclude
'etc/volatile.cache'
\
--exclude
''
\
--exclude
''
\
--exclude
'media'
\
--exclude
'mnt'
\
--exclude
'run'
\
--exclude
'var'
\
/tmp/rootfs.rw/upperdir/ /tmp/rootfs.ro/
exit
0
exit
0
recipes-core/overlay-sync/files/overlay_syncd
View file @
f3c5db5d
...
@@ -12,7 +12,9 @@ case "$1" in
...
@@ -12,7 +12,9 @@ case "$1" in
stop
)
stop
)
echo
-n
"Stopping
$DESC
: "
echo
-n
"Stopping
$DESC
: "
echo
"
$NAME
."
echo
"
$NAME
."
/sbin/overlay_sync
if
[
-f
/tmp/overlay
]
;
then
rsync
-av
/tmp/rootfs.rw/upperdir/ /tmp/rootfs.ro/
fi
;;
;;
restart
)
restart
)
echo
-n
"Restarting
$DESC
: "
echo
-n
"Restarting
$DESC
: "
...
@@ -27,7 +29,9 @@ case "$1" in
...
@@ -27,7 +29,9 @@ case "$1" in
fi
fi
;;
;;
sync
)
sync
)
/sbin/overlay_sync
if
[
-f
/tmp/overlay
]
;
then
rsync
-av
/tmp/rootfs.rw/upperdir/ /tmp/rootfs.ro/
fi
;;
;;
*
)
*
)
N
=
/etc/init.d/
$NAME
N
=
/etc/init.d/
$NAME
...
...
recipes-core/udev-rules/files/90-elphel-automount.rules
View file @
f3c5db5d
...
@@ -13,14 +13,14 @@ ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="", GOTO="quit_automount"
...
@@ -13,14 +13,14 @@ ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="", GOTO="quit_automount"
ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="filesystem", ENV{dir_name}="%k"
ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="filesystem", ENV{dir_name}="%k"
# Mount device to /media if it is not SSD
# Mount device to /media if it is not SSD
ACTION=="add", ENV{ID_ATA_SATA}!="1", RUN+="/bin/mkdir -p /
tmp/media/%E{dir_name}", RUN+="/bin/mount /dev/%k /tmp
/media/%E{dir_name}"
ACTION=="add", ENV{ID_ATA_SATA}!="1", RUN+="/bin/mkdir -p /
media/%E{dir_name}", RUN+="/bin/mount /dev/%k
/media/%E{dir_name}"
# Mound device to /mnt if it is SSD
# Mound device to /mnt if it is SSD
ACTION=="add", ENV{ID_ATA_SATA}=="1", RUN+="/bin/mkdir -p /
tmp/mnt/%E{dir_name}", RUN+="/bin/mount /dev/%k /tmp
/mnt/%E{dir_name}"
ACTION=="add", ENV{ID_ATA_SATA}=="1", RUN+="/bin/mkdir -p /
mnt/%E{dir_name}", RUN+="/bin/mount /dev/%k
/mnt/%E{dir_name}"
# Delete directory after removal
# Delete directory after removal
ACTION=="remove", ENV{ID_ATA_SATA}!="1", ENV{dir_name}!="", RUN+="/bin/rmdir /
tmp/
media/%E{dir_name}"
ACTION=="remove", ENV{ID_ATA_SATA}!="1", ENV{dir_name}!="", RUN+="/bin/rmdir /media/%E{dir_name}"
ACTION=="remove", ENV{ID_ATA_SATA}=="1", ENV{dir_name}!="", RUN+="/bin/rmdir /
tmp/
mnt/%E{dir_name}"
ACTION=="remove", ENV{ID_ATA_SATA}=="1", ENV{dir_name}!="", RUN+="/bin/rmdir /mnt/%E{dir_name}"
# Exit point
# Exit point
LABEL="quit_automount"
LABEL="quit_automount"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment