All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Foster <colin.foster@in-advantage.com>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [v1 2/2] bootpc: add dhcp-like configuration ability
Date: Wed, 24 May 2023 10:58:30 -0700	[thread overview]
Message-ID: <ZG5QRpfWU6SQGKqD@colin-ia-desktop> (raw)
In-Reply-To: <20230523211851.GL621937@scaer>

Hi Yann,

On Tue, May 23, 2023 at 11:18:51PM +0200, Yann E. MORIN wrote:
> Colin, All,
> 
> On 2023-05-23 10:21 -0700, Colin Foster spake thusly:
> > bootpc only works on interfaces that are up. If BOOTP is desired to get
> > an IP address to a running kernel, bootpc won't work.
> > 
> > This scenario was brought up as a bug in Debian forums [1] in 2007. The
> > response was to run the attached script to bring up the network without
> > an IP address. Sure enough, it still works!
> > 
> > Implement this bootpc script to allow IP configuration by way of
> > "iface eth0 inet bootp" in /etc/network/interfaces.
> 
> Can't one just use a pre-up command ?
> 
>     iface eth0 inet bootp
>         pre-up ip l set dev eth0 up
>         pre-up ip r add default dev eth0
>         post-up ip r del default dev eth0
> 
> Not sure that would work, but maybe worth a try?

I'll give it a shot. I tried a bunch of pre-up / post-up commands before
I found the script, but can't say I tried exactly this. I fully agree
though, if the script + rename implementation isn't needed, it should be
avoided.

> 
> Ditto as for patch 1/2: run check-package.

Apologies again. I'll clean up v2 and appreciate the feedback! And I'm
ack-ing everything you said below.

> 
> [--SNIP--]
> > diff --git a/package/bootpc/bootpc.mk b/package/bootpc/bootpc.mk
> > index d3c5ce5198..ebd7490ea1 100644
> > --- a/package/bootpc/bootpc.mk
> > +++ b/package/bootpc/bootpc.mk
> > @@ -8,12 +8,28 @@ BOOTPC_VERSION = 80c0811dc69f9f3923661be4f9f9c09a44313f62
> >  BOOTPC_SITE_METHOD = git
> >  BOOTPC_SITE = https://salsa.debian.org/debian/bootpc.git
> >  
> > +ifeq ($(BR2_PACKAGE_BOOTPC_FULL_CONFIG),y)
> > +BOOTPC_TARGET_BIN_NAME = bootpc-bin
> > +else
> > +BOOTPC_TARGET_BIN_NAME = bootpc
> > +endif
> > +
> >  define BOOTPC_BUILD_CMDS
> > -	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all
> > +	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) PROG=$(BOOTPC_TARGET_BIN_NAME) -C $(@D) all
> 
> Please keep lines below the ~80 char limit, e.g.:
> 
>         $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
>             -C $(@D) \
>             PROG=$(BOOTPC_TARGET_BIN_NAME) \
>             all
> 
> (I like to see '-C $(@D)' to be the first thing right after the call to
> make).
> 
> > +endef
> > +
> > +ifeq ($(BR2_PACKAGE_BOOTPC_FULL_CONFIG),y)
> > +define BOOTPC_INSTALL_CONFIG_SCRIPT
> > +	$(INSTALL) -m 0755 $(BR2_EXTERNAL_BR2INADVANTAGE_PATH)/package/bootpc/bootpc_dhcp_script $(TARGET_DIR)/sbin/bootpc
> > +endef
> > +else
> > +define BOOTPC_INSTALL_CONFIG_SCRIPT ""
> >  endef
> 
> No need to define an empty macro.
> 
> Regards,
> Yann E. MORIN.
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-05-24 17:58 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 ` [Buildroot] [v1 1/2] package/bootpc: new package Colin Foster
2023-05-23 20:43   ` 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 [this message]
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=ZG5QRpfWU6SQGKqD@colin-ia-desktop \
    --to=colin.foster@in-advantage.com \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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.