Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 199 lines 9.5 kB view raw
1When libomxdynamicloader.so is loaded, it complains that RM_Deinit can't be resolved. 2Link explicitly against omxil-bellagio so that ld.so can find the reference. 3 4Signed-off-by: Qais Yousef <qais.yousef@imgtec.com> 5 6--- bellagio-0.9.3/src/dynamic_loader/Makefile.am.old 2012-03-23 15:07:47.379021034 +0000 7+++ bellagio-0.9.3/src/dynamic_loader/Makefile.am 2012-03-23 15:08:47.563034818 +0000 8@@ -3,7 +3,7 @@ 9 omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la 10 libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h 11 12-libomxdynamicloader_la_LDFLAGS = 13+libomxdynamicloader_la_LDFLAGS = -L$(abs_top_srcdir)/src/.libs -lomxil-bellagio 14 libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \ 15 -I$(top_srcdir)/src \ 16 -I$(top_srcdir)/src/base \ 17Fix dependency issue to allow parallel build 18 19Signed-off-by: Qais Yousef <qais.yousef@imgtec.com> 20 21Index: bellagio-0.9.3/src/Makefile.am 22=================================================================== 23--- bellagio-0.9.3.orig/src/Makefile.am 24+++ bellagio-0.9.3/src/Makefile.am 25@@ -8,6 +8,7 @@ omxregister_bellagio_SOURCES = omxregist 26 omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \ 27 -I$(top_srcdir)/include 28 omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir) 29+omxregister_bellagio_DEPENDENCIES = libomxil-bellagio.la 30 31 lib_LTLIBRARIES = libomxil-bellagio.la 32 libomxil_bellagio_la_SOURCES = component_loader.h \ 33We always access globalComponentList[] at indexComponent=-1 which causes a 34segfault. Use i as the index instead. 35 36Signed-off-by: Qais Yousef <qais.yousef@imgtec.com> 37 38--- bellagio-0.9.3/src/omx_reference_resource_manager.c.old 2012-03-13 10:15:25.743940980 +0000 39+++ bellagio-0.9.3/src/omx_reference_resource_manager.c 2012-03-13 10:18:02.201971009 +0000 40@@ -485,7 +485,6 @@ 41 OMX_ERRORTYPE RM_removeFromWaitForResource(OMX_COMPONENTTYPE *openmaxStandComp) { 42 omx_base_component_PrivateType* omx_base_component_Private; 43 int i = 0; 44- int indexComponent = -1; 45 46 DEBUG(DEB_LEV_FUNCTION_NAME, "In %s\n", __func__); 47 omx_base_component_Private = (omx_base_component_PrivateType*)openmaxStandComp->pComponentPrivate; 48@@ -493,16 +492,13 @@ 49 while(listOfcomponentRegistered[i].component_name != NULL ) { 50 if (!strcmp(listOfcomponentRegistered[i].component_name, omx_base_component_Private->name)) { 51 // found component in the list of the resource manager 52- removeElemFromList(&globalComponentList[indexComponent], openmaxStandComp); 53- break; 54+ removeElemFromList(&globalComponentList[i], openmaxStandComp); 55+ DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__); 56+ return OMX_ErrorNone; 57 } 58 i++; 59 } 60- if (indexComponent <0) { 61- // No resource to be handled 62- DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__); 63- return OMX_ErrorNone; 64- } 65- DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__); 66+ // No resource to be handled 67+ DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__); 68 return OMX_ErrorNone; 69 } 70 OMX_INDEXTYPE/OMX_INDEXVENDORTYPE in one switch 71 src/base/omx_base_component.c | 54 ++++++++++++++++++++++------------------- 72 1 files changed, 29 insertions(+), 25 deletions(-) 73--- a/src/base/omx_base_component.c 74+++ a/src/base/omx_base_component.c 75@@ -915,14 +915,6 @@ OSCL_EXPORT_REF OSCL_EXPORT_REF OMX_ERRORTYPE omx_base_component_GetParameter( 76 return OMX_ErrorBadParameter; 77 } 78 switch(nParamIndex) { 79- case OMX_IndexParameterThreadsID: 80- if ((err = checkHeader(ComponentParameterStructure, sizeof(OMX_PARAM_BELLAGIOTHREADS_ID))) != OMX_ErrorNone) { 81- break; 82- } 83- threadID = (OMX_PARAM_BELLAGIOTHREADS_ID *)ComponentParameterStructure; 84- threadID->nThreadBufferMngtID = omx_base_component_Private->bellagioThreads->nThreadBufferMngtID; 85- threadID->nThreadMessageID = omx_base_component_Private->bellagioThreads->nThreadMessageID; 86- break; 87 case OMX_IndexParamAudioInit: 88 case OMX_IndexParamVideoInit: 89 case OMX_IndexParamImageInit: 90@@ -988,28 +980,40 @@ OSCL_EXPORT_REF OSCL_EXPORT_REF OMX_ERRORTYPE omx_base_component_GetParameter( 91 } 92 } 93 break; 94- case OMX_IndexVendorCompPropTunnelFlags: 95- pPropTunnelSetup = (OMX_VENDOR_PROP_TUNNELSETUPTYPE*)ComponentParameterStructure; 96+ default: 97+ /* additional switch statement for extended OMX_INDEXTYPE */ 98+ switch((OMX_INDEXVENDORTYPE) nParamIndex) { 99+ case OMX_IndexParameterThreadsID: 100+ if ((err = checkHeader(ComponentParameterStructure, sizeof(OMX_PARAM_BELLAGIOTHREADS_ID))) != OMX_ErrorNone) { 101+ break; 102+ } 103+ threadID = (OMX_PARAM_BELLAGIOTHREADS_ID *)ComponentParameterStructure; 104+ threadID->nThreadBufferMngtID = omx_base_component_Private->bellagioThreads->nThreadBufferMngtID; 105+ threadID->nThreadMessageID = omx_base_component_Private->bellagioThreads->nThreadMessageID; 106+ break; 107+ case OMX_IndexVendorCompPropTunnelFlags: 108+ pPropTunnelSetup = (OMX_VENDOR_PROP_TUNNELSETUPTYPE*)ComponentParameterStructure; 109 110- if (pPropTunnelSetup->nPortIndex >= (omx_base_component_Private->sPortTypesParam[OMX_PortDomainAudio].nPorts + 111- omx_base_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts + 112- omx_base_component_Private->sPortTypesParam[OMX_PortDomainImage].nPorts + 113- omx_base_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts)) { 114+ if (pPropTunnelSetup->nPortIndex >= (omx_base_component_Private->sPortTypesParam[OMX_PortDomainAudio].nPorts + 115+ omx_base_component_Private->sPortTypesParam[OMX_PortDomainVideo].nPorts + 116+ omx_base_component_Private->sPortTypesParam[OMX_PortDomainImage].nPorts + 117+ omx_base_component_Private->sPortTypesParam[OMX_PortDomainOther].nPorts)) { 118 119- DEBUG(DEB_LEV_ERR,"In %s OMX_IndexVendorCompPropTunnelFlags nPortIndex=%d Line=%d \n", 120- __func__,(int)pPropTunnelSetup->nPortIndex,__LINE__); 121+ DEBUG(DEB_LEV_ERR,"In %s OMX_IndexVendorCompPropTunnelFlags nPortIndex=%d Line=%d \n", 122+ __func__,(int)pPropTunnelSetup->nPortIndex,__LINE__); 123 124- return OMX_ErrorBadPortIndex; 125- } 126+ return OMX_ErrorBadPortIndex; 127+ } 128 129- pPort = omx_base_component_Private->ports[pPropTunnelSetup->nPortIndex]; 130+ pPort = omx_base_component_Private->ports[pPropTunnelSetup->nPortIndex]; 131 132- pPropTunnelSetup->nTunnelSetup.nTunnelFlags = pPort->nTunnelFlags; 133- pPropTunnelSetup->nTunnelSetup.eSupplier = pPort->eBufferSupplier; 134- break; 135- default: 136- err = OMX_ErrorUnsupportedIndex; 137- break; 138+ pPropTunnelSetup->nTunnelSetup.nTunnelFlags = pPort->nTunnelFlags; 139+ pPropTunnelSetup->nTunnelSetup.eSupplier = pPort->eBufferSupplier; 140+ break; 141+ default: 142+ err = OMX_ErrorUnsupportedIndex; 143+ break; 144+ } 145 } 146 DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s for component %p\n", __func__, hComponent); 147 return err; 148diff -up libomxil-bellagio-0.9.3/Makefile.am.nodoc libomxil-bellagio-0.9.3/Makefile.am 149--- libomxil-bellagio-0.9.3/Makefile.am.nodoc 2011-01-12 08:53:26.000000000 +0100 150+++ libomxil-bellagio-0.9.3/Makefile.am 2012-04-23 13:46:15.410823381 +0200 151@@ -7,7 +7,6 @@ EXTRA_DIST = libomxil-bellagio.spec 152 pkgconfigdir = $(libdir)/pkgconfig 153 pkgconfig_DATA = libomxil-bellagio.pc 154 155-docdir = $(DESTDIR)$(prefix)/share/doc/@PACKAGE@ 156 doc_DATA = README \ 157 ChangeLog \ 158 TODO 159diff -up libomxil-bellagio-0.9.3/src/omxregister.c.unused libomxil-bellagio-0.9.3/src/omxregister.c 160--- libomxil-bellagio-0.9.3/src/omxregister.c.unused 2011-01-12 08:53:26.000000000 +0100 161+++ libomxil-bellagio-0.9.3/src/omxregister.c 2012-12-10 22:02:28.621695659 +0100 162@@ -248,7 +248,15 @@ static int buildComponentsList(FILE* omx 163 } 164 fptr(stComponents); 165 err = fwrite(lib_absolute_path, 1, strlen(lib_absolute_path), omxregistryfp); 166- err = fwrite("\n", 1, 1, omxregistryfp); 167+ if (err != strlen(lib_absolute_path)) { 168+ DEBUG(DEB_LEV_ERR, "Failed to write %zu bytes to fd %d\n", strlen(lib_absolute_path), fileno(omxregistryfp)); 169+ continue; 170+ } 171+ err = fwrite("\n", 1, strlen(buffer), omxregistryfp); 172+ if (err != strlen(buffer)) { 173+ DEBUG(DEB_LEV_ERR, "Failed to write %zu bytes to fd %d\n", strlen(buffer), fileno(omxregistryfp)); 174+ continue; 175+ } 176 177 178 for (i = 0; i<num_of_comp; i++) { 179--- libomxil-bellagio-0.9.3/include/OMX_Types.h.orig 2011-01-12 08:53:26.000000000 +0100 180+++ libomxil-bellagio-0.9.3/include/OMX_Types.h 2013-02-25 09:53:55.000000000 +0100 181@@ -314,6 +314,18 @@ 182 * platform & operating specific object used to reference the window */ 183 typedef void* OMX_NATIVE_WINDOWTYPE; 184 185+ 186+/** Define the OMX IL version that corresponds to this set of header files. 187+ * We also define a combined version that can be used to write or compare 188+ * values of the 32bit nVersion field, assuming a little endian architecture */ 189+#define OMX_VERSION_MAJOR 1 190+#define OMX_VERSION_MINOR 1 191+#define OMX_VERSION_REVISION 2 192+#define OMX_VERSION_STEP 0 193+ 194+#define OMX_VERSION ((OMX_VERSION_STEP<<24) | (OMX_VERSION_REVISION<<16) | (OMX_VERSION_MINOR<<8) | OMX_VERSION_MAJOR) 195+ 196+ 197 /** The OMX_VERSIONTYPE union is used to specify the version for 198 a structure or component. For a component, the version is entirely 199 specified by the component vendor. Components doing the same function