]> git.baikalelectronics.ru Git - uboot.git/commit
bootm: fix wrong conditions about images overlap
authorJaehoon Chung <jh80.chung@samsung.com>
Wed, 21 Oct 2020 05:17:03 +0000 (14:17 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 23 Oct 2020 17:33:07 +0000 (13:33 -0400)
commit2858d3ccf4dd5950d9d3d3660ff61d0b40db2d32
treea800559bb4f09991378cf23d49743211d8301424
parentc6efcd2e9329bce993408128ee0f80f60792a932
bootm: fix wrong conditions about images overlap

It doesn't need to consider start byte address.
If ramdisk size is 0x800000 and start address is 0x2700000, then it's
used until 0x02efffff, not 0x02f00000. But it's detected to overlapt RD
image, when kernel start address is 0x02f00000.
Because it's doing wrong calculation about rd_len.
This patch fixed wrong calculation address position when check
condition.

In addition, it needs to check one more condition about overlapping
entire area.

Fixes: commit ce142f79e9e2 ("common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image")
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
common/bootm.c