Subprocess to run lftp on Python 3.6 - python-3.x

I'm trying to write a sub-process to do an lftp (bash command lftp) in Python. It works perfectly in Python 2.7 but fails in Python 3.6
Working code in Python 2.7
>>> uname = 'bunnylorr#gmail.com'
>>> pass_wrd = '*********'
>>> flink = 'ftps://ftp.filestorage.com:990'
>>> src_dir = 'Acct\ Files'
>>> src_frmt = 'compact_'
>>> import subprocess
>>> cmd = """
... filelist=$(lftp -c "open -u {usr},{pwd} {url};cd {sdir};cls -1| grep {sname}")
... echo "INFO: List of files to download: \n$filelist \n"
... for file in $filelist; do lftp -c "open -u {usr},{pwd} {url};cd {sdir};get $file"; \
... echo "INFO: File downloaded to local - $file \n"; done """ \
... .format(usr = uname, pwd = pass_wrd, url = flink, sdir = src_dir, sname = src_frmt )
>>> ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT); cmd_opt = ps.communicate()[0]
>>> print(cmd_opt)
Output Received:
INFO: List of files to download:
compact_wizard_20201211.csv
compact_accounts_20201211.csv
compact_register_20201211.csv
INFO: File downloaded to local - compact_wizard_20201211.csv
INFO: File downloaded to local - compact_accounts_20201211.csv
INFO: File downloaded to local - compact_register_20201211.csv
However I tried the same code on python 3.6 I get the below error
>>> uname = 'bunnylorr#gmail.com'
>>> pass_wrd = '*********'
>>> flink = 'ftps://ftp.filestorage.com:990'
>>> src_dir = 'Acct\ Files'
>>> src_frmt = 'compact_'
>>> import subprocess
>>> cmd = """
... filelist=$(lftp -c "open -u {usr},{pwd} {url};cd {sdir};cls -1| grep {sname}")
... echo "INFO: List of files to download: \n$filelist \n"
... for file in $filelist; do lftp -c "open -u {usr},{pwd} {url};cd {sdir};get $file"; \
... echo "INFO: File downloaded to local - $file \n"; done """ \
... .format(usr = uname, pwd = pass_wrd, url = flink, sdir = src_dir, sname = src_frmt )
>>> ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT); cmd_opt = ps.communicate()[0]
>>> print(cmd_opt)
Error: b'/bin/sh: lftp: command not found\n'
Any recommendations or suggestions on this?
Thanks!!

Installed lftp on my server and reran the Python cmd. It worked!!
sudo apt-get install lftp

Related

Make a shell pipeline started from subprocess.Popen fail if the left-hand side of a pipe fails

Im running a bash command with subprocess.popen in python:
cmd = "bwa-mem2/bwa-mem2 mem -R \'#RG\\tID:2064-01\\tSM:2064-01\\tLB:2064-01\\tPL:ILLUMINA\\tPU:2064-01\' reference_genome/human_g1k_v37.fasta BHYHT7CCXY.RJ-1967-987-02.2_1.fastq BHYHT7CCXY.RJ-1967-987-02.2_2.fastq -t 14 | samtools view -bS -o dna_seq/aligned/2064-01/2064-01.6.bam -"
process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
The problem is that I get returncode 0 even if the first command fails.
I have googled and found out about pipefail and it seems that this is what I should use.
However, I don't understand where to write it. I have tried:
"set -o pipefail && bwa-mem2/bwa-mem2 mem -R \'#RG\\tID:2064-01\\tSM:2064-01\\tLB:2064-01\\tPL:ILLUMINA\\tPU:2064-01\' reference_genome/human_g1k_v37.fasta BHYHT7CCXY.RJ-1967-987-02.2_1.fastq BHYHT7CCXY.RJ-1967-987-02.2_2.fastq -t 14 | samtools view -bS -o dna_seq/aligned/2064-01/2064-01.6.bam -"
which gives: /bin/sh: 1: set: Illegal option -o pipefail
any ideas how I should incorporate this?
Edit:
I'm not sure if it is correct to edit my answer when responding to an answer? there was not enough characters to respond in a comment:/
Anyway,
I tried your second approach without shell=True #Charles Duffy.
(cmd_1 and cmd_2 are equal to what you wrote in your solution)
This is the code I use:
try:
p1 = Popen(shlex.split(cmd_1), stdout=PIPE)
p2 = Popen(shlex.split(cmd_2), stdin=p1.stdout, stdout=PIPE, stderr=STDOUT, text=True)
p1.stdout.close()
output, error = p2.communicate()
p1.wait()
rc_1 = p1.poll()
rc_2 = p2.poll()
print("rc_1:", rc_1)
print("rc_2:", rc_2)
if rc_1 == 0 and rc_2 == 0:
self.log_to_file("DEBUG", "# Process ended with returncode = 0")
if text: self.log_to_file("INFO", f"{text} succesfully
else:
print("Raise exception")
raise Exception(f"stdout: {output} stderr: {error}")
except Exception as e:
print(f"Error: {e} in misc.run_command()")
self.log_to_file("ERROR", f"# Process ended with returncode != 0, {e}")
this is the result i get when deliberately causing an error by renaming one file:
[E::main_mem] failed to open file `/home/jonas/BASE/dna_seq/reads/2064-01/test_BHYHT7CCXY.RJ-1967-987-02.2_2.fastq.gz'.
free(): double free detected in tcache 2
rc_1: -6
rc_2: 0
Raise exception
Error: stdout: stderr: None in misc.run_command()
ERROR: # Process ended with returncode != 0, stdout: stderr: None
It seems to capture the faulty returncode.
But why is stdout empty and stderr= None?
How can I capture the output to have it logged to a logger both when the process is successful and when it fails?
First, With A Shell
Instead of letting shell=True specify sh by default, specify bash explicitly to ensure that pipefail is an available feature:
shell_script = r'''
set -o pipefail || exit
bwa-mem2/bwa-mem2 mem \
-R '#RG\tID:2064-01\tSM:2064-01\tLB:2064-01\tPL:ILLUMINA\tPU:2064-01' \
reference_genome/human_g1k_v37.fasta \
BHYHT7CCXY.RJ-1967-987-02.2_1.fastq \
BHYHT7CCXY.RJ-1967-987-02.2_2.fastq \
-t 14 \
| samtools view -bS \
-o dna_seq/aligned/2064-01/2064-01.6.bam -
'''
process = subprocess.Popen(["bash", "-c", shell_script],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True)
This works, but it's not the best available option.
Second, With No Shell At All
p1 = subprocess.Popen(
['bwa-mem2/bwa-mem2', 'mem',
'-R', r'#RG\tID:2064-01\tSM:2064-01\tLB:2064-01\tPL:ILLUMINA\tPU:2064-01',
'reference_genome/human_g1k_v37.fasta',
'BHYHT7CCXY.RJ-1967-987-02.2_1.fastq',
'BHYHT7CCXY.RJ-1967-987-02.2_2.fastq', '-t', '14'],
stdout=subprocess.PIPE)
p2 = subprocess.Popen(
['samtools', 'view', '-bS',
'-o', 'dna_seq/aligned/2064-01/2064-01.6.bam', '-'],
stdin=p1.stdout,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True)
p1.stdout.close()
output, _ = p2.communicate() # let p2 finish running
p1.wait() # ensure p1 has properly exited
print(f'bwa-mem2 exited with status {p1.returncode}')
print(f'samtools exited with status {p2.returncode}')
...which lets you check p1.returncode and p2.returncode separately.

Nodejs node binary core dumped(Ilegal Insatruction)

I am working on bit-bake environment. I am using nodejs ver 10.15.3
dest cpu == ppc64 linux
My problem is node binary core dumps and I am not able to identify the root cause. I am trying to compile nodejs for dest cpu(ppc64).
I am not sure but I guess there are runtime requirements which are not satisfied on the target machine.
below is my recipe:-
DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
HOMEPAGE = "http://nodejs.org"
LICENSE = "MIT & BSD & Artistic-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9ceeba79eb2ea1067b7b3ed16fff8bab"
DEPENDS = "openssl zlib icu"
DEPENDS_append_class-target = " nodejs-native"
inherit pkgconfig
COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
file://0003-Crypto-reduce-memory-usage-of-SignFinal.patch \
file://0004-Make-compatibility-with-gcc-4.8.patch \
file://0005-Link-atomic-library.patch \
file://0006-Use-target-ldflags.patch \
"
SRC_URI_append_class-target = " \
file://0002-Using-native-torque.patch \
"
SRC_URI[md5sum] = "d76210a6ae1ea73d10254947684836fb"
SRC_URI[sha256sum] = "4e22d926f054150002055474e452ed6cbb85860aa7dc5422213a2002ed9791d5"
S = "${WORKDIR}/node-v${PV}"
# v8 errors out if you have set CCACHE
CCACHE = ""
def map_nodejs_arch(a, d):
import re
if re.match('i.86$', a): return 'ia32'
elif re.match('x86_64$', a): return 'x64'
elif re.match('aarch64$', a): return 'arm64'
elif re.match('(powerpc64|ppc64le)$', a): return 'ppc64'
elif re.match('powerpc$', a): return 'ppc'
return a
ARCHFLAGS_arm = "${#bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '--with-arm-float-abi=hard', '--with-arm-float-abi=softfp', d)} \
${#bb.utils.contains('TUNE_FEATURES', 'neon', '--with-arm-fpu=neon', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '--with-arm-fpu=vfpv3-d16', \
bb.utils.contains('TUNE_FEATURES', 'vfpv3', '--with-arm-fpu=vfpv3', \
'--with-arm-fpu=vfp', d), d), d)}"
GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
ARCHFLAGS ?= ""
# Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
do_configure () {
rm -rf ${S}/deps/openssl
export LD="${CXX}"
GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
# $TARGET_ARCH settings don't match --dest-cpu settings
./configure --prefix=${prefix} --with-intl=system-icu --without-snapshot --shared-openssl --shared-zlib \
--dest-cpu="${#map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
--dest-os=linux \
${ARCHFLAGS}
}
do_compile () {
export LD="${CXX}"
oe_runmake BUILDTYPE=Release
}
do_install () {
oe_runmake install DESTDIR=${D}
}
do_install_append_class-native() {
# use node from PATH instead of absolute path to sysroot
# node-v0.10.25/tools/install.py is using:
# shebang = os.path.join(node_prefix, 'bin/node')
# update_shebang(link_path, shebang)
# and node_prefix can be very long path to bindir in native sysroot and
# when it exceeds 128 character shebang limit it's stripped to incorrect path
# and npm fails to execute like in this case with 133 characters show in log.do_install:
# updating shebang of /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/work/x86_64-linux/nodejs-native/0.10.15-r0/image/home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/npm to /home/jenkins/workspace/build-webos-nightly/device/qemux86/label/open-webos-builder/BUILD-qemux86/sysroots/x86_64-linux/usr/bin/node
# /usr/bin/npm is symlink to /usr/lib/node_modules/npm/bin/npm-cli.js
# use sed on npm-cli.js because otherwise symlink is replaced with normal file and
# npm-cli.js continues to use old shebang
sed "1s^.*^#\!/usr/bin/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
# Install the native torque to provide it within sysroot for the target compilation
install -d ${D}${bindir}
install -m 0755 ${S}/out/Release/torque ${D}${bindir}/torque
}
do_install_append_class-target() {
sed "1s^.*^#\!${bindir}/env node^g" -i ${D}${exec_prefix}/lib/node_modules/npm/bin/npm-cli.js
}
PACKAGES =+ "${PN}-npm"
FILES_${PN}-npm = "${exec_prefix}/lib/node_modules ${bindir}/npm ${bindir}/npx"
RDEPENDS_${PN}-npm = "bash python-shell python-datetime python-subprocess python-textutils \
python-compiler python-misc python-multiprocessing"
PACKAGES =+ "${PN}-systemtap"
FILES_${PN}-systemtap = "${datadir}/systemtap"
BBCLASSEXTEND = "native"
I am able to apply gdb to node binary below is the snapshot. It core dumps at this point.
Thread 1 "node" hit Breakpoint 10, v8::internal::Runtime_PromiseHookInit (args_length=2, args_object=0x3fffffffd188, isolate=0x11284ab0)
at /usr/src/debug/nodejs/8.17.0-r0/node-v8.17.0/deps/v8/src/runtime/runtime-promise.cc:132
132 /usr/src/debug/nodejs/8.17.0-r0/node-v8.17.0/deps/v8/src/runtime/runtime-promise.cc: No such file or directory.
(gdb) bt
#0 v8::internal::Runtime_PromiseHookInit (args_length=2, args_object=0x3fffffffd188, isolate=0x11284ab0) at /usr/src/debug/nodejs/8.17.0-r0/node-v8.17.0/deps/v8/src/runtime/runtime-promise.cc:132
#1 0x000003c7b3f04134 in ?? ()
(gdb) c
Continuing.
Nodejs is not supported on PPC64 LE architecture. There is only support for the Big Endian platform on PPC architecture till 7.9 Version.

executing raspberry pi shell commands with python

i need to execute this two shell commands in my raspberry pi through a python code:
cd Desktop\fm_transmitter-master
sudo python ./PiStation.py -f 96 example.mp3
but i cant figure out how to do this, someone can help me please?
import subprocess
subprocess.call('cd Desktop\fm_transmitter-master', shell=True)
subprocess.call('sudo python ./PiStation.py -f 96 syria.mp3', shell=True)
executing the commands
import os
desktop = os.path.expanduser("~/Desktop")
script_path = os.path.join(desktop, 'fm_transmitter-master', 'PiStation.py')
song_path = os.path.join(desktop, 'fm_transmitter-master', 'syria.mp3')
subprocess.call('sudo python ' + script_path + ' -f 96 ' + song_path, shell=True)
solved it:
path = "/home/pi/Desktop/fm_transmitter-master/"
os.chdir(path)
args = ["sudo", "python", "PiStation.py", "-f", "96", "song.mp3"]
pi_station = subprocess.Popen(args, stdout=subprocess.PIPE)

python3: can't restore the out on console to a file from the program beginning to end& pexpect.EOF issue

Below is my code about using pexpect module achieve SSH logon function.
#!/usr/bin/env python
import pexpect
import sys
#use ssh to logon server
user="inteuser" #username
host="146.11.85.xxx" #host ip
password="xxxx" #password
command="ls -l" #list file on home/user directory
child = pexpect.spawn('ssh -l %s %s %s'%(user, host, command))
child.expect('password:')
child.sendline(password)
childlog = open('prompt.log',"ab") # restore prompt log to file prompt.log
__console__ = sys.stdout # make a backup of system output to console
sys.stdout = childlog # print the system output to childlog
child.expect(pexpect.EOF)
childlog.close()
sys.stdout = __console__ # back to the original state of system output
print(child.before) # print the contents before match expect function
after I execute my script
[~/Liaohaifeng]$ python3 ssh_test.py
b' \r\ntotal 69636\r\n-rw-rw-r-- 1 inteuser inteuser 949 Nov 28 02:01
01_eITK_trtest01_CrNwid.log\r\n
[~/Liaohaifeng]$ cat prompt.log
total 69412
-rw-rw-r-- 1 inteuser inteuser 949 Nov 28 02:01 01_eITK_trtest01_CrNwid.log
I think this result is not my expected. when I remove the code child.expect(pexpect.EOF) in my script, the output about print(child.before) can be correct(it should print the content before matching password)
Below is the output after I remove child.expect(pexpect.EOF)
[~/Liaohaifeng]$ python3 ssh_test.py
b"\r\n-------------------------------------------------------------------------------\r\n...
These computer resources are provided for authorized users only. For legal,
\r\n
security and cost reasons, utilization and access of resources are sxx, in\r\n
accordance with approved internal procedures, at any time if IF YOU ARE NOT AN AUTHORIZED USER; PLEASE EXIT IMMEDIATELY...\r\n "
my purpose is print out all the output to a file after executing the script,but the log file still only contains the output of listing directory. So why this happen? could you please help update my script? thank you very much.
You can use the spawn().logfile_read.
[STEP 101] # cat example.py
import pexpect, sys
child = pexpect.spawn('bash --norc')
if sys.version_info[0] <= 2:
# python2
child.logfile_read = open('/tmp/pexpect.log', 'w')
else:
# python3
fp = open('/tmp/pexpect.log', 'w')
child.logfile_read = fp.buffer
child.expect('bash-[.0-9]+[$#] ')
child.sendline('echo hello world')
child.expect('bash-[.0-9]+[$#] ')
child.sendline('exit')
child.expect(pexpect.EOF)
child.logfile_read.close()
[STEP 102] # python3 example.py
[STEP 103] # cat /tmp/pexpect.log
bash-4.4# echo hello world
hello world
bash-4.4# exit
exit
[STEP 104] #
It is a simple question, just adjust code order is OK.
#!/usr/bin/env python
import pexpect
import sys
#use ssh to logon server
user="inteuser" #username
host="146.11.85.xxx" #host ip
password="xxxx" #password
command="ls -l" #list file on home/user directory
child = pexpect.spawn('ssh -l %s %s %s'%(user, host, command))
childlog = open('prompt.log',"ab")
child.logfile = childlog
child.expect('password:')
child.sendline(password)
child.expect(pexpect.EOF)
childlog.close()

Yocto fails to boot after adding package

I'm about to build a Linux-Yocto filesystem for Xilinx Zynq platform.
Everything runs fine until I added one more package to the rootfs.
It doesn't matter what kind of package I'm adding it always fails with:
INIT: version 2.88 booting
/etc/init.d/rcS: line 17: mount: command not found
/etc/init.d/rc: line 66: stty: command not found
/etc/rcS.d/S02banner.sh: line 11: /bin/mknod: No such file or directory
/etc/rcS.d/S02sysfs.sh: line 14: mount: command not found
/etc/rcS.d/S02sysfs.sh: line 17: grep: command not found
/etc/rcS.d/S06checkroot.sh: line 142: mount: command not found
/etc/rcS.d/S06checkroot.sh: line 145: ln: command not found
Starting Bootlog daemon: bootlogd: cannot find console device 249:0 under /dev
bootlogd.
/etc/rcS.d/S37populate-volatile.sh: line 12: dirname: command not found
/etc/rcS.d/S37populate-volatile.sh: line 13: sed: command not found
/etc/rcS.d/S37populate-volatile.sh: line 193: /proc/cmdline: No such file or directory
/etc/rcS.d/S38devpts.sh: line 13: grep: command not found
/etc/rcS.d/S38dmesg.sh: line 17: dmesg: command not found
/etc/rcS.d/S39hostname.sh: line 10: /bin/hostname: No such file or directory
/etc/rcS.d/S39hostname.sh: line 19: hostname: command not found
/etc/rcS.d/S55bootmisc.sh: line 64: date: command not found
/etc/rcS.d/S55bootmisc.sh: l
INIT: Entering runlevel: 5
/etc/init.d/rc: line 66: stty: command not found
Starting ntpd: /etc/rc5.d/S20ntpd: line 42: start-stop-daemon: command not found
done
Stopping Bootlog daemon: /etc/rc5.d/S99stop-bootlogd: line 62: start-stop-daemon: command not found
bootlogd.
And:
INIT: cannot execute "/sbin/getty"cannot execute "/sbin/getty"
INIT: Id "1" respawning too fast: disabled for 5 minutes
INIT: cannot execute "/sbin/getty"
INIT: Id "PS0" respawning too fast: disabled for 5 minutes
My local.conf:
MACHINE ?= "zedboard-zynq7"
DISTRO ?= "poky"
EXTRA_IMAGE_FEATURES = "debug-tweaks"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K"
PACKAGECONFIG_pn-qemu-native = "sdl"
PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"
#AT-ubifs config
MKUBIFS_ARGS = "-m 2048 -e 126976 -c 1884"
#added by hob
PACKAGE_CLASSES = "package_rpm "
#added by hob
DL_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/downloads"
#added by hob
SSTATE_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/sstate-cache"
#added by hob
SSTATE_MIRRORS = ""
#added by hob
PARALLEL_MAKE = "-j 8"
#added by hob
BB_NUMBER_THREADS = "8"
#added by hob
INCOMPATIBLE_LICENSE = ""
#added by hob
SDKMACHINE = "x86_64"
#added by hob
http_proxy = ""
#added by hob
https_proxy = ""
#added by hob
ftp_proxy = ""
#added by hob
all_proxy = ""
#added by hob
CVS_PROXY_HOST = ""
#added by hob
CVS_PROXY_PORT = ""
#added by hob
IMAGE_EXTRA_SPACE = "0"
#added by hob
TOOLCHAIN_BUILD = "False"
#added by hob
IMAGE_FSTYPES = "ubifs cpio"
#added by hob
LINGUAS_INSTALL = ""
My Image recipe:
require /home/jonas/Zynq_AT_Debug/Yocto/poky/meta/recipes-core/images/core-image-minimal.bb
IMAGE_INSTALL = "sysvinit-pidof \
update-alternatives-opkg shadow-securetty init-ifupdown \
initscripts-functions base-files update-rc.d \
run-postinsts openssh udev-cache zlib libcrypto \
util-linux-libblkid openssh-scp openssh-keygen \
mtd-utils-ubifs initscripts openssh-ssh \
udev-utils modutils-initscripts eglibc \
shadow netbase openssh-sshd udev base-passwd \
sysvinit mtd-utils openssl-conf libkmod lzo \
util-linux-libuuid libwrap sysvinit-inittab \
iperf nbench-byte ntp ntpdate nano"
DESCRIPTION = "***** Yocto-filesystem"
If I take out nano everything is fine.
I hope someone can help me.
To add more package into the rootfs,
in conf/local.conf add this line:
IMAGE_INSTALL_append = " nano"
The space in front is really important.
In addition, please show where you get your bsp and your conf/bblayers.conf
Edit:
Let's start from the beginning. Copy this, replace my local.conf to yours local.conf. With this minimal set up, you could at least bitbake core-image-minimal
Then, to add your packages into the image, just add them to IMAGE_INSTALL_append = " "
MACHINE ?= "zedboard-zynq7"
DISTRO ?= "poky"
EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh package-manager"
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K"
PACKAGECONFIG_pn-qemu-native = "sdl"
PACKAGECONFIG_pn-nativesdk-qemu = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"
#AT-ubifs config
MKUBIFS_ARGS = "-m 2048 -e 126976 -c 1884"
PACKAGE_CLASSES = "package_rpm "
DL_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/downloads"
SSTATE_DIR = "/home/jonas/Zynq_AT_Debug/Yocto/poky/build/sstate-cache"
SSTATE_MIRRORS = ""
PARALLEL_MAKE = "-j ${#oe.utils.cpu_count()}"
BB_NUMBER_THREADS = "${#oe.utils.cpu_count()}"
SDKMACHINE = "x86_64"
IMAGE_FSTYPES = "ubifs cpio"
IMAGE_INSTALL_append = " nano smartpm openssh-sftp-server "

Resources