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