summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorStefan Christ <s.christ@phytec.de>2015-11-05 15:20:11 +0100
committerStefan Müller-Klieser <s.mueller-klieser@phytec.de>2015-11-06 14:05:30 +0100
commit8269deb9069748d46767864a5fa3368e762afae5 (patch)
tree838ac04e18ab55f3083fa2dd0f57fff963c1cd65 /recipes-bsp
parent10b20ff230583444960092d44b4a8324b349b873 (diff)
downloadmeta-phytec-8269deb9069748d46767864a5fa3368e762afae5.tar.bz2
meta-phytec-8269deb9069748d46767864a5fa3368e762afae5.zip
classes: refactor task savedefconfig to bbclass
Move the task do_savedefconfig to his own separate bbclass, so it can be used by multiple recipes. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/barebox/barebox.inc35
1 files changed, 1 insertions, 34 deletions
diff --git a/recipes-bsp/barebox/barebox.inc b/recipes-bsp/barebox/barebox.inc
index 4d7280d..09ce243 100644
--- a/recipes-bsp/barebox/barebox.inc
+++ b/recipes-bsp/barebox/barebox.inc
@@ -27,6 +27,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
inherit kernel-arch cml1 deploy
inherit kconfig-prepare-configure
+inherit kconfig-savedefconfig
# Increase INC_PR everytime the include file is changed.
INC_PR = "r5"
@@ -108,40 +109,6 @@ do_default_defconfig () {
oe_runmake ${BAREBOX_DEFAULT_DEFCONFIG}
}
-
-# Python implementation of function oe_runmake_call and oe_runmake from
-# meta/classes/base.bbclass.
-def py_oe_runmake(d, cmd):
- import subprocess
- statement = "%s %s %s" % (d.getVar("MAKE", True) or '',
- d.getVar("EXTRA_OEMAKE", True) or '',
- cmd)
- bb.note(statement)
- exitcode = subprocess.call(statement, shell=True)
- if exitcode != 0:
- bb.fatal("oe_runmake failed")
-
-# This is a python implementation, because the output of bbnote, bbplain, .. is
-# not shown on the bitbake console, it's only saved to a log file. See Bug ????
-# (... I cannot find the bug currently)
-# The function provides the same workflow as for the task 'diffconfig'. The
-# user can simply copy&paste the path and move the generated defconfig file
-# into his/her layer.
-python do_savedefconfig() {
- import shutil
- workdir = d.getVar("WORKDIR", True)
- workdir_defconfig = os.path.join(workdir, "defconfig.temp")
- B = d.getVar("B", True)
-
- bb.plain("Saving defconfig to %s" % (workdir_defconfig,))
- py_oe_runmake(d, "savedefconfig")
-
- shutil.copyfile(os.path.join(B, "defconfig"), workdir_defconfig)
-
-}
-addtask savedefconfig after do_configure
-do_savedefconfig[nostamp] = "1"
-
do_compile () {
unset CFLAGS LDFLAGS
oe_runmake all