A timer is required for a recent + uClinux project, but the timing accuracy is not very high. So I thought of the librt library. The POSIX 100b. 3 standard timer and Message Queue interface implemented by the librt library are widely supported in the Linux 2.6 kernel. Some later versions of the 2.4 kernel also provide the librt library in patch form.
UClinux 2.4.x does not provide a ready-made library. Although uclibc0.9.7 provides the library, it cannot be directly used because the 2.4 kernel does not support it. No POSIX timer patch for uClinux has been found on the Internet. Considering that uClinux originated from Linux, the POSIX timer patch of Linux is used to name uClinux, so that the kernel of uClinux 2.4 also supports POSIX timer. This enables the library to be used in uClinux 2.4.
The following is a brief migration procedure for librt.
1. SlaveHttp://home.concepts-ict.nl /~ RHDV/posix.htmlDownload POSIX timer patch. Select a newer version of Linux 2.4.8. Unfortunately, my uClinux 2.4 kernel version is 2.4.x (x> 16), and the directory structure is different. You cannot directly use the patch command to patch the kernel.
The patch is made using 'diff'. You can also manually modify the file based on the patch content. Since I am an ARM platform (nommu), I only need to modify the arm and armnmmu directories under linux2.4.x/ARCH. (Of course, I can use the modified results to create a patch file for uClinux 2.4.x)
2. Download uclibc0.9.7 and recompile the library to obtain the library. A static library. Remember to modify the include path of the Configuration System in make config to uClinux/linux2.4.x.
3. Use the kernel after patch and the compiled librt. A to develop real-time applications on uClinux. If you have high requirements on timer accuracy, you can consider porting the RT, soureforge has a corresponding open source.
If you need POSIX timer patch for uClinux 2.4 and librt. A, follow the instructions. Detailed patches and librt library compilation processes are not easy to publish.