<div dir="ltr"><div class="gmail_default" style="font-size:small">Hello,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I have completed the porting of the OFW code from FreeBSD to RTEMS.</div><div class="gmail_default" style="font-size:small">I do acknowledge the fact that we haven't decided on the directory for files</div><div class="gmail_default" style="font-size:small">to be placed in. The previous conversation had stopped quite a while ago.</div><div class="gmail_default" style="font-size:small">Christian suggested I work on the patch since that would also start the</div><div class="gmail_default" style="font-size:small">conversation again and also refactoring the patch to the correct directory</div><div class="gmail_default" style="font-size:small">will not be much of work.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">cpukit/libfreebsd was suggested as one of the directories to place the ported</div><div class="gmail_default" style="font-size:small">FreeBSD files. It is suggested to place all the source files under this directory.</div><div class="gmail_default" style="font-size:small">Since this will make the sync part easier. But this causes issues when porting</div><div class="gmail_default" style="font-size:small">BSP dependent files. Since RTEMS currently doesn't allow files in cpukit to</div><div class="gmail_default" style="font-size:small">reference bsp headers. I faced a similar issue during my porting process also.</div><div class="gmail_default" style="font-size:small">The OFW init function require bsp_fdt_get function to get a reference to the fdt</div><div class="gmail_default" style="font-size:small">blob. But I can't include the bsp/fdt.h header file from a source file under cpukit.</div><div class="gmail_default" style="font-size:small">We must decide the directory quickly because my project will import other</div><div class="gmail_default" style="font-size:small">FreeBSD sources like the pinmux driver for beaglebone into RTEMS.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><a href="https://github.com/gs-niteesh/rtems/commits/ofw_branch">https://github.com/gs-niteesh/rtems/commits/ofw_branch</a><br></div><div class="gmail_default" style="font-size:small">Please have a look at the last 6 patches for the ported work.</div><div class="gmail_default" style="font-size:small">Below is a short summary of the patch.</div><div class="gmail_default" style="font-size:small">* The openfirm.h is the OF interface that will provided to the user.</div><div class="gmail_default" style="font-size:small">* The openfirm.c contains the function definition for openfirm.h. The functions</div><div class="gmail_default" style="font-size:small">call the respective OFW_* functions which are responsible for choosing the correct implementation for OF interface.</div><div class="gmail_default" style="font-size:small">* ofw_if.h is the replacement for ofw_if.h in FreeBSD. This is an auto generated</div><div class="gmail_default" style="font-size:small">header in FreeBSD which choose the correct OF implementation(ofw_fdt, ofw_std,</div><div class="gmail_default" style="font-size:small">ofw_32bit, ofw_real). In RTEMS we directly map to the FDT implementation as</div><div class="gmail_default" style="font-size:small">suggested by Sebastian.</div><div class="gmail_default" style="font-size:small">* ofw_fdt.c contains the fdt implementation of OF interface.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small">Niteesh.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"></div></div>