Transplant librt library to uClinux

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.