package-image: keep MT6797 firmware blobs by default
This commit is contained in:
1 parent
29314ca9e6
commit
561dc2633b
4 files changed
+34
-9
No files matched your search
@@ -96,7 +96,7 @@ def _debugfs_ls_details(abs_img, internal_dir):
|
||||
return out
|
||||
|
||||
|
||||
def sanitize_ext4_for_release(img_path, strip_firmware=True, strip_ssh_keys=True):
|
||||
def sanitize_ext4_for_release(img_path, strip_firmware=False, strip_ssh_keys=True):
|
||||
"""Remove SSH keys and/or proprietary MT6797 firmware blobs from a staged ext4 image."""
|
||||
fw_mod = _load_fw_mod()
|
||||
abs_img = os.path.abspath(img_path)
|
||||
@@ -170,10 +170,10 @@ e2fsck -fn "$IMG" >/dev/null
|
||||
return ["(sanitized via docker e2fsprogs)"]
|
||||
|
||||
|
||||
def render_flash_instructions(version, codename, build_date, top_dir, include_firmware=False):
|
||||
def render_flash_instructions(version, codename, build_date, top_dir, include_firmware=True):
|
||||
"""Generate plain-text FLASH-INSTRUCTIONS.txt shipped inside the release ZIP."""
|
||||
fw_mode = (
|
||||
"INCLUDED (for personal single-device backup images)"
|
||||
"INCLUDED (bundled in rootfs)"
|
||||
if include_firmware else
|
||||
"CLEAN / STRIPPED (auto-extracted from your PDA during flashing)"
|
||||
)
|
||||
@@ -351,7 +351,7 @@ def package_release_zip(
|
||||
output_zip=None,
|
||||
version=None,
|
||||
codename=None,
|
||||
include_firmware=False,
|
||||
include_firmware=True,
|
||||
keep_ssh_keys=False,
|
||||
compress_level=6,
|
||||
verify=True,
|
||||
@@ -472,8 +472,10 @@ def build_arg_parser():
|
||||
help="Directory containing boot-geminux.img, recovery-geminux.img, geminux-rootfs.img")
|
||||
p.add_argument("--version", help="Override Geminux version string")
|
||||
p.add_argument("--codename", help="Override Geminux codename")
|
||||
p.add_argument("--include-firmware", action="store_true",
|
||||
help="Keep /lib/firmware/mediatek/mt6797 blobs inside packaged rootfs (not for redistribution)")
|
||||
p.add_argument("--include-firmware", dest="include_firmware", action="store_true", default=True,
|
||||
help="Keep /lib/firmware/mediatek/mt6797 blobs inside packaged rootfs (default)")
|
||||
p.add_argument("--strip-firmware", dest="include_firmware", action="store_false",
|
||||
help="Strip /lib/firmware/mediatek/mt6797 blobs for clean redistribution")
|
||||
p.add_argument("--keep-ssh-keys", action="store_true",
|
||||
help="Keep SSH authorized_keys and ssh_host_* keys in packaged rootfs")
|
||||
p.add_argument("--compress-level", type=int, default=6, choices=range(0, 10), metavar="0..9",
|
||||
|
||||
Reference in new issue
Block a user