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

merged with master-initial

parent a5f141f6
# developers version # developers version
inherit elphel-misc inherit elphel-misc elphel-scp
do_unpack(){ do_unpack(){
if [ -d ${S} ]; then if [ -d ${S} ]; then
...@@ -38,16 +38,18 @@ do_install_append() { ...@@ -38,16 +38,18 @@ do_install_append() {
oe_runmake ${EXTRA_OEMAKE} install oe_runmake ${EXTRA_OEMAKE} install
} }
# --- Adding support for scp installed files to the target --- do_compile_prepend() {
do_target_scp () { echo "SRCREV is ${SRCREV}"
#Without next echo - no trace of the scp in the log! if [ ! -f Makefile ]; then
SSH_COMMAND='tar -C / -xzpf /image.tar.gz; rm -f /image.tar.gz; sync' echo "Nothing to compile (missing a Makefile)"
tar -czvf ${WORKDIR}/image.tar.gz -C ${WORKDIR}/image . exit 1
echo scp -p ${WORKDIR}/image.tar.gz ${REMOTE_USER}@${REMOTE_IP}:/ fi
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_install_append() {
oe_runmake ${EXTRA_OEMAKE} install
} }
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)" # Always start from compile
EXPORT_FUNCTIONS do_target_scp # 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