Migration and configuration of uclibc Library Based on Osip open-source database partysip server [2]

Source: Internet
Author: User

**************************************** **************************************** **************************************** ***
Easywave time: 2014.09.19

Category: Linux application-Sip Proxy Server partysip Declaration: reprinted, please keep the link

NOTE: If any error occurs, please correct it. These are my Learning Log articles ......

**************************************** **************************************** **************************************** ***

I. Introduction to uclibc

Uclibc is a small C standard library for Embedded Linux systems. Initially, uclibc was developed to support uClinux, a Linux version that does not require memory management units, so it is suitable for microcontroller systems. Uclibc is much smaller than the gnu c library (glibc), which is generally used in Linux distributions. glibc aims to support all the C standards of the largest range of hardware and kernel platforms, uclibc focuses on Embedded Linux. many functions can be selected based on space requirements. Uclibc runs on standard and MMU-free Linux systems and supports i386, x86 64, arm (big/little endian), avr32, Blackfin, h8300, m68k, MIPs (big/little endian), PowerPC, superh (big/little endian), iSCSI, and v850 processors.


Ii. uclibc download and version Selection

This is because partysip requires at least a uClib-0.9.30.x version or later to be supported and is not supported below this version. This is because the getifaddrs library function is required in partysip, which is not supported by uclibc of earlier versions. This blog post focuses on the uclibc of earlier versions. To port uclibc, first comeHttp://www.uclibc.orgDownload the latest uclibc library from the website, as shown in:


You can directly download the latest version for use. However, it is recommended that you download the latest version for embedded system development. This is because the latest version may have some bugs, it is not tested yet, and earlier versions won't or will have fewer bugs, isn't it? ClickDowndloadClick the hyperlink to go To the download page, as shown below:


In this example, we select uclibc-0.9.32.1.tar.bz2 as the basic C library of the partysip system. Let's take a look at the following functions in the ppl directory in the open source code of partysip that will use getifaddrs, as shown below:


The selected code calls the getifaddrs function in the C library of uclibc. The path is as follows:



3: uClibc-0.9.32.1 configuration and compilation

To compile the uClibc-0.9.32.1, you must first configure the uclibc compilation environment and some configuration items that must be configured. You can enter the configuration interface configuration by running the make menuconfig command, as shown in:


After you press enter, you will see the following interface, select your target platform, and select the ARM platform here, as shown below:


Go to target architecture features and options for further configuration. My specific configuration is as follows:


Note that the target platform I selected is arm926t. You need to configure it based on your specific platform and check whether your target platform supports FPU, if not[] Target CPU has a floating point Unit (FPU)Cancel the operation. Otherwise, an ill error occurs when FPU operations are used later, that is, an invalid command system error. You also need to set[*] Enable full c99 Math library supportIt is very important to select it. GoGeneral Library settingsConfigure as follows:


After you press enter, you can see the following configuration. We need to select pthread support. This is required. The configuration selected here is as follows:


Thread support (older (stable) version of linuxthreads)I chose a relatively conservative version here, that is, a relatively old stable thread version. GoNetworking SupportTo configure the network support function. It is very important to select the following Configuration:


Only these two configurations can be selected to support the getifaddrs library function. My configuration for this part is as follows:


IPv6 is enabled because IPv6 is required for partysip. Next, you need to enable the following configuration in string and stdio support, as shown below:


Next, you need to open the following configuration in big and tall, as shown in the selected section:


Finally, configure the cross-compilation toolchain and configure it in uclibc development and debugging support, as shown below:


Of course, there is another configuration option to be configured, but this requires different configuration for different cross-compilation tools, which will not be described in detail here. As follows:


Here I will select the default configuration !! Finally, it is compilation and installation. The compilation command is: make. The installation command is: make install. You can also directly use: Make; make install to compile and install it, as shown below:


If your cross-compilation tool is too old and too low, you need to modify the uclibc code and add a macro definition, as shown below:

# DEFINE _ User

The specific path is as follows:


Is the selected features. h file. The specific modifications are as follows:


Here, we will explain in detail how to configure and compile uclibc, as well as how to modify some methods of the Cross-compilation tool for earlier versions.

Migration and configuration of uclibc Library Based on Osip open-source database partysip server [2]

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.