From: Andrew F. Davis Date: Fri, 5 Aug 2016 11:15:21 -0500 Subject: [U-Boot] [PATCH 2/4] ARM: AM57xx: Disable non-FIT based image loading for HS devices In-Reply-To: References: <20160801153026.7341-1-afd@ti.com> <20160801153026.7341-3-afd@ti.com> <20160804014838.GB9942@bill-the-cat> Message-ID: <5f53d7d9-e564-ee81-d926-d1113bce2955@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/03/2016 09:27 PM, Simon Glass wrote: > Hi Tom, > > On 3 August 2016 at 19:48, Tom Rini wrote: >> On Wed, Aug 03, 2016 at 07:16:12PM -0600, Simon Glass wrote: >>> Hi Andrew, >>> >>> On 1 August 2016 at 09:30, Andrew F. Davis wrote: >>>> Disable support for loading non-FIT images for AM57xx platforms using >>>> the high-security (HS) device variant. >>>> >>>> Signed-off-by: Andrew F. Davis >>>> --- >>>> configs/am57xx_hs_evm_defconfig | 1 + >>>> 1 file changed, 1 insertion(+) >>>> >>>> diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig >>>> index a4bfdd5..e6f3ebc 100644 >>>> --- a/configs/am57xx_hs_evm_defconfig >>>> +++ b/configs/am57xx_hs_evm_defconfig >>>> @@ -41,6 +41,7 @@ CONFIG_FIT=y >>>> CONFIG_SPL_OF_LIBFDT=y >>>> CONFIG_SPL_LOAD_FIT=y >>>> CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y >>>> +CONFIG_SPL_PANIC_ON_NON_FIT_IMAGE=y >>>> CONFIG_OF_LIST="am57xx-beagle-x15" >>>> CONFIG_DM_I2C=y >>>> CONFIG_DM_SPI=y >>> >>> Why do we need to panic? Can we use something like CONFIG_IMAGE_FORMAT_LEGACY? >> >> The need to panic is because if we cannot authenticate we are to fail as >> this is a secure device. > > We already have a hang in board_init_r() (SPL: failed to boot from all > boot devices). I'm suggesting that instead of panic we just return an > error from spl_parse_image_header() and let things work in the normal > way. > I think this will work also, it looks like CONFIG_IMAGE_FORMAT_LEGACY was made for a similar reason as we have here just for the non-SPL u-boot case. > Anyway, I don't mind if people prefer this approach. > I'll investigate this and see if it can be made into an SPL equivalent version. Thanks, Andrew > It's strange that this patch does not seem to be in patchwork. > > Regards, > Simon >