Skip to contentSkip to conversation

emlog:new package

PATCH New Joris Lijssens 2 participants 2 messages Dec 4, 2015 – Dec 17, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 emlog:new package

---
 package/Config.in        |  1 +
 package/emlog/Config.in  | 12 ++++++++++++
 package/emlog/emlog.hash |  2 ++
 package/emlog/emlog.mk   | 26 ++++++++++++++++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 package/emlog/Config.in
 create mode 100644 package/emlog/emlog.hash
 create mode 100644 package/emlog/emlog.mk
package/Config.in +1 -0
index 2bdad01..c862c40 100644
@@ -1499,6 +1499,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/debianutils/Config.in"
 endif
 	source "package/dsp-tools/Config.in"
+	source "package/emlog/Config.in"
 	source "package/ftop/Config.in"
 	source "package/getent/Config.in"
 	source "package/htop/Config.in"
package/emlog/Config.in new file +12 -0
new file mode 100644
index 0000000..85a9ed6
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_EMLOG
+	bool "emlog"
+	help
+	  emlog is a Linux kernel module that makes it easy to access the most
+	  recent (and only the most recent) output from a process. It works
+	  just like "tail -f" on a log file, except that the storage required
+	  never grows. This can be useful in embedded systems where there isn't
+	  enough memory or disk space for keeping complete log files, but the
+	  most recent debugging messages are sometimes needed (e.g., after an
+	  error is observed).
+
+	  https://github.com/nicupavel/emlog
package/emlog/emlog.hash new file +2 -0
new file mode 100644
index 0000000..ab729f8
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 37b03b79684245ddcb33cfff388a7f2d74f465f2e1fce4f661b81726f5ccd595 emlog-0.52.tar.gz
package/emlog/emlog.mk new file +26 -0
new file mode 100644
index 0000000..9264849
@@ -0,0 +1,26 @@
+################################################################################
+#
+# emlog
+#
+################################################################################
+
+EMLOG_VERSION = 0.52
+EMLOG_SITE = $(call github,nicupavel,emlog,emlog-$(EMLOG_VERSION))
+EMLOG_LICENSE = GPLv2
+EMLOG_LICENSE_FILES = COPYING
+
+EMLOG_DEPENDENCIES = linux
+
+define EMLOG_BUILD_CMDS
+       $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules
+       $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(@D) nbcat
+endef
+
+define EMLOG_INSTALL_TARGET_CMDS
+       $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) \
+               INSTALL_MOD_STRIP=1 \
+               modules_install
+       $(INSTALL) -m 0755 $(@D)/nbcat $(TARGET_DIR)/usr/bin
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 emlog:new package

Joris, All,

On 2015-12-04 11:22 +0100, Joris Lijssens spake thusly:

Quoted 2 lines

---

[--SNIP--]

Quoted 20 lines
package/emlog/emlog.mk new file +14 -0
new file mode 100644
index 0000000..9264849
@@ -0,0 +1,26 @@
+################################################################################
+#
+# emlog
+#
+################################################################################
+
+EMLOG_VERSION = 0.52
+EMLOG_SITE = $(call github,nicupavel,emlog,emlog-$(EMLOG_VERSION))
+EMLOG_LICENSE = GPLv2
+EMLOG_LICENSE_FILES = COPYING
+
+EMLOG_DEPENDENCIES = linux
+
+define EMLOG_BUILD_CMDS

package/emlog/emlog.mk line 24

Quoted 10 lines
package/emlog/emlog.mk new file +10 -0
+       $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules
+       $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(@D) nbcat
+endef
+
+define EMLOG_INSTALL_TARGET_CMDS
+       $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) \
+               INSTALL_MOD_STRIP=1 \
+               modules_install
+       $(INSTALL) -m 0755 $(@D)/nbcat $(TARGET_DIR)/usr/bin
+endef

As far as I can see, this is using the standrad Linux out-of-tree external module mechanism to build the emlog module. Buildroot has an infrastructure to help write packages that build a kernel module:
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_packages_building_kernel_modules

Thomas and I believe emlog should use that kernel-module infra. You just need to handle the nbcat userland utility with the generic-package infra.

Care to update and respin, please?

In the meantime, I'm marking this patch as "Changes Requested" in our Patchwork.

Thanks! :-)

Quoted 8 lines
package/emlog/emlog.mk new file +1 -0
+$(eval $(generic-package))
Signature · 6 lines
1.8.3.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'