Re: zynqmpbif - sample
On 14/07/21, Michal Simek wrote: > Hi, > > On 7/14/21 9:37 AM, Jorge Ramirez-Ortiz, Foundries wrote: > > On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > >> On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > >>> On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > On 13/07/21, Michal Simek wrote: > > > > > > On 7/13/21 11:25 AM, Jorge Ramirez-Ortiz, Foundries wrote: > >> 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 : 0x09c0 > Image Size : 147216 bytes (147216 bytes packed) > PMUFW Size : 129792 bytes (129792 bytes packed) > Image Load : 0xfffc > Checksum : 0xfd15d661 > [u-boot](debian-sent)$ cat /tmp/bif > image : { > [pmufw_image, load=0xffdc] > /mnt/disk/u-boot-bins/zynqmp/pmu.elf > [destination_cpu=a53-0, load=0xfffc, 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 > >> Len: 08b8 Res: "BootHeader" > >> Len: 0040 Res: "ImageHeaderTable" > >> Len: 0024 Res: 0800 "ImageHeader > >> u-boot-spl.bin" > >> Len: 0040 Res: "PartitionHeader > >> u-boot-spl.bin.0" > >> Len: 0040 Res: 16c0 "PartitionHeader Null" > >> Len: 00020574 Res: "u-boot-spl.bin.0" > >>-- End of Dump > >> [INFO] : After align > >>-- Dump of Binary Image > >> Len: 08b8 Res: "BootHeader" > >>08c0 Len: 0040 Res: "ImageHeaderTable" > >>0900 Len: 0024 Res: 0800 "ImageHeader > >> u-boot-spl.bin" > >>1100 Len: 0040 Res: "PartitionHeader > >> u-boot-spl.bin.0" > >>1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > >>2800 Len: 00020574 Res: "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 > >> Len: 08b8 Res: "BootHeader" > >>08c0 Len: 0040 Res: "ImageHeaderTable" > >>0900 Len: 0024 Res: 0800 "ImageHeader > >> u-boot-spl.bin" > >>1100 Len: 0040 Res: "PartitionHeader > >> u-boot-spl.bin.0" > >>1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > >>2800 Len: 00020574 Res: "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
Re: zynqmpbif - sample
Hi, On 7/14/21 9:37 AM, Jorge Ramirez-Ortiz, Foundries wrote: > On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: >> On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: >>> On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: On 13/07/21, Michal Simek wrote: > > > On 7/13/21 11:25 AM, Jorge Ramirez-Ortiz, Foundries wrote: >> 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 : 0x09c0 Image Size : 147216 bytes (147216 bytes packed) PMUFW Size : 129792 bytes (129792 bytes packed) Image Load : 0xfffc Checksum : 0xfd15d661 [u-boot](debian-sent)$ cat /tmp/bif image : { [pmufw_image, load=0xffdc] /mnt/disk/u-boot-bins/zynqmp/pmu.elf [destination_cpu=a53-0, load=0xfffc, 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 >> Len: 08b8 Res: "BootHeader" >> Len: 0040 Res: "ImageHeaderTable" >> Len: 0024 Res: 0800 "ImageHeader >> u-boot-spl.bin" >> Len: 0040 Res: "PartitionHeader >> u-boot-spl.bin.0" >> Len: 0040 Res: 16c0 "PartitionHeader Null" >> Len: 00020574 Res: "u-boot-spl.bin.0" >>-- End of Dump >> [INFO] : After align >>-- Dump of Binary Image >> Len: 08b8 Res: "BootHeader" >>08c0 Len: 0040 Res: "ImageHeaderTable" >>0900 Len: 0024 Res: 0800 "ImageHeader >> u-boot-spl.bin" >>1100 Len: 0040 Res: "PartitionHeader >> u-boot-spl.bin.0" >>1140 Len: 0040 Res: 16c0 "PartitionHeader Null" >>2800 Len: 00020574 Res: "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 >> Len: 08b8 Res: "BootHeader" >>08c0 Len: 0040 Res: "ImageHeaderTable" >>0900 Len: 0024 Res: 0800 "ImageHeader >> u-boot-spl.bin" >>1100 Len: 0040 Res: "PartitionHeader >> u-boot-spl.bin.0" >>1140 Len: 0040 Res: 16c0 "PartitionHeader Null" >>2800 Len: 00020574 Res: "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
Re: zynqmpbif - sample
On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > > On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > > > On 13/07/21, Michal Simek wrote: > > > > > > > > > > > > On 7/13/21 11:25 AM, Jorge Ramirez-Ortiz, Foundries wrote: > > > > > 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 : 0x09c0 > > > > >>> Image Size : 147216 bytes (147216 bytes packed) > > > > >>> PMUFW Size : 129792 bytes (129792 bytes packed) > > > > >>> Image Load : 0xfffc > > > > >>> Checksum : 0xfd15d661 > > > > >>> [u-boot](debian-sent)$ cat /tmp/bif > > > > >>> image : { > > > > >>> [pmufw_image, load=0xffdc] > > > > >>> /mnt/disk/u-boot-bins/zynqmp/pmu.elf > > > > >>> [destination_cpu=a53-0, load=0xfffc, 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 > > > > > Len: 08b8 Res: "BootHeader" > > > > > Len: 0040 Res: "ImageHeaderTable" > > > > > Len: 0024 Res: 0800 "ImageHeader > > > > > u-boot-spl.bin" > > > > > Len: 0040 Res: "PartitionHeader > > > > > u-boot-spl.bin.0" > > > > > Len: 0040 Res: 16c0 "PartitionHeader Null" > > > > > Len: 00020574 Res: "u-boot-spl.bin.0" > > > > >-- End of Dump > > > > > [INFO] : After align > > > > >-- Dump of Binary Image > > > > > Len: 08b8 Res: "BootHeader" > > > > >08c0 Len: 0040 Res: "ImageHeaderTable" > > > > >0900 Len: 0024 Res: 0800 "ImageHeader > > > > > u-boot-spl.bin" > > > > >1100 Len: 0040 Res: "PartitionHeader > > > > > u-boot-spl.bin.0" > > > > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > > > > >2800 Len: 00020574 Res: "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 > > > > > Len: 08b8 Res: "BootHeader" > > > > >08c0 Len: 0040 Res: "ImageHeaderTable" > > > > >0900 Len: 0024 Res: 0800 "ImageHeader > > > > > u-boot-spl.bin" > > > > >1100 Len: 0040 Res: "PartitionHeader > > > > > u-boot-spl.bin.0" > > > > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > > > > >2800 Len: 00020574 Res: "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
Re: zynqmpbif - sample
On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > > On 13/07/21, Michal Simek wrote: > > > > > > > > > On 7/13/21 11:25 AM, Jorge Ramirez-Ortiz, Foundries wrote: > > > > 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 : 0x09c0 > > > >>> Image Size : 147216 bytes (147216 bytes packed) > > > >>> PMUFW Size : 129792 bytes (129792 bytes packed) > > > >>> Image Load : 0xfffc > > > >>> Checksum : 0xfd15d661 > > > >>> [u-boot](debian-sent)$ cat /tmp/bif > > > >>> image : { > > > >>> [pmufw_image, load=0xffdc] > > > >>> /mnt/disk/u-boot-bins/zynqmp/pmu.elf > > > >>> [destination_cpu=a53-0, load=0xfffc, 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 > > > > Len: 08b8 Res: "BootHeader" > > > > Len: 0040 Res: "ImageHeaderTable" > > > > Len: 0024 Res: 0800 "ImageHeader > > > > u-boot-spl.bin" > > > > Len: 0040 Res: "PartitionHeader > > > > u-boot-spl.bin.0" > > > > Len: 0040 Res: 16c0 "PartitionHeader Null" > > > > Len: 00020574 Res: "u-boot-spl.bin.0" > > > >-- End of Dump > > > > [INFO] : After align > > > >-- Dump of Binary Image > > > > Len: 08b8 Res: "BootHeader" > > > >08c0 Len: 0040 Res: "ImageHeaderTable" > > > >0900 Len: 0024 Res: 0800 "ImageHeader > > > > u-boot-spl.bin" > > > >1100 Len: 0040 Res: "PartitionHeader > > > > u-boot-spl.bin.0" > > > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > > > >2800 Len: 00020574 Res: "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 > > > > Len: 08b8 Res: "BootHeader" > > > >08c0 Len: 0040 Res: "ImageHeaderTable" > > > >0900 Len: 0024 Res: 0800 "ImageHeader > > > > u-boot-spl.bin" > > > >1100 Len: 0040 Res: "PartitionHeader > > > > u-boot-spl.bin.0" > > > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > > > >2800 Len: 00020574 Res: "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
Re: zynqmpbif - sample
On 13/07/21, Jorge Ramirez-Ortiz, Foundries wrote: > On 13/07/21, Michal Simek wrote: > > > > > > On 7/13/21 11:25 AM, Jorge Ramirez-Ortiz, Foundries wrote: > > > 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 : 0x09c0 > > >>> Image Size : 147216 bytes (147216 bytes packed) > > >>> PMUFW Size : 129792 bytes (129792 bytes packed) > > >>> Image Load : 0xfffc > > >>> Checksum : 0xfd15d661 > > >>> [u-boot](debian-sent)$ cat /tmp/bif > > >>> image : { > > >>> [pmufw_image, load=0xffdc] > > >>> /mnt/disk/u-boot-bins/zynqmp/pmu.elf > > >>> [destination_cpu=a53-0, load=0xfffc, 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 > > > Len: 08b8 Res: "BootHeader" > > > Len: 0040 Res: "ImageHeaderTable" > > > Len: 0024 Res: 0800 "ImageHeader > > > u-boot-spl.bin" > > > Len: 0040 Res: "PartitionHeader > > > u-boot-spl.bin.0" > > > Len: 0040 Res: 16c0 "PartitionHeader Null" > > > Len: 00020574 Res: "u-boot-spl.bin.0" > > >-- End of Dump > > > [INFO] : After align > > >-- Dump of Binary Image > > > Len: 08b8 Res: "BootHeader" > > >08c0 Len: 0040 Res: "ImageHeaderTable" > > >0900 Len: 0024 Res: 0800 "ImageHeader > > > u-boot-spl.bin" > > >1100 Len: 0040 Res: "PartitionHeader > > > u-boot-spl.bin.0" > > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > > >2800 Len: 00020574 Res: "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 > > > Len: 08b8 Res: "BootHeader" > > >08c0 Len: 0040 Res: "ImageHeaderTable" > > >0900 Len: 0024 Res: 0800 "ImageHeader > > > u-boot-spl.bin" > > >1100 Len: 0040 Res: "PartitionHeader > > > u-boot-spl.bin.0" > > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > > >2800 Len: 00020574 Res: "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? > > > > > > I tested it and it works fine for me. Take a look at the code what > > exactly is > > > >
Re: zynqmpbif - sample
On 13/07/21, Michal Simek wrote: > > > On 7/13/21 11:25 AM, Jorge Ramirez-Ortiz, Foundries wrote: > > 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 : 0x09c0 > >>> Image Size : 147216 bytes (147216 bytes packed) > >>> PMUFW Size : 129792 bytes (129792 bytes packed) > >>> Image Load : 0xfffc > >>> Checksum : 0xfd15d661 > >>> [u-boot](debian-sent)$ cat /tmp/bif > >>> image : { > >>> [pmufw_image, load=0xffdc] /mnt/disk/u-boot-bins/zynqmp/pmu.elf > >>> [destination_cpu=a53-0, load=0xfffc, 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 > > Len: 08b8 Res: "BootHeader" > > Len: 0040 Res: "ImageHeaderTable" > > Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" > > Len: 0040 Res: "PartitionHeader > > u-boot-spl.bin.0" > > Len: 0040 Res: 16c0 "PartitionHeader Null" > > Len: 00020574 Res: "u-boot-spl.bin.0" > >-- End of Dump > > [INFO] : After align > >-- Dump of Binary Image > > Len: 08b8 Res: "BootHeader" > >08c0 Len: 0040 Res: "ImageHeaderTable" > >0900 Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" > >1100 Len: 0040 Res: "PartitionHeader > > u-boot-spl.bin.0" > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > >2800 Len: 00020574 Res: "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 > > Len: 08b8 Res: "BootHeader" > >08c0 Len: 0040 Res: "ImageHeaderTable" > >0900 Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" > >1100 Len: 0040 Res: "PartitionHeader > > u-boot-spl.bin.0" > >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" > >2800 Len: 00020574 Res: "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? > > > I tested it and it works fine for me. Take a look at the code what > exactly is > > [u-boot]$ cat /tmp/bif > image : { > [pmufw_image] /mnt/disk/u-boot-bins/zynqmp/pmu.bin > [destination_cpu=a53-0, load=0xfffc, bootloader] > spl/u-boot-spl-align.bin > } > > Didn't try the latest bootgen but format is changing over years but none > is updating this tool. Feel free to take a look at it.
Re: zynqmpbif - sample
On 7/13/21 11:25 AM, Jorge Ramirez-Ortiz, Foundries wrote: > 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 : 0x09c0 >>> Image Size : 147216 bytes (147216 bytes packed) >>> PMUFW Size : 129792 bytes (129792 bytes packed) >>> Image Load : 0xfffc >>> Checksum : 0xfd15d661 >>> [u-boot](debian-sent)$ cat /tmp/bif >>> image : { >>> [pmufw_image, load=0xffdc] /mnt/disk/u-boot-bins/zynqmp/pmu.elf >>> [destination_cpu=a53-0, load=0xfffc, 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 > Len: 08b8 Res: "BootHeader" > Len: 0040 Res: "ImageHeaderTable" > Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" > Len: 0040 Res: "PartitionHeader > u-boot-spl.bin.0" > Len: 0040 Res: 16c0 "PartitionHeader Null" > Len: 00020574 Res: "u-boot-spl.bin.0" >-- End of Dump > [INFO] : After align >-- Dump of Binary Image > Len: 08b8 Res: "BootHeader" >08c0 Len: 0040 Res: "ImageHeaderTable" >0900 Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" >1100 Len: 0040 Res: "PartitionHeader > u-boot-spl.bin.0" >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" >2800 Len: 00020574 Res: "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 > Len: 08b8 Res: "BootHeader" >08c0 Len: 0040 Res: "ImageHeaderTable" >0900 Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" >1100 Len: 0040 Res: "PartitionHeader > u-boot-spl.bin.0" >1140 Len: 0040 Res: 16c0 "PartitionHeader Null" >2800 Len: 00020574 Res: "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? I tested it and it works fine for me. Take a look at the code what exactly is [u-boot]$ cat /tmp/bif image : { [pmufw_image] /mnt/disk/u-boot-bins/zynqmp/pmu.bin [destination_cpu=a53-0, load=0xfffc, bootloader] spl/u-boot-spl-align.bin } Didn't try the latest bootgen but format is changing over years but none is updating this tool. Feel free to take a look at it. Thanks, Michal
Re: zynqmpbif - sample
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 : 0x09c0 > > Image Size : 147216 bytes (147216 bytes packed) > > PMUFW Size : 129792 bytes (129792 bytes packed) > > Image Load : 0xfffc > > Checksum : 0xfd15d661 > > [u-boot](debian-sent)$ cat /tmp/bif > > image : { > > [pmufw_image, load=0xffdc] /mnt/disk/u-boot-bins/zynqmp/pmu.elf > > [destination_cpu=a53-0, load=0xfffc, 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 Len: 08b8 Res: "BootHeader" Len: 0040 Res: "ImageHeaderTable" Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" Len: 0040 Res: "PartitionHeader u-boot-spl.bin.0" Len: 0040 Res: 16c0 "PartitionHeader Null" Len: 00020574 Res: "u-boot-spl.bin.0" -- End of Dump [INFO] : After align -- Dump of Binary Image Len: 08b8 Res: "BootHeader" 08c0 Len: 0040 Res: "ImageHeaderTable" 0900 Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" 1100 Len: 0040 Res: "PartitionHeader u-boot-spl.bin.0" 1140 Len: 0040 Res: 16c0 "PartitionHeader Null" 2800 Len: 00020574 Res: "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 Len: 08b8 Res: "BootHeader" 08c0 Len: 0040 Res: "ImageHeaderTable" 0900 Len: 0024 Res: 0800 "ImageHeader u-boot-spl.bin" 1100 Len: 0040 Res: "PartitionHeader u-boot-spl.bin.0" 1140 Len: 0040 Res: 16c0 "PartitionHeader Null" 2800 Len: 00020574 Res: "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
Re: zynqmpbif - sample
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 : 0x09c0 > Image Size : 147216 bytes (147216 bytes packed) > PMUFW Size : 129792 bytes (129792 bytes packed) > Image Load : 0xfffc > Checksum : 0xfd15d661 > [u-boot](debian-sent)$ cat /tmp/bif > image : { > [pmufw_image, load=0xffdc] /mnt/disk/u-boot-bins/zynqmp/pmu.elf > [destination_cpu=a53-0, load=0xfffc, bootloader] spl/u-boot-spl.bin > } awesome, exactly what I needed to start with. > > Thanks, > Michal
Re: zynqmpbif - sample
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 : 0x09c0 Image Size : 147216 bytes (147216 bytes packed) PMUFW Size : 129792 bytes (129792 bytes packed) Image Load : 0xfffc Checksum : 0xfd15d661 [u-boot](debian-sent)$ cat /tmp/bif image : { [pmufw_image, load=0xffdc] /mnt/disk/u-boot-bins/zynqmp/pmu.elf [destination_cpu=a53-0, load=0xfffc, bootloader] spl/u-boot-spl.bin } Thanks, Michal