ANDROID: build: Pass variant-specific kernel cmdline params to vendor
Enable the inclusion of variant-specific kernel command line parameters in vendor builds through the generation of a file containing them. Set "androidboot.console" to 0 and 1 for Vendor GKI and consolidate variants respectively, by this method. Additionally, enable "nosoftlockup" for the GKI variant of both Kernel Platform and Vendor builds by this method. Change-Id: Id2ce57bad4556cfa96c1a0215141a1f015066e8b Signed-off-by: Vamsi Krishna Lanka <quic_vamslank@quicinc.com> Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
This commit is contained in:
parent
17717e1c51
commit
585aa20d96
@ -6,7 +6,8 @@ def boot_image_opts(
|
||||
boot_partition_size = 0x6000000,
|
||||
lz4_ramdisk = True,
|
||||
earlycon_addr = "0x00a9C000",
|
||||
kernel_vendor_cmdline_extras = ["bootconfig"]):
|
||||
kernel_vendor_cmdline_extras = ["bootconfig"],
|
||||
board_kernel_cmdline_extras = []):
|
||||
return struct(
|
||||
boot_image_header_version = boot_image_header_version,
|
||||
base_address = base_address,
|
||||
@ -16,6 +17,7 @@ def boot_image_opts(
|
||||
lz4_ramdisk = lz4_ramdisk,
|
||||
earlycon_addr = earlycon_addr,
|
||||
kernel_vendor_cmdline_extras = kernel_vendor_cmdline_extras,
|
||||
board_kernel_cmdline_extras = board_kernel_cmdline_extras,
|
||||
)
|
||||
|
||||
def vm_image_opts(
|
||||
|
@ -111,6 +111,14 @@ EOF
|
||||
],
|
||||
)
|
||||
|
||||
native.genrule(
|
||||
name = "{}_extra_cmdline".format(target),
|
||||
outs = ["board_extra_cmdline_{}".format(target)],
|
||||
cmd_bash = """
|
||||
echo {} > "$@"
|
||||
""".format(" ".join(boot_image_opts.board_kernel_cmdline_extras)),
|
||||
)
|
||||
|
||||
def _define_kernel_build(
|
||||
target,
|
||||
base_kernel,
|
||||
@ -321,6 +329,8 @@ def _define_kernel_dist(target, msm_target, variant, base_kernel, define_abi_tar
|
||||
|
||||
msm_dist_targets.append("{}_avb_sign_boot_image".format(target))
|
||||
|
||||
msm_dist_targets.append("{}_extra_cmdline".format(target))
|
||||
|
||||
if define_abi_targets:
|
||||
kernel_abi_dist(
|
||||
name = "{}_dist".format(target),
|
||||
|
@ -270,11 +270,21 @@ def define_pineapple():
|
||||
"lib/test_user_copy.ko",
|
||||
]
|
||||
|
||||
kernel_vendor_cmdline_extras = [
|
||||
# do not sort
|
||||
"console=ttyMSM0,115200n8",
|
||||
"qcom_geni_serial.con_enabled=1",
|
||||
"bootconfig",
|
||||
]
|
||||
|
||||
for variant in la_variants:
|
||||
if variant == "consolidate":
|
||||
mod_list = _pineapple_consolidate_in_tree_modules
|
||||
board_kernel_cmdline_extras = ["androidboot.console=1"]
|
||||
else:
|
||||
mod_list = _pineapple_in_tree_modules
|
||||
board_kernel_cmdline_extras = ["nosoftlockup", "androidboot.console=0"]
|
||||
kernel_vendor_cmdline_extras += ["nosoftlockup"]
|
||||
|
||||
define_msm_la(
|
||||
msm_target = target_name,
|
||||
@ -282,11 +292,7 @@ def define_pineapple():
|
||||
in_tree_module_list = mod_list,
|
||||
boot_image_opts = boot_image_opts(
|
||||
earlycon_addr = "qcom_geni,0x00a9C000",
|
||||
kernel_vendor_cmdline_extras = [
|
||||
# do not sort
|
||||
"console=ttyMSM0,115200n8",
|
||||
"qcom_geni_serial.con_enabled=1",
|
||||
"bootconfig",
|
||||
],
|
||||
kernel_vendor_cmdline_extras = kernel_vendor_cmdline_extras,
|
||||
board_kernel_cmdline_extras = board_kernel_cmdline_extras,
|
||||
),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user