Categories: LinuxN2B1NAS

Compiling x264 for arm926ej-s in the LG NAS

Trying to compile the x264 library (x264-snapshot-20120805-2245-stable)  for the ARM926 in my LG NAS. Running ./configure seems to give a binary which won’t link with ffmpeg. Config.log in ffmpeg gives the following errors:

/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d26′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d22′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d2′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d20′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d24′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `d0′
/usr/lib/gcc/arm-linux-gnueabi/4.3.2/../../../libx264.so: undefined reference to `q1′
collect2: ld returned 1 exit status
ERROR: libx264 not found

Here’s some random notes I used to make it work:

The .configure for x264 seems to default to cortex9 w/ Neon FPU… not present in my LGNAS. Run configure with the following options:

./configure –disable-neon –enable-gpl  –prefix=/usr –enable-static –enable-shared  –disable-asm 

As a result I hand edited the config.mak as follows:

ARCH=ARM
MYCPU=arm926ej-s
SYS=LINUX
CC=gcc
CFLAGS=-Wshadow -O3 -fno-fast-math -Wall -I. -I$(SRCPATH) -std=gnu99 -mcpu=${MYCPU} -mtune=${MYCPU} -fPIC -fomit-frame-pointer -fno-tree-vectorize

Where did I get arm926ej-s ? cat /proc/cpuinfo
According to this post; the LGNAS CPU (Marvell “Kirkwood”) does not have VFP support (would be listed as vfp under “Features” in cpuinfo) therefore do not specify a -mfpu= in the CFLAGS.

Do ‘make’; do ‘make install-lib-shared’.

In ffmpeg; pass the following configure command:

./configure –enable-gpl –enable-libx264 –enable-libfaac –enable-nonfree –enable-libxvid –prefix=/usr –disable-stripping –disable-armv6 –disable-altivec –disable-vis –enable-shared –disable-static

Did the same edit to ffmpeg’s config.mak as done in x264 config.mak.

Zitt

Share
Published by
Zitt

Recent Posts

Star Trek LX-8: EPROM Labels

On Feb 15, 2023; ingo333 of Pinside released a bug fix update to the Williams…

3 years ago

Stern Godzilla UFO mods

UFO enhancement mod for Stern Godzilla pinball machines using clear pop bumper parts from Pinball-Mods.com.

3 years ago

Review: Zagg InvisibleShield Fusion Curve 1/5 stars

As a pre-order user for the Pixel 7 Pro; I wanted a screen protector and…

3 years ago

Star Trek v3.0: EPROM Labels

On April 5, 2020; ChadH of Pinside (aka PinballCode.com) released a much needed rule update…

6 years ago

Monster Bash: Mummy Painting

This is part 2 of the Monster Bash figure painting series. For part 1; please…

6 years ago

WMS Monster Bash: Creature Painting

Earlier in the month; I purchased a great condition 1998 Williams Monster Bash pinball machine…

6 years ago