summaryrefslogtreecommitdiffstats
path: root/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch')
-rw-r--r--recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch b/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch
new file mode 100644
index 00000000..c9fdc5d6
--- /dev/null
+++ b/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch
@@ -0,0 +1,42 @@
1From d8bd5749e6fc6e0c86a8720044ec78167bab3569 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@xilinx.com>
3Date: Mon, 16 Dec 2019 22:03:14 -0800
4Subject: [PATCH] make-initrd: cross install tweaks
5
6Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com>
7---
8 kernel/make-initrd | 18 ++++++++++++++++--
9 1 file changed, 16 insertions(+), 2 deletions(-)
10
11diff --git a/kernel/make-initrd b/kernel/make-initrd
12index 4c299dc..9ef386f 100755
13--- a/kernel/make-initrd
14+++ b/kernel/make-initrd
15@@ -16,8 +16,22 @@ mkdir -p $tmpdir/sys
16 mkdir -p $tmpdir/lib
17 mkdir -p $tmpdir/var
18 mkdir -p $tmpdir/mnt
19-cp `which busybox` $tmpdir/bin
20-$tmpdir/bin/busybox --install $tmpdir/bin
21+
22+
23+if [ -z "$BUSYBOX" ]; then
24+ BUSYBOX=`which busybox`
25+fi
26+cp $BUSYBOX $tmpdir/bin
27+if [ -n "$CROSS_COMPILE" ]; then
28+ echo "cross compiling, busybox --install emulation"
29+ if [ -n "$QEMU_USER" ]; then
30+ $QEMU_USER $tmpdir/bin/busybox --install $tmpdir/bin
31+ else
32+ echo "QEMU_USER is not defined, no binary symlinks will be available"
33+ fi
34+else
35+ $tmpdir/bin/busybox --install $tmpdir/bin
36+fi
37
38 cp $init $tmpdir/init
39 chmod +x $tmpdir/init
40--
412.17.1
42