Commit 9d5f76e1 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

merged with master-initial

parent a5f141f6
# developers version
inherit elphel-misc
inherit elphel-misc elphel-scp
do_unpack(){
if [ -d ${S} ]; then
......@@ -38,16 +38,18 @@ do_install_append() {
oe_runmake ${EXTRA_OEMAKE} install
}
# --- Adding support for scp installed files to the target ---
do_target_scp () {
#Without next echo - no trace of the scp in the log!
SSH_COMMAND='tar -C / -xzpf /image.tar.gz; rm -f /image.tar.gz; sync'
tar -czvf ${WORKDIR}/image.tar.gz -C ${WORKDIR}/image .
echo scp -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
scp -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
echo ssh ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
ssh ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
do_compile_prepend() {
echo "SRCREV is ${SRCREV}"
if [ ! -f Makefile ]; then
echo "Nothing to compile (missing a Makefile)"
exit 1
fi
}
addtask do_target_scp after do_install
do_target_scp[doc] = "scp installed files to the target. TARGET_USER and TARGET_IP should be defined (ssh-copy-id TARGET_USER@TARGET_USER should be issued once)"
EXPORT_FUNCTIONS do_target_scp
do_install_append() {
oe_runmake ${EXTRA_OEMAKE} install
}
# Always start from compile
# link1: http://www.crashcourse.ca/wiki/index.php/BitBake_task_flags
do_compile[nostamp]="1"
# Adding support for scp files to the target (similar to install) ---
IDENTITY_FILE ?= "-i ~/.ssh/id_rsa"
do_target_scp () {
#Without next echo - no trace of the scp in the log!
tar -czvf ${WORKDIR}/image.tar.gz -C ${WORKDIR}/image .
echo scp ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
scp ${IDENTITY_FILE} -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/
echo ssh ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
ssh ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
}
addtask do_target_scp after do_install
do_target_scp[doc] = "scp installed files to the target. TARGET_USER and TARGET_IP should be defined (ssh-copy-id -i KEY.pub TARGET_USER@TARGET_IP should be issued once)"
EXPORT_FUNCTIONS do_target_scp
#REMOTE_USER=root
#REMOTE_IP=192.168.0.7
#DESTDIR=/home/eyesis/git/elphel393/poky/build/tmp/work/cortexa9-neon-poky-linux-gnueabi/web-393/1_0-4/image
# echo "REMOTE_USER=${REMOTE_USER}"
# echo "REMOTE_IP=${REMOTE_IP}"
# echo "DESTDIR=${D}"
#scp -pr image/* root@192.168.0.9:/
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