Commit 0b779300 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

moved archiving to do_install because fakeroot

parent f159dd4a
...@@ -57,6 +57,8 @@ do_install_append() { ...@@ -57,6 +57,8 @@ do_install_append() {
oe_runmake ${EXTRA_OEMAKE} install oe_runmake ${EXTRA_OEMAKE} install
install -d ${D}/etc/elphel393/packages install -d ${D}/etc/elphel393/packages
echo "${PE}.${PV}.${PR}" > ${D}/etc/elphel393/packages/${BPN} echo "${PE}.${PV}.${PR}" > ${D}/etc/elphel393/packages/${BPN}
#make archive
tar -czvf ${WORKDIR}/image.tar.gz -C ${WORKDIR}/image .
} }
# Always start from compile # Always start from compile
......
...@@ -16,6 +16,11 @@ inherit elphel-ssh ...@@ -16,6 +16,11 @@ inherit elphel-ssh
# ssh -i ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND} # ssh -i ${IDENTITY_FILE} ${REMOTE_USER}@${REMOTE_IP} ${SSH_COMMAND}
#} #}
#python () {
# #d.setVarFlag('do_target_scp', 'fakeroot', '1')
# print("test")
#}
python do_target_scp () { python do_target_scp () {
import subprocess import subprocess
...@@ -29,9 +34,10 @@ python do_target_scp () { ...@@ -29,9 +34,10 @@ python do_target_scp () {
MMC2 = "/dev/mmcblk0p2" MMC2 = "/dev/mmcblk0p2"
MMC2MNT = "/mnt/mmc2" MMC2MNT = "/mnt/mmc2"
cmd = "tar -czvf "+WORKDIR+"/image.tar.gz -C "+WORKDIR+"/image ." #cmd = "tar -czvf "+WORKDIR+"/image.tar.gz -C "+WORKDIR+"/image ."
print("cmd: "+cmd) #print("cmd: "+cmd)
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True) #subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
cmd = "ping "+REMOTE_IP+" -c 1" cmd = "ping "+REMOTE_IP+" -c 1"
print("cmd: "+cmd) print("cmd: "+cmd)
...@@ -43,9 +49,9 @@ python do_target_scp () { ...@@ -43,9 +49,9 @@ python do_target_scp () {
nandboot = command_over_ssh(d,"'if [ -d /tmp/rootfs.ro ]; then echo 1; else echo 0;fi'") nandboot = command_over_ssh(d,"'if [ -d /tmp/rootfs.ro ]; then echo 1; else echo 0;fi'")
if COPY_TO_NAND=='1': if COPY_TO_NAND=='1':
print("Copy to NAND") print("Copy to NAND")
if nandboot=="1": if nandboot=="1":
#copy archive #copy archive
cmd = "scp -i "+IDENTITY_FILE+" -p "+WORKDIR+"/image.tar.gz "+REMOTE_USER+"@"+REMOTE_IP+":/" cmd = "scp -i "+IDENTITY_FILE+" -p "+WORKDIR+"/image.tar.gz "+REMOTE_USER+"@"+REMOTE_IP+":/"
......
# Need this function in another reipe # Need this function in another recipe
def command_over_ssh(d,command): def command_over_ssh(d,command):
import subprocess import subprocess
......
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