All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Foster <colin.foster@in-advantage.com>
To: buildroot@buildroot.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [v1 1/2] package/bootpc: new package
Date: Tue, 23 May 2023 10:21:19 -0700	[thread overview]
Message-ID: <20230523172120.1948573-2-colin.foster@in-advantage.com> (raw)
In-Reply-To: <20230523172120.1948573-1-colin.foster@in-advantage.com>

Add the ability to select, build, and run bootpc - a client program for
BOOTP requests.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
 package/Config.in                             |  1 +
 package/bootpc/0001-main-fix-build.patch      | 37 +++++++++++++++++++
 ...Makefile-remove-strip-from-the-build.patch | 28 ++++++++++++++
 package/bootpc/Config.in                      |  5 +++
 package/bootpc/bootpc.mk                      | 19 ++++++++++
 5 files changed, 90 insertions(+)
 create mode 100644 package/bootpc/0001-main-fix-build.patch
 create mode 100644 package/bootpc/0002-Makefile-remove-strip-from-the-build.patch
 create mode 100644 package/bootpc/Config.in
 create mode 100644 package/bootpc/bootpc.mk

diff --git a/package/Config.in b/package/Config.in
index 420ebaa370..07de6500bf 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2273,6 +2273,7 @@ endif
 	source "package/bmon/Config.in"
 	source "package/bmx7/Config.in"
 	source "package/boinc/Config.in"
+    source "package/bootpc/Config.in"
 	source "package/brcm-patchram-plus/Config.in"
 	source "package/bridge-utils/Config.in"
 	source "package/bwm-ng/Config.in"
diff --git a/package/bootpc/0001-main-fix-build.patch b/package/bootpc/0001-main-fix-build.patch
new file mode 100644
index 0000000000..cf4ad66e47
--- /dev/null
+++ b/package/bootpc/0001-main-fix-build.patch
@@ -0,0 +1,37 @@
+From 349164d3db2210fb51e3784dd1afbe2b120f32d6 Mon Sep 17 00:00:00 2001
+From: Colin Foster <colin.foster@in-advantage.com>
+Date: Mon, 20 Mar 2023 11:18:13 -0700
+Subject: [PATCH 1/2] main: fix build
+
+---
+ main.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/main.c b/main.c
+index 6774cf1..0aa3767 100644
+--- a/main.c
++++ b/main.c
+@@ -21,8 +21,6 @@
+ 
+ #include "bootpc.h"
+ 
+-FILE * logfile = stderr ;
+-
+ int main(int argc,
+ 	 char *argv[])
+ {
+@@ -159,8 +157,8 @@ void doLogMessage(char * s, ...) {
+     va_list args;
+ 
+     va_start(args, s);
+-    fprintf(logfile, "* ");
+-    vfprintf(logfile, s, args);
+-    fprintf(logfile, "\n");
++    fprintf(stderr, "* ");
++    vfprintf(stderr, s, args);
++    fprintf(stderr, "\n");
+     va_end(args);
+ }
+-- 
+2.25.1
+
diff --git a/package/bootpc/0002-Makefile-remove-strip-from-the-build.patch b/package/bootpc/0002-Makefile-remove-strip-from-the-build.patch
new file mode 100644
index 0000000000..1f5edab2eb
--- /dev/null
+++ b/package/bootpc/0002-Makefile-remove-strip-from-the-build.patch
@@ -0,0 +1,28 @@
+From a58a27b82d2d822e338b46ce6eb270f121a8905f Mon Sep 17 00:00:00 2001
+From: Colin Foster <colin.foster@in-advantage.com>
+Date: Mon, 20 Mar 2023 11:35:12 -0700
+Subject: [PATCH 2/2] Makefile: remove strip from the build
+
+---
+ Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4189648..54562ba 100644
+--- a/Makefile
++++ b/Makefile
+@@ -33,11 +33,9 @@ clean:
+ 
+ ${PROG}: ${OBJS}
+ 	${CC} -o ${PROG} ${CFLAGS} ${OBJS}
+-	strip ${PROG}
+ 
+ ${PROG}-static: ${OBJS}
+ 	${CC} -static -o ${PROG} ${CFLAGS} ${OBJS}
+-	strip ${PROG}
+ 
+ # Make up a distribution file from the bits we want people to see
+ distrib:  $(CFILES) $(CHEADS) $(MISC)
+-- 
+2.25.1
+
diff --git a/package/bootpc/Config.in b/package/bootpc/Config.in
new file mode 100644
index 0000000000..2936142b7f
--- /dev/null
+++ b/package/bootpc/Config.in
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_BOOTPC
+	bool "bootpc"
+	help
+		Application to perform BOOTP
+
diff --git a/package/bootpc/bootpc.mk b/package/bootpc/bootpc.mk
new file mode 100644
index 0000000000..d3c5ce5198
--- /dev/null
+++ b/package/bootpc/bootpc.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# bootpc package
+#
+################################################################################
+
+BOOTPC_VERSION = 80c0811dc69f9f3923661be4f9f9c09a44313f62
+BOOTPC_SITE_METHOD = git
+BOOTPC_SITE = https://salsa.debian.org/debian/bootpc.git
+
+define BOOTPC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all
+endef
+
+define BOOTPC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/bootpc $(TARGET_DIR)/sbin
+endef
+
+$(eval $(generic-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-05-23 17:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23 17:21 [Buildroot] [v1 0/2] add bootpc package Colin Foster
2023-05-23 17:21 ` Colin Foster [this message]
2023-05-23 20:43   ` [Buildroot] [v1 1/2] package/bootpc: new package Yann E. MORIN
2023-05-24 17:49     ` Colin Foster
2023-05-23 17:21 ` [Buildroot] [v1 2/2] bootpc: add dhcp-like configuration ability Colin Foster
2023-05-23 21:18   ` Yann E. MORIN
2023-05-24 17:58     ` Colin Foster
2023-05-25 15:31       ` Colin Foster

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=20230523172120.1948573-2-colin.foster@in-advantage.com \
    --to=colin.foster@in-advantage.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.