From ad352a9c433439c40ad02b022796eea1a2f231bd Mon Sep 17 00:00:00 2001 From: CrawX Date: Sat, 29 Mar 2014 16:38:32 +0100 Subject: [PATCH 1/4] core/linux-imx6-wandboard-dt add freescale specific headers to /usr/include --- core/linux-imx6-wandboard-dt/PKGBUILD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/linux-imx6-wandboard-dt/PKGBUILD b/core/linux-imx6-wandboard-dt/PKGBUILD index f379404dc..ecfb119ab 100644 --- a/core/linux-imx6-wandboard-dt/PKGBUILD +++ b/core/linux-imx6-wandboard-dt/PKGBUILD @@ -218,6 +218,12 @@ _package-headers() { mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm" cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h" + # add freescale specific headers to uapi in /usr/include/linux + mkdir -p "${pkgdir}/usr/include/linux" + for f in mxcfb.h mxc_v4l2.h ipu.h; do + cp "include/uapi/linux/$f" "${pkgdir}/usr/include/linux" + done + # copy in Kconfig files for i in `find . -name "Kconfig*"`; do mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'` From 5ded1ad28739dec5addcdca46d1d4b3da596c60d Mon Sep 17 00:00:00 2001 From: CrawX Date: Sat, 29 Mar 2014 16:58:59 +0100 Subject: [PATCH 2/4] alarm/xbmc-imx fixed build alarm/xbmc-imx add dependency on linux-headers-imx6, provided by linux-imx6-cubox, linux-imx6-cubox-dt and linux-imx6-wandboard-dt core/linux-imx* added linux-headers-imx6 to provides, bumped PKGREL --- alarm/xbmc-imx/PKGBUILD | 27 +++++++++++++++------------ core/linux-imx6-cubox-dt/PKGBUILD | 4 ++-- core/linux-imx6-cubox/PKGBUILD | 4 ++-- core/linux-imx6-wandboard-dt/PKGBUILD | 4 ++-- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/alarm/xbmc-imx/PKGBUILD b/alarm/xbmc-imx/PKGBUILD index 10c21f524..45ecc96ab 100644 --- a/alarm/xbmc-imx/PKGBUILD +++ b/alarm/xbmc-imx/PKGBUILD @@ -12,7 +12,7 @@ pkgdesc="A software media player and entertainment hub for digital media for sel arch=('armv7h') url="http://xbmc.org" license=('GPL' 'custom') -depends=('fribidi' 'lzo2' 'smbclient' 'libtiff' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'libplist' 'swig' 'taglib' 'libxslt' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'linux-headers-imx6-cubox' ) +depends=('fribidi' 'lzo2' 'smbclient' 'libtiff' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'libplist' 'swig' 'taglib' 'libxslt' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'linux-headers-imx6' ) makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'java-runtime-headless') optdepends=( 'lirc: remote controller support' @@ -69,19 +69,22 @@ build() { # Bootstrapping XBMC ./bootstrap - _kernel_release="$(pacman -Q linux-headers-imx6-cubox | grep -Eo "[^\ ]+$")" - - - # dirty: copy headers from kernel as we need those but apart from that want to use the ones in /usr/include - KERNELSRC=/usr/src/linux-${_kernel_release} - mkdir -p linux-includes/include/linux - for f in mxcfb.h mxc_v4l2.h ipu.h; do - cp "${KERNELSRC}/include/linux/${f}" linux-includes/include/linux/ - done - # Configuring XBMC export PYTHON_VERSION=2 # external python v2 - INCLUDES="-I${srcdir}/${_gitname}/linux-includes/include -I/opt/fsl/include" + + INCLUDES="-I/opt/fsl/include" + # check for cubox-i, copy some headers and add them to the INCLUDES + _kernel_release="$(pacman -Q linux-headers-imx6-cubox | grep -Eo "[^\ ]+$")" + if [[ $? -eq 0 && -n "$_kernel_release" ]]; then + # dirty: copy headers from kernel as we need those but apart from that want to use the ones in /usr/include + KERNELSRC=/usr/src/linux-${_kernel_release} + mkdir -p linux-includes/include/linux + for f in mxcfb.h mxc_v4l2.h ipu.h; do + cp "${KERNELSRC}/include/linux/${f}" linux-includes/include/linux/ + done + INCLUDES="$INCLUDES -I${srcdir}/${_gitname}/linux-includes/include" + fi + export CFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib" export CPPFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib" export CXXFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib" diff --git a/core/linux-imx6-cubox-dt/PKGBUILD b/core/linux-imx6-cubox-dt/PKGBUILD index b1289d183..a2b998720 100644 --- a/core/linux-imx6-cubox-dt/PKGBUILD +++ b/core/linux-imx6-cubox-dt/PKGBUILD @@ -15,7 +15,7 @@ _srcname=linux-linaro-stable-mx6-${_commit} _kernelname=${pkgname#linux} _basekernel=3.10 pkgver=${_basekernel}.30 -pkgrel=10 +pkgrel=11 arch=('arm') url="http://www.kernel.org/" license=('GPL2') @@ -138,7 +138,7 @@ package_linux-imx6-cubox-dt() { package_linux-headers-imx6-cubox-dt() { pkgdesc="Header files and scripts for building modules for linux kernel - i.MX6 cubox-i" - provides=("linux-headers=${pkgver}") + provides=("linux-headers=${pkgver}" "linux-headers-imx6=${pkgver}") conflicts=('linux-headers-omap' 'linux-headers-trimslice') install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" diff --git a/core/linux-imx6-cubox/PKGBUILD b/core/linux-imx6-cubox/PKGBUILD index eece0e559..2184da720 100644 --- a/core/linux-imx6-cubox/PKGBUILD +++ b/core/linux-imx6-cubox/PKGBUILD @@ -15,7 +15,7 @@ _srcname=linux-imx6-${_commit} _kernelname=${pkgname#linux} _basekernel=3.0 pkgver=${_basekernel}.35 -pkgrel=16 +pkgrel=17 arch=('arm') url="http://www.kernel.org/" license=('GPL2') @@ -140,7 +140,7 @@ package_linux-imx6-cubox() { package_linux-headers-imx6-cubox() { pkgdesc="Header files and scripts for building modules for linux kernel - i.MX6 cubox-i" - provides=("linux-headers=${pkgver}") + provides=("linux-headers=${pkgver}" "linux-headers-imx6=${pkgver}") conflicts=('linux-headers-omap' 'linux-headers-trimslice') install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" diff --git a/core/linux-imx6-wandboard-dt/PKGBUILD b/core/linux-imx6-wandboard-dt/PKGBUILD index ecfb119ab..ffe859446 100644 --- a/core/linux-imx6-wandboard-dt/PKGBUILD +++ b/core/linux-imx6-wandboard-dt/PKGBUILD @@ -9,7 +9,7 @@ _srcname=linux-wandboard_imx_3.10.17_1.0.0_beta _kernelname=${pkgbase#linux} _desc="i.MX6 Wandboard" pkgver=3.10.17 -pkgrel=2 +pkgrel=3 rcnrel=wand6 arch=('armv7h') url="http://www.kernel.org/" @@ -119,7 +119,7 @@ _package() { _package-headers() { pkgdesc="Header files and scripts for building modules for linux kernel - ${_desc}" - provides=("linux-headers=${pkgver}") + provides=("linux-headers=${pkgver}" "linux-headers-imx6=${pkgver}") conflicts=('linux-headers-omap' 'linux-headers-trimslice') install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}" From b03a2f69f77534fd9a5fed1be55849becfae8e05 Mon Sep 17 00:00:00 2001 From: CrawX Date: Sat, 29 Mar 2014 18:03:24 +0100 Subject: [PATCH 3/4] alarm/xbmc-imx fix build on wandboard. Add small patch to work around xbmc-imx6/xbmc#51 --- alarm/xbmc-imx/PKGBUILD | 13 +++++++++---- alarm/xbmc-imx/fix-wandboard.patch | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 alarm/xbmc-imx/fix-wandboard.patch diff --git a/alarm/xbmc-imx/PKGBUILD b/alarm/xbmc-imx/PKGBUILD index 45ecc96ab..649c3e667 100644 --- a/alarm/xbmc-imx/PKGBUILD +++ b/alarm/xbmc-imx/PKGBUILD @@ -6,7 +6,7 @@ buildarch=4 pkgname=xbmc-imx-git -pkgver=13.20140324 +pkgver=13.20140329 pkgrel=1 pkgdesc="A software media player and entertainment hub for digital media for select imx6 systems" arch=('armv7h') @@ -24,10 +24,12 @@ provides=("xbmc") conflicts=("xbmc") install="xbmc.install" source=('xbmc.service' + 'fix-wandboard.patch' 'runxbmc') md5sums=('07096dfd530cc432fa6073ee1a32e7f6' - '56ced80db9c37d86fa732961ad2cfe4c') + '4ddb9c84c81b03da4e6aae46d7e82edb' + '730ac095a89b05c3c2cf2dd93947cb5c') # master branch of xbmc-imx6 organization. Modified by Stephan "wolgar" Rafin, Chris "koying" Browet, Rudi "rudi-warped" Ihle and smallint _gitname="xbmc" @@ -54,6 +56,9 @@ prepare() { cd "${srcdir}/${_gitname}" + # fix running on wandboard-dt + patch -p0 <../fix-wandboard.patch + # fix lsb_release dependency sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/arch-release:' xbmc/utils/SystemInfo.cpp @@ -74,8 +79,8 @@ build() { INCLUDES="-I/opt/fsl/include" # check for cubox-i, copy some headers and add them to the INCLUDES - _kernel_release="$(pacman -Q linux-headers-imx6-cubox | grep -Eo "[^\ ]+$")" - if [[ $? -eq 0 && -n "$_kernel_release" ]]; then + _kernel_release="$(pacman -Qs linux-headers-imx6-cubox | head -n1 | grep -Eo "[^\ ]+$")" + if [[ -n "$_kernel_release" ]]; then # dirty: copy headers from kernel as we need those but apart from that want to use the ones in /usr/include KERNELSRC=/usr/src/linux-${_kernel_release} mkdir -p linux-includes/include/linux diff --git a/alarm/xbmc-imx/fix-wandboard.patch b/alarm/xbmc-imx/fix-wandboard.patch new file mode 100644 index 000000000..c9cdd2b4b --- /dev/null +++ b/alarm/xbmc-imx/fix-wandboard.patch @@ -0,0 +1,20 @@ +diff --git xbmc/windowing/egl/EGLNativeTypeIMX.cpp xbmc/windowing/egl/EGLNativeTypeIMX.cpp +index 4ffa708..e85a633 100644 +--- xbmc/windowing/egl/EGLNativeTypeIMX.cpp ++++ xbmc/windowing/egl/EGLNativeTypeIMX.cpp +@@ -48,11 +48,15 @@ bool CEGLNativeTypeIMX::CheckCompatibility() + { + std::string strName; + std::string str2 ("mxc_sdc_fb"); ++ std::string str3 ("platform:fb.24"); + get_sysfs_str("/sys/class/graphics/fb0/device/modalias", strName); + StringUtils::Trim(strName); + size_t found = strName.find(str2); + if (found!=std::string::npos) + return true; ++ found = strName.find(str3); ++ if (found!=std::string::npos) ++ return true; + return false; + } + From fb92b0af6447a6363100796b44977fbb9c3d24d5 Mon Sep 17 00:00:00 2001 From: CrawX Date: Sun, 30 Mar 2014 12:59:26 +0200 Subject: [PATCH 4/4] core/linux-imx6* add freescale-specific userspace headers to /usr/include/linux alarm/xbmc-imx remove dirty build conditionals alarm/xbmc-imx remove linux-headers-imx6 to makedepends --- alarm/xbmc-imx/PKGBUILD | 16 ++-------------- core/linux-imx6-cubox-dt/PKGBUILD | 11 +++++++++++ core/linux-imx6-cubox/PKGBUILD | 12 ++++++++++++ core/linux-imx6-wandboard-dt/PKGBUILD | 12 +++++++++--- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/alarm/xbmc-imx/PKGBUILD b/alarm/xbmc-imx/PKGBUILD index 649c3e667..ef2aded3e 100644 --- a/alarm/xbmc-imx/PKGBUILD +++ b/alarm/xbmc-imx/PKGBUILD @@ -12,8 +12,8 @@ pkgdesc="A software media player and entertainment hub for digital media for sel arch=('armv7h') url="http://xbmc.org" license=('GPL' 'custom') -depends=('fribidi' 'lzo2' 'smbclient' 'libtiff' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'libplist' 'swig' 'taglib' 'libxslt' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6' 'linux-headers-imx6' ) -makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'java-runtime-headless') +depends=('fribidi' 'lzo2' 'smbclient' 'libtiff' 'libpng' 'libcdio' 'yajl' 'libmariadbclient' 'libjpeg-turbo' 'libsamplerate' 'libssh' 'libmicrohttpd' 'sdl_image' 'python2' 'libass' 'libmpeg2' 'libmad' 'libmodplug' 'jasper' 'rtmpdump' 'unzip' 'libbluray' 'libnfs' 'afpfs-ng' 'libshairport' 'avahi' 'bluez-libs' 'tinyxml' 'libplist' 'swig' 'taglib' 'libxslt' 'libfslvpuwrap' 'gpu-viv-bin-mx6q-fb' 'libcec-imx6') +makedepends=('boost' 'cmake' 'gperf' 'nasm' 'zip' 'udisks' 'upower' 'git' 'autoconf' 'java-runtime-headless' 'linux-headers-imx6') optdepends=( 'lirc: remote controller support' 'udisks: automount external drives' @@ -78,18 +78,6 @@ build() { export PYTHON_VERSION=2 # external python v2 INCLUDES="-I/opt/fsl/include" - # check for cubox-i, copy some headers and add them to the INCLUDES - _kernel_release="$(pacman -Qs linux-headers-imx6-cubox | head -n1 | grep -Eo "[^\ ]+$")" - if [[ -n "$_kernel_release" ]]; then - # dirty: copy headers from kernel as we need those but apart from that want to use the ones in /usr/include - KERNELSRC=/usr/src/linux-${_kernel_release} - mkdir -p linux-includes/include/linux - for f in mxcfb.h mxc_v4l2.h ipu.h; do - cp "${KERNELSRC}/include/linux/${f}" linux-includes/include/linux/ - done - INCLUDES="$INCLUDES -I${srcdir}/${_gitname}/linux-includes/include" - fi - export CFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib" export CPPFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib" export CXXFLAGS="-Ofast -mfloat-abi=hard -mfpu=vfpv3-d16 -mtls-dialect=gnu -march=armv7-a -mtune=cortex-a9 -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 $INCLUDES -Wl,-rpath,/opt/fsl/lib -L/opt/fsl/lib" diff --git a/core/linux-imx6-cubox-dt/PKGBUILD b/core/linux-imx6-cubox-dt/PKGBUILD index a2b998720..e19c1a15a 100644 --- a/core/linux-imx6-cubox-dt/PKGBUILD +++ b/core/linux-imx6-cubox-dt/PKGBUILD @@ -237,6 +237,17 @@ package_linux-headers-imx6-cubox-dt() { mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm" cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h" + #make uapi headers, some of them are needed for vpu/ipu usage + mkdir -p "${srcdir}/headers" + make headers_install ARCH=$KARCH INSTALL_HDR_PATH="${srcdir}/headers" + + + # copy freescale specific headers to /usr/include/linux + mkdir -p "${pkgdir}/usr/include/linux" + for f in "$srcdir/headers/include/linux"/mxc*.h "$srcdir/headers/include/linux/ipu.h"; do + cp "$f" "${pkgdir}/usr/include/linux" + done + # copy in Kconfig files for i in `find . -name "Kconfig*"`; do mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'` diff --git a/core/linux-imx6-cubox/PKGBUILD b/core/linux-imx6-cubox/PKGBUILD index 2184da720..790d3a737 100644 --- a/core/linux-imx6-cubox/PKGBUILD +++ b/core/linux-imx6-cubox/PKGBUILD @@ -248,6 +248,18 @@ package_linux-headers-imx6-cubox() { mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm" cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h" + + #make uapi headers, some of them are needed for vpu/ipu usage + mkdir -p "${srcdir}/headers" + make headers_install ARCH=$KARCH INSTALL_HDR_PATH="${srcdir}/headers" + + + # copy freescale specific headers to /usr/include/linux + mkdir -p "${pkgdir}/usr/include/linux" + for f in "$srcdir/headers/include/linux"/mxc*.h "$srcdir/headers/include/linux/ipu.h"; do + cp "$f" "${pkgdir}/usr/include/linux" + done + # copy in Kconfig files for i in `find . -name "Kconfig*"`; do mkdir -p "${pkgdir}"/usr/src/linux-${_kernver}/`echo ${i} | sed 's|/Kconfig.*||'` diff --git a/core/linux-imx6-wandboard-dt/PKGBUILD b/core/linux-imx6-wandboard-dt/PKGBUILD index ffe859446..0cdabb993 100644 --- a/core/linux-imx6-wandboard-dt/PKGBUILD +++ b/core/linux-imx6-wandboard-dt/PKGBUILD @@ -218,10 +218,16 @@ _package-headers() { mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/mm" cp fs/xfs/xfs_sb.h "${pkgdir}/usr/src/linux-${_kernver}/fs/xfs/xfs_sb.h" - # add freescale specific headers to uapi in /usr/include/linux + + #make uapi headers, some of them are needed for vpu/ipu usage + mkdir -p "${srcdir}/headers" + make headers_install ARCH=$KARCH INSTALL_HDR_PATH="${srcdir}/headers" + + + # copy freescale specific headers to /usr/include/linux mkdir -p "${pkgdir}/usr/include/linux" - for f in mxcfb.h mxc_v4l2.h ipu.h; do - cp "include/uapi/linux/$f" "${pkgdir}/usr/include/linux" + for f in "$srcdir/headers/include/linux"/mxc*.h "$srcdir/headers/include/linux/ipu.h"; do + cp "$f" "${pkgdir}/usr/include/linux" done # copy in Kconfig files