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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BFA8C07E95 for ; Tue, 13 Jul 2021 09:25:43 +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 7ACE560FF1 for ; Tue, 13 Jul 2021 09:25:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ACE560FF1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 339C183155; Tue, 13 Jul 2021 11:25:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io 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; unprotected) header.d=foundries.io header.i=@foundries.io header.b="hkU4Ca33"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 05778832D5; Tue, 13 Jul 2021 11:25:38 +0200 (CEST) Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 1C38D831CA for ; Tue, 13 Jul 2021 11:25:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wr1-x42a.google.com with SMTP id t5so15712339wrw.12 for ; Tue, 13 Jul 2021 02:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PTYwQ/t+PMm5r6dKc7AkPXdvOEvwNvLWPmAbYJTjhgQ=; b=hkU4Ca33lqvUnvb/+jpVE3nxsRe1mNzHbrXKeZg658ZVRQa8qsnmr3U9sqYsJKncxw yHWX6qJ1IAUaY7maN32odbOJ8asq6XDYw5ifpykxzcud4zFatBwRJsyzZ+2dwpFDEr8P djmiNGSin9gNOznuCyozaNv8GTpEmsCDA0pnnLbWELq7/w2gupxESUgYlOWBefkaUneB PkH0seYehkmiKF/jgdBtnyFQQ2LDY4TyUm8xBdNPVKiJHn9rYbyzxVCsh1pI5nVg0OTB IlEXwwOf4PetZtISJF5L6wGhlymoTtxjveDksxiQnFPldvW/tU2nXNmGgplg/wP9HeCo we0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PTYwQ/t+PMm5r6dKc7AkPXdvOEvwNvLWPmAbYJTjhgQ=; b=pife8at55PnRDaPuRe6tHka9RWRxFUYl4b1doHVaLZCz+lW5gfnuVj3ncfGybO3BKZ AVc141zIkX9+owXL5yrBGrso0ZJPa8hEoMjdzd9xTKlfnCrVs8C5FwaPtOeioXSN7k7Z KqWT6tVwnwcN01yeeM9lua52AWOdEXPeOx0y0RV8LVR5x0pEhDAB5GnUhFQjw+sVHBL9 iCfAsFsXXX9QFXeNZfV1BiF3fTlkBJfjRolZen9qe66ipDAG9YAFAVK/j7u5qHhbjvvX ugaHCQSQI9hXQPpnZktqVsTx8Z9Yo336sUOSsgGKxhZ46GAoIGAfMSi/K+3PjtG1WtCv lPTw== X-Gm-Message-State: AOAM5336dsUXYCI2l10ob+Lgivfpph8L1mHWv1gOqFttWC+0ctKkN3Di 35+h9jKvOlaWNL1PRv/28QG89w== X-Google-Smtp-Source: ABdhPJzE50df+q/wjZBWfBurKWdXVMihO/wCcYRc9C6aLSxk9fgvSGBEMWj1tEKfwqRYIeXj0D9wWw== X-Received: by 2002:a5d:604e:: with SMTP id j14mr4303002wrt.399.1626168329546; Tue, 13 Jul 2021 02:25:29 -0700 (PDT) Received: from trex (138.red-79-146-80.dynamicip.rima-tde.net. [79.146.80.138]) by smtp.gmail.com with ESMTPSA id v15sm1782830wmj.39.2021.07.13.02.25.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Jul 2021 02:25:29 -0700 (PDT) From: "Jorge Ramirez-Ortiz, Foundries" X-Google-Original-From: "Jorge Ramirez-Ortiz, Foundries" Date: Tue, 13 Jul 2021 11:25:28 +0200 To: "Jorge Ramirez-Ortiz, Foundries" Cc: Michal Simek , u-boot@lists.denx.de, ricardo@foundries.io Subject: Re: zynqmpbif - sample Message-ID: <20210713092528.GA25779@trex> References: <20210712174043.GA18753@trex> <20210713073229.GA9771@trex> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210713073229.GA9771@trex> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > On 13/07/21, Michal Simek wrote: > > Hi, > > > > On 7/12/21 7:40 PM, Jorge Ramirez-Ortiz, Foundries wrote: > > > hi Michal, > > > > > > Would you have some sample/reference code to generate a SPL boot image > > > using zynqmpbif instead of zynqmpimage? I cant find any documentation > > > and I see no option to enable it (I was expecting to find some config > > > in Makefile.spl but I see none). > > > > > > What is the expected way of building these images? > > > > Alex implemented it for Xilinx bif format after origin zynqmpimage > > format. But usage is just like this. > > > > [u-boot](debian-sent)$ ./tools/mkimage -T zynqmpbif -d /tmp/bif > > /tmp/boot.bin > > Image Type : Xilinx ZynqMP Boot Image support > > Image Offset : 0x000009c0 > > Image Size : 147216 bytes (147216 bytes packed) > > PMUFW Size : 129792 bytes (129792 bytes packed) > > Image Load : 0xfffc0000 > > Checksum : 0xfd15d661 > > [u-boot](debian-sent)$ cat /tmp/bif > > image : { > > [pmufw_image, load=0xffdc0000] /mnt/disk/u-boot-bins/zynqmp/pmu.elf > > [destination_cpu=a53-0, load=0xfffc0000, bootloader] spl/u-boot-spl.bin > > } > > awesome, exactly what I needed to start with. So I can boot using the steps you mentioned above. But shouldnt the same bif work with bootgen? ****** Xilinx Bootgen v2019.2 **** Build date : Oct 23 2019-22:59:42 ** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved. [TRACE] : Command Line parsing started [TRACE] : Command: -arch zynqmp -image ./bif -w -o bootbif.bin -log trace [INFO] : Command line parsing completed successfully [TRACE] : BIF File: ./bif [TRACE] : BIF file parsing started [TRACE] : Setting PMU FW Image file as pmu.elf [INFO] : BIF file parsing completed successfully [INFO] : Parsing Partition Data to Image [INFO] : Building image - image [INFO] : Building the Partition Header Table [INFO] : After build -- Dump of Binary Image ---- 00000000 Len: 000008b8 Res: 00000000 "BootHeader" 00000000 Len: 00000040 Res: 00000000 "ImageHeaderTable" 00000000 Len: 00000024 Res: 00000800 "ImageHeader u-boot-spl.bin" 00000000 Len: 00000040 Res: 00000000 "PartitionHeader u-boot-spl.bin.0" 00000000 Len: 00000040 Res: 000016c0 "PartitionHeader Null" 00000000 Len: 00020574 Res: 00000000 "u-boot-spl.bin.0" -- End of Dump [INFO] : After align -- Dump of Binary Image ---- 00000000 Len: 000008b8 Res: 00000000 "BootHeader" 000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable" 00000900 Len: 00000024 Res: 00000800 "ImageHeader u-boot-spl.bin" 00001100 Len: 00000040 Res: 00000000 "PartitionHeader u-boot-spl.bin.0" 00001140 Len: 00000040 Res: 000016c0 "PartitionHeader Null" 00002800 Len: 00020574 Res: 00000000 "u-boot-spl.bin.0" -- End of Dump [INFO] : Partition Information: [INFO] : Image: u-boot-spl.bin [INFO] : Partition 0: u-boot-spl.bin.0, Size: 132467 [INFO] : After Link -- Dump of Binary Image ---- 00000000 Len: 000008b8 Res: 00000000 "BootHeader" 000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable" 00000900 Len: 00000024 Res: 00000800 "ImageHeader u-boot-spl.bin" 00001100 Len: 00000040 Res: 00000000 "PartitionHeader u-boot-spl.bin.0" 00001140 Len: 00000040 Res: 000016c0 "PartitionHeader Null" 00002800 Len: 00020574 Res: 00000000 "u-boot-spl.bin.0" -- End of Dump however when I boot and inspect the processor state, xsdb returns "APU L2 cache is held in reset" Since the functionality to support RSA authentication is missing from mkimage (I'll have to add that), I would first like to see it functional with SPL using bootgen. However the same bif doesnt even boot - is this to be expected? also the layouts generated from the bif using mkimage and bootgen are completely different (it seems that naively I expected them to be the same); is there any information on the different layouts used for the bootrom? thanks Jorge > > > > > > Thanks, > > Michal