Skip to contentSkip to conversation

Add imx-kobs package

PATCH Superseded Gary Bisson 2 participants 6 messages Sep 21, 2015 – Sep 22, 2015 Arm i.MX and Layerscape

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add imx-kobs package

Hi all,

This series adds the up to date imx-kobs package and deperecate the old kobs-ng.

It also includes a patch to allow building this tool on musl as suggested by Thomas:
http://lists.busybox.net/pipermail/buildroot/2015-September/139899.html

This patch will be submitted to the yocto mailing list (soone) to hopefully get the attention of the actual imx-kobs package maintainer but I have little to no hope that they will merge it into their code base as most Freescale packages require glibc. I'll respond to this e-mail once the patch has been submitted.

Regards,
Gary

Gary Bisson (2):
imx-kobs: add new package
kobs-ng: remove obsolete package

 Config.in.legacy                                   |  8 +++
 package/Config.in                                  |  1 -
 package/freescale-imx/Config.in                    |  1 +
 .../imx-kobs/0001-Fix-musl-build.patch             | 43 +++++++++++++
 package/freescale-imx/imx-kobs/Config.in           | 10 +++
 package/freescale-imx/imx-kobs/imx-kobs.hash       |  2 +
 package/freescale-imx/imx-kobs/imx-kobs.mk         | 12 ++++
 package/kobs-ng/0001-fix-mtd-defines.patch         | 73 ----------------------
 package/kobs-ng/Config.in                          |  9 ---
 package/kobs-ng/kobs-ng.hash                       |  2 -
 package/kobs-ng/kobs-ng.mk                         | 13 ----
 11 files changed, 76 insertions(+), 98 deletions(-)
 create mode 100644 package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch
 create mode 100644 package/freescale-imx/imx-kobs/Config.in
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.hash
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.mk
 delete mode 100644 package/kobs-ng/0001-fix-mtd-defines.patch
 delete mode 100644 package/kobs-ng/Config.in
 delete mode 100644 package/kobs-ng/kobs-ng.hash
 delete mode 100644 package/kobs-ng/kobs-ng.mk
Signature · 1 line
2.5.1
#1 lore raw

PATCH 1/2 imx-kobs: add new package

Based on the Yocto 3.14.28-1.0.0_ga update:
https://github.com/Freescale/meta-fsl-arm/commit/6c44744

---
 package/freescale-imx/Config.in                    |  1 +
 .../imx-kobs/0001-Fix-musl-build.patch             | 43 ++++++++++++++++++++++
 package/freescale-imx/imx-kobs/Config.in           | 10 +++++
 package/freescale-imx/imx-kobs/imx-kobs.hash       |  2 +
 package/freescale-imx/imx-kobs/imx-kobs.mk         | 12 ++++++
 5 files changed, 68 insertions(+)
 create mode 100644 package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch
 create mode 100644 package/freescale-imx/imx-kobs/Config.in
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.hash
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.mk
package/freescale-imx/Config.in +1 -0
index dffe76f..a958dbd 100644
@@ -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"
package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch new file +43 -0

43 lines not on this page · raw message

package/freescale-imx/imx-kobs/Config.in new file +10 -0
new file mode 100644
index 0000000..fc2344e
@@ -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.
+
package/freescale-imx/imx-kobs/imx-kobs.hash new file +2 -0
new file mode 100644
index 0000000..13373ea
@@ -0,0 +1,2 @@
+# locally computed
+sha256 cfac042f5c96731205c397a4a6b3ed966f804569ae4d0e2685d22fdf6bdc9eb7  imx-kobs-3.14.28-1.0.0.tar.gz
package/freescale-imx/imx-kobs/imx-kobs.mk new file +12 -0
new file mode 100644
index 0000000..02c5cad
@@ -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))
Signature · 1 line
2.5.1
#2 lore raw

PATCH 1/2 imx-kobs: add new package

Quoted 42 lines · Gary Bisson

Based on the Yocto 3.14.28-1.0.0_ga update:
https://github.com/Freescale/meta-fsl-arm/commit/6c44744

---
 package/freescale-imx/Config.in                    |  1 +
 .../imx-kobs/0001-Fix-musl-build.patch             | 43 ++++++++++++++++++++++
 package/freescale-imx/imx-kobs/Config.in           | 10 +++++
 package/freescale-imx/imx-kobs/imx-kobs.hash       |  2 +
 package/freescale-imx/imx-kobs/imx-kobs.mk         | 12 ++++++
 5 files changed, 68 insertions(+)
 create mode 100644 package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch
 create mode 100644 package/freescale-imx/imx-kobs/Config.in
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.hash
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.mk
package/freescale-imx/Config.in +1 -0
index dffe76f..a958dbd 100644
@@ -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"
package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch new file +8 -0
new file mode 100644
index 0000000..4e9c72b
@@ -0,0 +1,43 @@
+[PATCH] Fix musl build
+
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ src/mtd.c | 5 +++++
+ src/mtd.h | 5 +++++
+ 2 files changed, 10 insertions(+)
+

package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch line 18

Quoted 10 lines
package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch new file +10 -0
+diff --git a/src/mtd.c b/src/mtd.c
+index 1edc441..2d3824e 100644
+--- a/src/mtd.c
++++ b/src/mtd.c
+@@ -34,6 +34,11 @@
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ 
++// musl offsetof macro is located in stddef.h
++#if !defined(__GLIBC__) && !defined(__UCLIBC__)

Since C99 (and probably C90 as well) specifies that offsetof is in stddef.h, I
don't think it's necessary to do this conditionally.

Regards,
Arnout

Quoted 6 lines
package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch new file +6 -0
++#include <stddef.h>
++#endif
++
+ #include "mtd.h"
+ #include "rand.h"
+ 

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/2 imx-kobs: add new package

Hi Arnout,

Quoted 48 lines · Arnout Vandecappelle
Quoted 47 lines · Gary Bisson

Based on the Yocto 3.14.28-1.0.0_ga update:
https://github.com/Freescale/meta-fsl-arm/commit/6c44744

---
 package/freescale-imx/Config.in                    |  1 +
 .../imx-kobs/0001-Fix-musl-build.patch             | 43 ++++++++++++++++++++++
 package/freescale-imx/imx-kobs/Config.in           | 10 +++++
 package/freescale-imx/imx-kobs/imx-kobs.hash       |  2 +
 package/freescale-imx/imx-kobs/imx-kobs.mk         | 12 ++++++
 5 files changed, 68 insertions(+)
 create mode 100644 package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch
 create mode 100644 package/freescale-imx/imx-kobs/Config.in
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.hash
 create mode 100644 package/freescale-imx/imx-kobs/imx-kobs.mk
package/freescale-imx/Config.in +1 -0
index dffe76f..a958dbd 100644
@@ -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"
package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch new file +13 -0
new file mode 100644
index 0000000..4e9c72b
@@ -0,0 +1,43 @@
+[PATCH] Fix musl build
+
+Signed-off-by: Gary Bisson <[email protected]>
+---
+ src/mtd.c | 5 +++++
+ src/mtd.h | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/src/mtd.c b/src/mtd.c
+index 1edc441..2d3824e 100644
+--- a/src/mtd.c
++++ b/src/mtd.c
+@@ -34,6 +34,11 @@
Quoted 8 lines

package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch line 18

Quoted 5 lines
package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch new file +5 -0
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+
++// musl offsetof macro is located in stddef.h
++#if !defined(__GLIBC__) && !defined(__UCLIBC__)

Since C99 (and probably C90 as well) specifies that offsetof is in stddef.h, I
don't think it's necessary to do this conditionally.

You're right. I just didn't think it through, when the build complained at offsetof I just looked at its location in the musl toolchain.

I'll submit a V2 soon. Thanks for the feedback.

Regards,
Gary

#4 lore raw

PATCH 2/2 kobs-ng: remove obsolete package

In reply to Gary Bisson

In favor of imx-kobs maintained by Freescale.

---
 Config.in.legacy                           |  8 ++++
 package/Config.in                          |  1 -
 package/kobs-ng/0001-fix-mtd-defines.patch | 73 ------------------------------
 package/kobs-ng/Config.in                  |  9 ----
 package/kobs-ng/kobs-ng.hash               |  2 -
 package/kobs-ng/kobs-ng.mk                 | 13 ------
 6 files changed, 8 insertions(+), 98 deletions(-)
 delete mode 100644 package/kobs-ng/0001-fix-mtd-defines.patch
 delete mode 100644 package/kobs-ng/Config.in
 delete mode 100644 package/kobs-ng/kobs-ng.hash
 delete mode 100644 package/kobs-ng/kobs-ng.mk
Config.in.legacy +8 -0
index 18231fd..5305538 100644
@@ -363,6 +363,14 @@ config BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW
 	  BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all
 	  examples.
 
+config BR2_PACKAGE_KOBS_NG
+	bool "kobs-ng was replaced by imx-kobs"
+	select BR2_LEGACY
+	select BR2_PACKAGE_IMX_KOBS
+	help
+	  The outdated kobs-ng has been replaced by the Freescale-
+	  maintained imx-kobs package.
+
 config BR2_PACKAGE_SAWMAN
 	bool "sawman package removed"
 	select BR2_LEGACY
package/Config.in +0 -1
index 22aef52..5c4c3b4 100644
@@ -164,7 +164,6 @@ menu "Filesystem and flash utilities"
 	source "package/genext2fs/Config.in"
 	source "package/genpart/Config.in"
 	source "package/genromfs/Config.in"
-	source "package/kobs-ng/Config.in"
 	source "package/makedevs/Config.in"
 	source "package/mmc-utils/Config.in"
 	source "package/mtd/Config.in"
package/kobs-ng/0001-fix-mtd-defines.patch deleted +0 -73

73 lines not on this page · raw message

package/kobs-ng/Config.in deleted +0 -9
deleted file mode 100644
index 1f6b2d1..0000000
@@ -1,9 +0,0 @@
-config BR2_PACKAGE_KOBS_NG
-	bool "kobs-ng"
-	depends on BR2_arm
-	help
-	  The kobs-ng tool is used for writing images to NAND on i.MX
-	  platforms.
-
-	  This utility is provided by Freescale as-is and doesn't have an
-	  upstream.
package/kobs-ng/kobs-ng.hash deleted +0 -2
deleted file mode 100644
index 3e527da..0000000
@@ -1,2 +0,0 @@
-# From http://repository.timesys.com/buildsources/k/kobs-ng/kobs-ng-3.0.35-4.0.0/kobs-ng-3.0.35-4.0.0.tar.gz.md5sum
-md5	26104c577f59a6b81782a5bd16aadd82	kobs-ng-3.0.35-4.0.0.tar.gz
package/kobs-ng/kobs-ng.mk deleted +0 -13
deleted file mode 100644
index 13d1faf..0000000
@@ -1,13 +0,0 @@
-################################################################################
-#
-# kobs-ng
-#
-################################################################################
-
-# kobs-ng versions have never made much sense :(
-KOBS_NG_VERSION = 3.0.35-4.0.0
-KOBS_NG_SITE = http://repository.timesys.com/buildsources/k/kobs-ng/kobs-ng-$(KOBS_NG_VERSION)
-KOBS_NG_LICENSE = GPLv2+
-KOBS_NG_LICENSE_FILES = COPYING
-
-$(eval $(autotools-package))
Signature · 1 line
2.5.1
#5 lore raw

PATCH 2/2 kobs-ng: remove obsolete package

Quoted 3 lines · Gary Bisson

In favor of imx-kobs maintained by Freescale.

Regards,
Arnout

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF