From: chenxy <field.xue@gmail.com>
To: buildroot@buildroot.org
Cc: fieldxy <field.xue@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH] feat: add siitool package
Date: Tue, 2 Nov 2021 22:18:47 +0800 [thread overview]
Message-ID: <20211102141848.364177-1-field.xue@gmail.com> (raw)
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
next reply other threads:[~2021-11-02 14:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 14:18 chenxy [this message]
2021-12-28 21:05 ` [Buildroot] [PATCH] feat: add siitool package Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211102141848.364177-1-field.xue@gmail.com \
--to=field.xue@gmail.com \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox