Skip to content

Commit

Permalink
Added some patches that need to be committed to the poky.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zang Ruochen authored and baibaidashixiong committed Sep 4, 2023
1 parent 5c8c77c commit 0fd2bc6
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 0 deletions.
81 changes: 81 additions & 0 deletions poky-patch/0003-Fresh-0003-64-bit-multilib-hack.patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
From cdc1034d5b0b1aa0015caba360fea68b03f8bcb5 Mon Sep 17 00:00:00 2001
From: Zang Ruochen <[email protected]>
Date: Tue, 1 Aug 2023 19:32:56 +0800
Subject: Fresh 0003-64-bit-multilib-hack.patch

Signed-off-by: Zang Ruochen <[email protected]>
---
.../gcc/gcc/0003-64-bit-multilib-hack.patch | 53 ++++++++++++++++++-
1 file changed, 52 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch b/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
index d547d7e48a..c66cf10b2c 100644
--- a/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
+++ b/meta/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch
@@ -35,7 +35,8 @@ Signed-off-by: Mark Hatle <[email protected]>
gcc/config/mips/t-linux64 | 28 ++--------------------------
gcc/config/riscv/t-linux | 4 ++--
gcc/config/rs6000/t-linux64 | 5 ++---
- 6 files changed, 14 insertions(+), 41 deletions(-)
+ gcc/config/loongarch/t-linux | 34 ++++++++++++++++++----------------
+ 7 files changed, 32 insertions(+), 57 deletions(-)

diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
index 57bf4100fcd..aaef5da8059 100644
@@ -147,3 +148,53 @@ index 01a94242308..1429eceaebf 100644

rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.cc
$(COMPILE) $<
+diff --git a/gcc/config/loongarch/t-linux b/gcc/config/loongarch/t-linux
+index e40da1792..0c7ec9f8a 100644
+--- a/gcc/config/loongarch/t-linux
++++ b/gcc/config/loongarch/t-linux
+@@ -18,7 +18,9 @@
+
+ # Multilib
+ MULTILIB_OPTIONS = mabi=lp64d/mabi=lp64f/mabi=lp64s
+-MULTILIB_DIRNAMES = base/lp64d base/lp64f base/lp64s
++#MULTILIB_DIRNAMES = base/lp64d base/lp64f base/lp64s
++MULTILIB_DIRNAMES = . . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+
+ # The GCC driver always gets all abi-related options on the command line.
+ # (see loongarch-driver.c:driver_get_normalized_m_opts)
+@@ -36,18 +38,18 @@ else
+ endif
+
+ # Don't define MULTILIB_OSDIRNAMES if multilib is disabled.
+-ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
+-
+- MULTILIB_OSDIRNAMES = \
+- mabi.lp64d=../lib64$\
+- $(call if_multiarch,:loongarch64-linux-gnu)
+-
+- MULTILIB_OSDIRNAMES += \
+- mabi.lp64f=../lib64/f32$\
+- $(call if_multiarch,:loongarch64-linux-gnuf32)
+-
+- MULTILIB_OSDIRNAMES += \
+- mabi.lp64s=../lib64/sf$\
+- $(call if_multiarch,:loongarch64-linux-gnusf)
+-
+-endif
++#ifeq ($(filter LA_DISABLE_MULTILIB,$(tm_defines)),)
++#
++# MULTILIB_OSDIRNAMES = \
++# mabi.lp64d=../lib64$\
++# $(call if_multiarch,:loongarch64-linux-gnu)
++#
++# MULTILIB_OSDIRNAMES += \
++# mabi.lp64f=../lib64/f32$\
++# $(call if_multiarch,:loongarch64-linux-gnuf32)
++#
++# MULTILIB_OSDIRNAMES += \
++# mabi.lp64s=../lib64/sf$\
++# $(call if_multiarch,:loongarch64-linux-gnusf)
++#
++#endif
+
--
2.20.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 7a00df6f3c0f2ab5a53e339c767a600bfbd14876 Mon Sep 17 00:00:00 2001
From: Zang Ruochen <[email protected]>
Date: Fri, 4 Aug 2023 16:15:31 +0800
Subject: Fixed missing kernel source code when test_kernelmodules

Signed-off-by: Zang Ruochen <[email protected]>
---
meta/recipes-kernel/linux/kernel-devsrc.bb | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 6764598d48..ce5777fbe9 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -318,6 +318,15 @@ do_install() {
cp -a --parents arch/mips/kernel/syscalls/*.tbl $kerneldir/build 2>/dev/null || :
cp -a --parents arch/mips/tools/elf-entry.c $kerneldir/build 2>/dev/null || :
fi
+
+ if [ "${ARCH}" = "loongarch" ]; then
+ cp -a --parents arch/loongarch/kernel/asm-offsets.c $kerneldir/build
+ cp -a --parents Kbuild $kerneldir/build
+ cp -a --parents arch/loongarch/vdso/*.S $kerneldir/build 2>/dev/null || :
+ cp -a --parents arch/loongarch/vdso/*gettimeofday.* $kerneldir/build 2>/dev/null || :
+ cp -a --parents arch/loongarch/vdso/*getcpu.* $kerneldir/build 2>/dev/null || :
+ cp -a --parents arch/loongarch/vdso/gen_vdso*_offsets.sh $kerneldir/build/ 2>/dev/null || :
+ fi

# required to build scripts/selinux/genheaders/genheaders
cp -a --parents security/selinux/include/* $kerneldir/build/
--
2.20.1

0 comments on commit 0fd2bc6

Please sign in to comment.