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 1C757C433F5 for ; Mon, 24 Jan 2022 09:26:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 98D70811D8; Mon, 24 Jan 2022 10:26:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.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=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="GUt4ud10"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5DAB080FD6; Mon, 24 Jan 2022 10:26:26 +0100 (CET) Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 3ECE880FC6 for ; Mon, 24 Jan 2022 10:26:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wr1-x434.google.com with SMTP id k18so12298447wrg.11 for ; Mon, 24 Jan 2022 01:26:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yWjlA8hqiiqL6BLsH/fEBaLGVWYzmO54zmirGjk6w8Y=; b=GUt4ud10EmLK+yM0LIDjqsBz6xEpz0pyieeQ/onFC97qmR48RrzEc02O4kSTv82XqP sJZTjepq6WiyJJcA1m9ajGcXZOGhiYe07OfeFv43Tk3vB94SIml5iLHm/SD/pLt3i6v7 FPRF1r5L4acSJX0tl+P1XGGdHGF6AiuhsclGjeyfZtFcSnpG/n5eAmXv4LIgqU5/IoeS HKty/DWCKO6bV66GUH9VWXB0lEHX5McNbBipmIKgJUXQNk4U9Sm6LDz8vdOLst84lwS1 91I42XFDWGaJpIZA/AO2AnP5eBgiZg5E1l3cqBR6ewjQIXrRHkZ2LUX5gL8EXdi23I2o baOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=yWjlA8hqiiqL6BLsH/fEBaLGVWYzmO54zmirGjk6w8Y=; b=BSZ9Lrj+0BMz0Qv+KhmB/PSaj1Qw/2OIknCEOkeE7xhK68t6bj/UV6ZxJcViYqyAdK 11bcoCUt/iPuuNsJ7ItLuBJAE577MxDhnolZP2mTDgTiC/ZeFNhwXQZRogbW5KUfYAkU 3rKpH1//J2/I6dFKlJNEPoM9URxPVM++kTjg7vfPe11HFva0WV8TOsd+PW15a992HshM T6ehqAz2Ef2ZSnW1AyFopIFHFtLT4SiHa0+1XjNuHn5YsNFZ4fJKp45DMYTEj1CZSrgI QzbOAYgrxRgDr6I7nNaxVOvPzblb9yjv+YKT/hWYgMiUcSdAle9OAyr8ioUKOhun4JzM JXhQ== X-Gm-Message-State: AOAM532JWGFvZBxOOhHDFT4U9Wp/6dyYVr5If/Qf+FEFbsE3JLONaN96 DI0lwLQHspzOyZ/RoX2qUYcYNQ== X-Google-Smtp-Source: ABdhPJzXhJg6szXIrGUoXAEKgfhqmTPWTnNdtWhNcWtIjvoXzOneBAHsKo53CxnxMSkQlKXxVE5cdQ== X-Received: by 2002:a05:6000:102:: with SMTP id o2mr12518819wrx.600.1643016382678; Mon, 24 Jan 2022 01:26:22 -0800 (PST) Received: from ?IPv6:2001:861:44c0:66c0:8055:1f16:ac7:73ec? ([2001:861:44c0:66c0:8055:1f16:ac7:73ec]) by smtp.gmail.com with ESMTPSA id l10sm3586326wry.67.2022.01.24.01.26.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Jan 2022 01:26:21 -0800 (PST) Subject: Re: [PATCH v2] image-board: fix wrong implementation ram disk address setup from cmdline To: Art Nikpal , Tom Rini Cc: Simon Glass , Tom Warren , Andre Przywara , U-Boot Mailing List , u-boot-amlogic@groups.io, Christian Hewitt , Artem Lapkin , Nick Xie , Gouwa Wang References: <20211125030859.2896352-1-art@khadas.com> <20220117194708.GA2657591@bill-the-cat> From: Neil Armstrong Organization: Baylibre Message-ID: <1125d75f-7bba-37da-d9e0-7e562c766915@baylibre.com> Date: Mon, 24 Jan 2022 10:26:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 Hi, On 23/01/2022 04:32, Art Nikpal wrote: > 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. Indeed, I missed this fix completely... anyway having a functional release was the most important at that time. Re-sending "image: Remove #ifdefs from select_ramdisk()" with this fix squashed would be the time now. Neil >> >> -- >> Tom