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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32E1CC433F5 for ; Sat, 16 Oct 2021 05:19:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 056DC61181 for ; Sat, 16 Oct 2021 05:19:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 056DC61181 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 09A5E8364A; Sat, 16 Oct 2021 07:19:42 +0200 (CEST) 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="Se5/51BP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8735983656; Sat, 16 Oct 2021 07:19:40 +0200 (CEST) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 E69BD835F6 for ; Sat, 16 Oct 2021 07:19:36 +0200 (CEST) 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-pl1-x62d.google.com with SMTP id t11so7659283plq.11 for ; Fri, 15 Oct 2021 22:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ss+Ook0+ULTdT4d6MO5UgjPnKx426vWd03ennL+tiS8=; b=Se5/51BPtHyal+vx5H9paBQ60NMiAhc+4JVXopeewswQNAYcdv9YlIQcFBh9djt/2L +C+LH859vHtIf7/ewyjl2FsasVVu6PWDeevqe123sq8rGhpJHcvW/cWOj+KRDvCg08cc g39hCkNoiS8/YcG0Q3fhON4y5s7p14g+LfJvxndOrYt16GFqVIsq1NYe+pjbT9qK839R TUAie+qt9A9htmEdlw0rqzUTruAVTJDCfzaOXY+eK9V6NeibDOAQ8717882svV3ozRag DpAD/iB8qRnDpH9wlRRQbTSNWTITdR7UI2Y5rg1Iu4DacH454r1YUqEVsJfM8mhG/lc3 oW9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ss+Ook0+ULTdT4d6MO5UgjPnKx426vWd03ennL+tiS8=; b=BxIEfywwOshJsJxv1H3NnLdhHyeoHRAWOCCLy3e8PVN1+PYguQ9027Z8w4FsWig4nC B54ZwaQrJ87GDHaewwY/lTNmZbipAPNRbZGZn4ubd3HGzzYo9uRqEOqG5auSuRelb5/h XuV0REMJ4Ye6FnUtCf8CG8eLeENN3aYo/iAZBEtDiKM2v7zslpBtgqpBzzTZl3ItFlSR oHXRn99ka03KKIJCaVdgSPe+en4SI/sstV4AJ/pjQ7aH+04xoToB2tBJfj+OCDD+kcU6 Nwd4HpyKOGvheWlAN7dG5Xrzn7R7sJM7kaau4CkljK30yk5zCANcoqGosVExRNQOXf/r tIcQ== X-Gm-Message-State: AOAM531ffKjkb+N11V8ksIAfLekmlXg7HosfD9XhVSGpGGPJ/SvzFyqF L2FvrH8y2csBLxX/huiIqJw= X-Google-Smtp-Source: ABdhPJzeeTL5eN3uAZn6AThTviYASfxk3xC3jXC5S1/+loU22sOeIF2y7goizweRXS30wvho21pEpA== X-Received: by 2002:a17:902:a50f:b029:11a:cd45:9009 with SMTP id s15-20020a170902a50fb029011acd459009mr15137746plq.38.1634361574091; Fri, 15 Oct 2021 22:19:34 -0700 (PDT) Received: from localhost.localdomain (199.19.111.227.16clouds.com. [199.19.111.227]) by smtp.gmail.com with ESMTPSA id z24sm6214943pgu.54.2021.10.15.22.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Oct 2021 22:19:33 -0700 (PDT) From: Artem Lapkin X-Google-Original-From: Artem Lapkin To: sjg@chromium.org Cc: trini@konsulko.com, narmstrong@baylibre.com, twarren@nvidia.com, andre.przywara@arm.com, u-boot@lists.denx.de, u-boot-amlogic@groups.io, art@khadas.com, nick@khadas.com, gouwa@khadas.com Subject: [PATCH] image-board: fix wrong implementation ram disk address setup from cmdline Date: Sat, 16 Oct 2021 13:19:15 +0800 Message-Id: <20211016051915.4157293-1-art@khadas.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean 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 Come-from: https://patchwork.ozlabs.org/project/uboot/patch/20211015101501.4091141-1-art@khadas.com/ Signed-off-by: Artem Lapkin --- common/image-board.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/image-board.c b/common/image-board.c index e7660352e9..e7063016ef 100644 --- a/common/image-board.c +++ b/common/image-board.c @@ -333,7 +333,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)) { /* @@ -351,13 +351,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) { -- 2.25.1