From 50fb898d80f1e244cb369589c850f04f414eee6d Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 30 Mar 2017 11:24:24 -0500 Subject: Fix the pre-downloaded rs9113 ipk build --- recipes-kernel/rs9113/rs9113.inc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/recipes-kernel/rs9113/rs9113.inc b/recipes-kernel/rs9113/rs9113.inc index a956ee5..b511029 100644 --- a/recipes-kernel/rs9113/rs9113.inc +++ b/recipes-kernel/rs9113/rs9113.inc @@ -22,10 +22,7 @@ python do_fetch_prepend () { bb.note("export is " + ex) gt = "git archive -v --remote=git@" - try: - gt += d.getVar("MTS_INTERNAL_GIT") - except TypeError: - bb.fatal("MTS_INTERNAL_GIT must be in BB_ENV_EXTRAWHITE") + gitversion = d.getVar("PV",True) @@ -35,17 +32,27 @@ python do_fetch_prepend () { PV += d.getVar("MLINUX_KERNEL_VERSION",True) except TypeError: bb.fatal("MLINUX_KERNEL_VERSION missing from conf/local.conf, usually put there by setup.sh") - try: PV += d.getVar("MLINUX_KERNEL_EXTRA_VERSION",True) except TypeError: bb.fatal("MLINUX_KERNEL_EXTRA_VERSION missing from conf/local.conf, usually put there by setup.sh") bb.note("PV is " + PV) + + ipkn = "rs9113-from-src_" + PV + ".0_mtcdt.ipk" + bb.note("ipkname is " + ipkn) + bb.note ("ipk path is " + DR + "/" + ipkn) + + try: + gt += d.getVar("MTS_INTERNAL_GIT") + except TypeError: + if os.path.isfile(DR + "/" + ipkn): + return + bb.fatal("Need " + DR + "/" + ipkn + " or set MTS_INTERNAL_GIT and add it to BB_ENV_EXTRAWHITE") + gt += ":mlinux/ipk.git " + gitversion bb.note("git is " + gt) - tar = "tar -vx --strip-components 1 -C " + DR + " rs9113/rs9113-from-src_" - tar += PV + ".0_mtcdt.ipk" + tar = "tar -vx --strip-components 1 -C " + DR + " rs9113/" + ipkn bb.note("tar is " + tar) os.system(ex + ";" + gt + "|" + tar) } -- cgit v1.2.3