From patchwork Sun Dec 11 14:40:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1714613 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=IMEXn9yq; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NVSB86kwSz23yc for ; Mon, 12 Dec 2022 01:41:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D8B885395; Sun, 11 Dec 2022 15:41:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.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=intel.com header.i=@intel.com header.b="IMEXn9yq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C93DD853AA; Sun, 11 Dec 2022 15:41:02 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 871D385397 for ; Sun, 11 Dec 2022 15:40:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670769658; x=1702305658; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pR6EGukNxi4EgkWLWFkOA6EDNgJgvdGYPfmUHrdNU5U=; b=IMEXn9yqs31PwY2ceU56CYsatRVwKQb++W9MJQcmJvy9JbomBb3GlBmo Zsbc3y3W/GFViMW4PGjd5D1x5TsqGumw0p06Re9UdMQe4zPO5+nLX9heN ecQhHM2Vhl51HbA1d+N7tLW76ApDkQ2KiElifYaP4PvDbBR5EhooxjTLY S4RicFmtvt/KVSWzMWN33aKyCcIkMvQ2TfBg2+wgH2/b0Ho0xUGtWQnS6 mIwF2BWSYSJUir/MB1GRlTiSdZxvxNXqMzs9wL4z9Tg6QcN+jAK7vSMSB Lna6cX0fQ7tbJ01+s4F5GEY6I2suB/NEpYjtZ0EucU3GBL94W/KxPO04A A==; X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="301125601" X-IronPort-AV: E=Sophos;i="5.96,236,1665471600"; d="scan'208";a="301125601" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 06:40:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="647891212" X-IronPort-AV: E=Sophos;i="5.96,236,1665471600"; d="scan'208";a="647891212" Received: from pglmail07.png.intel.com ([10.221.193.207]) by orsmga002.jf.intel.com with ESMTP; 11 Dec 2022 06:40:50 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id 61C6C6F; Sun, 11 Dec 2022 22:40:49 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 5FE5BE00218; Sun, 11 Dec 2022 22:40:49 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang Subject: [PATCH 4/4] arm: socfpga: soc64: Load and boot for NAND flash with UBI and UBIFS in enviroment Date: Sun, 11 Dec 2022 22:40:47 +0800 Message-Id: <20221211144047.8464-4-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20221211144047.8464-1-jit.loon.lim@intel.com> References: <20221211144047.8464-1-jit.loon.lim@intel.com> MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean From: Sin Hui Kho Load kernel and device tree from UBI volume. Set root file system type for NAND boot as UBIFS located at UBI volume on MTD partition 1 or namely "root". Signed-off-by: Sin Hui Kho Signed-off-by: Jit Loon Lim --- include/configs/socfpga_soc64_common.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h index 5939f13231..5b1d243153 100644 --- a/include/configs/socfpga_soc64_common.h +++ b/include/configs/socfpga_soc64_common.h @@ -92,10 +92,15 @@ "scriptfile=u-boot.scr\0" \ "fatscript=if fatload mmc 0:1 ${scriptaddr} ${scriptfile};" \ "then source ${scriptaddr}:script; fi\0" \ + "nandroot=ubi0:rootfs\0" \ + "nandload=ubi part root; ubi readvol ${loadaddr} kernel; ubi readvol ${fdt_addr} dtb\0" \ + "nandboot=setenv bootargs " CONFIG_BOOTARGS \ + " root=${nandroot} rw rootwait rootfstype=ubifs ubi.mtd=1; " \ + "booti ${loadaddr} - ${fdt_addr}\0" \ "nandfitboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${nandroot} rw rootwait rootfstype=jffs2; " \ + " root=${nandroot} rw rootwait rootfstype=ubifs ubi.mtd=1; " \ "bootm ${loadaddr}\0" \ - "nandfitload=nand read ${loadaddr} kernel\0" \ + "nandfitload=ubi part root; ubi readvol ${loadaddr} kernel\0" \ "socfpga_legacy_reset_compat=1\0" \ "rsu_status=rsu dtb; rsu display_dcmf_version; "\ "rsu display_dcmf_status; rsu display_max_retry\0" \