mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
psplash: improve make-image-header.sh call
Simplify make-image-header.sh call and make sure it gets called in the current working directory. Also check the return value of the function call. (From OE-Core rev: d4c55e2448053b51eb217c61328a2ca25bec0461) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
4860914b3b
commit
d6f3bc736c
@@ -74,7 +74,6 @@ ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash"
|
||||
python do_compile () {
|
||||
import shutil
|
||||
import subprocess
|
||||
import shlex
|
||||
|
||||
# Build a separate executable for each splash image
|
||||
workdir = d.getVar('WORKDIR')
|
||||
@@ -84,9 +83,10 @@ python do_compile () {
|
||||
outputfiles = d.getVar('SPLASH_INSTALL').split()
|
||||
for localfile, outputfile in zip(localfiles, outputfiles):
|
||||
if localfile.endswith(".png"):
|
||||
subprocess.call(shlex.split('%s %s POKY' % (convertscript, os.path.join(workdir, localfile))))
|
||||
if subprocess.call([ convertscript, os.path.join(workdir, localfile), 'POKY' ], cwd=workdir):
|
||||
bb.fatal("Error calling convert script '%s'" % (convertscript))
|
||||
fbase = os.path.splitext(localfile)[0]
|
||||
shutil.copyfile("%s-img.h" % fbase, destfile)
|
||||
shutil.copyfile(os.path.join(workdir, "%s-img.h" % fbase), destfile)
|
||||
else:
|
||||
shutil.copyfile(os.path.join(workdir, localfile), destfile)
|
||||
# For some reason just updating the header is not enough, we have to touch the .c
|
||||
|
||||
Reference in New Issue
Block a user