Skip to content

uboot: enable device tree overlay (alternative solution)

Larry Shen requested to merge atline/lava:dtbo_v2 into master

The !2337 has an issue, we will have to define a maximum number of overlay dtb.

This is because looks all device currently claim its ability in base-uboot like next, so I have to ask user to define a maximum_dtbo_number in device.jinjia2.

  - "tftp {TEE_ADDR} {TEE}"
  - "setenv initrd_size ${filesize}"
  - "tftp {DTB_ADDR} {DTB}"
  - "fdt addr {DTB_BASE_ADDR}"
  - "fdt resize {DTB_BASE_RESIZE}"
  - "tftp {DTBO_ADDR0} {DTBO0}"
  - "fdt apply {DTBO_ADDR0}"
  - "tftp {DTBO_ADDR1} {DTBO1}"
  - "fdt apply {DTBO_ADDR1}"

But, it's not flexible: if I define maximum_dtbo_number as 5, while user has 6 dtbos, I have to override the parameter again.

As an alternative, this implementation though claim the "fdt apply" command in base_uboot.jinja2 too, but not static append to base_uboot_tftp_commands. The lava_dispatcher code will dynamic append "fdt apply" to base_uboot_tftp_commands. If user define 1 dtbo in job, it appends one; if user define 2 dtbo in job, it appends two.

I'm not sure which implementation you prefer, so I supply 2 MRs, let you choose.

Merge request reports