configs/qemu_xtensa_lx60_nommu: use busybox minimal config
PATCH 1/1 configs/qemu_xtensa_lx60_nommu: use busybox minimal config
Update the qemu_xtensa_lx60_nommu_defconfig to use the busybox-minimal.config, to make it more consistent with the other no-MMU defconfigs.
After commit 3de486f8b052 ("package/busybox: fix udhcpc options in minimal config"), this has the benefit of fixing the following network initialization failure:
udhcpc: invalid option -- b
--- configs/qemu_xtensa_lx60_nommu_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/qemu_xtensa_lx60_nommu_defconfig +3 -0
@@ -7,6 +7,9 @@ BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ BR2_PACKAGE_HOST_ELF2FLT=y # BR2_USE_MMU is not set +# Use minimal busybox with hush and networking tools +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" + # System BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 3 lines · Vincent Stehlé via buildroot
Update the
qemu_xtensa_lx60_nommu_defconfigto use the busybox-minimal.config, to make it more consistent with the other no-MMU defconfigs.
That's not a valid reason IMHO. We use the minimal busybox for boards that are
extremely tight on memory - which is often the case for noMMU boards. But if we can spare the size, full busybox is a lot more useable.
I've marked this patch as Rejected in patchwork, but if there's a good reason
to do this, we can always recover it.
Regards,
Arnout
Quoted 19 lines
After commit
3de486f8b052("package/busybox: fix udhcpc options in minimal config"), this has the benefit of fixing the following network initialization failure:udhcpc: invalid option -- b
Signed-off-by Vincent Stehlé <[email protected]>Cc Romain Naour <[email protected]>Cc Gerome Burlats <[email protected]>--- configs/qemu_xtensa_lx60_nommu_defconfig | 3 +++ 1 file changed, 3 insertions(+)configs/qemu_xtensa_lx60_nommu_defconfig +0
-0
configs/qemu_xtensa_lx60_nommu_defconfig BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ · line 15
Quoted 9 lines
configs/qemu_xtensa_lx60_nommu_defconfig +3
-0@@ -7,6 +7,9 @@ BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ BR2_PACKAGE_HOST_ELF2FLT=y # BR2_USE_MMU is not set +# Use minimal busybox with hush and networking tools +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" + # System BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines · Arnout Vandecappelle
Quoted 3 lines · Vincent Stehlé via buildroot
Update the
qemu_xtensa_lx60_nommu_defconfigto use the busybox-minimal.config, to make it more consistent with the other no-MMU defconfigs.That's not a valid reason IMHO. We use the minimal busybox for boards that
are extremely tight on memory - which is often the case for noMMU boards. But if we can spare the size, full busybox is a lot more useable.
Hi Arnout,
Thanks for reviewing this patch.
Quoted 2 lines
I've marked this patch as Rejected in patchwork, but if there's a good
reason to do this, we can always recover it.
There is another incentive to using the minimal config on no-MMU platforms: it fixes the udhcpc error and repairs the network initialization.
Just let me know if you want me to reword the commit message to insist more on this aspect and submit a v2. Or we can abandon it for good if you prefer.
Best regards,
Vincent.
Quoted 18 lines
Regards,
ArnoutQuoted 14 lines
After commit
3de486f8b052("package/busybox: fix udhcpc options in minimal config"), this has the benefit of fixing the following network initialization failure:udhcpc: invalid option -- b
Signed-off-by Vincent Stehlé <[email protected]>Cc Romain Naour <[email protected]>Cc Gerome Burlats <[email protected]>--- configs/qemu_xtensa_lx60_nommu_defconfig | 3 +++ 1 file changed, 3 insertions(+)
Quoted 13 lines
configs/qemu_xtensa_lx60_nommu_defconfig BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ · line 14
Quoted 13 lines
configs/qemu_xtensa_lx60_nommu_defconfig +3
-0@@ -7,6 +7,9 @@ BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ BR2_PACKAGE_HOST_ELF2FLT=y # BR2_USE_MMU is not set +# Use minimal busybox with hush and networking tools +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" + # System BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 14 lines · Vincent Stehlé
Quoted 10 lines · Arnout Vandecappelle
Quoted 3 lines · Vincent Stehlé via buildroot
Update the
qemu_xtensa_lx60_nommu_defconfigto use the busybox-minimal.config, to make it more consistent with the other no-MMU defconfigs.That's not a valid reason IMHO. We use the minimal busybox for boards that
are extremely tight on memory - which is often the case for noMMU boards. But if we can spare the size, full busybox is a lot more useable.Hi Arnout,
Quoted 7 lines
Thanks for reviewing this patch.
Quoted 2 lines
I've marked this patch as Rejected in patchwork, but if there's a good
reason to do this, we can always recover it.There is another incentive to using the minimal config on no-MMU platforms: it fixes the udhcpc error and repairs the network initialization.
Ooh, now I understand what that commit does...
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...
So we should find a different solution, and we should probably use that in the
MMU case as well (just to keep things consistent.
Regards,
Arnout
Quoted 25 lines
Just let me know if you want me to reword the commit message to insist more on this aspect and submit a v2. Or we can abandon it for good if you prefer.
Best regards,
Vincent.Quoted 18 lines
Regards,
ArnoutQuoted 14 lines
After commit
3de486f8b052("package/busybox: fix udhcpc options in minimal config"), this has the benefit of fixing the following network initialization failure:udhcpc: invalid option -- b
Signed-off-by Vincent Stehlé <[email protected]>Cc Romain Naour <[email protected]>Cc Gerome Burlats <[email protected]>--- configs/qemu_xtensa_lx60_nommu_defconfig | 3 +++ 1 file changed, 3 insertions(+)
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
configs/qemu_xtensa_lx60_nommu_defconfig +0
-0@@ -7,6 +7,9 @@ BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/Quoted 8 lines
configs/qemu_xtensa_lx60_nommu_defconfig BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ · line 15
Quoted 8 lines
configs/qemu_xtensa_lx60_nommu_defconfig +3
-0BR2_PACKAGE_HOST_ELF2FLT=y # BR2_USE_MMU is not set +# Use minimal busybox with hush and networking tools +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" + # System BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
On Mon, Apr 04, 2022 at 10:28:12PM +0200, Arnout Vandecappelle wrote:
..
Quoted 4 lines
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;
}
#endifThat 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
Quoted 2 lines
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?
Best regards,
Vincent.
[1]: https://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c#n1352
[2]: https://git.busybox.net/busybox/commit/?id=21765fa063830923d13426ec6989c16da9210e49
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 35 lines · Vincent Stehlé
On Mon, Apr 04, 2022 at 10:28:12PM +0200, Arnout Vandecappelle wrote:
..Quoted 4 lines
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; } #endifThat 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
Quoted 4 lines
Quoted 2 lines
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
Quoted 6 lines
Best regards,
Vincent.[1]: https://git.busybox.net/busybox/tree/networking/udhcp/dhcpc.c#n1352
[2]: https://git.busybox.net/busybox/commit/?id=21765fa063830923d13426ec6989c16da9210e49
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · Vincent Stehlé via buildroot
Update the
qemu_xtensa_lx60_nommu_defconfigto use the busybox-minimal.config, to make it more consistent with the other no-MMU defconfigs.After commit
3de486f8b052("package/busybox: fix udhcpc options in minimal config"), this has the benefit of fixing the following network initialization failure:
Quoted 5 lines
udhcpc: invalid option -- b
Signed-off-by Vincent Stehlé <[email protected]>Cc Romain Naour <[email protected]>Cc Gerome Burlats <[email protected]>
As promised: applied to master with an extended commit message.
However, the proper approach would be to revert both this and 3de486f8b052,
and instead add a config fixup to busybox.mk that removes the -b option from CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS on NOMMU. The regex to match it is going to be tricky to write though... (/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-b\b/ works for our config, but we also want to remove it from a user-supplied config where -b may not be the first option).
So in order to get this fixed expediently, I applied this patch.
Regards,
Arnout
Quoted 9 lines
--- configs/qemu_xtensa_lx60_nommu_defconfig | 3 +++ 1 file changed, 3 insertions(+)configs/qemu_xtensa_lx60_nommu_defconfig +0
-0
configs/qemu_xtensa_lx60_nommu_defconfig BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ · line 15
Quoted 9 lines
configs/qemu_xtensa_lx60_nommu_defconfig +3
-0@@ -7,6 +7,9 @@ BR2_XTENSA_OVERLAY_FILE="https://github.com/jcmvbkbc/xtensa-toolchain-build/raw/ BR2_PACKAGE_HOST_ELF2FLT=y # BR2_USE_MMU is not set +# Use minimal busybox with hush and networking tools +BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" + # System BR2_SYSTEM_DHCP="eth0" BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Vincent" == Vincent Stehlé via buildroot <[email protected]> writes:
Update the
qemu_xtensa_lx60_nommu_defconfigto use the busybox-minimal.config, to make it more consistent with the other no-MMU defconfigs.After commit
3de486f8b052("package/busybox: fix udhcpc options in minimal config"), this has the benefit of fixing the following network initialization failure:
Quoted 5 lines
udhcpc: invalid option -- b
Signed-off-by Vincent Stehlé <[email protected]>Cc Romain Naour <[email protected]>Cc Gerome Burlats <[email protected]>
Committed to 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot