Skip to contentSkip to conversation

ti-wpan: Add new package

PATCH New Alexandre Belloni 2 participants 3 messages Dec 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ti-wpan: Add new package

---
 package/Config.in                                  |  1 +
 package/ti-wpan/0001-Fix-build-on-uclibc.patch     | 30 ++++++++++++++++++++
 ...ine-message-macros-for-non-android-builds.patch | 32 ++++++++++++++++++++++
 package/ti-wpan/Config.in                          |  7 +++++
 package/ti-wpan/ti-wpan.mk                         | 25 +++++++++++++++++
 5 files changed, 95 insertions(+)
 create mode 100644 package/ti-wpan/0001-Fix-build-on-uclibc.patch
 create mode 100644 package/ti-wpan/0002-Define-message-macros-for-non-android-builds.patch
 create mode 100644 package/ti-wpan/Config.in
 create mode 100644 package/ti-wpan/ti-wpan.mk
package/Config.in +1 -0
index a7ab4ea9d535..ad32dca9890d 100644
@@ -330,6 +330,7 @@ source "package/sunxi-mali-prop/Config.in"
 source "package/sysstat/Config.in"
 source "package/ti-gfx/Config.in"
 source "package/ti-utils/Config.in"
+source "package/ti-wpan/Config.in"
 source "package/uboot-tools/Config.in"
 source "package/udev/Config.in"
 source "package/udisks/Config.in"
package/ti-wpan/0001-Fix-build-on-uclibc.patch new file +30 -0
new file mode 100644
index 000000000000..570b094954b8
@@ -0,0 +1,30 @@
+From b02b318cdd0f97351f5414e5c6591d0e40131674 Mon Sep 17 00:00:00 2001
+From: Alexandre Belloni <[email protected]>
+Date: Sun, 8 Dec 2013 08:53:46 +0100
+Subject: [PATCH 1/2] Fix build on uclibc
+
+uclibc doesn't define struct termios2, it is necessary to get it from
+the linux headers.
+
+Signed-off-by: Alexandre Belloni <[email protected]>
+---
+ ti_st/uim-sysfs/uim.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/ti_st/uim-sysfs/uim.c b/ti_st/uim-sysfs/uim.c
+index 60e34001f114..c927a3a24ca5 100644
+--- a/ti_st/uim-sysfs/uim.c
++++ b/ti_st/uim-sysfs/uim.c
+@@ -20,8 +20,7 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <signal.h>
+-#include <sys/ioctl.h>
+-#include <termios.h>
++#include <linux/termios.h>
+ #include <poll.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+-- 
+1.8.3.2
+
package/ti-wpan/0002-Define-message-macros-for-non-android-builds.patch new file +32 -0
new file mode 100644
index 000000000000..2d1ea88587dc
@@ -0,0 +1,32 @@
+From 17360cbf9f74885c7385b87430e9f77776a163ce Mon Sep 17 00:00:00 2001
+From: Alexandre Belloni <[email protected]>
+Date: Sun, 8 Dec 2013 08:57:13 +0100
+Subject: [PATCH 2/2] Define message macros for non android builds
+
+Trying to build uim-sysfs for linux (as opposed to android) will fail
+because the debug/message macros are not defined.
+
+Signed-off-by: Alexandre Belloni <[email protected]>
+---
+ ti_st/uim-sysfs/uim.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/ti_st/uim-sysfs/uim.h b/ti_st/uim-sysfs/uim.h
+index 5accf09aa0b9..199527eb9e4f 100644
+--- a/ti_st/uim-sysfs/uim.h
++++ b/ti_st/uim-sysfs/uim.h
+@@ -75,6 +75,11 @@
+ #define UIM_DBG(fmt, arg...)
+ #define UIM_VER(fmt, arg...)
+ #endif
++#else
++#define UIM_START_FUNC()
++#define UIM_DBG(fmt, arg...)
++#define UIM_VER(fmt, arg...)
++#define UIM_ERR(fmt, arg...) printf("uim: err:"fmt"\n" , ## arg)
+ #endif  /* ANDROID */
+ 
+ /*Termios2 structure for setting the Custom baud rate*/
+-- 
+1.8.3.2
+
package/ti-wpan/Config.in new file +7 -0
new file mode 100644
index 000000000000..2352c9ae6168
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_TI_WPAN
+	bool "ti-wpan"
+	help
+	  UIM daemon for the TI_ST driver. This daemon is needed to get the btwilink
+	  driver to work.
+
+	  http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution
package/ti-wpan/ti-wpan.mk new file +25 -0
new file mode 100644
index 000000000000..ef70495e3342
@@ -0,0 +1,25 @@
+#############################################################
+#
+# ti-wpan
+#
+#############################################################
+
+TI_WPAN_VERSION = 5beae4748cd36f4464a43e0a870c881a3f8f1b5b
+TI_WPAN_SITE = git://git.omapzoom.org/platform/hardware/ti/wpan.git
+TI_WPAN_LICENSE = GPLv2+
+TI_WPAN_LICENSE_FILES = ti_st/uim-sysfs/uim.c
+
+define TI_WPAN_BUILD_CMDS
+    cd $(@D)/ti_st/uim-sysfs && $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o uim-sysfs uim.c 
+endef
+
+define TI_WPAN_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/ti_st/uim-sysfs/uim-sysfs \
+		$(TARGET_DIR)/usr/sbin/uim-sysfs
+endef
+
+define TI_WPAN_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/sbin/uim-sysfs
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 ti-wpan: Add new package

Dear Alexandre Belloni,

Thanks for this contribution!

Quoted 9 lines · Alexandre Belloni
package/ti-wpan/ti-wpan.mk new file +3 -0
new file mode 100644
index 000000000000..ef70495e3342
@@ -0,0 +1,25 @@
+#############################################################
+#
+# ti-wpan

package/ti-wpan/ti-wpan.mk line 13

Quoted 10 lines
package/ti-wpan/ti-wpan.mk new file +10 -0
+#
+#############################################################
+
+TI_WPAN_VERSION = 5beae4748cd36f4464a43e0a870c881a3f8f1b5b
+TI_WPAN_SITE = git://git.omapzoom.org/platform/hardware/ti/wpan.git
+TI_WPAN_LICENSE = GPLv2+
+TI_WPAN_LICENSE_FILES = ti_st/uim-sysfs/uim.c
+
+define TI_WPAN_BUILD_CMDS
+    cd $(@D)/ti_st/uim-sysfs && $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o uim-sysfs uim.c 

Would be slightly better to have an indentation of one tab here, like the other commands below.

package/ti-wpan/ti-wpan.mk line 23

Quoted 10 lines
package/ti-wpan/ti-wpan.mk new file +10 -0
+endef
+
+define TI_WPAN_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/ti_st/uim-sysfs/uim-sysfs \
+		$(TARGET_DIR)/usr/sbin/uim-sysfs
+endef
+
+define TI_WPAN_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/sbin/uim-sysfs
+endef

Please remove the uninstall command. We have deprecated this, and they have all been removed from the repository a few days ago, so we don't want to introduce more of them :)

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 ti-wpan: Add new package

Quoted 27 lines · Thomas Petazzoni

Dear Alexandre Belloni,

Thanks for this contribution!

Quoted 9 lines · Alexandre Belloni
package/ti-wpan/ti-wpan.mk new file +3 -0
new file mode 100644
index 000000000000..ef70495e3342
@@ -0,0 +1,25 @@
+#############################################################
+#
+# ti-wpan

package/ti-wpan/ti-wpan.mk line 13

Quoted 10 lines
package/ti-wpan/ti-wpan.mk new file +10 -0
+#
+#############################################################
+
+TI_WPAN_VERSION = 5beae4748cd36f4464a43e0a870c881a3f8f1b5b
+TI_WPAN_SITE = git://git.omapzoom.org/platform/hardware/ti/wpan.git
+TI_WPAN_LICENSE = GPLv2+
+TI_WPAN_LICENSE_FILES = ti_st/uim-sysfs/uim.c
+
+define TI_WPAN_BUILD_CMDS
+    cd $(@D)/ti_st/uim-sysfs && $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o uim-sysfs uim.c 

Would be slightly better to have an indentation of one tab here, like the other commands below.

Quoted 13 lines

package/ti-wpan/ti-wpan.mk line 23

Quoted 10 lines
package/ti-wpan/ti-wpan.mk new file +10 -0
+endef
+
+define TI_WPAN_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/ti_st/uim-sysfs/uim-sysfs \
+		$(TARGET_DIR)/usr/sbin/uim-sysfs
+endef
+
+define TI_WPAN_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/sbin/uim-sysfs
+endef

Please remove the uninstall command. We have deprecated this, and they have all been removed from the repository a few days ago, so we don't want to introduce more of them :)

Will do. Anyway, scrap that, I just found another repository without all the android crap in it...

Quoted 3 lines

Thanks!

Thomas

Signature · 3 lines
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com