* [Buildroot] [PATCH 1/1] tftpd: make installation of tftp client optional
@ 2016-11-30 9:23 Nielsen, David Marqvar
2016-12-05 21:29 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Nielsen, David Marqvar @ 2016-11-30 9:23 UTC (permalink / raw)
To: buildroot
Signed-off-by: David Marqvar <david.nielsen@cobham.com>
---
package/tftpd/Config.in | 8 ++++++++
package/tftpd/tftpd.mk | 11 ++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/package/tftpd/Config.in b/package/tftpd/Config.in
index ea5cb30..9d6addd 100644
--- a/package/tftpd/Config.in
+++ b/package/tftpd/Config.in
@@ -6,3 +6,11 @@ config BR2_PACKAGE_TFTPD
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
help
HPA's Trivial File Transfer Protocol (tftp) server.
+
+config BR2_PACKAGE_TFTPD_OVERRIDE_BUSYBOX_TFTP
+ bool "install tftp"
+ default y
+ depends on BR2_PACKAGE_TFTPD
+ depends on BR2_PACKAGE_BUSYBOX
+ help
+ This will also override tftp from Busybox
diff --git a/package/tftpd/tftpd.mk b/package/tftpd/tftpd.mk
index 78df835..8080f97 100644
--- a/package/tftpd/tftpd.mk
+++ b/package/tftpd/tftpd.mk
@@ -9,13 +9,18 @@ TFTPD_SOURCE = tftp-hpa-$(TFTPD_VERSION).tar.xz
TFTPD_SITE = $(BR2_KERNEL_MIRROR)/software/network/tftp/tftp-hpa
TFTPD_CONF_OPTS = --without-tcpwrappers
-# Override BusyBox implementations if BusyBox is enabled.
-ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+
+ifeq ($(BR2_PACKAGE_TFTPD_OVERRIDE_BUSYBOX_TFTP),y)
+# override BusyBox - install after busybox
TFTPD_DEPENDENCIES += busybox
+define TFTPD_INSTALL_TARGET_TFTP
+ $(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp
+endef
endif
+
define TFTPD_INSTALL_TARGET_CMDS
- $(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp
+ $(TFTPD_INSTALL_TARGET_TFTP)
$(INSTALL) -D $(@D)/tftpd/tftpd $(TARGET_DIR)/usr/sbin/tftpd
endef
--
1.8.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] tftpd: make installation of tftp client optional
2016-11-30 9:23 [Buildroot] [PATCH 1/1] tftpd: make installation of tftp client optional Nielsen, David Marqvar
@ 2016-12-05 21:29 ` Thomas Petazzoni
2016-12-06 7:07 ` Nielsen, David Marqvar
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2016-12-05 21:29 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 30 Nov 2016 09:23:19 +0000, Nielsen, David Marqvar wrote:
> Signed-off-by: David Marqvar <david.nielsen@cobham.com>
> ---
> package/tftpd/Config.in | 8 ++++++++
> package/tftpd/tftpd.mk | 11 ++++++++---
> 2 files changed, 16 insertions(+), 3 deletions(-)
Your commit log is empty, so I'm not sure what you're trying to do
here. If I understand correctly, you want a sub-option to
enable/disable the installation of the "tftp" binary, so that you can
have a configuration where:
- tftpd is the one coming from the tftpd package
- tftp remains the one provided by Busybox
However, in Buildroot, we try to avoid having one sub-option per binary
program. We do have that in a few packages, and it's often very painful
and annoying to maintain. If you really, really don't like the tftp
program from the tftpd package, you can also add in your post-build
script:
rm /usr/bin/tftp
ln -s /bin/busybox /usr/bin/tftp
But I just checked and the tftp program installed by the tftp package
is only 22 KB in size:
thomas at skate:~/projets/buildroot (master)$ ls -l output/target/usr/bin/tftp
-rwxr-xr-x 1 thomas thomas 22252 d?c. 5 22:24 output/target/usr/bin/tftp
So I really don't think it's worth the effort having yet another
sub-option for 22 KB, especially when you can handle such tweaking in
your post-build script if you really really want to.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] tftpd: make installation of tftp client optional
2016-12-05 21:29 ` Thomas Petazzoni
@ 2016-12-06 7:07 ` Nielsen, David Marqvar
2016-12-06 7:20 ` Baruch Siach
0 siblings, 1 reply; 4+ messages in thread
From: Nielsen, David Marqvar @ 2016-12-06 7:07 UTC (permalink / raw)
To: buildroot
Hi Thomas Petazzoni,
> Your commit log is empty, so I'm not sure what you're trying to do
> here. If I understand correctly, you want a sub-option to
> enable/disable the installation of the "tftp" binary, so that you can
> have a configuration where:
> - tftpd is the one coming from the tftpd package
> - tftp remains the one provided by Busybox
Exactly.
The (rather unusual) situation is that the Busybox implementation has
features that the "full" tftpd package does not support - features that
we have come to rely on (set block size).
> However, in Buildroot, we try to avoid having one sub-option per binary
> program. We do have that in a few packages, and it's often very painful
> and annoying to maintain.
Ok.
> If you really, really don't like the tftp
> program from the tftpd package, you can also add in your post-build
> script:
> rm /usr/bin/tftp
> ln -s /bin/busybox /usr/bin/tftp
Thank you for this idea.
> But I just checked and the tftp program installed by the tftp package
> is only 22 KB in size:
> So I really don't think it's worth the effort having yet another
> sub-option for 22 KB, especially when you can handle such tweaking in
> your post-build script if you really really want to.
I agree.
Thank you very much for your response.
/David
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] tftpd: make installation of tftp client optional
2016-12-06 7:07 ` Nielsen, David Marqvar
@ 2016-12-06 7:20 ` Baruch Siach
0 siblings, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2016-12-06 7:20 UTC (permalink / raw)
To: buildroot
Hi David,
On Tue, Dec 06, 2016 at 07:07:36AM +0000, Nielsen, David Marqvar wrote:
> > Your commit log is empty, so I'm not sure what you're trying to do
> > here. If I understand correctly, you want a sub-option to
> > enable/disable the installation of the "tftp" binary, so that you can
> > have a configuration where:
> > - tftpd is the one coming from the tftpd package
> > - tftp remains the one provided by Busybox
>
> Exactly.
> The (rather unusual) situation is that the Busybox implementation has
> features that the "full" tftpd package does not support - features that
> we have come to rely on (set block size).
The atftp TFTP client seems to support block size set:
--option "blksize 1428"
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-06 7:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-30 9:23 [Buildroot] [PATCH 1/1] tftpd: make installation of tftp client optional Nielsen, David Marqvar
2016-12-05 21:29 ` Thomas Petazzoni
2016-12-06 7:07 ` Nielsen, David Marqvar
2016-12-06 7:20 ` Baruch Siach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox