* [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on
@ 2013-11-22 18:10 jeroen.de.wachter at telenet.be
2013-11-22 19:52 ` Thomas De Schampheleire
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: jeroen.de.wachter at telenet.be @ 2013-11-22 18:10 UTC (permalink / raw)
To: buildroot
A menu entry has been added to set the port. This menu entry
is processed like entries that were already present and will
rewrite one line of the options.h file that is used by
dropbear during compilation.
Signed-off-by: Jeroen De Wachter <jeroen.de_wachter@alcatel-lucent.com>
---
package/dropbear/Config.in | 11 +++++++++++
package/dropbear/dropbear.mk | 6 ++++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in
index 68c3b71..f266567 100644
--- a/package/dropbear/Config.in
+++ b/package/dropbear/Config.in
@@ -36,4 +36,15 @@ config BR2_PACKAGE_DROPBEAR_LASTLOG
Enable logging of dropbear access to lastlog. Notice that
Buildroot does not generate lastlog by default.
+config BR2_PACKAGE_DROPBEAR_DEFPORT
+ int "Default port"
+ default "22"
+ depends on BR2_PACKAGE_DROPBEAR
+ help
+ Default port for dropbear to listen on. Can be overruled
+ by command line option. The default init script calls the
+ binary without parameters so if you want to use the
+ default script, this is a good way of setting a
+ non-standard port.
+
endif
diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
index 7fa9273..84c34be 100644
--- a/package/dropbear/dropbear.mk
+++ b/package/dropbear/dropbear.mk
@@ -39,6 +39,10 @@ define DROPBEAR_BUILD_FEATURED
$(SED) 's:.*\(#define DROPBEAR_SHA2_512_HMAC\).*:\1:' $(@D)/options.h
endef
+define DROPBEAR_SET_DEFPORT
+ $(SED) 's:.*\(#define DROPBEAR_DEFPORT\).*:\1 "$(BR2_PACKAGE_DROPBEAR_DEFPORT)":' $(@D)/options.h
+endef
+
define DROPBEAR_DISABLE_STANDALONE
$(SED) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D)/options.h
endef
@@ -72,6 +76,8 @@ ifneq ($(BR2_PACKAGE_DROPBEAR_LASTLOG),y)
DROPBEAR_CONF_OPT += --disable-lastlog
endif
+DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_SET_DEFPORT
+
define DROPBEAR_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear
for f in $(DROPBEAR_TARGET_BINS); do \
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on
2013-11-22 18:10 [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on jeroen.de.wachter at telenet.be
@ 2013-11-22 19:52 ` Thomas De Schampheleire
2013-11-22 20:17 ` Arnout Vandecappelle
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Thomas De Schampheleire @ 2013-11-22 19:52 UTC (permalink / raw)
To: buildroot
Hi Jeroen,
On Fri, Nov 22, 2013 at 7:10 PM, <jeroen.de.wachter@telenet.be> wrote:
> A menu entry has been added to set the port. This menu entry
> is processed like entries that were already present and will
> rewrite one line of the options.h file that is used by
> dropbear during compilation.
>
> Signed-off-by: Jeroen De Wachter <jeroen.de_wachter@alcatel-lucent.com>
> ---
> package/dropbear/Config.in | 11 +++++++++++
> package/dropbear/dropbear.mk | 6 ++++++
> 2 files changed, 17 insertions(+), 0 deletions(-)
>
> diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in
> index 68c3b71..f266567 100644
> --- a/package/dropbear/Config.in
> +++ b/package/dropbear/Config.in
> @@ -36,4 +36,15 @@ config BR2_PACKAGE_DROPBEAR_LASTLOG
> Enable logging of dropbear access to lastlog. Notice that
> Buildroot does not generate lastlog by default.
>
> +config BR2_PACKAGE_DROPBEAR_DEFPORT
> + int "Default port"
> + default "22"
> + depends on BR2_PACKAGE_DROPBEAR
This 'depends on' is no longer needed. There is already a 'if
BR2_PACKAGE_DROPBEAR' around this block.
Best regards
Thomas
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on
2013-11-22 18:10 [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on jeroen.de.wachter at telenet.be
2013-11-22 19:52 ` Thomas De Schampheleire
@ 2013-11-22 20:17 ` Arnout Vandecappelle
2013-11-22 20:58 ` Yann E. MORIN
2013-11-22 22:14 ` Peter Korsgaard
2013-12-03 4:04 ` [Buildroot] Moschip MCS8142 SoC Matthew Weber
3 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2013-11-22 20:17 UTC (permalink / raw)
To: buildroot
On 22/11/13 19:10, jeroen.de.wachter at telenet.be wrote:
> A menu entry has been added to set the port. This menu entry
> is processed like entries that were already present and will
> rewrite one line of the options.h file that is used by
> dropbear during compilation.
>
> Signed-off-by: Jeroen De Wachter<jeroen.de_wachter@alcatel-lucent.com>
Hi Jeroen,
Thank you for your patch. However, I don't think we will accept it in
buildroot. We could make thousands of configuration options that deal
with all possible fine-grained tweaking. And especially in this
particular case, the option is quite invasive (requires 5 additional
lines in the .mk file) and it is possible to achieve the same result by
adding a command-line option to dropbear, by including a custom
S50dropbear to your fs-overlay.
But of course, our friendly maintainer may be of a different opinion.
The patch itself looks good BTW, except that indentation should be with
a tab (tab + 2 spaces for the Config.in help text).
Regards,
Arnout
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on
2013-11-22 20:17 ` Arnout Vandecappelle
@ 2013-11-22 20:58 ` Yann E. MORIN
0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2013-11-22 20:58 UTC (permalink / raw)
To: buildroot
Jeroen, All,
On 2013-11-22 21:17 +0100, Arnout Vandecappelle spake thusly:
> On 22/11/13 19:10, jeroen.de.wachter at telenet.be wrote:
> >A menu entry has been added to set the port. This menu entry
> >is processed like entries that were already present and will
> >rewrite one line of the options.h file that is used by
> >dropbear during compilation.
> >
> >Signed-off-by: Jeroen De Wachter<jeroen.de_wachter@alcatel-lucent.com>
>
> Hi Jeroen,
>
> Thank you for your patch. However, I don't think we will accept it in
> buildroot. We could make thousands of configuration options that deal with
> all possible fine-grained tweaking. And especially in this particular case,
> the option is quite invasive (requires 5 additional lines in the .mk file)
> and it is possible to achieve the same result by adding a command-line
> option to dropbear, by including a custom S50dropbear to your fs-overlay.
Agreed. We've already declined to apply such changes in the past, on the
ground that this kind of run-time configuration should be delegated to
either one of:
- a post-build script (BR2_ROOTFS_POST_BUILD_SCRIPT)
- a rootfs-overlay (BR2_ROOTFS_OVERLAY)
The basic idea is that Buildroot should install default, sane config
files in /etc, and startup scripts, that provide the standard behaviour
of the package (when that makes sense), and that further project-specific
customisation is out-of-scope for Buildroot (but Buildroot offers the
rootfs-overlay and post-{build,image} scripts for that).
Also, I do not like the way this change tweaks the code between the
extract and patch steps. If that was to be accepted at all, then this
should be done with a real patch file, not a sed expression.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on
2013-11-22 18:10 [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on jeroen.de.wachter at telenet.be
2013-11-22 19:52 ` Thomas De Schampheleire
2013-11-22 20:17 ` Arnout Vandecappelle
@ 2013-11-22 22:14 ` Peter Korsgaard
2013-12-03 4:04 ` [Buildroot] Moschip MCS8142 SoC Matthew Weber
3 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2013-11-22 22:14 UTC (permalink / raw)
To: buildroot
>>>>> "jeroen" == jeroen de wachter <jeroen.de.wachter@telenet.be> writes:
Hi Jeroen,
> A menu entry has been added to set the port. This menu entry
> is processed like entries that were already present and will
> rewrite one line of the options.h file that is used by
> dropbear during compilation.
Thanks for the patch, but I'm afraid I agree with Arnout and Yann. The
difference between this option and the others is that there's a runtime
command line option to set the port (-p), whereas that isn't the case
for the others.
Please have a look at changing this with a post build script instead. If
we want to do something to make it a bit easier, then we could change
the init script to source /etc/default/dropbear if available and let if
define E.G. ARGS that we could add to the start-stop-command invocation
-E.G. how we do in S81named for the bind package.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Moschip MCS8142 SoC
2013-11-22 18:10 [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on jeroen.de.wachter at telenet.be
` (2 preceding siblings ...)
2013-11-22 22:14 ` Peter Korsgaard
@ 2013-12-03 4:04 ` Matthew Weber
2013-12-03 4:52 ` Baruch Siach
3 siblings, 1 reply; 7+ messages in thread
From: Matthew Weber @ 2013-12-03 4:04 UTC (permalink / raw)
To: buildroot
Has anyone happened to work with this Moschip SoC? I found Linux BSP
patches for the MCS8140 (OpenWRT 3.3 Kernel plus some initial attempts at
mainlining around 3.7), however that MCS8140 SoC was a true ARMv5 compared
to the MCS8142 seems to be based on a Faraday fa526 ARMv4. Plus I'm not
to sure if the bus and peripheral architecture are simliar (need to do a
little more research yet).
Any help is appreciated (reference docs that outline the register
definition, etc.) . We're trying to get a 3.x kernel running on this
target to replace a older 2.6.24 blob that we can't get source for.....
Thanks!
Matthew L Weber / Sr Software Engineer / Platform SW
mlweber1 at rockwellcollins.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131202/4ae22c2d/attachment-0001.html>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] Moschip MCS8142 SoC
2013-12-03 4:04 ` [Buildroot] Moschip MCS8142 SoC Matthew Weber
@ 2013-12-03 4:52 ` Baruch Siach
0 siblings, 0 replies; 7+ messages in thread
From: Baruch Siach @ 2013-12-03 4:52 UTC (permalink / raw)
To: buildroot
Hi Matthew,
On Mon, Dec 02, 2013 at 10:04:00PM -0600, Matthew Weber wrote:
> Has anyone happened to work with this Moschip SoC? I found Linux BSP
> patches for the MCS8140 (OpenWRT 3.3 Kernel plus some initial attempts at
> mainlining around 3.7), however that MCS8140 SoC was a true ARMv5 compared
> to the MCS8142 seems to be based on a Faraday fa526 ARMv4. Plus I'm not
> to sure if the bus and peripheral architecture are simliar (need to do a
> little more research yet).
>
> Any help is appreciated (reference docs that outline the register
> definition, etc.) . We're trying to get a 3.x kernel running on this
> target to replace a older 2.6.24 blob that we can't get source for.....
You have better chances of getting useful answers at the linux-arm-kernel
mailing list (linux-arm-kernel at lists.infradead.org).
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-12-03 4:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 18:10 [Buildroot] [PATCH 1/1] Add support to set the default port for dropbear to listen on jeroen.de.wachter at telenet.be
2013-11-22 19:52 ` Thomas De Schampheleire
2013-11-22 20:17 ` Arnout Vandecappelle
2013-11-22 20:58 ` Yann E. MORIN
2013-11-22 22:14 ` Peter Korsgaard
2013-12-03 4:04 ` [Buildroot] Moschip MCS8142 SoC Matthew Weber
2013-12-03 4:52 ` Baruch Siach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox