imx-kobs: add new package
authorGary Bisson <gary.bisson@boundarydevices.com>
Wed, 23 Sep 2015 13:39:26 +0000 (15:39 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 30 Sep 2015 20:06:47 +0000 (22:06 +0200)
Based on the Yocto 3.14.28-1.0.0_ga update:
https://github.com/Freescale/meta-fsl-arm/commit/6c44744

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/freescale-imx/Config.in
package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch [new file with mode: 0644]
package/freescale-imx/imx-kobs/Config.in [new file with mode: 0644]
package/freescale-imx/imx-kobs/imx-kobs.hash [new file with mode: 0644]
package/freescale-imx/imx-kobs/imx-kobs.mk [new file with mode: 0644]

index dffe76ffc9fea68c54de20bc0f56391c600cbe4c..a958dbd444f580d364ae8166dd56d73a814041ce 100644 (file)
@@ -42,6 +42,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM
        default "IMX53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
        default "IMX6Q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
 
+source "package/freescale-imx/imx-kobs/Config.in"
 source "package/freescale-imx/imx-lib/Config.in"
 source "package/freescale-imx/imx-vpu/Config.in"
 source "package/freescale-imx/firmware-imx/Config.in"
diff --git a/package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch b/package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch
new file mode 100644 (file)
index 0000000..ce123de
--- /dev/null
@@ -0,0 +1,39 @@
+[PATCH] Fix musl build
+
+Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
+---
+ src/mtd.c | 1 +
+ src/mtd.h | 5 +++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/mtd.c b/src/mtd.c
+index 1edc441..6d2264c 100644
+--- a/src/mtd.c
++++ b/src/mtd.c
+@@ -31,6 +31,7 @@
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <errno.h>
++#include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+diff --git a/src/mtd.h b/src/mtd.h
+index bd21add..debfc84 100644
+--- a/src/mtd.h
++++ b/src/mtd.h
+@@ -31,6 +31,11 @@
+ #include "BootControlBlocks.h"
+ #include "rom_nand_hamming_code_ecc.h"
++// musl library doesn't define loff_t
++#if !defined(__GLIBC__) && !defined(__UCLIBC__)
++#define loff_t off_t
++#endif
++
+ //------------------------------------------------------------------------------
+ // Re-definitions of true and false, because the standard ones aren't good
+ // enough?
+-- 
+2.5.1
+
diff --git a/package/freescale-imx/imx-kobs/Config.in b/package/freescale-imx/imx-kobs/Config.in
new file mode 100644 (file)
index 0000000..fc2344e
--- /dev/null
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_IMX_KOBS
+       bool "imx-kobs"
+       depends on BR2_arm # Only relevant for i.MX
+       help
+         The imx-kobs tool is used for writing images to NAND on i.MX
+         platforms.
+
+         This library is provided by Freescale as-is and doesn't have
+         an upstream.
+
diff --git a/package/freescale-imx/imx-kobs/imx-kobs.hash b/package/freescale-imx/imx-kobs/imx-kobs.hash
new file mode 100644 (file)
index 0000000..13373ea
--- /dev/null
@@ -0,0 +1,2 @@
+# locally computed
+sha256 cfac042f5c96731205c397a4a6b3ed966f804569ae4d0e2685d22fdf6bdc9eb7  imx-kobs-3.14.28-1.0.0.tar.gz
diff --git a/package/freescale-imx/imx-kobs/imx-kobs.mk b/package/freescale-imx/imx-kobs/imx-kobs.mk
new file mode 100644 (file)
index 0000000..02c5cad
--- /dev/null
@@ -0,0 +1,12 @@
+################################################################################
+#
+# imx-kobs
+#
+################################################################################
+
+IMX_KOBS_VERSION = $(FREESCALE_IMX_VERSION)
+IMX_KOBS_SITE = $(FREESCALE_IMX_SITE)
+IMX_KOBS_LICENSE = GPLv2+
+IMX_KOBS_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))