aboutsummaryrefslogtreecommitdiffstats
path: root/meta-zephyr-core/recipes-kernel/zephyr-kernel/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-zephyr-core/recipes-kernel/zephyr-kernel/files')
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch63
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-added-missing-file-ext-to.patch42
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch80
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/arduino-nano-33-ble-storage-partition.patch49
-rw-r--r--meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch43
5 files changed, 277 insertions, 0 deletions
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch
new file mode 100644
index 0000000..563af7d
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch
@@ -0,0 +1,63 @@
+From bfab268c870548e3e7a24ea67ebed2a0513b2307 Mon Sep 17 00:00:00 2001
+From: Naveen Saini <naveen.kumar.saini@intel.com>
+Date: Wed, 7 Jul 2021 13:53:05 +0800
+Subject: [PATCH] cmake: add yocto toolchain
+
+Upstream status: inappropriate [OE specific]
+
+Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+---
+ cmake/compiler/gcc/target.cmake | 7 -------
+ cmake/toolchain/yocto/generic.cmake | 13 +++++++++++++
+ cmake/toolchain/yocto/target.cmake | 1 +
+ 3 files changed, 14 insertions(+), 7 deletions(-)
+ create mode 100644 cmake/toolchain/yocto/generic.cmake
+ create mode 100644 cmake/toolchain/yocto/target.cmake
+
+diff --git a/cmake/compiler/gcc/target.cmake b/cmake/compiler/gcc/target.cmake
+index 2b90c5d2ef..b6f28b2f87 100644
+--- a/cmake/compiler/gcc/target.cmake
++++ b/cmake/compiler/gcc/target.cmake
+@@ -68,13 +68,6 @@ execute_process(
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+
+-assert_exists(LIBGCC_FILE_NAME)
+-
+-get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)
+-
+-assert_exists(LIBGCC_DIR)
+-
+-LIST(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
+ LIST(APPEND TOOLCHAIN_LIBS gcc)
+
+ if(SYSROOT_DIR)
+diff --git a/cmake/toolchain/yocto/generic.cmake b/cmake/toolchain/yocto/generic.cmake
+new file mode 100644
+index 0000000000..45e5777e2a
+--- /dev/null
++++ b/cmake/toolchain/yocto/generic.cmake
+@@ -0,0 +1,13 @@
++set(COMPILER gcc)
++set(LINKER ld)
++set(BINTOOLS gnu)
++
++set(ZEPHYR_SYSROOT ${ZEPHYR_SYSROOT})
++set(SYSROOT_DIR ${ZEPHYR_SYSROOT})
++set(LIBC_LIBRARY_DIR "\"${SYSROOT_DIR}\"/")
++set(LIBC_INCLUDE_DIR ${SYSROOT_DIR}/include)
++LIST(APPEND TOOLCHAIN_LIBS gcc)
++
++LIST(APPEND LIB_INCLUDE_DIR "-L\"${STAGING_LIBDIR}\"")
++
++set(TOOLCHAIN_LIBS gcc)
+diff --git a/cmake/toolchain/yocto/target.cmake b/cmake/toolchain/yocto/target.cmake
+new file mode 100644
+index 0000000000..9881313609
+--- /dev/null
++++ b/cmake/toolchain/yocto/target.cmake
+@@ -0,0 +1 @@
++# SPDX-License-Identifier: Apache-2.0
+--
+2.17.1
+
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-added-missing-file-ext-to.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-added-missing-file-ext-to.patch
new file mode 100644
index 0000000..6aeca14
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-cmake-added-missing-file-ext-to.patch
@@ -0,0 +1,42 @@
+From 783c1f78c8e39751fe89d0883c8bce7336f55e94 Mon Sep 17 00:00:00 2001
+From: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
+Date: Thu, 19 Aug 2021 08:53:00 +0200
+Subject: [PATCH] cmake: added missing file ext to
+ lv_font_dejavu_16_persian_hebrew.c
+
+CMake >= 3.20 requires file extensions explicitly added to source files.
+
+See CMP0115:
+> Starting in CMake 3.20, CMake prefers all source files to have their
+> extensions explicitly listed:
+
+In the CMakeLists.txt, the file lv_font_dejavu_16_persian_hebrew.c
+was added without its .c extension, causing never CMakes ti fail
+discovering the file.
+
+This has been fixed by correctly add the file as:
+lv_font_dejavu_16_persian_hebrew.c
+
+Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
+---
+Upstream-status: Accepted
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57b07c84..0f433edc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -58,7 +58,7 @@ zephyr_library_sources(
+ src/lv_misc/lv_utils.c
+
+ src/lv_font/lv_font.c
+- src/lv_font/lv_font_dejavu_16_persian_hebrew
++ src/lv_font/lv_font_dejavu_16_persian_hebrew.c
+ src/lv_font/lv_font_fmt_txt.c
+ src/lv_font/lv_font_loader.c
+ src/lv_font/lv_font_montserrat_12.c
+--
+Gitee
+
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
new file mode 100644
index 0000000..fd6fc6b
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch
@@ -0,0 +1,80 @@
+From cfde3b1018c3151b6cc1fbe3e9e163d0aaf16954 Mon Sep 17 00:00:00 2001
+From: Naveen Saini <naveen.kumar.saini@intel.com>
+Date: Tue, 11 May 2021 13:46:39 +0800
+Subject: [PATCH] x86: fix efi binary generation issue in cross compilation env
+
+Set root directory for headers.
+
+Upstream-Status: Inappropriate [Cross-compilation specific]
+
+Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+---
+ arch/x86/zefi/zefi.py | 6 +++++-
+ boards/x86/ehl_crb/CMakeLists.txt | 1 +
+ boards/x86/qemu_x86/CMakeLists.txt | 1 +
+ boards/x86/up_squared/CMakeLists.txt | 1 +
+ 4 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/arch/x86/zefi/zefi.py b/arch/x86/zefi/zefi.py
+index d3514391a8..b9eccbfa10 100755
+--- a/arch/x86/zefi/zefi.py
++++ b/arch/x86/zefi/zefi.py
+@@ -106,7 +106,10 @@ def build_elf(elf_file):
+ # + We need pic to enforce that the linker adds no relocations
+ # + UEFI can take interrupts on our stack, so no red zone
+ # + UEFI API assumes 16-bit wchar_t
+- cmd = [args.compiler, "-shared", "-Wall", "-Werror", "-I.",
++
++ # Pass --sysroot path for cross compilation
++ sysrootarg = "--sysroot=" + args.sysroot
++ cmd = [args.compiler, "-shared", "-Wall", "-Werror", "-I.", sysrootarg,
+ "-fno-stack-protector", "-fpic", "-mno-red-zone", "-fshort-wchar",
+ "-Wl,-nostdlib", "-T", ldscript, "-o", "zefi.elf", cfile]
+ verbose(" ".join(cmd))
+@@ -145,6 +148,7 @@ def parse_args():
+ parser.add_argument("-o", "--objcopy", required=True, help="objcopy to be used")
+ parser.add_argument("-f", "--elf-file", required=True, help="Input file")
+ parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output")
++ parser.add_argument("-s", "--sysroot", required=True, help="Cross compilation --sysroot=path")
+
+ return parser.parse_args()
+
+diff --git a/boards/x86/ehl_crb/CMakeLists.txt b/boards/x86/ehl_crb/CMakeLists.txt
+index 0d572eff30..6a228107dc 100644
+--- a/boards/x86/ehl_crb/CMakeLists.txt
++++ b/boards/x86/ehl_crb/CMakeLists.txt
+@@ -5,6 +5,7 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
+ -c ${CMAKE_C_COMPILER}
+ -o ${CMAKE_OBJCOPY}
+ -f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
++ -s ${SYSROOT_DIR}
+ $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+diff --git a/boards/x86/qemu_x86/CMakeLists.txt b/boards/x86/qemu_x86/CMakeLists.txt
+index 1131a5c7ce..489f17192b 100644
+--- a/boards/x86/qemu_x86/CMakeLists.txt
++++ b/boards/x86/qemu_x86/CMakeLists.txt
+@@ -4,6 +4,7 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
+ -c ${CMAKE_C_COMPILER}
+ -o ${CMAKE_OBJCOPY}
+ -f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
++ -s ${SYSROOT_DIR}
+ $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+diff --git a/boards/x86/up_squared/CMakeLists.txt b/boards/x86/up_squared/CMakeLists.txt
+index 0eaa9753fc..2e8ce7cfbc 100644
+--- a/boards/x86/up_squared/CMakeLists.txt
++++ b/boards/x86/up_squared/CMakeLists.txt
+@@ -5,6 +5,7 @@ set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
+ -c ${CMAKE_C_COMPILER}
+ -o ${CMAKE_OBJCOPY}
+ -f ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.elf
++ -s ${SYSROOT_DIR}
+ $<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+ )
+--
+2.17.1
+
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/arduino-nano-33-ble-storage-partition.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/arduino-nano-33-ble-storage-partition.patch
new file mode 100644
index 0000000..4568a41
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/arduino-nano-33-ble-storage-partition.patch
@@ -0,0 +1,49 @@
+commit 6c9945aafa00c09149e2052a9c2bccad16dd1d8a
+Author: Stefan Schmidt <stefan.schmidt@huawei.com>
+Date: Fri May 7 11:47:44 2021 +0200
+
+ boards/arduino_nano_33_ble: add storage partition at end of flash
+
+ Change default partition table to allow for application which need
+ storage. One use case is running the OpenThread integration which has
+ a dependency on this.
+
+ Upstream-Status: Backported [https://github.com/zephyrproject-rtos/zephyr/commit/6c9945aafa00c09149e2052a9c2bccad16dd1d8a]
+
+ Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com>
+ Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+
+diff --git a/boards/arm/arduino_nano_33_ble/arduino_nano_33_ble.dts b/boards/arm/arduino_nano_33_ble/arduino_nano_33_ble.dts
+index d09b66ec43..d11d800eb5 100644
+--- a/boards/arm/arduino_nano_33_ble/arduino_nano_33_ble.dts
++++ b/boards/arm/arduino_nano_33_ble/arduino_nano_33_ble.dts
+@@ -44,15 +44,27 @@
+
+ boot_partition: partition@0 {
+ label = "sam-ba";
+- reg = <0x0 0x10000>;
++ reg = <0x00000000 0x00010000>;
+ read-only;
+ };
+
+ code_partition: partition@10000 {
+ label = "code";
+- reg = <0x10000 0xf0000>;
++ reg = <0x00010000 0x000e8000>;
+ read-only;
+ };
++
++ /*
++ * The flash starting at 0x000f8000 and ending at
++ * 0x000fffff is reserved for use by the application.
++ *
++ * Storage partition will be used by FCB/LittleFS/NVS
++ * if enabled.
++ */
++ storage_partition: partition@f8000 {
++ label = "storage";
++ reg = <0x000f8000 0x00008000>;
++ };
+ };
+ };
+
diff --git a/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch
new file mode 100644
index 0000000..f23a438
--- /dev/null
+++ b/meta-zephyr-core/recipes-kernel/zephyr-kernel/files/dtc.patch
@@ -0,0 +1,43 @@
+Upstream-Status: Submitted [https://github.com/zephyrproject-rtos/zephyr/pull/40364]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From deb6e9b29d77f0d86eb188fb3c5fc6f470277d3d Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Mon, 15 Nov 2021 14:01:47 +0000
+Subject: [PATCH] cmake: expand DTC version regex
+
+DTC can be built with both traditional Makefiles or Meson. When built
+with Makefiles the --version output looks like 'Version: DTC
+1.6.1-dirty' but when built with Meson the output is 'Version: DTC
+v1.6.1+.
+
+This fails to match the version regex and the cmake then fails:
+
+CMake Error at cmake/host-tools.cmake:28 (if):
+ if given arguments:
+ "VERSION_GREATER" "1.4.6"
+ Unknown arguments specified
+
+Expanding the regex with an optional 'v' covers both cases and the build
+succeeds.
+
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ cmake/host-tools.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/host-tools.cmake b/cmake/host-tools.cmake
+index cb7bf2e281..93d33d6390 100644
+--- a/cmake/host-tools.cmake
++++ b/cmake/host-tools.cmake
+@@ -20,7 +20,7 @@ if(DTC)
+ )
+
+ if(${dtc_status} EQUAL 0)
+- string(REGEX MATCH "Version: DTC ([0-9]+[.][0-9]+[.][0-9]+).*" out_var ${dtc_version_output})
++ string(REGEX MATCH "Version: DTC v?([0-9]+[.][0-9]+[.][0-9]+).*" out_var ${dtc_version_output})
+
+ # Since it is optional, an outdated version is not an error. If an
+ # outdated version is discovered, print a warning and proceed as if
+--
+2.25.1