Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1cb371e authored by Hridya Valsaraju's avatar Hridya Valsaraju Committed by android-build-merger
Browse files

Merge "Check DTB image size for boot image header version 2 and above" am:...

Merge "Check DTB image size for boot image header version 2 and above" am: cd9b18f2 am: a19c7f1d
am: 37124c2e

Change-Id: Ief6ae4da123227f8cc4edaedc095a06f40dc2cd0
parents 7c6f5feb 37124c2e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -113,6 +113,10 @@ def write_header(args):
        args.output.write(pack('I', BOOT_IMAGE_HEADER_V2_SIZE))

    if args.header_version > 1:

        if filesize(args.dtb) == 0:
            raise ValueError("DTB image must not be empty.")

        args.output.write(pack('I', filesize(args.dtb)))   # size in bytes
        args.output.write(pack('Q', args.base + args.dtb_offset)) # dtb physical load address
    pad_file(args.output, args.pagesize)