<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Richi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In your log it says:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Image Type: ARM Linux Kernel Image (gzip compressed)</span><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">At least for our zedboard devices we use the following main options for mkimage.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">mkimage -A arm -O rtems -T kernel
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Which yields for me:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Image Type: ARM RTEMS Kernel Image (gzip compressed)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">IIRC the difference between -O rtems and -O linux is subtle, but maybe that helps.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"> Jan<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>From:</b> devel <devel-bounces@rtems.org> <b>On Behalf Of
</b>Richi Dubey<br>
<b>Sent:</b> Wednesday, April 14, 2021 3:22 PM<br>
<b>To:</b> Kinsey Moore <kinsey.moore@oarcorp.com><br>
<b>Cc:</b> rtems-devel@rtems.org <devel@rtems.org><br>
<b>Subject:</b> Re: Booting a rtems exe on Zynq UltraScale+ MPSoC ZCU106 board<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Trying to boot directly from the .img file also fails:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">ZynqMP> tftpboot 0x3000000 rdubey/sp01.img <br>
Using ethernet@ff0e0000 device <br>
TFTP from server 172.19.0.3; our IP address is 172.19.2.40 <br>
Filename 'rdubey/sp01.img'. <br>
Load address: 0x3000000 <br>
Loading: #### <br>
6.1 MiB/s <br>
done <br>
Bytes transferred = 50978 (c722 hex) <br>
ZynqMP> bootm 0x3000000 ; reset <br>
## Booting kernel from Legacy Image at 03000000 ... <br>
Image Name: RTEMS <br>
Image Type: ARM Linux Kernel Image (gzip compressed) <br>
Data Size: 50914 Bytes = 49.7 KiB <br>
Load Address: 00300000 <br>
Entry Point: 00300000 <br>
Verifying Checksum ... OK <br>
Uncompressing Kernel Image ... OK <br>
FDT and ATAGS support not compiled in - hanging <br>
### ERROR ### Please RESET the board ### <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What can I do now?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Apr 14, 2021 at 6:11 PM Kinsey Moore <<a href="mailto:kinsey.moore@oarcorp.com">kinsey.moore@oarcorp.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">If you’re only running RTEMS, you should be able to drop the FDT commands since that what appears to be causing the problem and I don’t think that the arm/xilinx_zynqmp
BSP uses it at all.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Kinsey<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> <o:p></o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<b><span lang="EN-US">From:</span></b><span lang="EN-US"> Richi Dubey <<a href="mailto:richidubey@gmail.com" target="_blank">richidubey@gmail.com</a>>
<br>
<b>Sent:</b> Wednesday, April 14, 2021 01:01<br>
<b>To:</b> Kinsey Moore <<a href="mailto:kinsey.moore@oarcorp.com" target="_blank">kinsey.moore@oarcorp.com</a>>;
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a> <<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a>><br>
<b>Subject:</b> Booting a rtems exe on Zynq UltraScale+ MPSoC ZCU106 board<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">Hi,<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">I followed the <a href="https://docs.rtems.org/branches/master/user/bsps/bsps-arm.html#xilinx-zynqmp" target="_blank">
8.2.23 docs</a> to build rtems for the xilinx_zynqmp_ultra96 bsp since it was the only bsp corresponding to xilinx-zynqmp in the rtems-bsp. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">Then I followed the boot via Uboot section <a href="https://docs.rtems.org/branches/master/user/bsps/bsps-arm.html#boot-via-u-boot" target="_blank">
8.2.1.1 on docs</a>, but the uboot on zcu106 does not have a run loadfdt command, and its alternative is fdt addr [address]. But something is wrong, I cannot run the sp01.img file:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">With fdt:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">------------------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">ZynqMP> tftpboot 0x3000000 rdubey/sp01.img <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">Using ethernet@ff0e0000 device <br>
TFTP from server 172.19.0.3; our IP address is 172.19.2.40 <br>
Filename 'rdubey/sp01.img'. <br>
Load address: 0x3000000 <br>
Loading: #### <br>
6.9 MiB/s <br>
done <br>
Bytes transferred = 50978 (c722 hex) <br>
ZynqMP> fdt addr 0x2A00000 <br>
ZynqMP> bootm 0x3000000 - 0x2A00000 ; reset <br>
## Booting kernel from Legacy Image at 03000000 ... <br>
Image Name: RTEMS <br>
Image Type: ARM Linux Kernel Image (gzip compressed) <br>
Data Size: 50914 Bytes = 49.7 KiB <br>
Load Address: 00300000 <br>
Entry Point: 00300000 <br>
Verifying Checksum ... OK <br>
## Flattened Device Tree blob at 02a00000 <br>
Booting using the fdt blob at 0x2a00000 <br>
Uncompressing Kernel Image ... OK <br>
Loading Device Tree to 0000000007ff1000, end 0000000007fff257 ... OK <br>
fdt_find_or_add_subnode: chosen: FDT_ERR_BADSTRUCTURE <br>
ERROR: /chosen node create failed <br>
- must RESET the board to recover. <br>
<br>
FDT creation failed! hanging...### ERROR ### Please RESET the board ### <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">------------------------------<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">With loading the system.dtb that I generally use for loading yocto linux images:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">---------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">ZynqMP> tftpboot 0x2A00000 rdubey/system.dtb <br>
Using ethernet@ff0e0000 device <br>
TFTP from server 172.19.0.3; our IP address is 172.19.253.142 <br>
Filename 'rdubey/system.dtb'. <br>
Load address: 0x2a00000 <br>
Loading: ###T # <br>
8.8 KiB/s <br>
done <br>
Bytes transferred = 45656 (b258 hex) <br>
ZynqMP> tftpboot 0x3000000 rdubey/sp01.img <br>
Using ethernet@ff0e0000 device <br>
TFTP from server 172.19.0.3; our IP address is 172.19.253.142 <br>
Filename 'rdubey/sp01.img'. <br>
Load address: 0x3000000 <br>
Loading: #### <br>
1.7 MiB/s <br>
done <br>
Bytes transferred = 50978 (c722 hex) <br>
ZynqMP> bootm 0x3000000 - 0x2A00000 ; reset <br>
## Booting kernel from Legacy Image at 03000000 ... <br>
Image Name: RTEMS <br>
Image Type: ARM Linux Kernel Image (gzip compressed) <br>
Data Size: 50914 Bytes = 49.7 KiB <br>
Load Address: 00300000 <br>
Entry Point: 00300000 <br>
Verifying Checksum ... OK <br>
## Flattened Device Tree blob at 02a00000 <br>
Booting using the fdt blob at 0x2a00000 <br>
Uncompressing Kernel Image ... OK <br>
Loading Device Tree to 0000000007ff1000, end 0000000007fff257 ... OK <br>
<br>
Starting kernel ... <br>
<br>
"Synchronous Abort" handler, esr 0x02000000 <br>
elr: ffffffff90593000 lr : 0000000010081868 (reloc) <br>
elr: 0000000000300000 lr : 000000007fdee868 <br>
x0 : 0000000000000000 x1 : 0000000000000000 <br>
x2 : 0000000007ff1000 x3 : 0000000000000000 <br>
x4 : 0000000000300000 x5 : 0000000000000000 <br>
x6 : 0000000000000008 x7 : 0000000000000000 <br>
x8 : 000000007dda0650 x9 : 0000000001008000 <br>
x10: 000000000a200023 x11: 0000000000000002 <br>
x12: 0000000000000002 x13: 00000000000096f4 <br>
x14: 000000007dda06ac x15: 000000007fdee224 <br>
x16: 0000000000000002 x17: 0000000007fff258 <br>
x18: 000000007ddacde8 x19: 000000007fead720 <br>
x20: 0000000000000000 x21: 0000000000000400 <br>
x22: 000000000000071f x23: 000000007fdeedb8 <br>
x24: 0000000000000003 x25: 000000007ddbd378 <br>
x26: 000000007fe9ac18 x27: 0000000000300000 <br>
x28: 0000000003000040 x29: 000000007dda0790 <br>
<br>
Resetting CPU ... <br>
<br>
### ERROR ### Please RESET the board ### <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">---------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:36.0pt">
<span lang="EN-US">What might be going wrong? zcu106 is a multi processor board, so do I need to do something special to run the sp01 test? I have not tested any other .exe (or .img) so far.<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>