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 D5380C433EF for ; Thu, 18 Nov 2021 21:31:13 +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 3D245611EF for ; Thu, 18 Nov 2021 21:31:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3D245611EF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.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 6F3B982F96; Thu, 18 Nov 2021 22:31:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="iSh6G39i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4BDDC82FAD; Thu, 18 Nov 2021 22:31:07 +0100 (CET) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (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 A026582F96 for ; Thu, 18 Nov 2021 22:31:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x729.google.com with SMTP id d2so7949025qki.12 for ; Thu, 18 Nov 2021 13:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Fzlq8457qgNzl8Uu0d/N1Jy/R0fFKSFXBqrMDSFmpfk=; b=iSh6G39iMEuq5hxWAN/MJk09z7sOtGHpnCOnzoGKF7mA7ebEIj6HgSinbHdSO06CJz OW9iXjpaL1lDF/Yv4kQsqPS8S4BnykvVHJJudCmNfMGFj6DFdw93SLfPTrPuBci1/ltJ 3ycDbiACUhvjjvkzdiYwQdm6iwC+0kzxaYHvI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Fzlq8457qgNzl8Uu0d/N1Jy/R0fFKSFXBqrMDSFmpfk=; b=bW7iJ5T5FI8Z3lfcH8L+yP9390gbIuxWj2ZuByBkBB8XIzYb1f7aeSAJuNzczhTWyY OAcb2PlMfSGot9PntYT4u07wgnRldThEbgVGd4jhoTPwNabGNJTBjRFaqOkBilFIOZyM KC3PoGMFe9Ujf0tJtc50PBdtBnjxgqs9PSXJStEjZ3PaKzP+gy+JZy9Si/oEW+ndFU5s rRs2sPuHDXJTdL7u8GLGAPzUtu0Iu3q+4jAiIGSE3j7zRKGm5v225WbIb+c0tD/F5N4w Tau+hqBjSbd6hOsw48hQjja0vzMAiAbh8MZER0w1OQIq68XQhxqP6DYcZ9bANCIAZOev BkgQ== X-Gm-Message-State: AOAM533LeiLm00oE1g1y+Rgi6pXnXJDtmUQaGtrrOpw56byz8+XmJ/wH nXa14PzS96y+1xTRv9aAoq8/Jg== X-Google-Smtp-Source: ABdhPJzNpgZr0STUl6MO51xt3UCy50ftObQ3DqMBCgviN6OFM/3O++REb3Ur5pxwI4cXcnkpWtc9sg== X-Received: by 2002:a05:620a:4711:: with SMTP id bs17mr23480809qkb.321.1637271059242; Thu, 18 Nov 2021 13:30:59 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-6986-0eb7-a1cc-35fa.res6.spectrum.com. [2603:6081:7b01:cbda:6986:eb7:a1cc:35fa]) by smtp.gmail.com with ESMTPSA id f10sm575886qkp.135.2021.11.18.13.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 13:30:58 -0800 (PST) Date: Thu, 18 Nov 2021 16:30:56 -0500 From: Tom Rini To: Adam Ford Cc: "Peng Fan (OSS)" , "u-boot@lists.denx.de" , "sbabic@denx.de" , "festevam@gmail.com" , dl-uboot-imx , Peng Fan , "aford@beaconembedded.com" Subject: Re: [PATCH] imx8mn_beacon: Fix booting hang and switch to binman Message-ID: <20211118213056.GA24579@bill-the-cat> References: <20210910201922.263481-1-aford173@gmail.com> <20211118211208.GZ24579@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vvMukq6kM/q9kdzf" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 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 --vvMukq6kM/q9kdzf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 18, 2021 at 03:26:40PM -0600, Adam Ford wrote: > On Thu, Nov 18, 2021 at 3:12 PM Tom Rini wrote: > > > > On Wed, Nov 17, 2021 at 08:08:10AM -0600, Adam Ford wrote: > > > > > On Fri, Oct 22, 2021 at 2:36 PM Adam Ford wrote: > > > > > > > > On Wed, Sep 29, 2021 at 8:26 AM Adam Ford wrot= e: > > > > > > > > > > On Thu, Sep 23, 2021 at 3:03 PM Adam Ford wr= ote: > > > > > > > > > > > > On Tue, Sep 14, 2021 at 9:49 PM Peng Fan (OSS) wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > +Tom Rini > > > > > > > > > > On 2021/9/11 4:19, Adam Ford wrote: > > > > > > > > Somewhere along the line, the board stopped being able to b= oot. > > > > > > > > Rather than just fixing the issue, let's fix the issue and = migrate > > > > > > > > to binman to eliminate a warning when using custom imx tool= s for > > > > > > > > generating the binary. > > > > > > > > > > > > > > > > > > > > Any chance this can make it into 2021.10? it's currently broke= n, and > > > > > > this seems to fix the problem. i didn't bisect to see where th= e issue > > > > > > broke, or i would have added a fixes tag. > > > > > > > > > > Stefano or Tom? could someone comment and/or merge? the board is > > > > > currently not booting, and this fixes the issue > > > > > > > > It's been over a month, and we missed the 2021.10 release. Is there > > > > something stopping this from being applied? > > > > > > Tom, > > > > > > Is there any chance you can apply this? I can't get anyone to respond > > > to me, and it's been over 2 months since the initial submission. > > > > > > thanks, > > > > > > adam > > > > > > > > adam > > > > > > > > > > > > adam > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > > > > > > > > > diff --git a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi b/a= rch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi > > > > > > > > index bbc64a2819..69fd69c8d0 100644 > > > > > > > > --- a/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi > > > > > > > > +++ b/arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi > > > > > > > > @@ -4,6 +4,10 @@ > > > > > > > > */ > > > > > > > > > > > > > > > > / { > > > > > > > > + binman: binman { > > > > > > > > + multiple-images; > > > > > > > > + }; > > > > > > > > + > > > > > > > > wdt-reboot { > > > > > > > > compatible =3D "wdt-reboot"; > > > > > > > > wdt =3D <&wdog1>; > > > > > > > > @@ -40,6 +44,9 @@ > > > > > > > > &clk { > > > > > > > > u-boot,dm-spl; > > > > > > > > u-boot,dm-pre-reloc; > > > > > > > > + /delete-property/ assigned-clocks; > > > > > > > > + /delete-property/ assigned-clock-parents; > > > > > > > > + /delete-property/ assigned-clock-rates; > > > > > > > > }; > > > > > > > > > > > > > > > > &gpio1 { > > > > > > > > @@ -99,6 +106,10 @@ > > > > > > > > u-boot,off-on-delay-us =3D <20000>; > > > > > > > > }; > > > > > > > > > > > > > > > > +&uart2 { > > > > > > > > + u-boot,dm-spl; > > > > > > > > +}; > > > > > > > > + > > > > > > > > &usdhc1 { > > > > > > > > u-boot,dm-spl; > > > > > > > > sd-uhs-sdr104; > > > > > > > > @@ -120,3 +131,122 @@ > > > > > > > > &wdog1 { > > > > > > > > u-boot,dm-spl; > > > > > > > > }; > > > > > > > > + > > > > > > > > +&binman { > > > > > > > > + u-boot-spl-ddr { > > > > > > > > + filename =3D "u-boot-spl-ddr.bin"; > > > > > > > > + pad-byte =3D <0xff>; > > > > > > > > + align-size =3D <4>; > > > > > > > > + align =3D <4>; > > > > > > > > + > > > > > > > > + u-boot-spl { > > > > > > > > + align-end =3D <4>; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + blob_1: blob-ext@1 { > > > > > > > > + filename =3D "lpddr4_pmu_train_1d_ime= m.bin"; > > > > > > > > + size =3D <0x8000>; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + blob_2: blob-ext@2 { > > > > > > > > + filename =3D "lpddr4_pmu_train_1d_dme= m.bin"; > > > > > > > > + size =3D <0x4000>; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + blob_3: blob-ext@3 { > > > > > > > > + filename =3D "lpddr4_pmu_train_2d_ime= m.bin"; > > > > > > > > + size =3D <0x8000>; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + blob_4: blob-ext@4 { > > > > > > > > + filename =3D "lpddr4_pmu_train_2d_dme= m.bin"; > > > > > > > > + size =3D <0x4000>; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + > > > > > > > > + spl { > > > > > > > > + filename =3D "spl.bin"; > > > > > > > > + > > > > > > > > + mkimage { > > > > > > > > + args =3D "-n spl/u-boot-spl.cfgout -T= imx8mimage -e 0x912000"; > > > > > > > > + > > > > > > > > + blob { > > > > > > > > + filename =3D "u-boot-spl-ddr.= bin"; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + itb { > > > > > > > > + filename =3D "u-boot.itb"; > > > > > > > > + > > > > > > > > + fit { > > > > > > > > + description =3D "Configuration to loa= d ATF before U-Boot"; > > > > > > > > + #address-cells =3D <1>; > > > > > > > > + fit,external-offset =3D ; > > > > > > > > + > > > > > > > > + images { > > > > > > > > + uboot { > > > > > > > > + description =3D "U-Bo= ot (64-bit)"; > > > > > > > > + type =3D "standalone"; > > > > > > > > + arch =3D "arm64"; > > > > > > > > + compression =3D "none= "; > > > > > > > > + load =3D ; > > > > > > > > + > > > > > > > > + uboot_blob: blob-ext { > > > > > > > > + filename =3D = "u-boot-nodtb.bin"; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + atf { > > > > > > > > + description =3D "ARM = Trusted Firmware"; > > > > > > > > + type =3D "firmware"; > > > > > > > > + arch =3D "arm64"; > > > > > > > > + compression =3D "none= "; > > > > > > > > + load =3D <0x960000>; > > > > > > > > + entry =3D <0x960000>; > > > > > > > > + > > > > > > > > + atf_blob: blob-ext { > > > > > > > > + filename =3D = "bl31.bin"; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + fdt { > > > > > > > > + description =3D "NAME= "; > > > > > > > > + type =3D "flat_dt"; > > > > > > > > + compression =3D "none= "; > > > > > > > > + > > > > > > > > + uboot_fdt_blob: blob-= ext { > > > > > > > > + filename =3D = "u-boot.dtb"; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + configurations { > > > > > > > > + default =3D "conf"; > > > > > > > > + > > > > > > > > + conf { > > > > > > > > + description =3D "NAME= "; > > > > > > > > + firmware =3D "uboot"; > > > > > > > > + loadables =3D "atf"; > > > > > > > > + fdt =3D "fdt"; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + imx-boot { > > > > > > > > + filename =3D "flash.bin"; > > > > > > > > + pad-byte =3D <0x00>; > > > > > > > > + > > > > > > > > + spl: blob-ext@1 { > > > > > > > > + offset =3D <0x0>; > > > > > > > > + filename =3D "spl.bin"; > > > > > > > > + }; > > > > > > > > + > > > > > > > > + uboot: blob-ext@2 { > > > > > > > > + offset =3D <0x58000>; > > > > > > > > + filename =3D "u-boot.itb"; > > > > > > > > + }; > > > > > > > > + }; > > > > > > > > +}; > > > > > > > > diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mac= h-imx/imx8m/Kconfig > > > > > > > > index 8fedf45987..9a1eb108e4 100644 > > > > > > > > --- a/arch/arm/mach-imx/imx8m/Kconfig > > > > > > > > +++ b/arch/arm/mach-imx/imx8m/Kconfig > > > > > > > > @@ -116,6 +116,7 @@ config TARGET_IMX8MM_BEACON > > > > > > > > > > > > > > > > config TARGET_IMX8MN_BEACON > > > > > > > > bool "imx8mn Beacon Embedded devkit" > > > > > > > > + select BINMAN > > > > > > > > select IMX8MN > > > > > > > > select SUPPORT_SPL > > > > > > > > select IMX8M_LPDDR4 > > > > > > > > diff --git a/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg b/= board/beacon/imx8mn/imximage-8mn-lpddr4.cfg > > > > > > > > new file mode 100644 > > > > > > > > index 0000000000..7286b26494 > > > > > > > > --- /dev/null > > > > > > > > +++ b/board/beacon/imx8mn/imximage-8mn-lpddr4.cfg > > > > > > > > @@ -0,0 +1,10 @@ > > > > > > > > +/* SPDX-License-Identifier: GPL-2.0+ */ > > > > > > > > +/* > > > > > > > > + * Copyright 2021 NXP > > > > > > > > + */ > > > > > > > > + > > > > > > > > +#define __ASSEMBLY__ > > > > > > > > + > > > > > > > > +ROM_VERSION v2 > > > > > > > > +BOOT_FROM sd > > > > > > > > +LOADER u-boot-spl-ddr.bin 0x912000 > > > > > > > > diff --git a/configs/imx8mn_beacon_defconfig b/configs/imx8= mn_beacon_defconfig > > > > > > > > index 5296204aad..f2515874a2 100644 > > > > > > > > --- a/configs/imx8mn_beacon_defconfig > > > > > > > > +++ b/configs/imx8mn_beacon_defconfig > > > > > > > > @@ -26,9 +26,9 @@ CONFIG_LTO=3Dy > > > > > > > > CONFIG_FIT=3Dy > > > > > > > > CONFIG_FIT_EXTERNAL_OFFSET=3D0x3000 > > > > > > > > CONFIG_SPL_LOAD_FIT=3Dy > > > > > > > > -CONFIG_SPL_FIT_GENERATOR=3D"arch/arm/mach-imx/mkimage_fit_= atf.sh" > > > > > > > > +# CONFIG_USE_SPL_FIT_GENERATOR is not set > > > > > > > > CONFIG_OF_SYSTEM_SETUP=3Dy > > > > > > > > -CONFIG_SYS_EXTRA_OPTIONS=3D"IMX_CONFIG=3Darch/arm/mach-imx= /imx8m/imximage-8mn-lpddr4.cfg" > > > > > > > > +CONFIG_SYS_EXTRA_OPTIONS=3D"IMX_CONFIG=3Dboard/beacon/imx8= mn/imximage-8mn-lpddr4.cfg" > > > > > > > > CONFIG_DEFAULT_FDT_FILE=3D"imx8mn-beacon-kit.dtb" > > > > > > > > CONFIG_ARCH_MISC_INIT=3Dy > > > > > > > > CONFIG_SPL_BOARD_INIT=3Dy > > > > > > > > @@ -36,6 +36,7 @@ CONFIG_SPL_BOOTROM_SUPPORT=3Dy > > > > > > > > CONFIG_SPL_SEPARATE_BSS=3Dy > > > > > > > > CONFIG_SPL_I2C=3Dy > > > > > > > > CONFIG_SPL_POWER=3Dy > > > > > > > > +CONFIG_SPL_WATCHDOG=3Dy > > > > > > > > CONFIG_HUSH_PARSER=3Dy > > > > > > > > CONFIG_SYS_PROMPT=3D"u-boot=3D> " > > > > > > > > # CONFIG_BOOTM_NETBSD is not set > > > > > > > > @@ -62,7 +63,6 @@ CONFIG_CMD_EXT4_WRITE=3Dy > > > > > > > > CONFIG_CMD_FAT=3Dy > > > > > > > > CONFIG_OF_CONTROL=3Dy > > > > > > > > CONFIG_SPL_OF_CONTROL=3Dy > > > > > > > > -CONFIG_OF_SPL_REMOVE_PROPS=3D"interrupt-parent interrupts" > > > > > > > > CONFIG_ENV_IS_IN_MMC=3Dy > > > > > > > > CONFIG_SYS_RELOC_GD_ENV_ADDR=3Dy > > > > > > > > CONFIG_SYS_MMC_ENV_DEV=3D2 > > > > > > > > @@ -106,6 +106,7 @@ CONFIG_PHY_GIGE=3Dy > > > > > > > > CONFIG_FEC_MXC=3Dy > > > > > > > > CONFIG_MII=3Dy > > > > > > > > CONFIG_PINCTRL=3Dy > > > > > > > > +CONFIG_SPL_PINCTRL=3Dy > > > > > > > > CONFIG_PINCTRL_IMX8M=3Dy > > > > > > > > CONFIG_DM_PMIC=3Dy > > > > > > > > # CONFIG_SPL_PMIC_CHILDREN is not set > > > > > > > > @@ -122,7 +123,9 @@ CONFIG_SPI=3Dy > > > > > > > > CONFIG_DM_SPI=3Dy > > > > > > > > CONFIG_NXP_FSPI=3Dy > > > > > > > > CONFIG_SYSRESET=3Dy > > > > > > > > +CONFIG_SPL_SYSRESET=3Dy > > > > > > > > CONFIG_SYSRESET_PSCI=3Dy > > > > > > > > +CONFIG_SYSRESET_WATCHDOG=3Dy > > > > > > > > CONFIG_DM_THERMAL=3Dy > > > > > > > > CONFIG_USB=3Dy > > > > > > > > # CONFIG_SPL_DM_USB is not set > > > > > > > > @@ -134,3 +137,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=3D0xa4a5 > > > > > > > > CONFIG_CI_UDC=3Dy > > > > > > > > CONFIG_SDP_LOADADDR=3D0x0 > > > > > > > > CONFIG_OF_LIBFDT_OVERLAY=3Dy > > > > > > > > +CONFIG_IMX_WATCHDOG=3Dy > > > > > > > > > > > > > > > > > > > > > > Reviewed-by: Peng Fan > > > > This introduces failure to build now: > > https://source.denx.de/u-boot/u-boot/-/jobs/352491 >=20 > This goes to another discussion [1] because the binman requires some > file outside of U-Boot in order to create the binary. > If we could let the CI build with missing files, that would be helpful. >=20 > [1] - https://lore.kernel.org/all/20211109194224.GB24579@bill-the-cat/ Oh this fun.. :( --=20 Tom --vvMukq6kM/q9kdzf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmGWxg0ACgkQFHw5/5Y0 tyyddAv5AUbeebW4dJE46DYybhWM21BDsPUle3xZM48zK+5u3wua41EdTdAmxqBd rJVi3hQC57UAgJrVVPJewhCTkHerd4QppmgHiO8xzCf8u0+e0IhsWcgNQKJnvO2p tgaG18u9zR4z0AhvRFp2bP8V7P2DOsPK5uhIwNOXgqk5SNJ7CONlUoP7FRWjI7mE 9rQeg9dBm2BMFhPyaEZgsq+01/08x75774oEijM/PMQCL7+LNOZthFO/o5zPwHUD uS9uNNuMbGvwO2+maJASGzwysk0sGWOXu6uoc1cIpFIZ13/u9T/nt/9Itchc1YDQ eE0Ox0XPxXwqep5UyAhlDXdDNqkonSwCzlbjmmVlw2fnVbEPzZjzq7VJ5u3cOlqX e0t4FwuBntySdvB5SzoT/NOlso4T43TVTD6oiJcevlUMOL4Xuw1LNiDV8osl+Vji 0rtrKzIQu83HXrbf7LFvT9cbYbF5Kcyh22svIKarO/aA5E1aqssqhOHzPAUnsEu9 rLsC8Ab/ =+AU5 -----END PGP SIGNATURE----- --vvMukq6kM/q9kdzf--