[Buildroot] [PATCH] configs/qemu_xtensa_lx60_nommu: use busybox minimal config

Arnout Vandecappelle arnout at mind.be
Thu Apr 7 16:39:53 UTC 2022



On 06/04/2022 22:00, Vincent Stehlé wrote:
> On Mon, Apr 04, 2022 at 10:28:12PM +0200, Arnout Vandecappelle wrote:
> ..
>>   But that actually causes a problem: if udhcpc doesn't keep running the
>> background any more, it's not going to refresh its lease, but will keep on
>> using its IP address indefinitely. Although this seems to work at first
>> hand, it's going to cause some problem somewhere down the line...
> 
> Hi Arnout,
> 
> After your comment at first I thought all the no-MMU buildroot defconfigs were
> subtly broken :-S
> 
> I did some investigations and now my understanding is that udhcpc does indeed
> daemonize by default in the no-MMU case. See [1]:
> 
>    #if !BB_MMU
>    	/* on NOMMU reexec (i.e., background) early */
>    	if (!(opt & OPT_f)) {
>    		bb_daemonize_or_rexec(0 /* flags */, argv);
>    		logmode = LOGMODE_NONE;
>    	}
>    #endif
> 
> That behaviour was added in busybox udhcpc while removing the -b option (in
> commit [2]).
> 
> Also, this is confirmed on qemu where we can see the udhcpc process running in
> the background:
> 
>    ~ # ps
>      PID USER       VSZ STAT COMMAND
>        1 root       616 S    init
>    ...
>       62 root       612 S    udhcpc -R -p /var/run/udhcpc.eth0.pid -i eth0 -x hos
> 
>>   So we should find a different solution, and we should probably use that in
>> the MMU case as well (just to keep things consistent.
> 
> Now I think that we are safe. What is your opinion on this, please?

  I'll add a summary of this entire explanation and commit it.

  Regards,
  Arnout

> 
> Best regards,
> Vincent.
> 
> [1]: https://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c#n1352
> [2]: https://git.busybox.net/busybox/commit/?id=21765fa063830923d13426ec6989c16da9210e49



More information about the buildroot mailing list