diff options
Diffstat (limited to 'recipes-core/runx/runx/0001-make-initrd-allow-externally-provided-busybox.patch')
-rw-r--r-- | recipes-core/runx/runx/0001-make-initrd-allow-externally-provided-busybox.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/recipes-core/runx/runx/0001-make-initrd-allow-externally-provided-busybox.patch b/recipes-core/runx/runx/0001-make-initrd-allow-externally-provided-busybox.patch new file mode 100644 index 00000000..3c7e97c2 --- /dev/null +++ b/recipes-core/runx/runx/0001-make-initrd-allow-externally-provided-busybox.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 4a128a3d1bc3b069ac12d3d61f79bc001340a8b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Fri, 26 Mar 2021 10:55:49 -0400 | ||
4 | Subject: [PATCH] make-initrd: allow externally provided busybox | ||
5 | |||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
7 | --- | ||
8 | initrd/make-initrd | 24 ++++++++++++++++++++---- | ||
9 | 1 file changed, 20 insertions(+), 4 deletions(-) | ||
10 | |||
11 | diff --git a/initrd/make-initrd b/initrd/make-initrd | ||
12 | index 21170e8..939f71d 100755 | ||
13 | --- a/initrd/make-initrd | ||
14 | +++ b/initrd/make-initrd | ||
15 | @@ -35,6 +35,8 @@ then | ||
16 | cp $busybox_src_config .config | ||
17 | make -j "$(getconf _NPROCESSORS_ONLN)" | ||
18 | export busybox="$busybox_image" | ||
19 | +else | ||
20 | + echo "busybox: using externally provided binary" | ||
21 | fi | ||
22 | |||
23 | |||
24 | @@ -48,10 +50,24 @@ mkdir -p $tmpdir/lib | ||
25 | mkdir -p $tmpdir/var | ||
26 | mkdir -p $tmpdir/mnt | ||
27 | cp "$busybox" $tmpdir/bin/busybox | ||
28 | -for i in `cat "$base"/applet-list` | ||
29 | -do | ||
30 | - ln -s /bin/busybox $tmpdir/bin/$i | ||
31 | -done | ||
32 | + | ||
33 | +if [ -n "$CROSS_COMPILE" ]; then | ||
34 | + echo "cross compiling, busybox --install emulation" | ||
35 | + if [ -n "$QEMU_USER" ]; then | ||
36 | + $QEMU_USER $tmpdir/bin/busybox --install $tmpdir/bin | ||
37 | + else | ||
38 | + echo "QEMU_USER is not defined, default binary symlinks will be available" | ||
39 | + for i in `cat "$base"/applet-list` | ||
40 | + do | ||
41 | + ln -s /bin/busybox $tmpdir/bin/$i | ||
42 | + done | ||
43 | + fi | ||
44 | +else | ||
45 | + for i in `cat "$base"/applet-list` | ||
46 | + do | ||
47 | + ln -s /bin/busybox $tmpdir/bin/$i | ||
48 | + done | ||
49 | +fi | ||
50 | |||
51 | mkdir -p $tmpdir/etc/init.d | ||
52 | cp $init $tmpdir/etc/init.d/rcS | ||
53 | -- | ||
54 | 2.19.1 | ||
55 | |||