We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2016-08-23 15:11:14 +0200

setting up libMAD in SFOS on ARM

The first step forward to gain full¹ MPEG audio support is to build libMAD from scratch.
Building from latest upstream version (libmad-0.15.1b from the year 2004) does not work² due to ARMv4 assembler code.
So you have to look for a patched 'downstream' version: link
Three files are needed: libmad_0.15.1b-8.dsc, libmad_0.15.1b.orig.tar.gz and libmad_0.15.1b-8.diff.gz
Next step after downloading in a directory is (on a PC system with dpkg-Package):

dpkg-source -x libmad_0.15.1b-8.dsc

this will create a folder named 'libmad-0.15.1b'. Enter it ('cd libmad-0.15.1b') and apply the needed patches:

export QUILT_PATCHES=debian/patches
quilt push -a
touch NEWS AUTHORS ChangeLog

after that perform 'autoreconf -fi' on Jolla1 device, and then

./configure --prefix=/usr --disable-static CFLAGS="-mcpu=cortex-a15 -mtune=cortex-a15 -mfpu=neon-vfpv4" && make

and as root

make install

to be able to build a libMAD enabled gstreamer-plugin-ugly1.0 later, it is necessary (as root) to

cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

now everything is installed on Jolla1 (for Jolla C: CFLAGS=" -mfpu=neon" as only cortex-a7 is available)

¹ layer 1, 2 and 3 and not just built-in layer 3 support
² unlike x86, ARM is not backwards compatible

setting up libMAD in SFOS on ARM

The first step forward to gain full¹ MPEG audio support is to build libMAD from scratch.
Building from latest upstream version (libmad-0.15.1b from the year 2004) does not work² due to ARMv4 assembler code.
So you have to look for a patched 'downstream' version: link
Three files are needed: libmad_0.15.1b-8.dsc, libmad_0.15.1b.orig.tar.gz and libmad_0.15.1b-8.diff.gz
Next step after downloading in a directory is (on a PC system with dpkg-Package):

dpkg-source -x libmad_0.15.1b-8.dsc

this will create a folder named 'libmad-0.15.1b'. Enter it ('cd libmad-0.15.1b') and apply the needed patches:

export QUILT_PATCHES=debian/patches
quilt push -a
touch NEWS AUTHORS ChangeLog

after that perform 'autoreconf -fi' autoreconf -fi on Jolla1 device, and then

./configure --prefix=/usr --disable-static CFLAGS="-mcpu=cortex-a15 -mtune=cortex-a15 -mfpu=neon-vfpv4" && make

and as root

make install

to be able to build a libMAD enabled gstreamer-plugin-ugly1.0 later, it is necessary (as root) to

cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

now everything is installed on Jolla1 (for Jolla C: CFLAGS=" -mfpu=neon" as only cortex-a7 is available)

¹ layer 1, 2 and 3 and not just built-in layer 3 support
² unlike x86, ARM is not backwards compatible

setting up libMAD in SFOS on ARM

The first step forward to gain full¹ MPEG audio support is to build libMAD from scratch.
Building from latest upstream version (libmad-0.15.1b from the year 2004) does not work² due to ARMv4 assembler code.
So you have to look for a patched 'downstream' version: link
Three files are needed: libmad_0.15.1b-8.dsc, libmad_0.15.1b.orig.tar.gz and libmad_0.15.1b-8.diff.gz
Next step after downloading in a directory is (on a PC system with dpkg-Package):

dpkg-source -x libmad_0.15.1b-8.dsc

this will create a folder named 'libmad-0.15.1b'. Enter it ('cd libmad-0.15.1b') and apply the needed patches:

export QUILT_PATCHES=debian/patches
quilt push -a
touch NEWS AUTHORS ChangeLog

after that perform autoreconf -fi on Jolla1 device, and then

./configure --prefix=/usr --disable-static CFLAGS="-mcpu=cortex-a15 -mtune=cortex-a15 -mfpu=neon-vfpv4" && make

and as root

make install

to be able to build a libMAD enabled gstreamer-plugin-ugly1.0 later, it is necessary (as root) to

cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

now everything is installed on Jolla1 (for Jolla C: CFLAGS=" -mfpu=neon" as only cortex-a7 is available)

¹ layer 1, 2 and 3 and not just built-in layer 3 support
² unlike x86, ARM is not backwards compatible

setting up libMAD in SFOS on ARM

The first step forward to gain full¹ MPEG audio support is to build libMAD from scratch.
Building from latest upstream version (libmad-0.15.1b from the year 2004) does not work² due to ARMv4 assembler code.
So you have to look for a patched 'downstream' version: link
Three files are needed: libmad_0.15.1b-8.dsc, libmad_0.15.1b.orig.tar.gz and libmad_0.15.1b-8.diff.gz
Next step after downloading in a directory is (on a PC system with dpkg-Package):

dpkg-source -x libmad_0.15.1b-8.dsc

this will create a folder named 'libmad-0.15.1b'. Enter it ('cd libmad-0.15.1b') and apply the needed patches:

export QUILT_PATCHES=debian/patches
quilt push -a
touch NEWS AUTHORS ChangeLog

after that perform autoreconf -fi on Jolla1 device, and then

./configure --prefix=/usr --disable-static CFLAGS="-mcpu=cortex-a15 -mtune=cortex-a15 -mfpu=neon-vfpv4" && make

and as root

make install

to be able to build a libMAD enabled gstreamer-plugin-ugly1.0 later, it is necessary (as root) to

cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

now everything is installed on Jolla1 (for Jolla C: CFLAGS=" -mfpu=neon" as only cortex-a7 is available)

¹ layer 1, 2 and 3 and not just built-in layer 3 support
² unlike x86, ARM is not backwards compatible

setting Setting up libMAD in SFOS on ARM

The first step forward to gain full¹ MPEG audio support is to build libMAD from scratch.
Building from latest upstream version (libmad-0.15.1b from the year 2004) does not work² due to ARMv4 assembler code.
So you have to look for a patched 'downstream' version: link
Three files are needed: libmad_0.15.1b-8.dsc, libmad_0.15.1b.orig.tar.gz and libmad_0.15.1b-8.diff.gz
Next step after downloading in a directory is (on a PC system with dpkg-Package):

dpkg-source -x libmad_0.15.1b-8.dsc

this will create a folder named 'libmad-0.15.1b'. Enter it ('cd libmad-0.15.1b') and apply the needed patches:

export QUILT_PATCHES=debian/patches
quilt push -a
touch NEWS AUTHORS ChangeLog

after that perform autoreconf -fi on Jolla1 device, and then

./configure --prefix=/usr --disable-static CFLAGS="-mcpu=cortex-a15 -mtune=cortex-a15 -mfpu=neon-vfpv4" && make

and as root

make install

to be able to build a libMAD enabled gstreamer-plugin-ugly1.0 later, it is necessary (as root) to

cat > /usr/lib/pkgconfig/mad.pc << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: mad
Description: MPEG audio decoder
Requires:
Version: 0.15.1b
Libs: -L${libdir} -lmad
Cflags: -I${includedir}
EOF

now everything is installed on Jolla1 (for Jolla C: CFLAGS=" -mfpu=neon" as only cortex-a7 is available)

¹ layer 1, 2 and 3 and not just built-in layer 3 support
² unlike x86, ARM is not backwards compatible