From: Tom Rini Date: Mon, 7 Aug 2017 12:13:58 -0400 Subject: [U-Boot] [RFC] move booti_setup to arch/arm/lig/image.c In-Reply-To: <1501229051-31491-1-git-send-email-bin.chen@linaro.org> References: <1501229051-31491-1-git-send-email-bin.chen@linaro.org> Message-ID: <20170807161358.GN29197@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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? 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. Otherwise, and assuming you've booted the kernel with this patch, fix the above, post as v2 instead and: Reviewed-by: Tom Rini Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: