Add support for at91sam9m10 H/W video decoder
PATCH v2 1/1 Add support for at91sam9m10 H/W video decoder
--- .../at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb | 41 ++++++++ recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb | 49 ++++++++++ recipes/images/x11-at91sam9m10-image.bb | 102 ++++++++++++++++++++ 3 files changed, 192 insertions(+), 0 deletions(-) create mode 100644 recipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb create mode 100644 recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb create mode 100644 recipes/images/x11-at91sam9m10-image.bb
recipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb new file +41 -0
@@ -0,0 +1,41 @@ +# This is the support library for AT91SAM9M10 On2 8170 video decoder. +DESCRIPTION = "Library for AT91SAM9M10 On2 8170 video decoder" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "" + +COMPATIBLE_MACHINE = (at91sam9m10ekes|at91sam9m10g45ek) + +PR = "r1" + +DEPENDS = "glib-2.0 gstreamer on2-8170-libs" +CFLAGS += "-I${STAGING_INCDIR}/glib-2.0 -I${STAGING_INCDIR}/gstreamer-0.10 -I${STAGING_INCDIR}/libxml2/" +GST_MAJORMINOR=0.10 +PROVIDES += "gstx170" + +SRC_URI = "ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/gst-plugin-x170-${PV}.tar.gz" +S = ${WORKDIR}/gst-plugin-x170-${PV} + +inherit autotools + +FILES_${PN} = " \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.so \ + " + +FILES_${PN}-dev = " \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.so \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.a \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.la \ + " + +do_stage() { + echo staging ... + oe_libinstall -s -a -C ${S}/src/.libs libgstx170 ${STAGING_LIBDIR} + install -m 0644 ${S}/src/gstx170.h ${STAGING_INCDIR}/ +} + +do_install() { + echo install ... + install -d ${D}/${libdir}/gstreamer-${GST_MAJORMINOR} + oe_libinstall -s -C ${S}/src/.libs/ libgstx170 ${D}/${libdir}/gstreamer-${GST_MAJORMINOR} +}
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb new file +49 -0
49 lines not on this page · raw message
recipes/images/x11-at91sam9m10-image.bb new file +102 -0
102 lines not on this page · raw message
Signature · 1 line
1.6.3.3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
recipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb line 34
Quoted 4 lines · Ulf Samuelsson
recipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb new file +4
-0+do_stage() { + echo staging ... + oe_libinstall -s -a -C ${S}/src/.libs libgstx170 ${STAGING_LIBDIR} + install -m 0644 ${S}/src/gstx170.h ${STAGING_INCDIR}/
No legacy staging allowed in new recipes
recipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb line 38
Quoted 2 lines
recipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb new file +2
-0+do_install() { + echo install ...
remove
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb line 27
Quoted 2 lines
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb +1
-0+SRC_URI_append = ""
remove
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb line 39
Quoted 11 lines
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb +11
-0+do_stage() { + oe_libinstall -s -a -C ${S} libdwlx170 ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170h ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libx170j ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170m2 ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170m ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170p ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170v ${STAGING_LIBDIR} + + install -m 0644 ${S}/*.h ${STAGING_INCDIR}/ +}
No legacy staging allowed in new recipes
Quoted 8 lines
recipes/images/x11-at91sam9m10-image.bb +6
-0+at91sam9m10_rootfs_postprocess() { + curdir=$PWD + cd ${IMAGE_ROOTFS} + + # add init script to cratee hantro modules /dev files + echo 'MAJOR=`cat /proc/devices |grep hx170|cut -f1 -d\ `' >> ${IMAGE_ROOTFS}//etc/init.d/hantro
recipes/images/x11-at91sam9m10-image.bb line 90
Quoted 10 lines
recipes/images/x11-at91sam9m10-image.bb +10
-0+ echo 'mknod /dev/hx170 c $MAJOR 0' >> ${IMAGE_ROOTFS}/etc/init.d/hantro + echo 'MAJOR=`cat /proc/devices |grep memalloc|cut -f1 -d\ `' >> ${IMAGE_ROOTFS}//etc/init.d/hantro + echo 'mknod /dev/memalloc c $MAJOR 0' >> ${IMAGE_ROOTFS}/etc/init.d/hantro + chmod a+x ${IMAGE_ROOTFS}/etc/init.d/hantro + cd ${IMAGE_ROOTFS}/etc/rc5.d + ln -s ../init.d/hantro S51hantro + + # back on track + cd $curdir +}
Add that to the recipe and use the updated-rc.d class -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFNR6G0MkyGM64RGpERAmWdAJ45V+ZF5fMXZAwO5g7vvaJSy4Sg3gCfe6nr U7flNLkyur1hOoAiX2teRSs=
=9ww2
-----END PGP SIGNATURE-----
Quoted 93 lines · Ulf Samuelsson
Signed-off-by Ulf Samuelsson <[email protected]>--- .../at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb | 41 ++++++++ recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb | 49 ++++++++++ recipes/images/x11-at91sam9m10-image.bb | 102 ++++++++++++++++++++ 3 files changed, 192 insertions(+), 0 deletions(-) create mode 100644 recipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb create mode 100644 recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb create mode 100644 recipes/images/x11-at91sam9m10-image.bbrecipes/at91sam9m10-vdec/gst-plugin-on2-8170_1.0.bb new file +41
-0@@ -0,0 +1,41 @@ +# This is the support library for AT91SAM9M10 On2 8170 video decoder. +DESCRIPTION = "Library for AT91SAM9M10 On2 8170 video decoder" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "" + +COMPATIBLE_MACHINE = (at91sam9m10ekes|at91sam9m10g45ek) + +PR = "r1" + +DEPENDS = "glib-2.0 gstreamer on2-8170-libs" +CFLAGS += "-I${STAGING_INCDIR}/glib-2.0 -I${STAGING_INCDIR}/gstreamer-0.10 -I${STAGING_INCDIR}/libxml2/" +GST_MAJORMINOR=0.10 +PROVIDES += "gstx170" + +SRC_URI = "ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/gst-plugin-x170-${PV}.tar.gz" +S = ${WORKDIR}/gst-plugin-x170-${PV} + +inherit autotools + +FILES_${PN} = " \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.so \ + " + +FILES_${PN}-dev = " \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.so \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.a \ + ${libdir}/gstreamer-${GST_MAJORMINOR}/*.la \ + " + +do_stage() { + echo staging ... + oe_libinstall -s -a -C ${S}/src/.libs libgstx170 ${STAGING_LIBDIR} + install -m 0644 ${S}/src/gstx170.h ${STAGING_INCDIR}/ +} + +do_install() { + echo install ... + install -d ${D}/${libdir}/gstreamer-${GST_MAJORMINOR} + oe_libinstall -s -C ${S}/src/.libs/ libgstx170 ${D}/${libdir}/gstreamer-${GST_MAJORMINOR} +}recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb new file +29
-0@@ -0,0 +1,49 @@ +# This is the support library for Hantro X170 video decoder. +DESCRIPTION = "Library for Hantro X170 video decoder" +SECTION = "libs" +PRIORITY = "optional" + +COMPATIBLE_MACHINE = (at91sam9m10ekes|at91sam9m10g45ek) + +PR = "r1" +PROVIDES += "hantro-libs" +SRC_URI ="ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec/on2-8170-libs-1.0.tar.gz" + +inherit autotools +S = ${WORKDIR}/on2-8170-libs-${PV} + +FILES_${PN} = " \ + ${libdir}/*.so \ + " + +FILES_${PN}-dev = " \ + ${libdir}/*.so \ + ${libdir}/*.a \ + ${libdir}/*.la \ + ${includedir}/*.h \ + " + + +SRC_URI_append = "" + +do_stage() {
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb line 39
Quoted 10 lines
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb new file +10
-0+ oe_libinstall -s -a -C ${S} libdwlx170 ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170h ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libx170j ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170m2 ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170m ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170p ${STAGING_LIBDIR} + oe_libinstall -s -a -C ${S} libdecx170v ${STAGING_LIBDIR} + + install -m 0644 ${S}/*.h ${STAGING_INCDIR}/ +}
do_stage is obsolete get rid of it.
Quoted 65 lines
recipes/at91sam9m10-vdec/on2-8170-libs_1.0.bb new file +10
-0+ +do_install() { + oe_libinstall -s -C ${S} libdwlx170 ${D}/${libdir}/ + oe_libinstall -s -C ${S} libdecx170h ${D}/${libdir}/ + oe_libinstall -s -C ${S} libx170j ${D}/${libdir}/ + oe_libinstall -s -C ${S} libdecx170m2 ${D}/${libdir}/ + oe_libinstall -s -C ${S} libdecx170m ${D}/${libdir}/ + oe_libinstall -s -C ${S} libdecx170p ${D}/${libdir}/ + oe_libinstall -s -C ${S} libdecx170v ${D}/${libdir}/ +}recipes/images/x11-at91sam9m10-image.bb new file +49
-0@@ -0,0 +1,102 @@ +#Angstrom X11 at91sam9 image + +XSERVER ?= "" + +ANGSTROM_EXTRA_INSTALL += " \ + gpe-irc \ + gpe-sketchbook \ + gpe-filemanager \ + gpe-tetris \ + gpe-go \ + gpe-calendar \ + gpe-contacts \ + gpe-edit \ + gpe-gallery \ + gpe-calculator \ + gpe-clock \ + gpe-terminal \ + gpe-watch \ + matchbox-panel-hacks \ + gpe-scap \ + gpe-windowlist \ + gpe-mixer \ + usbview \ + mplayer \ + thttpd \ + madplay \ + alsa-utils-aplay \ + alsa-utils-amixer \ + iperf \ + dosfstools \ + mtd-utils \ +# nbench-byte \ + gpe-mini-browser \ + pointercal \ + gstreamer \ + gst-plugins-base \ + gst-plugins-good \ + gst-plugins-bad \ + gst-plugins-ugly \ + gst-plugin-avi \ + gst-plugin-mpegstream \ + gst-plugin-qtdemux \ + gst-plugin-mpegvideoparse \ + gst-plugin-asf \ + gst-plugin-alsa \ + gst-plugin-ossaudio \ + gst-plugin-audioresample \ + gst-plugin-audioconvert \ + gst-plugin-ximagesink \
recipes/images/x11-at91sam9m10-image.bb line 59
Quoted 10 lines
recipes/images/x11-at91sam9m10-image.bb new file +10
-0+ gst-plugin-fbdevsink \ + gst-plugin-faad \ + gst-plugin-mad \ + gst-plugin-playbin \ + gst-plugin-decodebin \ + gst-plugin-typefindfunctions \ + gst-ffmpeg \ + gst-plugin-on2-8170 \ + on2-8170-libs \ + owl-wifi \
Not all distros might use ANGSTROM_EXTRA_INSTALL just to let you know. If you are supporting angstrom distro then locking packages in machine config as you do might conflict with angtrom's policies make sure those conglicts with respect to patches dont happen.
"
Quoted 50 lines
recipes/images/x11-at91sam9m10-image.bb new file +42
-0+ +export IMAGE_BASENAME = "x11-at91sam9m10-image" + +DEPENDS = "task-base" +IMAGE_INSTALL = "\ + ${XSERVER} \ + task-base-extended \ + angstrom-x11-base-depends \ + angstrom-gpe-task-base \ + angstrom-gpe-task-settings \ + ${ANGSTROM_EXTRA_INSTALL}" + +IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp" + +at91sam9m10_rootfs_postprocess() { + curdir=$PWD + cd ${IMAGE_ROOTFS} + + # add init script to cratee hantro modules /dev files + echo 'MAJOR=`cat /proc/devices |grep hx170|cut -f1 -d\ `' >> ${IMAGE_ROOTFS}//etc/init.d/hantro + echo 'mknod /dev/hx170 c $MAJOR 0' >> ${IMAGE_ROOTFS}/etc/init.d/hantro + echo 'MAJOR=`cat /proc/devices |grep memalloc|cut -f1 -d\ `' >> ${IMAGE_ROOTFS}//etc/init.d/hantro + echo 'mknod /dev/memalloc c $MAJOR 0' >> ${IMAGE_ROOTFS}/etc/init.d/hantro + chmod a+x ${IMAGE_ROOTFS}/etc/init.d/hantro + cd ${IMAGE_ROOTFS}/etc/rc5.d + ln -s ../init.d/hantro S51hantro + + # back on track + cd $curdir +} + +#zap root password for release images +ROOTFS_POSTPROCESS_COMMAND += '${@base_conditional("DISTRO_TYPE", "release", "zap_root_password; ", "",d)}' +ROOTFS_POSTPROCESS_COMMAND += "set_image_autologin; " + +#we dont need the kernel in the image +ROOTFS_POSTPROCESS_COMMAND += "rm -f ${IMAGE_ROOTFS}/boot/*Image*; " + +#load sam9m10 vdec modules and create file descriptor at boot +ROOTFS_POSTPROCESS_COMMAND += "at91sam9m10_rootfs_postprocess; " + +inherit imageSignature · 7 lines
1.6.3.3 _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel