diff --git a/tools/pack.py b/tools/pack.py index 6b8043ac23..5913c077de 100644 --- a/tools/pack.py +++ b/tools/pack.py @@ -933,6 +933,11 @@ class Pack(object): try: if image_type == "all" or section.attrib['image_type'] == image_type: filename = section.attrib['filename_' + MODE] + if lk == "true" and "uImage" in filename: + if MODE == "32": + filename = 'openwrt-' + ARCH_NAME + '-kernelboot.img' + if MODE == "64": + filename = 'openwrt-' + ARCH_NAME + '_' + MODE + '-kernelboot.img' partition = section.attrib['label'] if filename == "": continue @@ -1203,6 +1208,11 @@ class Pack(object): try: if image_type == "all" or section.attrib['image_type'] == image_type: filename = section.attrib['filename_' + MODE] + if lk == "true" and "uImage" in filename: + if MODE == "32": + filename = 'openwrt-' + ARCH_NAME + '-kernelboot.img' + if MODE == "64": + filename = 'openwrt-' + ARCH_NAME + '_' + MODE + '-kernelboot.img' partition = section.attrib['label'] if filename == "": continue diff --git a/tools/pack_legacy.py b/tools/pack_legacy.py index 0c2be94be0..05bede10a9 100755 --- a/tools/pack_legacy.py +++ b/tools/pack_legacy.py @@ -724,6 +724,11 @@ class Pack(object): filename = "openwrt-ipq40xx-lkboot-stripped.elf" elif "ipq806x" in filename: filename = "openwrt-ipq806x-lkboot.mbn" + if lk == True and "uImage" in filename and self.flinfo.type == 'emmc': + if "ipq40xx" in filename: + filename = "openwrt-ipq40xx-kernelboot.img" + elif "ipq806x" in filename: + filename = "openwrt-ipq806x-kernelboot.img" partition = info.get(section, "partition") include = info.get(section, "include") except ConfigParserError, e: @@ -852,6 +857,11 @@ class Pack(object): filename = "openwrt-ipq40xx-lkboot-stripped.elf" elif "ipq806x" in filename: filename = "openwrt-ipq806x-lkboot.mbn" + if lk == True and "uImage" in filename: + if "ipq40xx" in filename: + filename = "openwrt-ipq40xx-kernelboot.img" + elif "ipq806x" in filename: + filename = "openwrt-ipq806x-kernelboot.img" img_size = self.__get_img_size(filename) size = roundup(img_size, flinfo.blocksize) if ( size != img_size ):