This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM65X: GStreamer plugin compilation

Part Number: PROCESSOR-SDK-AM65X


Tool/software: Linux

hi,

I followed in the instruction at the bottom of this getting started guide. I seem to have successfully ran the make command. I just dont know what to do next in terms of what file goes where on my target file

system.

I am running linux on the AM65xx IDK eval board right now.

Can someone show me where to put the files generated from make on top the target file system?

http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_03_00_07/linux/Overview_Getting_Started_Guide.html#gcc-toolchain

  • Hello,

    I am sorry for delay I was OoO. 

    You could follow this guide:

    http://software-dl.ti.com/processor-sdk-linux/esd/docs/05_03_00_07/linux/Overview_Building_the_SDK.html 

    For example if you want to build the gstreamer1.0-plugins-bad you could use:

    MACHINE=<machine> bitbake gstreamer1.0-plugins-bad

    After that you could copy the libs(.so files) under usr/lib/gstreamer-1.0

    Hope this helps.

    Best Regards,

    Margarita

  • Hi Margarita,

    I figured out how to use bitbake to build the plugins, but I haven't figured out how to include x264 in the ugly plugin.

    I found this post but it didn't work for me.

    https://e2e.ti.com/support/processors/f/791/t/626163?Linux-AM5728-Gstreamer1-0-plugins-ugly

    Can you tell me how to include x264 in the build?

    Thank you,

    Steven

  • Hello,

    The recipe for ugly plugin is available but by default the arago configuration prohibits the build of gst-ugly-plugins and some of its dependencies because of licensing limitations. Please, refer gstreamer1.0-plugins-ugly.inc and gstreamer1.0-plugins-ugly_$version.bb

    You could edit tisdk/sources/meta-arago/meta-arago-distro/conf/distro/arago.conf  

    LICENSE_FLAGS_WHITELIST = "commercial_gst-ffmpeg \
                                                            commercial_gst-plugins-ugly \
                                                            commercial_mpeg2dec \
                                                            commercial_lame \
                                                            commercial_x264"

    MACHINE=<Machine> bitbake gstreamer1.0-plugins-ugly

    You could find the ugly plugin here :

    tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gstreamer1.0-plugins-ugly

    after compilation.

    Here is where you could find the libs:

    tisdk/build/arago-tmp-external-linaro-toolchain/work/armv7ahf-neon-linux-gnueabi/gstreamer1.0-plugins-ugly/1.x.x-r0/image/usr/lib/gstreamer-1.0

    You must cp these libs (libgstx264.so) under /usr/lib/gstreamer-1.0 in rootfs.

    You know that the software codecs are running on ARM. 

    I would recommend you to check threads property. For example, threads property of  x264enc by default is 0.

    "threads : Number of threads used by the codec (0 for automatic)
    Unsigned Integer. Range: 0 - 2147483647 Default: 0"

    I would recommend you to try threads=2.

    ( ... ! x264enc tune=zerolatency pass=qual quantizer=27 subme=4 threads=2 bitrate=1024 key-int-max=4 ! ...)  

    With 

     gst-inspect-1.0 x264enc

    command you could check the other properties of the element. Or you could check them here:

    https://gstreamer.freedesktop.org/documentation/x264/index.html 

    Hope this helps.

    Best Regards,

    Margarita

  • Hello,

    In additional, please check RELEASE file in gst-plugins-ugly about license. 

    BR
    Margarita

  • Hi Margarita,

    i'm still missing the libgstx264.so library.

    I made the follow changes to the arago.conf file. I have attached the file for you to view.

    # Name and version of the distribution
    DISTRO_NAME = "Arago"
    DISTRO_VERSION = "2018.10"
    DISTRO_FEED_URI ?= "http://lcpd.gt.design.ti.com"
    BUILD_VARIANT = "${@['prod','rt','systest'][int(d.getVar('ARAGO_RT_ENABLE'))+int(d.getVar('ARAGO_SYSTEST_ENABLE'))*2]}"
    FEEDURIPREFIX ?= "packages/${DISTRO}-rocko/${BUILD_VARIANT}/"
    
    OPKG_ARGS_remove = "--prefer-arch-to-version"
    
    TI_MIRROR = "http://software-dl.ti.com/processor-sdk-mirror/sources/"
    MIRRORS += " \
    ftp://.*/.*       http://arago-project.org/files/sources/ \n \
    https?$://.*/.*   http://arago-project.org/files/sources/ \n \
    bzr://.*/.*      ${TI_MIRROR} \n \
    cvs://.*/.*      ${TI_MIRROR} \n \
    git://.*/.*      ${TI_MIRROR} \n \
    gitsm://.*/.*    ${TI_MIRROR} \n \
    hg://.*/.*       ${TI_MIRROR} \n \
    osc://.*/.*      ${TI_MIRROR} \n \
    p4://.*/.*       ${TI_MIRROR} \n \
    npm://.*/.*      ${TI_MIRROR} \n \
    ftp://.*/.*      ${TI_MIRROR} \n \
    https?$://.*/.*  ${TI_MIRROR} \n \
    svn://.*/.*      ${TI_MIRROR} \n \
    "
    
    # SDK paths and names
    SDK_NAME_PREFIX = "arago"
    SDK_VERSION = "${DISTRO_VERSION}"
    SDK_VENDOR = "-${SDK_NAME_PREFIX}"
    SDK_NAME = "${SDK_NAME_PREFIX}-${SDK_VERSION}"
    SDKPATH_REAL = "/usr/local/${SDK_NAME_PREFIX}-${SDK_VERSION}"
    SDKPATH = "${@"/tmp/"+"x"*96+"/"+"y"*96}"
    
    IMAGE_CLASSES += "image_types_md5"
    IMAGE_FSTYPES += "tar.xz.md5"
    
    # FIT image for secure devices
    KERNEL_CLASSES += "kernel-fitimage"
    FITIMAGE_HASH_ALGO = ""
    FITIMAGE_DTB_BY_NAME = "1"
    FITIMAGE_TEE_BY_NAME = "1"
    FITIMAGE_CONF_BY_NAME = "1"
    
    KERNEL_IMAGETYPES_dra7xx-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_dra7xx-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_dra7xx-hs-evm = "cpio.xz"
    
    KERNEL_IMAGETYPES_am57xx-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_am57xx-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_am57xx-hs-evm = "cpio.xz"
    
    KERNEL_IMAGETYPES_am437x-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_am437x-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_am437x-hs-evm = "cpio.xz"
    
    KERNEL_IMAGETYPES_am335x-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_am335x-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_am335x-hs-evm = "cpio.xz"
    
    KERNEL_IMAGETYPES_k2e-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_k2e-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_k2e-hs-evm = "cpio.xz"
    
    KERNEL_IMAGETYPES_k2hk-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_k2hk-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_k2hk-hs-evm = "cpio.xz"
    
    KERNEL_IMAGETYPES_k2g-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_k2g-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_k2g-hs-evm = "cpio.xz"
    
    KERNEL_IMAGETYPES_k2l-hs-evm = "zImage fitImage"
    INITRAMFS_IMAGE_k2l-hs-evm = "arago-base-tisdk-image"
    INITRAMFS_FSTYPES_k2l-hs-evm = "cpio.xz"
    
    # Mask any broken recipes (currently none)
    #BBMASK = ""
    
    # Start with default set of distro features
    DISTRO_FEATURES = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}"
    
    # Remove some unwanted features
    DISTRO_FEATURES_remove = "x11"
    
    # Add additional distro features
    DISTRO_FEATURES_append = " pam wayland opengl"
    
    # Set global runtime providers for major components
    ARAGO_SYSVINIT ?= "0"
    VIRTUAL-RUNTIME_dev_manager = "${@base_conditional("ARAGO_SYSVINIT", "1", "udev", "systemd", d)}"
    VIRTUAL-RUNTIME_init_manager = "${@base_conditional("ARAGO_SYSVINIT", "1", "sysvinit", "systemd", d)}"
    VIRTUAL-RUNTIME_initscripts = "${@base_conditional("ARAGO_SYSVINIT", "1", "initscripts", "systemd-compat-units", d)}"
    VIRTUAL-RUNTIME_initramfs = "${@base_conditional("ARAGO_SYSVINIT", "1", "sysvinit-initramfs", "systemd-initramfs", d)}"
    VIRTUAL-RUNTIME_login_manager = "busybox shadow"
    
    DISTRO_FEATURES_append = "${@base_conditional("ARAGO_SYSVINIT", "1", "", " systemd", d)}"
    
    # Set preferred Qt version
    QT_PROVIDER ?= "qt5"
    
    # Distro-specific package configuration
    PACKAGECONFIG_pn-weston = "egl kms launch clients"
    PACKAGECONFIG_append_pn-systemd = " coredump"
    
    # Configure Qt5 flags (GLES is still required for qtdeclarative and qtwebkit)
    PACKAGECONFIG_GL_pn-qtbase = "gles2 linuxfb"
    PACKAGECONFIG_DISTRO_pn-qtbase = "icu examples xkbcommon-evdev accessibility gif"
    PACKAGECONFIG_FONTS_pn-qtbase = "fontconfig"
    
    # Add gstreamer in package configuration to enable video
    PACKAGECONFIG_append_pn-qtmultimedia  = " gstreamer"
    
    # Prefer OpenSSL over GnuTLS for curl due to TSU exemptions
    PACKAGECONFIG_pn-curl = "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} ssl zlib"
    
    # No GFX on Keystone or OMAPL1
    PACKAGECONFIG_remove_pn-gstreamer1.0-plugins-bad_keystone = "wayland egl gles2"
    PACKAGECONFIG_remove_pn-gstreamer1.0-plugins-bad_omapl1 = "wayland egl gles2"
    
    PACKAGECONFIG_pn-glmark2 = "drm-gles2 wayland-gles2"
    
    # Enable U-boot OPTEE config for K3
    PACKAGECONFIG_append_pn-u-boot-ti-staging_k3 = " optee"
    
    # Enable encryption support in open62541
    PACKAGECONFIG_append_pn-open62541 = " encrypt"
    
    EXTRA_IMAGEDEPENDS_append_k3 += " u-boot-k3-r5 ti-sci-fw"
    
    # Enable UI and scripting for perf
    PERF_FEATURES_ENABLE ?= "perf-scripting perf-tui"
    
    ARAGO_KERNEL_SUFFIX ?= ""
    
    # Set real-time kernel suffix
    ARAGO_RT_ENABLE ?= "0"
    ARAGO_KERNEL_SUFFIX_append = "${@base_conditional("ARAGO_RT_ENABLE", "1", "-rt", "", d)}"
    
    # Set systest kernel suffix
    ARAGO_SYSTEST_ENABLE ?= "0"
    ARAGO_KERNEL_SUFFIX_append = "${@base_conditional("ARAGO_SYSTEST_ENABLE", "1", "-systest", "", d)}"
    IMAGE_FSTYPES_remove = "${@['','ubi ubifs'][d.getVar('ARAGO_SYSTEST_ENABLE') == '1']}"
    
    # Toolchain should be selected by setting TOOLCHAIN_BRAND in local.conf
    # Set some sane defaults, in case someone forgets to set them in local.conf
    TC_SANE_DEFAULT ?= "linaro"
    TOOLCHAIN_TYPE ?= "external"
    TOOLCHAIN_BRAND ?= "${@[d.getVar('TC_SANE_DEFAULT'),'gcc'][d.getVar('TOOLCHAIN_TYPE') == 'internal']}"
    
    require conf/distro/include/toolchain-${TOOLCHAIN_BRAND}.inc
    require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc
    
    # Enable basic stack and buffer overflow protections
    #TARGET_CPPFLAGS += "-fstack-protector -D_FORTIFY_SOURCE=1"
    #TARGET_CPPFLAGS += "-fstack-protector"
    
    # Load default preferences
    require conf/distro/include/arago-prefs.inc
    
    # Enable generation of source packages for SDKs
    require conf/distro/include/arago-source-ipk.inc
    
    # Allow branding on top of Arago Distro and Core TI-SDK
    # If ARAGO_BRAND is not set in local.conf, default to core
    ARAGO_BRAND ??= "core"
    
    require conf/distro/include/branding-${ARAGO_BRAND}.inc
    
    # Disable polkit's systemd configuration from meta-oe
    POLKITAUTH = ""
    
    # Set ENTERPRISE_DISTRO flag to ensure that recipes that have been flagged
    # do not attempt to enable features that have potential commercial
    # licensing issues.
    ENTERPRISE_DISTRO = "1"
    
    # oe-core uses external libav instead of internal libav for gst-ffmpeg. We
    # disable by default the codecs in libav that causes issues with shipping an
    # Arago based SDK. No need to prevent gst-ffmpeg from being used since we
    # disable troublesome software.
    LICENSE_FLAGS_WHITELIST = "commercial_gst-ffmpeg commercial_gstreamer1.0-libav commercial_gst-plugins-ugly commercial_mpeg2dec commercial_lame commercial_x264 commercial_libmad"
    
    # Do not package own copy of perl into devkit, rely on host one
    ASSUME_PROVIDED += "nativesdk-perl"
    

    I ran "MACHINE=am65xx-evm bitbake gst-plugins-ugly" and was not able to find libgstx264.so anywhere in the build directory

    then i tried running "MACHINE=am65xx-evm bitbake gstreamer1.0-plugins-ugly"* and still wasnt able to find libgstx264.so

    *note i had to update the whitelist in arago.conf from "commercial_gstreamer1.0-plugins-ugly" to "commercial_gst-plugins-ugly".

    i went ahead and tried to graph the dependencies for gst/gstreamer1.0-plugins-ugly recipe and the recipe-depends.dot file didnt contain any references to x264.

    recipe-depends.docx

    *had to change the .dot file to .docx so it can be uploaded. change it back to .dot to view file.

    did i miss something with the whitelist setup?

    Thank you,

    Steven

  • Hi Margarita,

    i got it to work. I had to add x264 to the PACKAGECONFIG in gstreamer1.0-plugins-ugly.inc

  • Hello,

    Yes, you must add it in gstreamer1.0-plugins-ugly.inc also. 

    Please refer my above answer about the threads property of x264enc element. It could be in help. 

    Please if you have new questions open a new thread.

    Best Regards,

    Margarita