
On 8 August 2017 at 02:13, Tom Rini trini@konsulko.com wrote:
On Fri, Jul 28, 2017 at 06:04:11PM +1000, Bin Chen wrote:
Follow bootz's pattern by moving the booti_setup to arch/arm/lib. This allows to use that function in other path, e.g booting an android image contains Image format.
Note that kernel relocation is move out of booti_setup and it is the caller's responsibility to do it and allows them do it differently. say, cmd/booti.c just do a manually, while in the bootm path, we can use bootm_load_os(with some changes).
Just to be clear, did you boot test this path on hardware?
yes, I tested the booti path with this patch applied.
And, a minor comment:
ih = (struct Image_header *)map_sysmem(images->ep, 0);
lmb_reserve(&images->lmb, images->ep, le32_to_cpu(ih->image_size));
/* Handle BOOTM_STATE_LOADOS */
if (relocated_addr != ld) {
debug("Moving Image from 0x%lx to 0x%lx\n", ld, relocated_addr);
memmove((void *)relocated_addr, (void *)ld, image_size);
- }
Please correct the indentation here.
OK. Thanks for the review!
Otherwise, and assuming you've booted the kernel with this patch, fix the above, post as v2 instead and:
Reviewed-by: Tom Rini trini@konsulko.com
Thanks!
-- Tom