From patchwork Thu Sep 12 19:05:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Otavio Salvador X-Patchwork-Id: 1161743 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ossystems.com.br Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46TpDk3TTYz9sDB for ; Fri, 13 Sep 2019 05:07:34 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 114F8C21F01; Thu, 12 Sep 2019 19:06:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C3719C21EB4; Thu, 12 Sep 2019 19:06:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1FA2BC21E45; Thu, 12 Sep 2019 19:05:38 +0000 (UTC) Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by lists.denx.de (Postfix) with ESMTPS id 46FFBC21EB4 for ; Thu, 12 Sep 2019 19:05:37 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id j1so18183635qth.1 for ; Thu, 12 Sep 2019 12:05:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=/Ypk3a48AexH03V3jRvO9XYC4sqRfMDTQMPt1Pp+Bbo=; b=EPN/AHYsVglofe+IVqg+Hsfr642nOWPweqZXAs4azG3EFOoNxXS7hj9NUUTT143oBo ZZmgruCn1jSuz8pDs95QDJBMxghZxcSyJ/nsLKmcCwnJ1oXEPlftWsnNid1ICz/627uy kU27hadhU6zfzlifIwfaocailYyQEs5t0hBEbZkeIQ3wjIDKuzXY0fi8rMCbzteebqAq Tmy9f2mZ4YuIdiR+nDchxOI7wmlyfn+3Ot+MfmcjaOwRFdLo0Y9V8dwKJR18JMap+ML7 lZXhfezpA6jRKksTX6oCJamxBrcDm9M26jC+gc7WYf1rMSuAs/3tIVNpoA1J6FD6YR49 eo6w== X-Gm-Message-State: APjAAAUkBjHtT0HhtvXaUnb29LKM8Ub3cZw7YvsjUQsWwL/FaXTcwaO4 17MwfUPm/NSA4+bNvCF5sn7WjNHEJMc= X-Google-Smtp-Source: APXvYqwOI4CClxBjZZbQ2YnJTMBHNRsehSyQI3Ufd0ST0ULUWv3TNPwNtUAZx91NG4iz4KyLpQG7bQ== X-Received: by 2002:ac8:44c7:: with SMTP id b7mr42604479qto.170.1568315135677; Thu, 12 Sep 2019 12:05:35 -0700 (PDT) Received: from localhost ([181.220.83.67]) by smtp.gmail.com with ESMTPSA id a36sm14025961qtk.21.2019.09.12.12.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 12:05:35 -0700 (PDT) From: Otavio Salvador To: U-Boot Mailing List Date: Thu, 12 Sep 2019 16:05:00 -0300 Message-Id: <20190912190501.3227111-4-otavio@ossystems.com.br> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190912190501.3227111-1-otavio@ossystems.com.br> References: <20190912190501.3227111-1-otavio@ossystems.com.br> MIME-Version: 1.0 Organization: O.S. Systems Software LTDA. Cc: Marek Vasut , Otavio Salvador , Vanessa Maegima , Fabio Estevam , John Weber , Richard Hu , mtudan@mobilisis.hr Subject: [U-Boot] [PATCH 4/5] pico-imx7d: Add instructions for booting in Falcon mode X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: Fabio Estevam Improve the README by adding instructions on how to boot using Falcon mode, which allows the SPL to load the kernel directly, without using U-Boot proper. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador --- board/technexion/pico-imx7d/README | 91 ++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/board/technexion/pico-imx7d/README b/board/technexion/pico-imx7d/README index 6aa0d25af5..4d57cdbfa8 100644 --- a/board/technexion/pico-imx7d/README +++ b/board/technexion/pico-imx7d/README @@ -66,3 +66,94 @@ Remove power from the pico board. Put pico board into normal boot mode. Power up the board and the new updated U-Boot should boot from eMMC. + +Booting in Falcon mode +====================== + +Generate a uImage kernel: + +$ make imx_v6_v7_defconfig (Using the default imx_v6_v7_defconfig configuration +just for an example. In order to boot faster the user should customize the +defconfig by only enabling the minimal required drivers). + +$ make -j4 uImage LOADADDR=0x80008000 + +$ cp arch/arm/boot/uImage /tftpboot +$ cp arch/arm/boot/dts/imx7d-pico-pi.dtb /tftpboot + +In the U-Boot prompt: + +Setup the server and board IP addresses: +=> setenv serverip 192.168.0.10 +=> setenv ipaddr 192.168.0.11 + +Get the dtb file: +=> tftp ${fdt_addr} imx7d-pico-pi.dtb + +Get the kernel: +=> tftp ${loadaddr} uImage + +Write the kernel at 2MB offset: +=> mmc write ${loadaddr} 0x1000 0x5000 + +Setup the bootargs: +=> setenv bootargs 'console=ttymxc4,115200 root=/dev/mmcblk2p1 rootfstype=ext4 rootwait rw' + +Prepare args: +=> spl export fdt ${loadaddr} - ${fdt_addr} +## Booting kernel from Legacy Image at 80800000 ... + Image Name: Linux-5.2.14 + Image Type: ARM Linux Kernel Image (uncompressed) + Data Size: 9077544 Bytes = 8.7 MiB + Load Address: 80008000 + Entry Point: 80008000 + Verifying Checksum ... OK +## Flattened Device Tree blob at 83000000 + Booting using the fdt blob at 0x83000000 + Loading Kernel Image + Using Device Tree in place at 83000000, end 8300b615 +subcommand not supported +subcommand not supported + Using Device Tree in place at 83000000, end 8300e615 +Argument image is now in RAM: 0x83000000 +=> + +Write 1MB of args data (0x800 sectors) to 1MB offset (0x800 sectors): + +=> mmc write ${fdt_addr} 0x800 0x800 + +In order to boot with Falcon mode, activate the CONFIG_SPL_OS_BOOT +option in the defconfig + +--- a/configs/pico-imx7d_defconfig ++++ b/configs/pico-imx7d_defconfig +@@ -67,3 +67,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 + CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 + CONFIG_CI_UDC=y + CONFIG_VIDEO=y ++CONFIG_SPL_OS_BOOT=y + +Then rebuild U-Boot: + +$ make pico-imx7d_defconfig +$ make -j4 + +Launch UMS: +=> ums 0 mmc 0 + +Flash the new binaries: + +$ sudo dd if=SPL of=/dev/sdX bs=1k seek=1; sync +$ sudo dd if=u-boot-dtb.img of=/dev/sdX bs=1k seek=69; sync + +And then SPL binary will load and jump directly to the kernel: + +U-Boot SPL 2019.10-rc3-00284-g001c8ea94a-dirty (Sep 10 2019 - 12:46:01 -0300) +Trying to boot from MMC1 +[ 0.000000] Booting Linux on physical CPU 0x0 +[ 0.000000] Linux version 5.2.14 (fabio@fabio-OptiPlex-7010) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #30 SMP Wed Sep 10 12:36:27 -03 2019 +[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d +[ 0.000000] CPU: div instructions available: patching division code +[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache +[ 0.000000] OF: fdt: Machine model: TechNexion PICO-IMX7D Board and PI baseboard +...