summaryrefslogtreecommitdiffstats
path: root/external/meta-virtualization/recipes-core/runx/runx
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-virtualization/recipes-core/runx/runx
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'external/meta-virtualization/recipes-core/runx/runx')
-rw-r--r--external/meta-virtualization/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch42
-rw-r--r--external/meta-virtualization/recipes-core/runx/runx/0001-make-kernel-cross-compilation-tweaks.patch86
2 files changed, 128 insertions, 0 deletions
diff --git a/external/meta-virtualization/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch b/external/meta-virtualization/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch
new file mode 100644
index 00000000..c9fdc5d6
--- /dev/null
+++ b/external/meta-virtualization/recipes-core/runx/runx/0001-make-initrd-cross-install-tweaks.patch
@@ -0,0 +1,42 @@
+From d8bd5749e6fc6e0c86a8720044ec78167bab3569 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@xilinx.com>
+Date: Mon, 16 Dec 2019 22:03:14 -0800
+Subject: [PATCH] make-initrd: cross install tweaks
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com>
+---
+ kernel/make-initrd | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/kernel/make-initrd b/kernel/make-initrd
+index 4c299dc..9ef386f 100755
+--- a/kernel/make-initrd
++++ b/kernel/make-initrd
+@@ -16,8 +16,22 @@ mkdir -p $tmpdir/sys
+ mkdir -p $tmpdir/lib
+ mkdir -p $tmpdir/var
+ mkdir -p $tmpdir/mnt
+-cp `which busybox` $tmpdir/bin
+-$tmpdir/bin/busybox --install $tmpdir/bin
++
++
++if [ -z "$BUSYBOX" ]; then
++ BUSYBOX=`which busybox`
++fi
++cp $BUSYBOX $tmpdir/bin
++if [ -n "$CROSS_COMPILE" ]; then
++ echo "cross compiling, busybox --install emulation"
++ if [ -n "$QEMU_USER" ]; then
++ $QEMU_USER $tmpdir/bin/busybox --install $tmpdir/bin
++ else
++ echo "QEMU_USER is not defined, no binary symlinks will be available"
++ fi
++else
++ $tmpdir/bin/busybox --install $tmpdir/bin
++fi
+
+ cp $init $tmpdir/init
+ chmod +x $tmpdir/init
+--
+2.17.1
+
diff --git a/external/meta-virtualization/recipes-core/runx/runx/0001-make-kernel-cross-compilation-tweaks.patch b/external/meta-virtualization/recipes-core/runx/runx/0001-make-kernel-cross-compilation-tweaks.patch
new file mode 100644
index 00000000..7d66f421
--- /dev/null
+++ b/external/meta-virtualization/recipes-core/runx/runx/0001-make-kernel-cross-compilation-tweaks.patch
@@ -0,0 +1,86 @@
+From 7e3498ab7c375bd545de501920acffa77eb24120 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@xilinx.com>
+Date: Mon, 16 Dec 2019 20:42:04 -0800
+Subject: [PATCH] make-kernel: cross-compilation tweaks
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com>
+---
+ kernel/make-kernel | 41 +++++++++++++++++++++++++++++++++--------
+ 1 file changed, 33 insertions(+), 8 deletions(-)
+
+diff --git a/kernel/make-kernel b/kernel/make-kernel
+index 33b7150..c684669 100755
+--- a/kernel/make-kernel
++++ b/kernel/make-kernel
+@@ -13,6 +13,7 @@ fi
+
+ kernel_stuffdir=`readlink -f kernel`
+ kernel_outpath=$kernel_stuffdir/out
++kernel_srcdir=$kernel_stuffdir/src
+ kernel_builddir=$kernel_stuffdir/build
+ kernel_out=$kernel_outpath/kernel
+
+@@ -22,28 +23,52 @@ kernel_tarball="$kernel_name".tar.xz
+ kernel_url=https://www.kernel.org/pub/linux/kernel/v4.x/"$kernel_tarball"
+ kernel_src_config="$kernel_stuffdir"/cutdown-config.$ARCH
+ kernel_patchesdir="$kernel_stuffdir"/patches
+-kernel_image="$kernel_builddir"/"$kernel_name"/arch/"$ARCH"/boot/"$image"
++kernel_image="$kernel_builddir"/arch/"$ARCH"/boot/"$image"
+
++echo "#########################"
++echo "kernel build summary:"
++echo " version: $kernel_version"
++echo " url: $kernel_url"
++echo " src dir: $kernel_srcdir"
++echo " out dir: $kernel_builddir"
++echo " artifacts: $kernel_out"
++echo " image: $image"
++echo " build vars: $build_vars"
++echo "#########################"
+
+-rm -rf $kernel_outpath
++if [ ! -e "$kernel_builddir/.config" ];
++then
++ rm -rf $kernel_buildir
++fi
+ mkdir -p $kernel_outpath
+ mkdir -p $kernel_builddir
++mkdir -p $kernel_srcdir
+
+ if [[ ! -f $kernel_builddir/$kernel_tarball ]]
+ then
++ echo "fetching the kernel .."
+ wget -O $kernel_builddir/$kernel_tarball --tries=20 $kernel_url
+ fi
+-if [[ ! -d $kernel_builddir/$kernel_name ]]
++
++if [[ ! -d $kernel_srcdir/$kernel_name ]]
+ then
+- tar --extract --xz --touch --file="$kernel_builddir/$kernel_tarball" --directory="$kernel_builddir"
+- cd $kernel_builddir/$kernel_name
++ echo "extracting the kernel ..."
++ echo " tar --extract --xz --touch --file=\"$kernel_builddir/$kernel_tarball\" --directory=\"$kernel_srcdir\""
++ tar --extract --xz --touch --file="$kernel_builddir/$kernel_tarball" --directory="$kernel_srcdir"
++ cd $kernel_srcdir/$kernel_name
+ for i in $kernel_patchesdir/*
+ do
+ patch -p1 < $i
+ done
+- cp $kernel_src_config .config
+ fi
+-cd $kernel_builddir/$kernel_name
+-make -j4 $image
++if [[ ! -f $kernel_builddir/.config ]]
++then
++ cp $kernel_src_config $kernel_builddir/.config
++fi
++cd $kernel_srcdir/$kernel_name
++
++echo "building the kernel ..."
++eval make O=$kernel_builddir $build_vars oldconfig
++eval make -j4 O=$kernel_builddir $build_vars $image
+
+ cp $kernel_image $kernel_out
+--
+2.17.1
+