* [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode
@ 2019-06-19 16:42 Titouan Christophe
2019-06-19 16:42 ` [Buildroot] [PATCH 1/3] package/busybox: bump version to 1.31.0 Titouan Christophe
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Titouan Christophe @ 2019-06-19 16:42 UTC (permalink / raw)
To: buildroot
The latest Busybox release introduces the daemon mode
for mdev, which can be used as a replacement for the
uevent+mdev setup, or the old kernel hotplug mechanism.
This new mode prevent race conditions in mdev invocations,
but on the other hand it requires CONFIG_NET to be enabled
in the kernel.
In this patchset, Busybox is bumped to the latest version,
the default configuration is updated to support the mdev
daemon mode, and the mdev init script is updated accordingly
Titouan Christophe (3):
package/busybox: bump version to 1.31.0
package/busybox: convert S10mdev to the canonical init script format
package/busybox: run mdev in daemon mode
...-scripted_main-as-externally-visible.patch | 53 -------------------
package/busybox/S10mdev | 42 ++++++++++-----
package/busybox/busybox.config | 1 +
package/busybox/busybox.hash | 4 +-
package/busybox/busybox.mk | 2 +-
5 files changed, 34 insertions(+), 68 deletions(-)
delete mode 100644 package/busybox/0003-libbb-mark-scripted_main-as-externally-visible.patch
--
2.21.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 1/3] package/busybox: bump version to 1.31.0
2019-06-19 16:42 [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode Titouan Christophe
@ 2019-06-19 16:42 ` Titouan Christophe
2019-06-19 16:42 ` [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format Titouan Christophe
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Titouan Christophe @ 2019-06-19 16:42 UTC (permalink / raw)
To: buildroot
Remove 0003-libbb-mark-scripted_main-as-externally-visible.patch
as it was committed upstream in 3193cb56d6
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
...-scripted_main-as-externally-visible.patch | 53 -------------------
package/busybox/busybox.hash | 4 +-
package/busybox/busybox.mk | 2 +-
3 files changed, 3 insertions(+), 56 deletions(-)
delete mode 100644 package/busybox/0003-libbb-mark-scripted_main-as-externally-visible.patch
diff --git a/package/busybox/0003-libbb-mark-scripted_main-as-externally-visible.patch b/package/busybox/0003-libbb-mark-scripted_main-as-externally-visible.patch
deleted file mode 100644
index d3b174dd4a..0000000000
--- a/package/busybox/0003-libbb-mark-scripted_main-as-externally-visible.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From eb5830223d452944b96e526b2f44158bda5c5c56 Mon Sep 17 00:00:00 2001
-From: Ron Yorston <rmy@pobox.com>
-Date: Sat, 30 Mar 2019 07:47:12 +0000
-Subject: [PATCH] libbb: mark scripted_main() as externally visible
-
-Building with individual binaries enabled fails when embedded
-script applets are included:
-
- /tmp/ccIvMFZg.o: In function `main':
- applet.c:(.text.main+0x20): undefined reference to `scripted_main'
-
-Mark scripted_main() as externally visible.
-
-Reported-by: Yann E. MORIN <yann.morin.1998@free.fr>
-Signed-off-by: Ron Yorston <rmy@pobox.com>
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
----
-Upstream status: reported, patch pending;
- http://lists.busybox.net/pipermail/busybox/2019-March/087148.html
- http://lists.busybox.net/pipermail/busybox/2019-March/087149.html
----
- include/libbb.h | 2 +-
- libbb/appletlib.c | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/include/libbb.h b/include/libbb.h
-index e0d5521e4..a20d5e403 100644
---- a/include/libbb.h
-+++ b/include/libbb.h
-@@ -1347,7 +1347,7 @@ void bb_logenv_override(void) FAST_FUNC;
-
- /* Embedded script support */
- char *get_script_content(unsigned n) FAST_FUNC;
--int scripted_main(int argc, char** argv);
-+int scripted_main(int argc, char** argv) MAIN_EXTERNALLY_VISIBLE;
-
- /* Applets which are useful from another applets */
- int bb_cat(char** argv) FAST_FUNC;
-diff --git a/libbb/appletlib.c b/libbb/appletlib.c
-index c15014a34..fa19e8488 100644
---- a/libbb/appletlib.c
-+++ b/libbb/appletlib.c
-@@ -770,6 +770,7 @@ static int find_script_by_name(const char *name)
- return -1;
- }
-
-+int scripted_main(int argc UNUSED_PARAM, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int scripted_main(int argc UNUSED_PARAM, char **argv)
- {
- int script = find_script_by_name(applet_name);
---
-2.14.1
-
diff --git a/package/busybox/busybox.hash b/package/busybox/busybox.hash
index c6804dc1fe..2b346e685d 100644
--- a/package/busybox/busybox.hash
+++ b/package/busybox/busybox.hash
@@ -1,3 +1,3 @@
-# From https://busybox.net/downloads/busybox-1.30.1.tar.bz2.sha256
-sha256 3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc busybox-1.30.1.tar.bz2
+# From https://busybox.net/downloads/busybox-1.31.0.tar.bz2.sha256
+sha256 0e4925392fd9f3743cc517e031b68b012b24a63b0cf6c1ff03cce7bb3846cc99 busybox-1.31.0.tar.bz2
sha256 bbfc9843646d483c334664f651c208b9839626891d8f17604db2146962f43548 LICENSE
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index e606068a90..7a5a37a05d 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -4,7 +4,7 @@
#
################################################################################
-BUSYBOX_VERSION = 1.30.1
+BUSYBOX_VERSION = 1.31.0
BUSYBOX_SITE = http://www.busybox.net/downloads
BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
BUSYBOX_LICENSE = GPL-2.0
--
2.21.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format
2019-06-19 16:42 [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode Titouan Christophe
2019-06-19 16:42 ` [Buildroot] [PATCH 1/3] package/busybox: bump version to 1.31.0 Titouan Christophe
@ 2019-06-19 16:42 ` Titouan Christophe
2019-06-20 10:10 ` Andy Shevchenko
2019-06-19 16:42 ` [Buildroot] [PATCH 3/3] package/busybox: run mdev in daemon mode Titouan Christophe
2019-06-20 14:31 ` [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev " Thomas Petazzoni
3 siblings, 1 reply; 12+ messages in thread
From: Titouan Christophe @ 2019-06-19 16:42 UTC (permalink / raw)
To: buildroot
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
package/busybox/S10mdev | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev
index 7075b77016..efef4290ba 100644
--- a/package/busybox/S10mdev
+++ b/package/busybox/S10mdev
@@ -3,21 +3,24 @@
# Start mdev....
#
-case "$1" in
- start)
+
+start() {
echo "Starting mdev..."
echo /sbin/mdev >/proc/sys/kernel/hotplug
/sbin/mdev -s
# coldplug modules
- find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \
- xargs -0 modprobe -abq
- ;;
- stop)
- ;;
- restart|reload)
+ find /sys/ -name modalias -print0 | \
+ xargs -0 sort -u | \
+ tr '\n' '\0' | \
+ xargs -0 modprobe -abq
+}
+
+case "$1" in
+ start)
+ "$1"
;;
*)
- echo "Usage: $0 {start|stop|restart}"
+ echo "Usage: $0 start"
exit 1
esac
--
2.21.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 3/3] package/busybox: run mdev in daemon mode
2019-06-19 16:42 [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode Titouan Christophe
2019-06-19 16:42 ` [Buildroot] [PATCH 1/3] package/busybox: bump version to 1.31.0 Titouan Christophe
2019-06-19 16:42 ` [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format Titouan Christophe
@ 2019-06-19 16:42 ` Titouan Christophe
2019-06-20 14:31 ` [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev " Thomas Petazzoni
3 siblings, 0 replies; 12+ messages in thread
From: Titouan Christophe @ 2019-06-19 16:42 UTC (permalink / raw)
To: buildroot
- Enable the mdev daemon mode in Busybox default config
- Update the S10mdev init script to use the daemon mode
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
---
package/busybox/S10mdev | 27 +++++++++++++++++++++------
package/busybox/busybox.config | 1 +
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev
index efef4290ba..3c6f47c18c 100644
--- a/package/busybox/S10mdev
+++ b/package/busybox/S10mdev
@@ -1,13 +1,17 @@
#!/bin/sh
#
-# Start mdev....
+# Run the mdev daemon
#
+DAEMON="mdev"
+PIDFILE="/var/run/$DAEMON.pid"
+
start() {
- echo "Starting mdev..."
- echo /sbin/mdev >/proc/sys/kernel/hotplug
- /sbin/mdev -s
+ echo -n "Starting $DAEMON... "
+ start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/mdev -- -df
+ [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+
# coldplug modules
find /sys/ -name modalias -print0 | \
xargs -0 sort -u | \
@@ -15,12 +19,23 @@ start() {
xargs -0 modprobe -abq
}
+stop() {
+ echo -n "Stopping $DAEMON... "
+ start-stop-daemon -K -p $PIDFILE
+ [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+}
+
+restart() {
+ stop
+ start
+}
+
case "$1" in
- start)
+ start|stop|restart)
"$1"
;;
*)
- echo "Usage: $0 start"
+ echo "Usage: $0 {start|stop|restart}"
exit 1
esac
diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
index 1d9560d655..c28718a725 100644
--- a/package/busybox/busybox.config
+++ b/package/busybox/busybox.config
@@ -628,6 +628,7 @@ CONFIG_FEATURE_MDEV_RENAME=y
# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
CONFIG_FEATURE_MDEV_EXEC=y
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
+CONFIG_FEATURE_MDEV_DAEMON=y
CONFIG_MESG=y
CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
CONFIG_MKE2FS=y
--
2.21.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format
2019-06-19 16:42 ` [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format Titouan Christophe
@ 2019-06-20 10:10 ` Andy Shevchenko
2019-06-20 10:44 ` Titouan Christophe
0 siblings, 1 reply; 12+ messages in thread
From: Andy Shevchenko @ 2019-06-20 10:10 UTC (permalink / raw)
To: buildroot
On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote:
> Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
> - find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \
> - xargs -0 modprobe -abq
> + find /sys/ -name modalias -print0 | \
> + xargs -0 sort -u | \
> + tr '\n' '\0' | \
> + xargs -0 modprobe -abq
How this indentation change related to the topic?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format
2019-06-20 10:10 ` Andy Shevchenko
@ 2019-06-20 10:44 ` Titouan Christophe
2019-06-20 11:39 ` Titouan Christophe
0 siblings, 1 reply; 12+ messages in thread
From: Titouan Christophe @ 2019-06-20 10:44 UTC (permalink / raw)
To: buildroot
Hello Andy,
On 6/20/19 12:10 PM, Andy Shevchenko wrote:
> On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote:
>> Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
>
>> - find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n' '\0' | \
>> - xargs -0 modprobe -abq
>
>> + find /sys/ -name modalias -print0 | \
>> + xargs -0 sort -u | \
>> + tr '\n' '\0' | \
>> + xargs -0 modprobe -abq
>
> How this indentation change related to the topic?
>
This is a preparatory patch to convert this script to the canonical init
script format, as suggested by Arnout (see
http://lists.busybox.net/pipermail/buildroot/2019-May/251199.html)
Regards,
Titouan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format
2019-06-20 10:44 ` Titouan Christophe
@ 2019-06-20 11:39 ` Titouan Christophe
2019-06-20 11:52 ` Andy Shevchenko
0 siblings, 1 reply; 12+ messages in thread
From: Titouan Christophe @ 2019-06-20 11:39 UTC (permalink / raw)
To: buildroot
Hi again,
On 6/20/19 12:44 PM, Titouan Christophe wrote:
> Hello Andy,
>
> On 6/20/19 12:10 PM, Andy Shevchenko wrote:
>> On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote:
>>> Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
>>
>>> -??? find /sys/ -name modalias -print0 | xargs -0 sort -u | tr '\n'
>>> '\0' | \
>>> -??????? xargs -0 modprobe -abq
>>
>>> +??? find /sys/ -name modalias -print0 | \
>>> +??????? xargs -0 sort -u | \
>>> +??????? tr '\n' '\0' | \
>>> +??????? xargs -0 modprobe -abq
>>
>> How this indentation change related to the topic?
>>
>
> This is a preparatory patch to convert this script to the canonical init
> script format, as suggested by Arnout (see
> http://lists.busybox.net/pipermail/buildroot/2019-May/251199.html)
sorry I did not pay attention to the fact that you were only commenting
on this particular hunk. I did reindent this command chain for better
readability (in my opinion); I can rework that part to better suit the
codestyle, if any.
Regards,
Titouan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format
2019-06-20 11:39 ` Titouan Christophe
@ 2019-06-20 11:52 ` Andy Shevchenko
0 siblings, 0 replies; 12+ messages in thread
From: Andy Shevchenko @ 2019-06-20 11:52 UTC (permalink / raw)
To: buildroot
On Thu, Jun 20, 2019 at 01:39:32PM +0200, Titouan Christophe wrote:
> On 6/20/19 12:44 PM, Titouan Christophe wrote:
> > Hello Andy,
> >
> > On 6/20/19 12:10 PM, Andy Shevchenko wrote:
> > > On Wed, Jun 19, 2019 at 06:42:56PM +0200, Titouan Christophe wrote:
> > > > Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
> > >
> > > > -??? find /sys/ -name modalias -print0 | xargs -0 sort -u | tr
> > > > '\n' '\0' | \
> > > > -??????? xargs -0 modprobe -abq
> > >
> > > > +??? find /sys/ -name modalias -print0 | \
> > > > +??????? xargs -0 sort -u | \
> > > > +??????? tr '\n' '\0' | \
> > > > +??????? xargs -0 modprobe -abq
> > >
> > > How this indentation change related to the topic?
> > >
> >
> > This is a preparatory patch to convert this script to the canonical init
> > script format, as suggested by Arnout (see
> > http://lists.busybox.net/pipermail/buildroot/2019-May/251199.html)
>
>
> sorry I did not pay attention to the fact that you were only commenting on
> this particular hunk. I did reindent this command chain for better
> readability (in my opinion); I can rework that part to better suit the
> codestyle, if any.
It should be a separate patch explaining why you are doing that, but not in this one.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode
2019-06-19 16:42 [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode Titouan Christophe
` (2 preceding siblings ...)
2019-06-19 16:42 ` [Buildroot] [PATCH 3/3] package/busybox: run mdev in daemon mode Titouan Christophe
@ 2019-06-20 14:31 ` Thomas Petazzoni
2019-06-20 15:16 ` Peter Korsgaard
3 siblings, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2019-06-20 14:31 UTC (permalink / raw)
To: buildroot
On Wed, 19 Jun 2019 18:42:54 +0200
Titouan Christophe <titouan.christophe@railnova.eu> wrote:
> Titouan Christophe (3):
> package/busybox: bump version to 1.31.0
> package/busybox: convert S10mdev to the canonical init script format
> package/busybox: run mdev in daemon mode
Series applied. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode
2019-06-20 14:31 ` [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev " Thomas Petazzoni
@ 2019-06-20 15:16 ` Peter Korsgaard
2019-06-20 16:02 ` Titouan Christophe
0 siblings, 1 reply; 12+ messages in thread
From: Peter Korsgaard @ 2019-06-20 15:16 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> On Wed, 19 Jun 2019 18:42:54 +0200
> Titouan Christophe <titouan.christophe@railnova.eu> wrote:
>> Titouan Christophe (3):
>> package/busybox: bump version to 1.31.0
>> package/busybox: convert S10mdev to the canonical init script format
>> package/busybox: run mdev in daemon mode
> Series applied. Thanks!
Yes, thanks. We still need to force CONFIG_NET=y in the Linux kernel if
mdev is enabled, right?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode
2019-06-20 15:16 ` Peter Korsgaard
@ 2019-06-20 16:02 ` Titouan Christophe
2019-06-23 13:20 ` Titouan Christophe
0 siblings, 1 reply; 12+ messages in thread
From: Titouan Christophe @ 2019-06-20 16:02 UTC (permalink / raw)
To: buildroot
Hello all,
On 6/20/19 5:16 PM, Peter Korsgaard wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
>
> > On Wed, 19 Jun 2019 18:42:54 +0200
> > Titouan Christophe <titouan.christophe@railnova.eu> wrote:
>
> >> Titouan Christophe (3):
> >> package/busybox: bump version to 1.31.0
> >> package/busybox: convert S10mdev to the canonical init script format
> >> package/busybox: run mdev in daemon mode
>
> > Series applied. Thanks!
>
> Yes, thanks. We still need to force CONFIG_NET=y in the Linux kernel if
> mdev is enabled, right?
>
Yes, since mdev is now launched in daemon mode CONFIG_NET is now needed.
Didn't think of enforcing that in the kernel config, I'm preparing a
patch right now.
Regards,
Titouan
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode
2019-06-20 16:02 ` Titouan Christophe
@ 2019-06-23 13:20 ` Titouan Christophe
0 siblings, 0 replies; 12+ messages in thread
From: Titouan Christophe @ 2019-06-23 13:20 UTC (permalink / raw)
To: buildroot
Hi all,
On 6/20/19 6:02 PM, Titouan Christophe wrote:
> Hello all,
>
> On 6/20/19 5:16 PM, Peter Korsgaard wrote:
>> Yes, thanks. We still need to force CONFIG_NET=y in the Linux kernel if
>> mdev is enabled, right?
>>
>
> Yes, since mdev is now launched in daemon mode CONFIG_NET is now needed.
> Didn't think of enforcing that in the kernel config, I'm preparing a
> patch right now.
>
> Regards,
>
> Titouan
The patch has been submitted here
http://patchwork.ozlabs.org/patch/1119590/.
Titouan
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-06-23 13:20 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-19 16:42 [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev daemon mode Titouan Christophe
2019-06-19 16:42 ` [Buildroot] [PATCH 1/3] package/busybox: bump version to 1.31.0 Titouan Christophe
2019-06-19 16:42 ` [Buildroot] [PATCH 2/3] package/busybox: convert S10mdev to the canonical init script format Titouan Christophe
2019-06-20 10:10 ` Andy Shevchenko
2019-06-20 10:44 ` Titouan Christophe
2019-06-20 11:39 ` Titouan Christophe
2019-06-20 11:52 ` Andy Shevchenko
2019-06-19 16:42 ` [Buildroot] [PATCH 3/3] package/busybox: run mdev in daemon mode Titouan Christophe
2019-06-20 14:31 ` [Buildroot] [PATCH 0/3] Update Busybox to 1.31 and use mdev " Thomas Petazzoni
2019-06-20 15:16 ` Peter Korsgaard
2019-06-20 16:02 ` Titouan Christophe
2019-06-23 13:20 ` Titouan Christophe
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.