From mboxrd@z Thu Jan 1 00:00:00 1970 From: Priyanka Jain Date: Fri, 11 Dec 2020 07:56:17 +0000 Subject: [PATCH] armv8: fsl-layerscape: Fix automatic setting of bootmcd with TF-A In-Reply-To: <20201117152004.58980-1-alban.bedel@aerq.com> References: <20201117152004.58980-1-alban.bedel@aerq.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de >-----Original Message----- >From: Alban Bedel >Sent: Tuesday, November 17, 2020 8:50 PM >To: u-boot at lists.denx.de >Cc: Priyanka Jain ; Pankit Garg >; Bedel, Alban >Subject: [PATCH] armv8: fsl-layerscape: Fix automatic setting of bootmcd with >TF-A > >When booting from TF-A there is a logic that attempt to detect if the default >environment is used, if this is the case it then set the `bootcmd` and >`mcinitcmd` depending of the device we booted from. >This detection logic is dubious as it access internals of the env implementation >and it doesn't always work correctly. > >First of all it detect any valid environment as not being the default, so after >running `env default -a && saveenv` the board doesn't boot anymore as >`bootcmd` is then empty. >But it also fails in some other ways, for example it always detect a default >environment when redundant env is enabled on MMC, so in that case >`bootcmd` is overwritten on every boot. > >Instead of increasing the complexity of the detection just check if `bootcmd` >and `mcinitcmd` are set in the environment and set them if they are not. > >Signed-off-by: Alban Bedel >--- Applied to fsl-qoriq. Awaiting upstream Regards Priyanka