* [Buildroot] [PATCH] feat: add siitool package
@ 2021-11-02 14:18 chenxy
2021-12-28 21:05 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: chenxy @ 2021-11-02 14:18 UTC (permalink / raw)
To: buildroot; +Cc: fieldxy, Thomas Petazzoni
From: fieldxy <field.xue@gmail.com>
- Siitool generates your SII/EEPROM files from the ESI/XML description files of
your EtherCAT devices. The program is also capable of interpreting a raw SII/EEPROM
file and print it in a human-friendly syntax.
- git web https://github.com/synapticon/siitool
---
package/Config.in | 1 +
...makefile-xmllib-and-ld-command-error.patch | 47 +++++++++++++++++++
package/siitool/Config.in | 9 ++++
package/siitool/siitool.mk | 23 +++++++++
4 files changed, 80 insertions(+)
create mode 100644 package/siitool/0001-fix-makefile-xmllib-and-ld-command-error.patch
create mode 100644 package/siitool/Config.in
create mode 100644 package/siitool/siitool.mk
diff --git a/package/Config.in b/package/Config.in
index c23755a421..752c935ea1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -599,6 +599,7 @@ endmenu
source "package/wipe/Config.in"
source "package/xorriso/Config.in"
source "package/xr819-xradio/Config.in"
+ source "package/siitool/Config.in"
endmenu
menu "Interpreter languages and scripting"
diff --git a/package/siitool/0001-fix-makefile-xmllib-and-ld-command-error.patch b/package/siitool/0001-fix-makefile-xmllib-and-ld-command-error.patch
new file mode 100644
index 0000000000..27b334f65a
--- /dev/null
+++ b/package/siitool/0001-fix-makefile-xmllib-and-ld-command-error.patch
@@ -0,0 +1,47 @@
+From 1b9b9b25b9fcf039a0566879d42e85d8941ea38d Mon Sep 17 00:00:00 2001
+From: chenxueyuan <chenxueyuan@hcfa.cn>
+Date: Mon, 1 Nov 2021 15:02:14 +0800
+Subject: [PATCH] fix: makefile xmllib and ld command error
+
+---
+ Makefile | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 17229b7..1872df2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,9 +1,6 @@
+ # project file for siitool
+
+-CC = gcc
+-LD = gcc
+-
+-INSTALL = install
++prefix = $(STAGING_DIR)
+
+ WARNINGS = -Wall -Wextra
+ OPTIMIZATION = -O2
+@@ -25,8 +22,8 @@ endif
+ endif
+
+ # add libxml specific flags
+-CFLAGS += `xml2-config --cflags`
+-LDFLAGS += `xml2-config --libs`
++CFLAGS += `$(prefix)/usr/bin/xml2-config --cflags`
++LDFLAGS += `$(prefix)/usr/bin/xml2-config --libs`
+
+ H2MFLAGS = --help-option "-h" --version-option "-v" --no-discard-stderr --no-info
+
+@@ -53,7 +50,7 @@ all: $(TARGET)
+ man: $(TARGET).1
+
+ $(TARGET): $(OBJECTS)
+- $(LD) -o $@ $^ $(LDFLAGS)
++ $(CC) -o $@ $^ $(LDFLAGS)
+
+ $(TARGET).1:
+ help2man -o $@ $(H2MFLAGS) -i misc/mansections.txt ./${TARGET}
+--
+2.25.1
+
diff --git a/package/siitool/Config.in b/package/siitool/Config.in
new file mode 100644
index 0000000000..23b338b9fb
--- /dev/null
+++ b/package/siitool/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_SIITOOL
+ bool "siitool"
+ depends on BR2_PACKAGE_LIBXML2
+ help
+ Siitool generates your SII/EEPROM files from the
+ ESI/XML description files of your EtherCAT devices.
+
+ https://github.com/synapticon/siitool/
+
diff --git a/package/siitool/siitool.mk b/package/siitool/siitool.mk
new file mode 100644
index 0000000000..46eacea6cc
--- /dev/null
+++ b/package/siitool/siitool.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# siitool
+#
+################################################################################
+
+SIITOOL_VERSION = v1.4
+SIITOOL_SITE = $(call github,synapticon,siitool,$(SIITOOL_VERSION))
+SIITOOL_SITE_METHOD=git
+SIITOOL_LICENSE = GPL-2.0
+SIITOOL_LICENSE_FILES = LICENSE COPYING
+
+SIITOOL_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)"
+
+define SIITOOL_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
+endef
+
+define SIITOOL_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/siitool $(TARGET_DIR)/usr/bin/siitool
+endef
+
+$(eval $(generic-package))
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] feat: add siitool package
2021-11-02 14:18 [Buildroot] [PATCH] feat: add siitool package chenxy
@ 2021-12-28 21:05 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-12-28 21:05 UTC (permalink / raw)
To: chenxy; +Cc: buildroot
Hello fieldxy,
On Tue, 2 Nov 2021 22:18:47 +0800
chenxy <field.xue@gmail.com> wrote:
> From: fieldxy <field.xue@gmail.com>
>
> - Siitool generates your SII/EEPROM files from the ESI/XML description files of
> your EtherCAT devices. The program is also capable of interpreting a raw SII/EEPROM
> file and print it in a human-friendly syntax.
> - git web https://github.com/synapticon/siitool
Thanks for your patch. But unfortunately, as it is, we can't apply it
as we don't accept anonymous contributions. Could you resubmit with
your full name?
Thanks a lot!
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-28 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-02 14:18 [Buildroot] [PATCH] feat: add siitool package chenxy
2021-12-28 21:05 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox