Recently a new board handling migration issues, migration third-party libraries, such as x264, encountered a strange problem. This is a new board to get, is said relatively high cost, hence the need for verification program
Logically, big point compatibility third-party libraries are doing well, especially x264 similar to this.
But not to force the ARM chip, resulting in many problems, but also toss a long time, and now finally thoroughly understand the ins and outs, the next MARK:
In general, taking into account the configure command longer, we will create a batch file (for example: install.sh), and will need to command parameters into the file,
And then execute the batch file you can change the automatically generated makefile
Finally, make & make install
General cross compiler, the configuration can be modified:
CC=arm-linux-gcc ./configure --host=arm-linux --disable-avs --disable-swscale --disable-lavf --disable-ffms --disable-lsmash --prefix=/usr/h264_a9 --cross-prefix=arm-linux- --enable-static --enable-shared
In general, so OK. Then everything goes well, if not successful, usually behind configure the parameters in question
However, iMX6 contex-A9 arm-poky not the CPU, the compiler is said to be good package.
Of course, after a trial, or to find a solution, as follows:
CC=arm-poky-linux-gnueabi-gcc CFLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-fb/qt5/sysroots/cortexa9hf-neon-poky-linux-gnueabi" LDFLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-fb/qt5/sysroots/cortexa9hf-neon-poky-linux-gnueabi" ./configure --host=arm-poky-linux-gnueabi --disable-avs --disable-swscale --disable-lavf --disable-ffms --disable-lsmash --prefix=/usr/h264_a9 --cross-prefix=arm-poky-linux-gnueabi- --enable-static --enable-shared
Yes, from the length of the term, a lot more. . .
More specifically CFLAGS with LDFLAGS, I was here two parameters are the same.
Look under, this parameter is probably what information is contained
CFLAGS="-march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-fb/qt5/sysroots/cortexa9hf-neon-poky-linux-gnueabi"
"-March = armv7-a -mfpu = neon -mfloat-abi = hard -mcpu = cortex-a9" this with the type of CPU
"--Sysroot = / opt / fsl-imx-fb / qt5 / sysroots / cortexa9hf-neon-poky-linux-gnueabi" This is where the compiler stores path, the path must be complete (folder)
In other words, these parameters have to tell make, and can not be omitted
Yes, there is a thing, CFLAGS with LDFLAGS is to be placed before the ./configure, otherwise it is not right.
After completion of the implementation of this batch, you can see the changes in the document "config.mak" inside. (Note the contents of the box if it has changed)
Content box is mounted and our thoughts change overnight? If there are no instructions, install.sh did not write right, need to operate again
(Where the content is very important, many said online files directly modify .mak, seemingly difficult to modify success)
Well, so far, it is also the most critical place to toss a better time to write clearly, in fact, also the case. To write a bunch of parameters, or the compiler however, a variety of errors, an error message is difficult to look at the configuration parameters linked to the wrong! ! ! This is disgusting place. We can see, I have an error:
arm-poky-linux-gnueabi-as -I. -I. -o common/arm/cpu-a.o common/arm/cpu-a.S common/arm/cpu-a.S: Assembler messages: common/arm/cpu-a.S:32: Error: bad instruction `function cpu_neon_test' common/arm/cpu-a.S:33: Error: selected processor does not support `vadd.i16 q0,q0,q0' in ARM mode common/arm/cpu-a.S:35: Error: bad instruction `endfunc' common/arm/cpu-a.S:40: Error: bad instruction `function cpu_enable_armv7_counter,export=0'
arm-poky-linux-gnueabi-as: unrecognized option '-STACK_ALIGNMENT=4'
Anyway, a variety of weird errors, of course, there may be some big God suddenly know where the problem. . . .