android_kernel_samsung_sm8650/image_opts.bzl
Naini Singh 9fa997948e ANDROID: build: Remove default value passed to earlycon cmdline option
Early boot kernel logs are enabled with earlycon cmdline option.
If earlycon device is passed to earlycon as a parameter with "=dev",
it is considered, otherwise kernel relies on stdout-path for the device.
Since this device can be different for different chipsets, sharing the
same compiled binary, the value passed to earlycon parameter can
be wrong for some of the chipsets, which is leading to issues like
invalid address access or garbled logs in some cases.

To fix this, add earlycon without any value so that the right
device can be picked from stdout-path. For chipsets not having
stdout-path defined, keep passing earlycon value if it is explicitly
defined in target bazel file.

Also, remove default earlycon param value for Pineapple family of
chipsets to avoid adding wrong address for Cliffs, Volcano SoCs.

Change-Id: If40d23a3916f1f148e26033d67408279dfca5493
Signed-off-by: Naini Singh <quic_nainsing@quicinc.com>
Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
2024-04-30 12:36:52 +05:30

44 lines
1.5 KiB
Python

def boot_image_opts(
boot_image_header_version = 4,
base_address = 0x80000000,
page_size = 4096,
super_image_size = 0x10000000,
boot_partition_size = 0x6000000,
lz4_ramdisk = True,
earlycon_addr = None,
kernel_vendor_cmdline_extras = ["bootconfig"],
board_kernel_cmdline_extras = [],
board_bootconfig_extras = []):
return struct(
boot_image_header_version = boot_image_header_version,
base_address = base_address,
page_size = page_size,
super_image_size = super_image_size,
boot_partition_size = boot_partition_size,
lz4_ramdisk = lz4_ramdisk,
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(
preferred_usespace = "vm",
vm_dtb_img_create = True,
kernel_offset = 0x0,
dtb_offset = 0x2000000,
ramdisk_offset = 0x2100000,
cmdline_cpio_offset = 0x2100000,
vm_size_ext4 = 270000000,
dummy_img_size = 4096):
return struct(
preferred_usespace = preferred_usespace,
vm_dtb_img_create = vm_dtb_img_create,
kernel_offset = kernel_offset,
dtb_offset = dtb_offset,
ramdisk_offset = ramdisk_offset,
cmdline_cpio_offset = cmdline_cpio_offset,
vm_size_ext4 = vm_size_ext4,
dummy_img_size = dummy_img_size,
)