build: Move more options to image_opts
Since, there are more options that are not common to all targets, move them to image_opts as configurable options. Change-Id: I5664be920500ee6da1795812d18945d113567401 Signed-off-by: Abdul Salam <quic_asalam@quicinc.com>
This commit is contained in:
parent
8cf9e2c33c
commit
34225b154a
@ -3,13 +3,17 @@ def boot_image_opts(
|
||||
base_address = 0x80000000,
|
||||
page_size = 4096,
|
||||
super_image_size = 0x10000000,
|
||||
lz4_ramdisk = True):
|
||||
lz4_ramdisk = True,
|
||||
earlycon_addr = "0x00a9C000",
|
||||
kernel_vendor_cmdline_extras = ["bootconfig"]):
|
||||
return struct(
|
||||
boot_image_header_version = boot_image_header_version,
|
||||
base_address = base_address,
|
||||
page_size = page_size,
|
||||
super_image_size = super_image_size,
|
||||
lz4_ramdisk = lz4_ramdisk,
|
||||
earlycon_addr = earlycon_addr,
|
||||
kernel_vendor_cmdline_extras = kernel_vendor_cmdline_extras,
|
||||
)
|
||||
|
||||
def vm_image_opts(
|
||||
|
10
kalama.bzl
10
kalama.bzl
@ -1,5 +1,6 @@
|
||||
load(":target_variants.bzl", "la_variants")
|
||||
load(":msm_kernel_la.bzl", "define_msm_la")
|
||||
load(":image_opts.bzl", "boot_image_opts")
|
||||
|
||||
target_name = "kalama"
|
||||
|
||||
@ -105,4 +106,13 @@ def define_kalama():
|
||||
msm_target = target_name,
|
||||
variant = variant,
|
||||
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",
|
||||
],
|
||||
),
|
||||
)
|
||||
|
@ -65,10 +65,10 @@ LZ4_RAMDISK=%d
|
||||
[ -z "$$DT_OVERLAY_SUPPORT" ] && DT_OVERLAY_SUPPORT=1
|
||||
|
||||
if [ "$$KERNEL_CMDLINE_CONSOLE_AUTO" != "0" ]; then
|
||||
KERNEL_VENDOR_CMDLINE+=' console=ttyMSM0,115200n8 earlycon=qcom_geni,0x00a9C000 qcom_geni_serial.con_enabled=1 '
|
||||
KERNEL_VENDOR_CMDLINE+=' earlycon=%s '
|
||||
fi
|
||||
|
||||
KERNEL_VENDOR_CMDLINE+=' bootconfig '
|
||||
KERNEL_VENDOR_CMDLINE+=' %s '
|
||||
VENDOR_BOOTCONFIG+='androidboot.first_stage_console=1 androidboot.hardware=qcom_kp'
|
||||
EOF
|
||||
""" % (
|
||||
@ -80,6 +80,8 @@ EOF
|
||||
boot_image_opts.page_size,
|
||||
boot_image_opts.super_image_size,
|
||||
int(boot_image_opts.lz4_ramdisk),
|
||||
boot_image_opts.earlycon_addr,
|
||||
" ".join(boot_image_opts.kernel_vendor_cmdline_extras),
|
||||
)
|
||||
|
||||
# Generate the build config
|
||||
|
@ -1,5 +1,6 @@
|
||||
load(":target_variants.bzl", "la_variants")
|
||||
load(":msm_kernel_la.bzl", "define_msm_la")
|
||||
load(":image_opts.bzl", "boot_image_opts")
|
||||
|
||||
target_name = "pineapple"
|
||||
|
||||
@ -270,4 +271,13 @@ def define_pineapple():
|
||||
msm_target = target_name,
|
||||
variant = variant,
|
||||
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",
|
||||
],
|
||||
),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user