{"id":1219,"date":"2018-05-23T11:01:58","date_gmt":"2018-05-23T19:01:58","guid":{"rendered":"http:\/\/www.beyond-circuits.com\/wordpress\/?p=1219"},"modified":"2018-05-23T11:01:58","modified_gmt":"2018-05-23T19:01:58","slug":"zynq-fsbl-the-saga-continues","status":"publish","type":"post","link":"https:\/\/www.beyond-circuits.com\/wordpress\/2018\/05\/zynq-fsbl-the-saga-continues\/","title":{"rendered":"ZYNQ FSBL &#8211; The Saga Continues"},"content":{"rendered":"<h1>Building an FSBL for the ZC706 using Petalinux<\/h1>\n<p>Well, another blog post on how to build a modified FSBL for ZYNQ. Using the patch which I demonstrated how to make in the previous post and a modified version of the fsbl_%.bbappend file which I received from the Xilinx Forum post regarding this I was able to make a working FSBL with my patch. The modified fsbl_%.bbappend file is shown below.<\/p>\n<pre># Force to use embeddedsw repository\r\nEXTERNALXSCTsrc=\"\"\r\nEXTERNALXSCTSRC_BUILD = \"\"\r\n\r\n#Enable FSBL debug flags\r\nYAML_COMPILER_FLAGS_append = \" -DFSBL_DEBUG\"\r\n\r\n# Patch FSBL\r\nSRC_URI_append += \"file:\/\/0001-fsbl.patch\"\r\nFILESEXTRAPATHS_prepend := \"${THISDIR}\/files:\"\r\n<\/pre>\n<p>Here are the steps used to create the FSBL<\/p>\n<p>First run petalinux-create to build a petalinux project. Point it at the appropriate BSP.<\/p>\n<pre>$ petalinux-create --type project --source \/tools\/xilinx\/bsp\/xilinx-zc706-v2017.4-final.bsp<\/pre>\n<p>Then copy the fsbl_%.bbappend file into the project.<\/p>\n<pre>$ cp fsbl_%.bbappend xilinx-zc706-2017.4\/project-spec\/meta-user\/recipes-bsp\/fsbl\r\n$ cp 0001-fsbl.patch xilinx-zc706-2017.4\/project-spec\/meta-user\/recipes-bsp\/fsbl\/files<\/pre>\n<p>Next run a petalinux-build to make the bootloader<\/p>\n<pre>$ petalinux-build --project xilinx-zc706-2017.4 -c bootloader<\/pre>\n<p>When all is said and done you will get a zynq_fsbl file in xilinx-zc706-2017.4\/images\/linux\/zynq_fsbl.elf.<\/p>\n<p>This procedure works for 2017.4 and 2016.4.<\/p>\n<h1>Building from the git checkout<\/h1>\n<p>Alternatively you can build from the git checkout where you made the patch. This seems much simpler but it doesn&#8217;t work for me with petalinux 2016.4.<\/p>\n<p>From the embeddesw checkout directory cd to lib\/sw_apps\/zynq_fsbl_src and run the following command.<\/p>\n<pre>$ make BOARD=zc706<\/pre>\n<p>This should build the file fsbl.elf in the src directory.<\/p>\n<p>When I try to build this for 2016.4 I get a bunch of errors. They differ depending on how I set the CC variable on the make command line. If I don&#8217;t set it I get errors about arm-xilinx-eabi-gcc: Command not found. If I set CC=arm-none-eabi-gcc then I get this<\/p>\n<pre>arm-none-eabi-gcc    -c pcap.c -o pcap.o -I..\/misc\/\/ps7_cortexa9_0\/include -I.\r\nIn file included from pcap.c:96:0:\r\npcap.h:65:21: fatal error: xdevcfg.h: No such file or directory\r\ncompilation terminated.\r\nMakefile:97: recipe for target 'pcap.o' failed\r\n<\/pre>\n<p>If anyone knows what to do about this I&#8217;m all ears.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Building an FSBL for the ZC706 using Petalinux Well, another blog post on how to build a modified FSBL for ZYNQ. Using the patch which I demonstrated how to make in the previous post and a modified version of the &hellip; <a href=\"https:\/\/www.beyond-circuits.com\/wordpress\/2018\/05\/zynq-fsbl-the-saga-continues\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1219","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts\/1219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1219"}],"version-history":[{"count":1,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts\/1219\/revisions"}],"predecessor-version":[{"id":1220,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/posts\/1219\/revisions\/1220"}],"wp:attachment":[{"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beyond-circuits.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}