Merge "ipq6018: Remove SDCC_MCI_POWER register write"
diff --git a/tools/pack.py b/tools/pack.py
index c1fb325..b35f1b1 100644
--- a/tools/pack.py
+++ b/tools/pack.py
@@ -1622,7 +1622,7 @@
     """Generate kernelboot.img needed by LK bootloader"""
 
     SKALES_DIR = parser.images_dname
-    TMP_DIR = parser.out_dname + "/tmp_dir"
+    TMP_DIR = parser.images_dname + "/tmp_dir"
 
     try:
 
@@ -1661,7 +1661,7 @@
                 "--kernel=" + TMP_DIR + "/Image.gz",
                 "--dt=" + TMP_DIR + "/qcom-ipq807x-hk01-dt.img",
                 "--cmdline=\'rootfsname=rootfs rootwait nosmp\'",
-                "--output=" + parser.out_dname + "/" + KERNEL_IMG_NAME,
+                "--output=" + parser.images_dname + "/" + KERNEL_IMG_NAME,
                 "--base=0x41200000"]
         ret = subprocess.call(cmd)
         if ret != 0:
diff --git a/tools/pack_legacy.py b/tools/pack_legacy.py
index 3f885bf..35dc0a6 100755
--- a/tools/pack_legacy.py
+++ b/tools/pack_legacy.py
@@ -730,7 +730,7 @@
             if not os.path.exists(os.path.join(self.images_dname, DTB)):
                 error("%s file not found" % DTB)
 
-            self.tmp_dir = self.images_dname + "tmp_dir"
+            self.tmp_dir = self.images_dname + "/tmp_dir"
             if os.path.exists(self.tmp_dir):
                 rmtree(self.tmp_dir)
             os.makedirs(self.tmp_dir)
@@ -750,7 +750,7 @@
                 print ret
                 error("Error executing gzip")
 
-            cmd = [SKALES_DIR + "mkbootimg",
+            cmd = [SKALES_DIR + "/mkbootimg",
                     "--kernel=" + self.tmp_dir + "/Image.gz",
                     "--dt=" + self.tmp_dir + "/" + DTB + ".img",
                     "--cmdline=" + BOOT_ARGS,
@@ -1237,8 +1237,8 @@
         self.__mkimage(images)
 
         """Remove tmp_dir,if created earlier for lk-kernelboot image generation"""
-        if os.path.exists(self.images_dname + "tmp_dir"):
-            rmtree(self.images_dname + "tmp_dir")
+        if os.path.exists(self.images_dname + "/tmp_dir"):
+            rmtree(self.images_dname + "/tmp_dir")
 
     def main(self, flinfo, images_dname, out_fname, part_fname, fconf_fname, ipq_nand):
         """Start the packing process.