mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
pack.py: included lkboot in single image
Added an additional option '--lk'. With this option '--lk' included, pack script will use lkboot.mbn instead of u-boot.mbn for APPSBL. This option applies to 'emmc' only image. Other flash types will discard this option. Applies to ipq806x and ipq40xx SoCs. Change-Id: Ic3b5a3398e3d007fe1d144e069e62a6157b9a2ef Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
parent
7b83f68369
commit
44cffe4325
1 changed files with 15 additions and 1 deletions
|
|
@ -83,6 +83,7 @@ import re
|
|||
import hashlib
|
||||
|
||||
version = "1.1"
|
||||
lk = False
|
||||
|
||||
TABLE_VERSION_AK = 3
|
||||
TABLE_VERSION_DK = 4
|
||||
|
|
@ -718,6 +719,11 @@ class Pack(object):
|
|||
for section in info.sections():
|
||||
try:
|
||||
filename = info.get(section, "filename")
|
||||
if lk == True and "u-boot" in filename and self.flinfo.type == 'emmc':
|
||||
if "ipq40xx" in filename:
|
||||
filename = "openwrt-ipq40xx-lkboot-stripped.elf"
|
||||
elif "ipq806x" in filename:
|
||||
filename = "openwrt-ipq806x-lkboot.mbn"
|
||||
partition = info.get(section, "partition")
|
||||
include = info.get(section, "include")
|
||||
except ConfigParserError, e:
|
||||
|
|
@ -841,6 +847,11 @@ class Pack(object):
|
|||
if ( size != img_size ):
|
||||
filename = filename + ".padded"
|
||||
if self.flinfo.type == 'emmc':
|
||||
if lk == True and "u-boot" in filename:
|
||||
if "ipq40xx" in filename:
|
||||
filename = "openwrt-ipq40xx-lkboot-stripped.elf"
|
||||
elif "ipq806x" in filename:
|
||||
filename = "openwrt-ipq806x-lkboot.mbn"
|
||||
img_size = self.__get_img_size(filename)
|
||||
size = roundup(img_size, flinfo.blocksize)
|
||||
if ( size != img_size ):
|
||||
|
|
@ -1404,9 +1415,10 @@ class ArgParser(object):
|
|||
bconf = False
|
||||
bconf_fname = None
|
||||
genitb_fname = None
|
||||
global lk
|
||||
|
||||
try:
|
||||
opts, args = getopt(argv[1:], "Bib:hp:t:o:c:m:f:F:M:")
|
||||
opts, args = getopt(argv[1:], "Bib:hp:t:o:c:m:f:F:M:", ["lk"])
|
||||
except GetoptError, e:
|
||||
raise UsageError(e.msg)
|
||||
|
||||
|
|
@ -1433,6 +1445,8 @@ class ArgParser(object):
|
|||
bconf_fname = value
|
||||
elif option == "-M":
|
||||
genitb_fname= value
|
||||
elif option == "--lk":
|
||||
lk = True
|
||||
|
||||
if len(args) != 1:
|
||||
raise UsageError("insufficient arguments")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue