diff --git a/image_opts.bzl b/image_opts.bzl index b2df95faac85..4a510fe64b70 100644 --- a/image_opts.bzl +++ b/image_opts.bzl @@ -7,7 +7,8 @@ def boot_image_opts( lz4_ramdisk = True, earlycon_addr = "0x00a9C000", kernel_vendor_cmdline_extras = ["bootconfig"], - board_kernel_cmdline_extras = []): + board_kernel_cmdline_extras = [], + board_bootconfig_extras = []): return struct( boot_image_header_version = boot_image_header_version, base_address = base_address, @@ -18,6 +19,7 @@ def boot_image_opts( earlycon_addr = earlycon_addr, kernel_vendor_cmdline_extras = kernel_vendor_cmdline_extras, board_kernel_cmdline_extras = board_kernel_cmdline_extras, + board_bootconfig_extras = board_bootconfig_extras, ) def vm_image_opts( diff --git a/msm_kernel_la.bzl b/msm_kernel_la.bzl index 5280f544d69a..313a39df6ebe 100644 --- a/msm_kernel_la.bzl +++ b/msm_kernel_la.bzl @@ -111,14 +111,24 @@ EOF ], ) - board_extras = " ".join(boot_image_opts.board_kernel_cmdline_extras) - if board_extras: + board_cmdline_extras = " ".join(boot_image_opts.board_kernel_cmdline_extras) + if board_cmdline_extras: native.genrule( name = "{}_extra_cmdline".format(target), outs = ["board_extra_cmdline_{}".format(target)], cmd_bash = """ echo {} > "$@" - """.format(board_extras), + """.format(board_cmdline_extras), + ) + + board_bc_extras = " ".join(boot_image_opts.board_bootconfig_extras) + if board_bc_extras: + native.genrule( + name = "{}_extra_bootconfig".format(target), + outs = ["board_extra_bootconfig_{}".format(target)], + cmd_bash = """ + echo {} > "$@" + """.format(board_bc_extras), ) def _define_kernel_build( @@ -336,10 +346,14 @@ def _define_kernel_dist( msm_dist_targets.append("{}_avb_sign_boot_image".format(target)) - board_extras = " ".join(boot_image_opts.board_kernel_cmdline_extras) - if board_extras: + board_cmdline_extras = " ".join(boot_image_opts.board_kernel_cmdline_extras) + if board_cmdline_extras: msm_dist_targets.append("{}_extra_cmdline".format(target)) + board_bc_extras = " ".join(boot_image_opts.board_kernel_cmdline_extras) + if board_bc_extras: + msm_dist_targets.append("{}_extra_bootconfig".format(target)) + if define_abi_targets: kernel_abi_dist( name = "{}_dist".format(target), diff --git a/pineapple.bzl b/pineapple.bzl index 71daaa852334..eaa54e7cb6ca 100644 --- a/pineapple.bzl +++ b/pineapple.bzl @@ -281,14 +281,16 @@ def define_pineapple(): ] board_kernel_cmdline_extras = [] + board_bootconfig_extras = [] for variant in la_variants: if variant == "consolidate": mod_list = _pineapple_consolidate_in_tree_modules else: mod_list = _pineapple_in_tree_modules - board_kernel_cmdline_extras += ["nosoftlockup", "androidboot.console=0"] + board_kernel_cmdline_extras += ["nosoftlockup"] kernel_vendor_cmdline_extras += ["nosoftlockup"] + board_bootconfig_extras += ["androidboot.console=0"] define_msm_la( msm_target = target_name, @@ -298,5 +300,6 @@ def define_pineapple(): earlycon_addr = "qcom_geni,0x00a9C000", kernel_vendor_cmdline_extras = kernel_vendor_cmdline_extras, board_kernel_cmdline_extras = board_kernel_cmdline_extras, + board_bootconfig_extras = board_bootconfig_extras, ), )