From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B1B9C433F5 for ; Sun, 23 Jan 2022 03:33:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E9A0381974; Sun, 23 Jan 2022 04:33:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="beHbdGX6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6C29881F0B; Sun, 23 Jan 2022 04:33:01 +0100 (CET) Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3A9F080378 for ; Sun, 23 Jan 2022 04:32:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=email2tema@gmail.com Received: by mail-io1-xd29.google.com with SMTP id a12so15510894iod.9 for ; Sat, 22 Jan 2022 19:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bz72VCm/BRlNRAvSRBw2aMTNwtnEmyeiHkpWv79Bl64=; b=beHbdGX6eP7FPSzz/REigXUrWz3rmjjzPx/jqQzCi/Xi4iU3aFfjopPsc2CnI5wWN6 x8lh18AdMQtdtrZXznwuC3u6Xpi2E95f9RBQ6vk4UtNcPSKl0a45gmvVuMP3ijuWHK99 EwdD6BEj2+8YFqAaea9KhMfclqx53cK9bFmybFqjFzNtjcP3eZCxh1zsUVTE4THkAggw 64qt47+vYOo3cfAXFYmoES7of/F/M/5BeCZg8IUqO11+l6bWqNg/kuM1XJ72QVNJDSjy DNqnlHuhNk5XHVA+Juq2mkpgDjbjFSHw7IeR5pGrO044b4ybajMvm3wAvWUZHkp5ZFeN rgiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bz72VCm/BRlNRAvSRBw2aMTNwtnEmyeiHkpWv79Bl64=; b=6yy2H6ir1ZIh8wXsz5eoS1hEuBZVvMVsjkjhgipSbr070enRklEjpMe8A7FHOnOZa1 fR3JyDl3T/mpf7SPTSG7KFgUZGL36H4kttbQIWvhqObDDBf8HD311yEi52CLT9ZV28OV ADFZF9szILQHerclPXXo8Fegsyvwh+C4S2Q/DNt9yH7N4d/3wDJidXLjrOOeSAvBMI1T aVLjhiHnr3Q34PSUCKOWX/Xk5pPTh6QtfB5OWcMUrF95y2JyLab+oPPzZTuPiSZHsRYd 0y2p5edYpdaHYKQ1YkRn/Wdy9EN2Z3+zttfqS3oTp2q01faHdDou8LDu14fpTZ+J+lQv nvJg== X-Gm-Message-State: AOAM530XF+QQUYf+h6sFbtKzfiQZnpr8A4EfDRHjKb26Mb/7V4H8h/v2 6HV4wadzCgFA8utl8tpKH0hOk+zY+PRxE57ut7E= X-Google-Smtp-Source: ABdhPJx2uBVf3DlpwyNe7xnm9emLBMTzupya21Cg3aTghga0LylETo6uhoZusZWEXnioTyZeh8IJWolC/y+jiwOwG4M= X-Received: by 2002:a05:6602:2d09:: with SMTP id c9mr5454230iow.142.1642908777038; Sat, 22 Jan 2022 19:32:57 -0800 (PST) MIME-Version: 1.0 References: <20211125030859.2896352-1-art@khadas.com> <20220117194708.GA2657591@bill-the-cat> In-Reply-To: <20220117194708.GA2657591@bill-the-cat> From: Art Nikpal Date: Sun, 23 Jan 2022 11:32:45 +0800 Message-ID: Subject: Re: [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline To: Tom Rini Cc: Simon Glass , Neil Armstrong , Tom Warren , Andre Przywara , U-Boot Mailing List , u-boot-amlogic@groups.io, Christian Hewitt , Artem Lapkin , Nick Xie , Gouwa Wang Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Tue, Jan 18, 2022 at 3:47 AM Tom Rini wrote: > > On Thu, Nov 25, 2021 at 11:08:59AM +0800, Artem Lapkin wrote: > > > Problem > > > > Wrong implementation logic: ramdisk cmdline image address always ignored! > > Next block { rd_addr = hextoul(select, NULL) } unusable for raw initrd. > > > > We have unbootable raw initrd images because, select_ramdisk for raw > > initrd images ignore submited select addr and setup rd_datap value to 0 > > > > Signed-off-by: Artem Lapkin > > Reviewed-by: Simon Glass > > --- > > V2 changes > > _ rebase to master > > _ from https://patchwork.ozlabs.org/project/uboot/patch/20211016051915.4157293-1-art@khadas.com/ > > --- > > boot/image-board.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/boot/image-board.c b/boot/image-board.c > > index bf8817165c..87a8f07432 100644 > > --- a/boot/image-board.c > > +++ b/boot/image-board.c > > @@ -334,7 +334,7 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch, > > > > if (select) { > > ulong default_addr; > > - bool done = true; > > + bool done = false; > > > > if (CONFIG_IS_ENABLED(FIT)) { > > /* > > @@ -352,13 +352,13 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch, > > &fit_uname_config)) { > > debug("* ramdisk: config '%s' from image at 0x%08lx\n", > > fit_uname_config, rd_addr); > > + done = true; > > } else if (fit_parse_subimage(select, default_addr, > > &rd_addr, > > &fit_uname_ramdisk)) { > > debug("* ramdisk: subimage '%s' from image at 0x%08lx\n", > > fit_uname_ramdisk, rd_addr); > > - } else { > > - done = false; > > + done = true; > > } > > } > > if (!done) { > > I think we still need this? Can you please confirm and if so rebase to > master again, sorry, thanks! i have check master which have new commit 621158d106fe53fbb2d786d9d19dff44ad1baf91 no need for this state !! Author: Tom Rini Date: Mon Dec 20 09:36:32 2021 -0500 Revert "image: Remove #ifdefs from select_ramdisk()" This reverts commit f33a2c1bd0fb371511a485cac1f182ba50db51be. This causes a crash on some platforms as seen here: https://lore.kernel.org/r/f153017b-c41a-0d32-67b9-f288e695f900@baylibre.com/ Reported-by: Neil Armstrong Signed-off-by: Tom Rini PS: about crash problem maybe its same reason may be need try apply my patch and no need reverts commit f33a2c1bd0fb371511a485cac1f182ba50db51be. > > -- > Tom