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 ED496C433EF for ; Wed, 20 Jul 2022 22:49:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B0E0A84055; Thu, 21 Jul 2022 00:49:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=posteo.de 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; secure) header.d=posteo.de header.i=@posteo.de header.b="jocRlLwY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 93BA584084; Wed, 20 Jul 2022 22:36:07 +0200 (CEST) Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DF9E4811CA for ; Wed, 20 Jul 2022 22:36:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=posteo.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick.boettcher@posteo.de Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 81845240109 for ; Wed, 20 Jul 2022 22:36:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1658349364; bh=0cBrusmxdKKprcpsQkxZKD2gM0d528FQ2g3K3B0DTzk=; h=Date:From:To:Cc:Subject:From; b=jocRlLwY8Z2lEOnpvNCCSj8vBV4+CGMGVNHajbFNM1M2NihuETx0fyjkuqeNApYGg uESqJEgT0Xisk05SFx8VY7NWHxJ4zynMxunq0w5iOcRFa+9omtAvf9FnWI05025AZI pmvqvh2fFMiqMKiOIIvWOHl22sh5tGDgM9320C/6XPaCHoPtUNUOvcigBnEi6oOqaN YV8lxtbHjAtWb5a7JUnsVvmP66RQR0u1AVeUApYInVTOVAL2HSVDVn/s5WsJLFC5kQ djgKNz3fF6YwU2Eoh2tx1wMN2VCjqHQkx1W8Zr5VWueuVB2COZqvWIkZZ4CRHQLaHP tJq2hDLetUPvw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Lp6sv4YjXz6tmb; Wed, 20 Jul 2022 22:36:03 +0200 (CEST) Date: Wed, 20 Jul 2022 20:36:02 +0000 From: Patrick Boettcher To: u-boot@lists.denx.de Cc: Adam Ford , Fabio Estevam , hws@denx.de, Christophe Blaess , Florent LEROY Subject: How to create a bootable SPL for USB booting for the i.MX8M Mini Message-ID: <20220720223602.6bd8f926@yaise-pc1> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 21 Jul 2022 00:49:40 +0200 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 Hi list, We are having some difficulties getting USB-boot (for a starter with SPL) to work on a imx8mm. Doing this is part of a debug-session for another problem, which is worth mentioning, as it has been discussed on this list in January/February 2022. The original problem: we have a "complete" yocto-environment (kirkstone) using meta-imx (and thus u-boot-imx 2022.04) where we are building a booloader image without FIT. We patched the atf to assign the UART4 to the Cortex A53 because it is this UART which is used as serial console. The binary produced by imx-boot in this environment starts booting SPL and when jumping to the ATF it hangs. Similar to what is seen here (some people from that thread are on CC, sorry for the noise). https://lore.kernel.org/all/20220203164637.GV7515@bill-the-cat/t/#r9071b8b65566bd68bd39ada6d5b6db6e78e034e5 We tried several things to understand what's happening, without success. A next step is now to build a SPL with upstream u-boot 2022.07 using an existing board (our board/dts-files are really not in good shape yet). We started using the imx8mm-beacon and then tried imx8mm-cl-iot-gate, when loading their SPL with uuu nothing is printed on the serial-console. Here are the steps we did to build and flash it: - patch imx-atf-2.6 to liberate UART4 into the Cortex A53-domain - build it and place the bl31.bin in uboot's source-tree - download ddr-firmwares and put them to uboot's source-tree - modify board/beacon/../spl.c to UART4 (pads and init_uart_clk(3)) - add FASTBOOT and USB_FUNCTION_FASTBOOT to its defconfig. - make deconfig && make - run "uuu SDP: boot -f flash.bin" uuu finds the devices and then says "Okay" but nothing happens on the console and we think the board is not running anything. The same uuu-command using the imx-boot-file from our yocto-env boots the SPL and the console is showing something sane. What did we miss? What are the steps in upstream u-boot to create a board which can boot over SPL? Thanks in advance for any help. best regards, -- Patrick.