diff options
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r-- | tools/releasetools/common.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 18ba842..4db9095 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -36,6 +36,7 @@ OPTIONS.verbose = False OPTIONS.tempfiles = [] OPTIONS.device_specific = None OPTIONS.extras = {} +OPTIONS.mkyaffs2_extra_flags = None # Values for "certificate" in apkcerts that mean special things. @@ -103,6 +104,17 @@ def LoadMaxSizes(info): raise +def LoadMkyaffs2ExtraFlags(): + """Load mkyaffs2 extra flags.""" + try: + fn = os.path.join(OPTIONS.input_tmp, "META", "mkyaffs2-extra-flags.txt"); + if os.access(fn, os.F_OK): + OPTIONS.mkyaffs2_extra_flags = open(fn).read().rstrip("\n") + except IOError, e: + if e.errno == errno.ENOENT: + pass + + def BuildAndAddBootableImage(sourcedir, targetname, output_zip): """Take a kernel, cmdline, and ramdisk directory from the input (in 'sourcedir'), and turn them into a boot image. Put the boot image @@ -155,6 +167,11 @@ def BuildBootableImage(sourcedir): cmd.append("--base") cmd.append(open(fn).read().rstrip("\n")) + fn = os.path.join(sourcedir, "pagesize") + if os.access(fn, os.F_OK): + cmd.append("--pagesize") + cmd.append(open(fn).read().rstrip("\n")) + cmd.extend(["--ramdisk", ramdisk_img.name, "--output", img.name]) |