03-24-2017 10:34 AM
So, I'm getting used to Petalinux, and understand how to patch things like the linux kernel and u-boot.
However, I also need to customzie the FSBL build. For example, I want to add some more debug messages, turn on debug logging (which depends on a #define), and also do a debug build.
On the first two items, I had hoped that it would be a similar process as with the kernel and u-boot...i.e. make code changes in the git clone, create the patches, make changes to the appropriate bbappend file, yada yada.
However, I can't seem to do this with the fsbl, as unless I'm missing something, it doesn't use a local git repository. It appears to fetch the files...but not in a way that allows patching.
How do I 1) patch the source code to my liking and 2) Actually build in debug mode?
I know I could always create an FSBL in the Xilinx SDK, shuttle it over to my images directory, and petalinx-image against it...but it seems like petalinux should allow me to do as I describe. If I'm going to use petalinux, I'd prefer to use it for everything.
In fact as far as building in debug mode, I'm not sure exactly how to do that for Linux or u-boot. Is this possible within petalinux? If so, how?
03-26-2017 08:43 AM
Please check whether any of the below Answer Record is useful for you
03-28-2017 08:15 AM
Ummmm....I'm not sure these are pointing to what you intended.
The first one seems to point to nowhere, as I end up at the support home page. The second are the release notes for petalinux 2016.3.
Is that what you meant to do? Am I missing something?
03-29-2017 02:43 AM
I have the exact same issue with the inconsistency.
You can use the "older" method: Creating a New Zynq FSBL.
And modify the source there and build.
Then add it to your boot image using:
petalinux-package --boot --u-boot --fsbl directory/to/fsbl.elf
You'd probably need to add the FSBL as an "application" to allow it to compile with the rest of the project - a bit of of a manual process. Hope it helps.
03-29-2017 03:35 AM
09-21-2017 05:20 AM
If your Petalinux equal or later than 2017.1, the following solution should work for you
I have worked with this solution on Petalinux 2017.2
11-15-2017 05:27 AM - edited 11-15-2017 05:27 AM
thanks @sherman_hsu, that's a great tip!
I'm just wondering how to create such a patch file.
Let's say I want to enable the debug info output of the FSBL on the COM port. In SDK, this could be done as follows :
Now if I understand you correctly, this can be somehow done from Petalinux too, using some patch file.
Now I'm wondering how to create such patch file?
Also, can the actual FSBL source be seen somewhere in a petalinux project? Like in the build folder?
11-15-2017 10:28 AM
I haven't worked with the FSBL very much in the Yocto builds but you can find the source after building in the build dir, something like this:
and it gets the source from, https://github.com/Xilinx/embeddedsw.git. the rule is in meta-xilinx-tools/recipes-bsp/fsbl
The other way I used to do it was generate the build using the hdf and the hsi tool. I'm not really sure where this source came from but once it was generated I could just manually modify it and build it with make. It's probably better to figure out the Yocto method at this point.
11-16-2017 08:40 PM
Refer http://www.wiki.xilinx.com/PetaLinux+Yocto+Tips I have added some steps to enable the debugs in FSBL and PMUFW.
Also here the steps to create the git patch.
$ git clone https://github.xilinx.com/embeddedsw/embeddedsw.git $ git checkout tags/xilinx-v2017.2 $ git branch myembsw_2017.2 $ git checkout myembsw_2017.2 $ vim lib/sw_apps/zynqmp_pmufw/src/xpfw_mod_em.c //Modify the source $ git add lib/sw_apps/zynqmp_pmufw/src/xpfw_mod_em.c $ git commit -s $ git format-patch -1
03-03-2018 01:49 AM
I must be stupid, but I still don't get it. Just like the people above I want the FSBL to be more verbose. I cannot believe I have to create a patch file for that. A simple -DFSBL_DEBUG compiler flag should be enough. So using petalinux 2017.4 I tried:
$ mkdir -p <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl
I don't think I need a files dir, but if I do, please explain.
$ vim <plnx-proj-root>/project-spec/meta-user/recipes-bsp/fsbl/fsbl_%.bbappend
#Enable appropriate FSBL debug flags YAML_COMPILER_FLAGS_append = " -DFSBL_DEBUG"
Why would this fail? It builds alright, but I get no verbose output.
03-09-2018 07:56 PM - edited 03-11-2018 01:58 PM
After you enable the debug flags run this following commands. Refer http://www.wiki.xilinx.com/PetaLinux+Yocto+Tips
$ petalinux-build -x mrproper $ rm -rf <plnx-proj-root>/components/plnx_workspace $ petalinux-build
03-10-2018 12:40 PM
03-16-2018 06:20 AM
Well, I had tried that and it seemed not to work. That was why I was asking here in the first place.
But now I see that it does work. I'm beginning to think that maybe the FSBL was writing to one of my other UARTs which are implemented in the PL.
Thanks for sticking with me.