Linux mobile phone DIY. Library File topics. compatibility issues

Source: Internet
Author: User

Linux mobile phone DIY. Library File topics. compatibility issues

Grass papaya in--9

I. Sequencing

The compatibility problem of the software porting process has been a long history, and the factors are also very complex and diverse. In the actual process, we found a more confusing phenomenon, which is still a hateful floating point problem!

Ii. Important Notes

To facilitate a better understanding of this article, we provide the following link.
Full range of articles address, mobile phone application development column: http://blog.csdn.net/liwei_cmg
Related important outcome: http://play.younet.com/view.php? Tid = 24045

Iii. Initial Knowledge of compatibility issues

Xiaxin e600 is very similar to the Philips 968 mobile phone system, and the kernel version information is consistent,
Even so, keys may occur when the e600 uses the 968 QT library during the simulator porting process.
Obviously, this is why the hardware is different.
Whether the qnes simulator can be used on the e680 is unlikely, because the hardware difference between the two is too large.
Large. The following message describes how to run qnes on e680.

After adding some lib files specific to xiaxin e600, I still use the local QT library of e680.
When environment variables are set, the following error occurs during running:
#./R qnes
./Qnes: Relocation error:/MMC/mmca1/qnes/libcec. so.0: Undefined
Symbol: _ zthn184_n10qpopupmenu10updateitemei
The built-in QT library lacks functions. I copied the e600 libqte-mt.so.2 and fonts,
The operation is normal, but it is not normal. The prompt is as follows:

========= 240x320x16
Default2: cannot open/dev/TS (no such file or directory)
========================================================== ============================
Theme config file [../settings/theme/010gray. conf] doesn' t exist!
JPEG parameter struct mismatch: Library thinks size is 376, caller expects 372
Qimage: Measure fail to guess image format
Csmchecklimited: CSM size 0/655360
Csmconstruct: CSM info
Start 0x40551000
Size 655360
Cocould not open for writing '/settings/CEC. conf. new'
Qcopchannel: no client registered for Channel CEC/desktop, not sending stopstartupanimation ()
...
Qcopchannel: no client registered for Channel CEC/idlemanager, not sending hideinputmethod ()
...

On the e680 mobile phone, a new interface is displayed, with load and back in English. With the prompt, you can
It is clear that the compatibility problem is generated due to hardware differences between the two. However, it also confirms the inferences in the previous article,
The floating point format is different. At most, the floating point operation is incorrect, but the program can still be chained. What causes
The segmentation fault error is still directly from the hardware.

If I put the sysinfo of e600 on e680, the following prompt will be displayed:

========= 240x320x16
Default2: cannot open/dev/TS (no such file or directory)
========================================================== ============================
Theme config file [../settings/theme/010gray. conf] doesn' t exist!
Qimage: Measure fail to guess image format
Csmchecklimited: CSM size 0/655360
Create CSM: exist
Csmconstruct: CSM info
Start 0x40871000
Size 655360
Cocould not open for writing '/settings/CEC. conf. new'
Can't make qgfx for null pixmap

Qpainter: Begin: Unable to get graphics context
Segmentation fault

This segmentation fault may be from the display device. The specific reason is unknown, as shown in
Disassemble to learn more.

Iv. Test simple floating point operations

Compiling environment:
VFP gcc-3.3.2 glibc-2.3.2 binutils-2.15 kernel 2.4.20
FPA gcc-3.4.0 glibc-2.2.5 binutils-2.15 kernel 2.4.19

First, write a command line program as follows:
Int main ()
{
Float fvaluea = 1.9;
Float fvalueb = 2.8;
Int ivaluec = 8;
Int ivalued = 9999;
Printf ("Hello! My e680g! /N ");
Printf ("testvalue (4.7): % F/N", fvaluea + fvalueb );
Printf ("testvalue (9.9): % F/N", fvaluea + ivaluec );
Printf ("testvalue (10007): % d/N", ivaluec + ivalued );
Return 0;
}

1. VFP soft FP gcc-3.3.2 glibc-2.3.2 Compilation
Arm-Linux-gcc-O hellocmdvfp hello. c

2. FPA soft FP gcc-3.4.0 glibc-2.2.5 Compilation
(The parameter-msoft-float is the same)
Arm-Linux-gcc-O hellow.fpa hello. c

------------------------------------------------
E680 running result:

#./Hellocmdvfp
Hello! My e680g!
Testvalue (1, 4.7): 4.700000
Testvalue (1, 9.9): 9.900000
Testvalue (1, 10007): 10007

#./Hellow.fpa
Hello! My e680g!
Testvalue (4.7):-2.000000
Testvalue (9.9):-2.000000
Testvalue (1, 10007): 10007

Although FPA has a soft floating point, the floating point operation still fails.

------------------------------------------------
Running results of e600 and 968:

#./Hellocmdvfp
Hello! My e680g!
Testvalue (4.7):-2.000000
Testvalue (9.9):-2.000000
Testvalue (1, 10007): 10007

#./Hellow.fpa
Hello! My e680g!
Testvalue (4.7):-2.000000
Testvalue (9.9):-2.000000
Testvalue (1, 10007): 10007

-------------------------------------------------

Unexpectedly, on the e600, all the floating point operations went wrong. Later, the VFP format was used by accident.
Arm-Linux-G ++ Compilation:
Arm-Linux-G ++-O hellocmdvfp + hello. c

#./Hellocmdvfp +
Hello! My e680g!
Testvalue (1, 4.7): 4.700000
Testvalue (1, 9.9): 9.900000
Testvalue (1, 10007): 10007

It's strange that the e600 runs correctly again. So I used the FPA format for this encoding.
Translation:
Arm-Linux-G ++-O hellow.fpa + hello. c

Because gcc.3.4.0 is used, the following error occurs: libstdc ++ 6. so.0 and libgcc_s.so.1 are missing.
After the library file is added, the running result is as follows (e680, e600, and 968 are identical ):

#. Hellow.fpa +
Hello! My e680g!
Testvalue (4.7):-2.000000
Testvalue (9.9):-2.000000
Testvalue (1, 10007): 10007

Obviously, they are all incorrect.

V. Summary
 
The VFP format runs on e600 and 968, so there is no floating point bug. However, FPA is always
Yes. The VFP compiling environment is not compatible with the e600 and 968 library files during the compilation process.
To use the FPA compiling environment.
The floating point issue is confusing and requires further research.

 

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.