From mboxrd@z Thu Jan 1 00:00:00 1970 From: Horatiu Vultur Date: Fri, 8 Mar 2019 13:30:39 +0100 Subject: [U-Boot] [PATCH] bootm: mips: Remove boot_reloc_ramdisk In-Reply-To: References: <1551973781-7325-1-git-send-email-horatiu.vultur@microchip.com> Message-ID: <20190308123038.h7hwkafi7lf3llb7@soft-dev3.microsemi.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Daniel, The 03/07/2019 18:33, Daniel Schwierzeck wrote: > Am Do., 7. M=C3=A4rz 2019 um 16:49 Uhr schrieb Horatiu Vultur > : > > > > Remove the function boot_reloc_ramdisk in the file arch/mips/lib/bootm > > because it is relocating again the ramdisk. The function do_bootm_state= s() > > already relocates the ramdisk even if it is a legacy uImage or a FIT im= age. > > > > The relocation in the function do_bootm_states() was introduce in the > > commit c2e7e72bb9f0cb47d024997b381cb64786eb5402 ("bootm: relocate ramdi= sk > > if CONFIG_SYS_BOOT_RAMDISK_HIGH set") > > > > Signed-off-by: Horatiu Vultur > > --- > > arch/mips/lib/bootm.c | 19 ------------------- > > 1 file changed, 19 deletions(-) > > > > diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c > > index deca518..35152cb 100644 > > --- a/arch/mips/lib/bootm.c > > +++ b/arch/mips/lib/bootm.c > > @@ -215,23 +215,6 @@ static void linux_env_legacy(bootm_headers_t *imag= es) > > } > > } > > > > -static int boot_reloc_ramdisk(bootm_headers_t *images) > > -{ > > - ulong rd_len =3D images->rd_end - images->rd_start; > > - > > - /* > > - * In case of legacy uImage's, relocation of ramdisk is already= done > > - * by do_bootm_states() and should not repeated in 'bootm prep'. > > - */ > > - if (images->state & BOOTM_STATE_RAMDISK) { > > - debug("## Ramdisk already relocated\n"); > > - return 0; > > - } > > - > > - return boot_ramdisk_high(&images->lmb, images->rd_start, > > - rd_len, &images->initrd_start, &images->initrd_end); > > -} > > - > > static int boot_reloc_fdt(bootm_headers_t *images) > > { > > /* > > @@ -270,8 +253,6 @@ static int boot_setup_fdt(bootm_headers_t *images) > > > > static void boot_prep_linux(bootm_headers_t *images) > > { > > - boot_reloc_ramdisk(images); > > - > > if (CONFIG_IS_ENABLED(MIPS_BOOT_FDT) && images->ft_len) { > > boot_reloc_fdt(images); > > boot_setup_fdt(images); > > -- > > 2.7.4 > > >=20 > Combined with c2e7e72bb9f0cb47d024997b381cb64786eb5402 it looks right. > But could you please verify that following scenarios still work? >=20 > - bootm uImage_legacy_addr initrd_addr > - bootm start uImage_legacy_addr initrd_addr + bootm loados ramdisk > fdt prep go (single step) > - bootm uImage_fit_addr > - bootm start uImage_fit_addr (single step) + bootm loados ramdisk fdt > prep go (single step) I tried all the above cases and all seems to work fine. I managed to start the linux kernel and it found the ramdisk. One observation in my case I used also a DT, but I don't see how this can influence the tests. >=20 > --=20 > - Daniel --=20 /Horatiu