From patchwork Wed Jul 27 13:53:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 653313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rzxKv5MQwz9t1v for ; Wed, 27 Jul 2016 23:53:55 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b=WFgFTBdS; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 36CF8896AC; Wed, 27 Jul 2016 13:53:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tlb0Xm2m3hS9; Wed, 27 Jul 2016 13:53:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 272A789D40; Wed, 27 Jul 2016 13:53:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3DAEF1C1574 for ; Wed, 27 Jul 2016 13:53:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3C7F186786 for ; Wed, 27 Jul 2016 13:53:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lFyXFW+BmBWr for ; Wed, 27 Jul 2016 13:53:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by whitealder.osuosl.org (Postfix) with ESMTPS id BF81C8683F for ; Wed, 27 Jul 2016 13:53:46 +0000 (UTC) Received: by mail-wm0-f51.google.com with SMTP id i5so63740757wmg.0 for ; Wed, 27 Jul 2016 06:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dd4x/IfeWzXJVXydS86mT7LQKbiI6lqpl3Z3XEH4wRc=; b=WFgFTBdSfoRcId9WSB6dT5Qx309bF4UtwG17guKGRybNGhCDsL1QJf4lY+AlHrqnpf Jh73RLT3c8aFqNSLGGngvqLgFNYIgLq9oT6hMYzz/MHS5ejHVKQg6HEv1l1FE/XeCuno SGz65ykDxzyq23v7/UrRFM7FQhBeDDq4aeMuA48DjsSXMcOh9/59aeDJiwNYPe0XXvfT kTQfFuPjICoTEIQQTG8WjTDxPJuy6Yc82AJx440e2fZJI6D32tzkPjivUcOc5VpNXMAK otXz7mMphU4NCfybZ5VL5mem3dTQX3oEu7i/DQfptp0dHKsbqpQFygx4cDMdPYa/tIiY 7Vug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dd4x/IfeWzXJVXydS86mT7LQKbiI6lqpl3Z3XEH4wRc=; b=Z8ifyzfEcAf9iJ/aCtGVro0x3tSMKRjj6uEN3YYYazcJpU3MoTQgi5Y3CtwR8oRA1/ OZFXeltLHINd70iqOIzwaX6rEfYAdu6Z8onS4cCjBpO2OEAVyxisohlJfpyvDsNeYWi3 p0U9NG7GmXFi/qmz9a80MirydJOEDjCHJQD6O7aULCTZAG8pqflQ8U1iVuhckpDpTXWT DPMglHThOGEsR8pZCu+PFhO8I2stqMQ/u4JZw637qwCY3WolsUShCIwM4NwyKvKbB2x7 oefFBQMEwlARD/8K20opkyL3VlMQ4060a9JliZv8Xymv0/22rLh6NAFn3P94l9i8wO0f mllw== X-Gm-Message-State: AEkoouvOpz3FyECaofQ3gLQUNrgVfCXBY7Ev9ba+L+zf5rqDtwmVPF7P3d7xBFrLl27MbQ== X-Received: by 10.194.140.35 with SMTP id rd3mr27026287wjb.88.1469627625343; Wed, 27 Jul 2016 06:53:45 -0700 (PDT) Received: from t450s.lan (89-92-156-188.hfc.dyn.abo.bbox.fr. [89.92.156.188]) by smtp.googlemail.com with ESMTPSA id i7sm6510648wjg.42.2016.07.27.06.53.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jul 2016 06:53:44 -0700 (PDT) From: Gary Bisson To: buildroot@busybox.net Date: Wed, 27 Jul 2016 15:53:30 +0200 Message-Id: <1469627614-29709-2-git-send-email-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1469627614-29709-1-git-send-email-gary.bisson@boundarydevices.com> References: <1469627614-29709-1-git-send-email-gary.bisson@boundarydevices.com> Cc: thomas.petazzoni@free-electrons.com, outforaride@gmail.com Subject: [Buildroot] [PATCH 1/5] imx-codec: add install hooks to fix libraries path X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" By default, all the libraries are installed under /usr/lib/imx-mm which causes problems at runtime. The hooks are inspired from the mechanism used in the Yocto recipe: https://github.com/Freescale/meta-fsl-arm/blob/krogoth/recipes-multimedia/imx-codec/imx-codec.inc Tested with the following commands: # gst-launch-0.10 audiotestsrc ! mfw_mp3encoder ! fakesink # gst-launch-1.0 audiotestsrc ! imxmp3audioenc ! fakesink Signed-off-by: Gary Bisson --- Here is the list of plugins that couldn't find the codecs at runtime: $ for i in `find target/usr/lib/gstreamer*/*.so`; do readelf -d $i \ | grep NEEDED | grep lib_ && echo "($i)"; done 0x00000001 (NEEDED) Shared library: [lib_nb_amr_dec_arm9_elinux.so.2] 0x00000001 (NEEDED) Shared library: [lib_wb_amr_dec_arm9_elinux.so.2] (target/usr/lib/gstreamer-0.10/libmfw_gst_amrdec.so) 0x00000001 (NEEDED) Shared library: [lib_peq_arm11_elinux.so.1.fhw] (target/usr/lib/gstreamer-0.10/libmfw_gst_audio_pp.so) 0x00000001 (NEEDED) Shared library: [lib_mp3_enc_arm12_elinux.so.2] (target/usr/lib/gstreamer-0.10/libmfw_gst_mp3enc.so) 0x00000001 (NEEDED) Shared library: [lib_mp3_enc_arm12_elinux.so.2] (target/usr/lib/gstreamer-1.0/libgstimxaudio.so) Regards, Gary --- package/freescale-imx/imx-codec/imx-codec.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/freescale-imx/imx-codec/imx-codec.mk b/package/freescale-imx/imx-codec/imx-codec.mk index 67d3390..266f47f 100644 --- a/package/freescale-imx/imx-codec/imx-codec.mk +++ b/package/freescale-imx/imx-codec/imx-codec.mk @@ -20,4 +20,11 @@ endef # FIXME The Makefile installs both the arm9 and arm11 versions of the # libraries, but we only need one of them. +define IMX_CODEC_FIXUP_TARGET_PATH + find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 3 -not -type d \ + -exec mv {} $(TARGET_DIR)/usr/lib \; + rm -fr $(TARGET_DIR)/usr/lib/imx-mm +endef +IMX_CODEC_POST_INSTALL_TARGET_HOOKS += IMX_CODEC_FIXUP_TARGET_PATH + $(eval $(autotools-package))