diff options
Diffstat (limited to 'recipes-bsp/elftosb')
-rw-r--r-- | recipes-bsp/elftosb/elftosb_10.12.01.bb | 22 | ||||
-rw-r--r-- | recipes-bsp/elftosb/files/cross-build.patch | 50 | ||||
-rw-r--r-- | recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch | 42 |
3 files changed, 114 insertions, 0 deletions
diff --git a/recipes-bsp/elftosb/elftosb_10.12.01.bb b/recipes-bsp/elftosb/elftosb_10.12.01.bb new file mode 100644 index 00000000..2cef1f6a --- /dev/null +++ b/recipes-bsp/elftosb/elftosb_10.12.01.bb @@ -0,0 +1,22 @@ +# Copyright (C) 2011, 2012 Freescale +# Released under the MIT license (see COPYING.MIT for the terms) + +DESCRIPTION = "Helper utility for freescale imx platforms" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=172ede34353056ebec7a597d8459f029" +SECTION = "bootloader" +PR = "r4" +BBCLASSEXTEND = "native nativesdk" + +SRC_URI = "http://repository.timesys.com/buildsources/e/elftosb/elftosb-${PV}/elftosb-${PV}.tar.gz \ + file://cross-build.patch \ + file://don-t-use-full-path-for-headers.patch" +SRC_URI[md5sum] = "e8005d606c1e0bb3507c82f6eceb3056" +SRC_URI[sha256sum] = "77bb6981620f7575b87d136d94c7daa88dd09195959cc75fc18b138369ecd42b" + +do_install() { + install -d ${D}${bindir} + install ${S}/bld/linux/elftosb ${D}${bindir} + install ${S}/bld/linux/keygen ${D}${bindir} + install ${S}/bld/linux/sbtool ${D}${bindir} +} diff --git a/recipes-bsp/elftosb/files/cross-build.patch b/recipes-bsp/elftosb/files/cross-build.patch new file mode 100644 index 00000000..8cffa03e --- /dev/null +++ b/recipes-bsp/elftosb/files/cross-build.patch @@ -0,0 +1,50 @@ +--- a/makefile.rules.orig 2012-05-09 21:03:28.000000000 +0200 ++++ b/makefile.rules 2012-05-09 21:03:56.000000000 +0200 +@@ -9,6 +9,8 @@ + # SRC_DIR needs to be passed in. It is assumed that make is running in + # the build directory. + ++CC ?= gcc ++ + #******************************************************************************* + # Environment + +@@ -101,7 +103,7 @@ + keygen.o + + +-LIBS = -lstdc++ ++LIBS ?= -lstdc++ -lm + + + ifeq ("${UNAMES}", "Linux") +@@ -137,13 +139,13 @@ + ${EXEC_FILE_ELFTOSB2} ${EXEC_FILE_SBTOOL} ${EXEC_FILE_KEYGEN} + + elftosb: ${OBJ_FILES_ELFTOSB2} +- gcc ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2} ++ ${CC} ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2} + + sbtool: ${OBJ_FILES_SBTOOL} +- gcc ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL} ++ ${CC} ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL} + + keygen: ${OBJ_FILES_KEYGEN} +- gcc ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN} ++ ${CC} ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN} + + + #ifeq ("${UNAMES}", "Linux") +@@ -153,10 +155,10 @@ + .SUFFIXES : .c .cpp + + .c.o : +- gcc ${CFLAGS} -c $< ++ ${CC} ${CFLAGS} -c $< + + .cpp.o : +- gcc ${CFLAGS} -c $< ++ ${CC} ${CFLAGS} -c $< + + #endif + diff --git a/recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch b/recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch new file mode 100644 index 00000000..8996ffbb --- /dev/null +++ b/recipes-bsp/elftosb/files/don-t-use-full-path-for-headers.patch @@ -0,0 +1,42 @@ +elftosb: don't use full path for headers + +This fixes the building on new host distributions where header might +move due multilib support and other possible changes in future. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> +--- + common/stdafx.h | 2 +- + stdafx.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common/stdafx.h b/common/stdafx.h +index e6bf9dd..fb3c2d7 100644 +--- a/common/stdafx.h ++++ b/common/stdafx.h +@@ -27,7 +27,7 @@ + // For Linux systems only, types.h only defines the signed + // integer types. This is not professional code. + // Update: They are defined in the header files in the more recent version of redhat enterprise gcc. +-#include "/usr/include/sys/types.h" ++#include <sys/types.h> + #include <stdint.h> + //typedef unsigned long uint32_t; + //typedef unsigned short uint16_t; +diff --git a/stdafx.h b/stdafx.h +index ce80458..6ff2f44 100644 +--- a/stdafx.h ++++ b/stdafx.h +@@ -27,7 +27,7 @@ + // For Linux systems only, types.h only defines the signed + // integer types. This is not professional code. + // Update: They are defined in the header files in the more recent version of redhat enterprise gcc. +-#include "/usr/include/sys/types.h" ++#include <sys/types.h> + //typedef unsigned long uint32_t; + //typedef unsigned short uint16_t; + //typedef unsigned char uint8_t; +-- +1.7.2.5 + |