diff --git a/README.md b/README.md index f92229f5f3ffe92de08fff51e8ba3d0ff2fcfc38..7ea83d8389c2486b760aed36897ed9bfc8c06183 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ -# Phytium Linux user guide +# Phytium Linux Yocto -Download Yocto Layer +下载 Yocto 层 -To make sure the build host is prepared for Yocto running and build, please follow below guide to prepare the build environment. +搭建 Yocto 运行环境请参考《飞腾嵌入式Linux Yocto4.0用户手册》 -https://docs.yoctoproject.org/4.0.9/ref-manual/index.html +https://gitee.com/phytium_embedded/phytium-embedded-docs/tree/master/linux -1. Get the Yocto layers from repo manifest: +1. 通过repo manifest获取Yocto层: - The following is the step of how to use repo utility to download all Yocto layers according to the repo manifest ``` - Install the repo utility: + 安装repo工具: $: mkdir ~/bin $: curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo @@ -21,7 +20,7 @@ https://docs.yoctoproject.org/4.0.9/ref-manual/index.html $: PATH=~/bin:${PATH} - Download the Yocto layers: + 下载Yocto层: $: export PATH=~/bin:${PATH} @@ -34,36 +33,35 @@ https://docs.yoctoproject.org/4.0.9/ref-manual/index.html $: repo sync --force-sync ``` -# Supported boards +# 支持开发板 e2000 -# Building images +# 构建镜像 - Take e2000 as an example: + 构建e2000镜像: $: . ./setup-env -m e2000 $: bitbake core-image-minimal - or: + 或: $: bitbake core-image-xfce - Images will be found under tmp/deploy/images/e2000/. + 镜像的输出位置 tmp/deploy/images/e2000/. -# Booting the images for supported boards +# 启动开发板 - Prerequisites: - 1. A serial cable connected from your PC to UART1 + 准备: + 连接串口到主机端 - Booting with core-image-minimal rootfs: + 启动core-image-minimal文件系统: - 1. Power up or reset the board and press a key on the terminal when prompted - to get to the U-Boot command line. + 1. 接通电源,串口输出信息,按任意键进入U-Boot 命令行. - 2. Set up the environment in U-Boot: + 2. 设置 U-Boot环境变量: For e2000: @@ -74,14 +72,14 @@ https://docs.yoctoproject.org/4.0.9/ref-manual/index.html => booti 0x90100000 - 0x90000000 -# Building with Multilib support +# 构建 Multilib 系统 - Yocto Project is able to build libraries for different target optimizations, combing those in one system image, - allowing the user to run both 32-bit and 64-bit applications. - Here is an example to add multilib support (lib32). + Yocto 支持构建multilib系统,系统包括同时包括32位和64位库 + 用户同时运行32位和64位应用程序. + 构建系统设置如下修改,系统同时支持lib32. - In local.conf - - Define multilib targets + 修改 local.conf + - 添加下列内容 require conf/multilib.conf @@ -89,25 +87,25 @@ https://docs.yoctoproject.org/4.0.9/ref-manual/index.html DEFAULTTUNE_virtclass-multilib-lib32 = "armv7athf-neon" - - 32-bit libraries to be added into the image + - 添加32 位软件到文件系统 IMAGE_INSTALL:append = " lib32-glibc lib32-libgcc lib32-libstdc++" -# FAQ - 1. How do I build linux rt in the Yocto Project? +# 常见问题 + 1. 如何编译Linux RT 内核 ? - Set PREFERRED_PROVIDER_virtual/kernel = "linux-phytium-rt" in your local.conf. + 在local.conf 里添加变量 PREFERRED_PROVIDER_virtual/kernel = "linux-phytium-rt" . - 2. How do I build linux 4.19 version in the Yocto Project ? + 2. 如何编译Linux 4.19 版本内核 ? - Set PREFERRED_VERSION_linux-phytium = "4.19" in your local.conf. + 在local.conf 里添加变量 PREFERRED_VERSION_linux-phytium = "4.19" . -# Contribute - Please submit any patches to guochunrong@phytium.com.cn +# 贡献 + 请提交补丁给 guochunrong@phytium.com.cn -# Maintainers +# 维护者 GuoChunRong `` diff --git a/default.xml b/default.xml index 5265c1bd4d475a49bd99797787bbcfc403e9bbce..aaa27acec3b11f8a5349a3496b63a740d7a39be9 100644 --- a/default.xml +++ b/default.xml @@ -9,7 +9,7 @@ - + diff --git a/meta-bsp/conf/layer.conf b/meta-bsp/conf/layer.conf index 54244890c2a6063027be6cc10d1427b1eaac83bf..878726d9b58fd580694ff9cc5a4224731dc80b84 100644 --- a/meta-bsp/conf/layer.conf +++ b/meta-bsp/conf/layer.conf @@ -11,7 +11,6 @@ BBFILE_PRIORITY_phytium-layer = "5" LAYERSERIES_COMPAT_phytium-layer = "dunfell hardknott kirkstone " LICENSE_PATH += "${LAYERDIR}/custom-licenses" - # FIXME: set this to avoid changing all the recipes that use it BBFILES_DYNAMIC += " \ diff --git a/meta-bsp/custom-licenses/PPL-1.0 b/meta-bsp/custom-licenses/PPL-1.0 deleted file mode 100644 index 30bd97be52ed4087906faa129dcaac47fe493d1f..0000000000000000000000000000000000000000 --- a/meta-bsp/custom-licenses/PPL-1.0 +++ /dev/null @@ -1,28 +0,0 @@ - - Phytium Public License 1.0 (PPL-1.0) - -UNLESS IT HAS ITS OWN COPYRIGHT/LICENSE EMBEDDED IN ITS BODY, EACH FILE IS SUBJECT TO THE FOLLOWING LICENSE TERMS - -Copyright (C) 2022, Phytium Technology Co., Ltd. -All Rights Reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that -the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the -following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. If the name of phytium or the names of its contributors are needed to endorse or promote products -derived from this software ,Prior written permission should be required. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/meta-bsp/custom-licenses/PSLA b/meta-bsp/custom-licenses/PSLA deleted file mode 100644 index 5bc7cd46d5dd2f83bd9ccd058ad5c8329d045f11..0000000000000000000000000000000000000000 --- a/meta-bsp/custom-licenses/PSLA +++ /dev/null @@ -1,56 +0,0 @@ -Copyright (c) 2023 Phytium Technology Co., Ltd. All rights reserved. -Phytium Software License Agreement (PSLA) -Licensee: Any user, reproducer or distributor of the Software who accepts the terms and -conditions of this Agreement. -Any user, reproducer or distributor of the Software shall be deemed to have accepted the terms -and conditions of this Agreement. -Redistribution and use Restrictions. Redistribution and use in binary forms, are permitted by -phytium provided that the following conditions are met: - 1.Redistributions must reproduce the above copyright notice, this Agreement in the documentation - and/or other materials provided with the distribution. - 2.Licensee must not reverse engineer, decompile, disassemble or modify in any way the Software - 3.If the name of Phytium or the names of its contributors are needed to endorse or promote - products derived from this software, prior written permission should be required. - -Warranty Disclaimer. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY -OF SUCH DAMAGE. -PHYTIUM DOES NOT WARRANT THAT THE SOFTWARE IS ERROR-FREE OR WILL OPERATE WITHOUT INTERRUPTION, AND -PHYTIUM GRANTS NO WARRANTY REGARDING ITS USE OR THE RESULTS THEREFROM, INCLUDING ITS CORRECTNESS, -ACCURACY, OR RELIABILITY. - -Governing. This Agreement shall be governed by, construed and enforced in accordance with the laws -of the People's Republic of China, without regard to conflicts of laws principles, will apply to -all matters relating to this Agreement or the binary software, and Licensee agrees that any litigation -will be subject to the exclusive jurisdiction of a court of competent jurisdiction in Tianjin, China. - -Other. To the extent there is a conflict between the English and Chinese version, the Chinese version -shall prevail. - - 版权所有(C)2023,飞腾信息技术有限公司,保留一切权利 - 飞腾软件许可协议 -被许可人:接受本协议条款和条件的本软件的任何使用方、复制方或分发方。 -对本软件的任何使用方、复制方或分发方视为已接受对本协议条款和条件。 - -分发及使用限制:在满足以下条件的情况下,飞腾允许以二进制形式重新分发和使用: - 1.重新分发时,必须在分发时提供的文件和/或其他材料中复制上述版权声明和本协议。 - 2.被许可人不得以任何方式对本软件进行逆向工程、反编译、反汇编或修改。 - 3.如果需要以飞腾及其贡献者的名称用于支持或推广源自本软件的产品,应当事先获得书面许可。 - -担保声明:本软件由版权所有者和贡献者“按原样”提供,不承担任何明示或暗示的担保,包括但不限于对适销性和特定用途适用 -性的暗示担保。在任何情况下,版权持有人或贡献者均不对任何直接、间接、偶然、特殊、惩戒性或后果性损害(包括但不限于 -替代商品或服务的采购;使用、数据或利润的损失;或业务中断)承担责任,无论是在合同中还是在任何责任理论下,严格责任, -或因使用本软件而产生的任何形式的侵权行为(包括疏忽或其他),即使告知可能发生此类损害。 -飞腾不保证本软件是无错误的或将在不中断的情况下运行,并且对其使用或由此产生的结果,包括其正确性、准确性或可靠性, -不给予任何保证。 - -管辖:本协议受中华人民共和国法律管辖、解释和执行,不考虑法律冲突原则,适用于与本协议或本软件有关的所有事项,被许 -可方同意任何诉讼均受得中国天津市有管辖权的法院管辖。 - -其他:如果中英文版本之间有冲突,则以中文版本为准。 diff --git a/meta-bsp/custom-licenses/Stream_Benchmark_License b/meta-bsp/custom-licenses/Stream_Benchmark_License new file mode 100644 index 0000000000000000000000000000000000000000..28650dbc195c819b1251e36d7fec722eaf6b2fbe --- /dev/null +++ b/meta-bsp/custom-licenses/Stream_Benchmark_License @@ -0,0 +1,203 @@ + + + +Stream_Benchmark_License « licenses « meta-arago-extras - meta-arago - Arago Project Distro and Apps metadata used in TI SDKs + + + + + + + + + + +
+ + + + +
+aboutsummaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: cf1c8e00223b720087082a020c1fa30d2b1545b9 (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
*=======================================================================
+*-----------------------------------------------------------------------
+* Copyright 1991-2003: John D. McCalpin
+*-----------------------------------------------------------------------
+* License:
+*  1. You are free to use this program and/or to redistribute
+*     this program.
+*  2. You are free to modify this program for your own use,
+*     including commercial use, subject to the publication
+*     restrictions in item 3.
+*  3. You are free to publish results obtained from running this
+*     program, or from works that you derive from this program,
+*     with the following limitations:
+*     3a. In order to be referred to as "STREAM benchmark results",
+*         published results must be in conformance to the STREAM
+*         Run Rules, (briefly reviewed below) published at
+*         http://www.cs.virginia.edu/stream/ref.html
+*         and incorporated herein by reference.
+*         As the copyright holder, John McCalpin retains the
+*         right to determine conformity with the Run Rules.
+*     3b. Results based on modified source code or on runs not in
+*         accordance with the STREAM Run Rules must be clearly
+*         labelled whenever they are published.  Examples of
+*         proper labelling include:
+*         "tuned STREAM benchmark results" 
+*         "based on a variant of the STREAM benchmark code"
+*         Other comparable, clear and reasonable labelling is
+*         acceptable.
+*     3c. Submission of results to the STREAM benchmark web site
+*         is encouraged, but not required.
+*  4. Use of this program or creation of derived works based on this
+*     program constitutes acceptance of these licensing restrictions.
+*  5. Absolutely no warranty is expressed or implied.
+*-----------------------------------------------------------------------
+
+
+
+ +
+ + diff --git a/meta-bsp/recipes-benchmark/arm-benchmarks/arm-benchmarks_1.3.bb b/meta-bsp/recipes-benchmark/arm-benchmarks/arm-benchmarks_1.3.bb index 5f6279ad52190f353d59793b18a32d60cc422cd4..e0f826e9879cf03965806568114c3693e472f9a7 100644 --- a/meta-bsp/recipes-benchmark/arm-benchmarks/arm-benchmarks_1.3.bb +++ b/meta-bsp/recipes-benchmark/arm-benchmarks/arm-benchmarks_1.3.bb @@ -1,6 +1,6 @@ SUMMARY = "ARM Benchmarks" HOMEPAGE = "https://gforge.ti.com/gf/project/am_benchmarks/" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=7aefb5e1cffc7b6a3ef18b803f957922" SECTION = "system" diff --git a/meta-bsp/recipes-benchmark/coremark/coremark_1.01.bb b/meta-bsp/recipes-benchmark/coremark/coremark_1.01.bb index 7358afbf46aea3e5bcf4058b54132bfc81db111d..0d2bf82498f403af51e784fd033d187fb09fe4c5 100755 --- a/meta-bsp/recipes-benchmark/coremark/coremark_1.01.bb +++ b/meta-bsp/recipes-benchmark/coremark/coremark_1.01.bb @@ -19,4 +19,4 @@ do_install(){ install -m 0755 ${S}/coremark ${D}${bindir} } -INSANE_SKIP_${PN} = "ldflags" +TARGET_CC_ARCH += "${LDFLAGS}" diff --git a/meta-bsp/recipes-benchmark/stream/files/0001-Makefile-modify-optimizations.patch b/meta-bsp/recipes-benchmark/stream/files/0001-Makefile-modify-optimizations.patch new file mode 100644 index 0000000000000000000000000000000000000000..9e661fdf7d96b9f85aafc04866deb2b4a1109efe --- /dev/null +++ b/meta-bsp/recipes-benchmark/stream/files/0001-Makefile-modify-optimizations.patch @@ -0,0 +1,25 @@ +From 560b3708476a5dcf74e7426312e73dbf70ef0014 Mon Sep 17 00:00:00 2001 +From: weishanshan1084 +Date: Fri, 26 May 2023 11:32:53 +0800 +Subject: [PATCH] Makefile: modify optimizations + +Signed-off-by: weishanshan1084 +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 42e7d21..fc5a736 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + CC ?= gcc + CFLAGS ?= -O2 +-OPTIMIZATIONS = -O3 -ffast-math -ftree-vectorize -funsafe-math-optimizations -fprefetch-loop-arrays ++OPTIMIZATIONS = -O3 -ftree-vectorize -DNTIMES=10 -DOFFSET=1024 -DSTREAM_ARRAY_SIZE=44900000 + + FF = g77 + FFLAGS = -O2 +-- +2.25.1 + diff --git a/meta-bsp/recipes-benchmark/stream/stream_%.bbappend b/meta-bsp/recipes-benchmark/stream/stream_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..841b56f0e9522d621010998d3af6f64ce51bfd82 --- /dev/null +++ b/meta-bsp/recipes-benchmark/stream/stream_%.bbappend @@ -0,0 +1,13 @@ +INSANE_SKIP:${PN} += "ldflags" +INSANE_SKIP:${PN}-openmp += "ldflags" + +BRANCH = "sdk" +SRCREV = "96156d407d9a4e5fac4513f3d3f60a414b3355cd" + +SRC_URI += "file://0001-Makefile-modify-optimizations.patch" + +do_compile:prepend() { + #Explicitly clear some variables to insure no unexpected optimizations are being passed in. + unset CFLAGS + unset LDFLAGS +} diff --git a/meta-bsp/recipes-benchmark/stream/stream_5.10.bb b/meta-bsp/recipes-benchmark/stream/stream_5.10.bb new file mode 100644 index 0000000000000000000000000000000000000000..cdde9b2015392f7bdad4c573daaab4edae755d92 --- /dev/null +++ b/meta-bsp/recipes-benchmark/stream/stream_5.10.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Stream Benchmark" +HOMEPAGE = "http://www.cs.virginia.edu/stream/" +LICENSE = "Stream_Benchmark_License" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=bca8cbe07976fe64c8946378d08314b0" +SECTION = "system" + +PR = "r0" + +BRANCH ?= "master" +SRCREV = "b66f2bab5d6d0b35732ef8406ae03873725a3306" + +SRC_URI = "git://git.ti.com/git/arago-project-org/stream.git;protocol=https;branch=${BRANCH}" + +S = "${WORKDIR}/git" + +PACKAGES =+ "${PN}-openmp" + +do_compile() { + # build the release version + oe_runmake +} + +do_install() { + install -d ${D}/${bindir} + install -m 0755 ${S}/stream_c ${D}/${bindir}/ + install -m 0755 ${S}/stream_c_openmp ${D}/${bindir}/ +} + +FILES:${PN}-openmp = "${bindir}/stream_c_openmp" diff --git a/meta-bsp/recipes-benchmark/sysbench/sysbench_1.0.20.bb b/meta-bsp/recipes-benchmark/sysbench/sysbench_1.0.20.bb new file mode 100644 index 0000000000000000000000000000000000000000..945e2c3274fddd7217210f21d3f68305b2c74d1d --- /dev/null +++ b/meta-bsp/recipes-benchmark/sysbench/sysbench_1.0.20.bb @@ -0,0 +1,30 @@ +SUMMARY = "System performance benchmark" +HOMEPAGE = "http://github.com/akopytov/sysbench" +SECTION = "console/tests" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "libtool libaio luajit concurrencykit" + +inherit autotools-brokensep pkgconfig + +# The project has moved from Sourceforge to Launchpad, to Github. Use the source tarball from +# Launchpad until the next release is available from Github. +SRC_URI = "git://github.com/akopytov/sysbench.git;protocol=https;branch=master" +SRCREV = "ebf1c90da05dea94648165e4f149abc20c979557" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = "(arm|aarch64|i.86|x86_64).*-linux*" + +EXTRA_OECONF += "--enable-largefile --with-system-luajit --with-system-ck --without-gcc-arch" +PACKAGECONFIG ??= "" +PACKAGECONFIG[aio] = "--enable-aio,--disable-aio,libaio," +PACKAGECONFIG[mysql] = "--with-mysql \ + --with-mysql-includes=${STAGING_INCDIR}/mysql \ + --with-mysql-libs=${STAGING_LIBDIR}, \ + --without-mysql,mysql5" + +do_configure:prepend() { + touch ${S}/NEWS ${S}/AUTHORS +} diff --git a/meta-bsp/recipes-benchmark/unixbench/unixbench_5.1.3.bb b/meta-bsp/recipes-benchmark/unixbench/unixbench_5.1.3.bb index 1d3a6a99167d220202a7d79952087e94e5e24fbd..373823f478125eaef080618e8bbb95382c3c58ce 100755 --- a/meta-bsp/recipes-benchmark/unixbench/unixbench_5.1.3.bb +++ b/meta-bsp/recipes-benchmark/unixbench/unixbench_5.1.3.bb @@ -1,19 +1,19 @@ SUMMARY = "UnixBench is the original BYTE UNIX benchmark suite" HOMEPAGE = "https://github.com/kdlucas/byte-unixbench" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" #SRC_URI = "git://github.com/kdlucas/byte-unixbench.git" #SRCREV = "e477bc034137f994f2bbaba52952ca6e1de53856" #S = "${WORKDIR}/git" SRC_URI = "https://github.com/kdlucas/byte-unixbench/archive/refs/heads/master.zip;downloadfilename=byte-unixbench-${PV}.zip" -SRC_URI[md5sum] = "4eac102bd3655a97d73626b54db2b1f2" -SRC_URI[sha256sum] = "292c31eade39c3f5eb247cf8fd5733917700e21b455183a9a03c550c24ffce05" +SRC_URI[md5sum] = "4812d550c9650096a5a5abd49a6a6f2d" +SRC_URI[sha256sum] = "3a6de368334006860e1742d5604740da8ac72f8ca2595c68db3eaa8911f2413e" S = "${WORKDIR}/byte-unixbench-master" B = "${S}/UnixBench" DEPENDS = "virtual/libgl virtual/libx11" -RDEPENDS_${PN} += "perl perl-modules" +RDEPENDS:${PN} += "perl perl-modules" EXTRA_OEMAKE = "CC='${CC}' UB_GCC_OPTIONS='${CFLAGS}' GRAPHIC_TESTS=defined" @@ -23,6 +23,6 @@ do_install(){ } PACKAGES = "${PN} ${PN}-dbg" -FILES_${PN} = "/opt/unixbench/" +FILES:${PN} = "/opt/unixbench/" -INSANE_SKIP_${PN} = "ldflags" +TARGET_CC_ARCH += "${LDFLAGS}" diff --git a/meta-bsp/recipes-bsp/grub/grub-bootconf_%.bbappend b/meta-bsp/recipes-bsp/grub/grub-bootconf_%.bbappend index 3862ff1016bdcd13a59113b824c244ee4b6a1d6c..27c67f5014feee257b669ac9123432e47eff7d8b 100644 --- a/meta-bsp/recipes-bsp/grub/grub-bootconf_%.bbappend +++ b/meta-bsp/recipes-bsp/grub/grub-bootconf_%.bbappend @@ -1,5 +1,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +inherit deploy + SRC_URI += " \ file://grub.cfg \ " @@ -9,3 +11,9 @@ do_install:append() { install grub.cfg ${D}${EFI_FILES_PATH}/grub.cfg } +do_deploy() { + install -d ${DEPLOYDIR}${EFI_FILES_PATH} + cp -rf ${D}/* ${DEPLOYDIR}/ +} + +addtask deploy before do_populate_sysroot after do_install diff --git a/meta-bsp/recipes-bsp/grub/grub-efi_%.bbappend b/meta-bsp/recipes-bsp/grub/grub-efi_%.bbappend index d4d0d5ebe292fcfb731cd1b37f6e5c6d5d37c459..84ad17dce7cdab573e4ef03c16bd8c5d81cb66df 100644 --- a/meta-bsp/recipes-bsp/grub/grub-efi_%.bbappend +++ b/meta-bsp/recipes-bsp/grub/grub-efi_%.bbappend @@ -5,3 +5,8 @@ do_install:append_class-target() { FILES_${PN} += "${EFI_FILES_PATH}/bootaa64.efi" require ${@oe.utils.conditional('TCMODE', 'external-arm', 'grub-external-arm.inc', '', d)} + +do_deploy:append () { + install -d ${DEPLOYDIR}${EFI_FILES_PATH} + install -m 644 ${B}/${GRUB_IMAGE} ${DEPLOYDIR}${EFI_FILES_PATH}/${EFI_BOOT_IMAGE} +} diff --git a/meta-bsp/recipes-bsp/phydisk/files/genimage.config b/meta-bsp/recipes-bsp/phydisk/files/genimage.config index 4393ec0d48fae354fd19068c2549eff0e4d4e6c2..0da0006bf9c4017aec68fbf47220d677f01c0b33 100644 --- a/meta-bsp/recipes-bsp/phydisk/files/genimage.config +++ b/meta-bsp/recipes-bsp/phydisk/files/genimage.config @@ -1,11 +1,24 @@ image efi-part.vfat { vfat { + file EFI { + image = "boot/EFI" + } file Image { image = "Image" } - file e2000q-demo-board.dtb { - image = "e2000q-demo-board.dtb" + files = { + "e2000d-demo-board.dtb", + "e2000d-miniitx-board.dtb", + "e2000d-power-board.dtb", + "e2000q-come-board.dtb", + "e2000q-demo-board.dtb", + "e2000q-edu-board.dtb", + "e2000q-hanwei-board.dtb", + "e2000q-miniitx-board.dtb", + "e2000q-vpx-board.dtb", + "e2000s-demo-board.dtb" } + } size = 400M @@ -18,13 +31,16 @@ image phydisk.img { partition boot { image = "efi-part.vfat" - partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4 + partition-type-uuid = c12a7328-f81f-11d2-ba4b-00a0c93ec93b offset = 32K bootable = true } partition root { - partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4 + partition-type-uuid = 0FC63DAF-8483-4772-8E79-3D69D8477DE4 + partition-uuid = "0a52c129-7e0f-43ad-989f-d96b07ccdbb2" image = "core-image-xfce-e2000.ext4" + size = 9G } } + diff --git a/meta-bsp/recipes-core/images/core-image-xfce.bb b/meta-bsp/recipes-core/images/core-image-xfce.bb index 45787dd87799a0e170e8f6f2239ec298f9cf391f..1eb1fe8eef752741f1cf7b84af2bb644e1d68667 100644 --- a/meta-bsp/recipes-core/images/core-image-xfce.bb +++ b/meta-bsp/recipes-core/images/core-image-xfce.bb @@ -36,21 +36,13 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" IMAGE_FSTYPES = "tar.gz ext4" -IMAGE_INSTALL += "packagegroup-phy-virtualization \ - packagegroup-core-tools-testapps \ - glmark2 \ - xserver-xfce-init \ - xfce-phytium-settings \ +IMAGE_INSTALL += " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'packagegroup-phy-virtualization', '', d)} \ + packagegroup-phy-mfgtools \ openssh \ - packagegroup-phy-gstreamer1.0-full packagegroup-phy-tools-audio \ - alsa-utils-alsactl alsa-utils-amixer \ - ${VIRTUAL-RUNTIME_alsa-state} \ + packagegroup-phy-gstreamer1.0-full \ + ${@bb.utils.contains('DISTRO_FEATURES', 'audio', 'packagegroup-phy-tools-audio', '', d)} \ udev-extra-rules \ - gtk+3 default-locale \ - evince xdg-user-dirs \ - lmsensors-sensors \ - binutils make cmake gcc-symlinks g++-symlinks cpp-symlinks pkgconfig \ - libomxil htop lsscsi lshw alsa-tools bison flex \ - cpufrequtils sysbench libkcapi libgpiod libgpiod-tools linuxptp vim git ntpdate ffmpeg \ + gtk+3 default-locale xdg-user-dirs \ + packagegroup-phy-tools-core-dev \ packagegroup-gui-base \ " diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb index acd91372afa6cb2f6171462c88fa85cebe0375b3..85c0e6b13f8d2911f3b0c461f829d253f355d6fa 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb @@ -17,4 +17,5 @@ RDEPENDS:${PN} = " \ xarchiver \ shared-mime-info \ xterm \ + xserver-xfce-init xfce-phytium-settings \ " diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-benchmark.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-benchmark.bb index 7ca2c43ad388f2b9f2ac7ca88ee346f5051717dc..f0a9cec4946ed7aaf05657b26804cdd1d629153a 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-benchmark.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-benchmark.bb @@ -10,15 +10,16 @@ inherit packagegroup PACKAGES = "${PN}-core ${PN}-extended" -RDEPENDS_${PN}-core = "\ +RDEPENDS:${PN}-core = "\ iozone3 \ iperf2 \ lmbench \ netperf \ - mtd-utils alsa-utils can-utils netcat devmem2 evtest libgpiod \ - tcpdump memtester fio coremark unixbench bpftrace \ + can-utils netcat devmem2 evtest libgpiod \ + tcpdump memtester fio coremark unixbench bpftrace stream-openmp \ + glmark2 \ " -RDEPENDS_${PN}-extended = " \ +RDEPENDS:${PN}-extended = " \ ${PN}-core \ perf \ nbench-byte \ diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-mfgtools.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-mfgtools.bb index 1ba0883b80fb2f7cbcdaf8381ff126a8db9996f2..4af91d56c19b32fca7256037de2952638dea72d2 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-mfgtools.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-mfgtools.bb @@ -10,7 +10,7 @@ inherit packagegroup PACKAGES = "${PN}" -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ packagegroup-core-boot \ bash \ dosfstools \ @@ -20,4 +20,5 @@ RDEPENDS_${PN} = " \ e2fsprogs-mke2fs \ hdparm \ util-linux\ + lmsensors-sensors \ " diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-networking-core.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-networking-core.bb index 2cfce514769b6b29cf4dc9301701b9c4c8c32c9a..882965dac84ff6d16155debfe71d586220990151 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-networking-core.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-networking-core.bb @@ -10,7 +10,7 @@ inherit packagegroup PACKAGES = "${PN} ${PN}-server" -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ attr \ ethtool \ iproute2 \ @@ -27,7 +27,7 @@ RDEPENDS_${PN} = " \ watchdog \ " -RDEPENDS_${PN}-server = " \ +RDEPENDS:${PN}-server = " \ inetutils-inetd \ inetutils-rshd \ inetutils-telnetd \ diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-audio.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-audio.bb index b2a36680c61db1b180529820c9fe39cac1137ebc..15e14f83a8a5643269921160628419446ee902c9 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-audio.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-audio.bb @@ -7,6 +7,8 @@ inherit packagegroup ALSA_INSTALL = " \ alsa-utils \ alsa-tools \ + alsa-utils-alsactl alsa-utils-amixer \ + ${VIRTUAL-RUNTIME_alsa-state} \ " PULSEAUDIO_INSTALL = " \ diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-core.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-core.bb index 5a6cfb664f470438cbd7b551596098a006167554..eb50af266645d5ae8d1778e42c829625121c1ecd 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-core.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-tools-core.bb @@ -10,7 +10,7 @@ inherit packagegroup PACKAGES = "${PN}" -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ e2fsprogs \ e2fsprogs-badblocks \ e2fsprogs-e2fsck \ @@ -32,4 +32,11 @@ RDEPENDS_${PN} = " \ usbutils \ mmc-utils \ acpica \ + libdrm-tests \ " +RDEPENDS:${PN}-dev = " \ + binutils make cmake gcc-symlinks g++-symlinks cpp-symlinks pkgconfig \ + libomxil htop lsscsi lshw bison flex \ + cpufrequtils sysbench libkcapi libgpiod libgpiod-tools linuxptp vim git ntpdate ffmpeg \ +" + diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-virtualization.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-virtualization.bb index b6c23558ea1a4bf9d2ebefc02920c8d43a5521a7..7a509814b1569eb1db7f26201a54a7cbd07a9f7f 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-virtualization.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-virtualization.bb @@ -10,7 +10,7 @@ inherit packagegroup PACKAGES = "${PN}" -RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', \ +RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', \ 'libvirt \ libvirt-libvirtd \ libvirt-virsh \ @@ -19,9 +19,9 @@ RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', \ '', d)} \ " -DOCKER_PKGS = " \ - docker \ - docker-registry \ +RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'jailhouse', \ + 'jailhouse', \ + '', d)} \ " -RDEPENDS:${PN} += " ${DOCKER_PKGS}" +RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'docker docker-registry', '', d)}" diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-qt5-phytium.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-qt5-phytium.bb index 04a7518420001df09bcb05b6bdf3753e2352f92f..71bbc58a04861aa51d4b55aed7d0a80cd697f0d7 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-qt5-phytium.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-qt5-phytium.bb @@ -1,7 +1,7 @@ # Copyright 2020 PHYTIUM # Released under the MIT license (see COPYING.MIT for the terms) -DESCRIPTION = "Package group for PHTTIUM Qt5" +DESCRIPTION = "Package group for Phytium Qt5" LICENSE = "MIT" PACKAGE_ARCH = "${TUNE_PKGARCH}" diff --git a/meta-bsp/recipes-crypto/libkcapi/libkcapi_%.bbappend b/meta-bsp/recipes-crypto/libkcapi/libkcapi_%.bbappend index 3149ec657be7a6eea3c4b7d094e210de392335ee..b9a82892108ec9ddcc3544dff8c4b14454df2b13 100644 --- a/meta-bsp/recipes-crypto/libkcapi/libkcapi_%.bbappend +++ b/meta-bsp/recipes-crypto/libkcapi/libkcapi_%.bbappend @@ -1 +1,2 @@ +PACKAGECONFIG[apps] = "--enable-kcapi-speed --enable-kcapi-rngapp --enable-kcapi-encapp --enable-kcapi-dgstapp,,," PACKAGECONFIG = "apps" diff --git a/meta-bsp/recipes-devtools/bcc/bcc_%.bbappend b/meta-bsp/recipes-devtools/bcc/bcc_%.bbappend deleted file mode 100644 index 7b2b28f7c71275beb281bde7323b3b0912a6206b..0000000000000000000000000000000000000000 --- a/meta-bsp/recipes-devtools/bcc/bcc_%.bbappend +++ /dev/null @@ -1,8 +0,0 @@ -EXTRA_OECMAKE = " \ - -DENABLE_LLVM_SHARED=ON \ - -DENABLE_CLANG_JIT=ON \ - -DLLVM_PACKAGE_VERSION=${LLVMVERSION} \ - -DPYTHON_CMD=${PYTHON} \ - -DPYTHON_FLAGS=--install-lib=${PYTHON_SITEPACKAGES_DIR} \ -" - diff --git a/meta-bsp/recipes-devtools/lshw/lshw_02.18.bb b/meta-bsp/recipes-devtools/lshw/lshw_02.18.bb index d1a73342483586b978f64b40eecfba395b602988..58114edb979129ebe21cb78d3b75bed18693044a 100644 --- a/meta-bsp/recipes-devtools/lshw/lshw_02.18.bb +++ b/meta-bsp/recipes-devtools/lshw/lshw_02.18.bb @@ -6,7 +6,7 @@ SUMMARY = "Hardware lister" HOMEPAGE = "http://ezix.org/project/wiki/HardwareLiSter" SECTION = "console/tools" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" diff --git a/meta-bsp/recipes-extended/igh-ethercat/igh-ethercat.bb b/meta-bsp/recipes-extended/igh-ethercat/igh-ethercat.bb new file mode 100644 index 0000000000000000000000000000000000000000..88371e2f05820595e6f2b88ebbf674cef44d290c --- /dev/null +++ b/meta-bsp/recipes-extended/igh-ethercat/igh-ethercat.bb @@ -0,0 +1,63 @@ +DESCRIPTION = "IgH EtherCAT Master for Linux" +HOMEPAGE = "https://gitee.com/phytium_embedded/ether-cat.git" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +SRCBRANCH ?= "master" + +SRC_URI = "git://gitee.com/phytium_embedded/ether-cat.git;branch=${SRCBRANCH};protocol=https" + +SRCREV = "1db8e8dcdfed8bb3a7b84812d8ea08e9e47f1966" +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "generic cadence" + +PACKAGECONFIG[generic] = "--enable-generic,--disable-generic," +PACKAGECONFIG[8139too] = "--enable-8139too,--disable-8139too," +PACKAGECONFIG[e100] = "--enable-e100,--disable-e100," +PACKAGECONFIG[e1000] = "--enable-e1000,--disable-e1000," +PACKAGECONFIG[e1000e] = "--enable-e1000e,--disable-e1000e," +PACKAGECONFIG[r8169] = "--enable-r8169,--disable-r8169," +PACKAGECONFIG[cadence] = "--enable-cadence,--disable-cadence" + + +do_configure:prepend() { + touch ${S}/ChangeLog +} + +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +inherit autotools-brokensep pkgconfig module-base + +EXTRA_OECONF += "--with-linux-dir=${STAGING_KERNEL_BUILDDIR}" +EXTRA_OECONF += "--with-module-dir=kernel/ethercat" + +do_compile:append() { + oe_runmake modules +} + +inherit systemd +do_install:append() { + oe_runmake MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} modules_install + rm -rf ${D}${sysconfdir}/init.d/ethercat + install -d ${D}${datadir}/examples/dc_user/ + if [ ! -z "${PACKAGECONFIG}" ]; then + if [ ! -d ${D}${sysconfdir}/modprobe.d ]; then + mkdir ${D}${sysconfdir}/modprobe.d + fi + if [ ! -e ${D}${sysconfdir}/modprobe.d/igh-ethercat.conf ]; then + touch ${D}${sysconfdir}/modprobe.d/igh-ethercat.conf + fi + for var in ${PACKAGECONFIG} + do + echo "blacklist ec_${var}" >> ${D}${sysconfdir}/modprobe.d/igh-ethercat.conf + done + fi + install -m 0755 ${S}/examples/dc_user/ec_dc_user_example ${D}${datadir}/examples/dc_user/ +} + +FILES:${PN} += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/* ${systemd_system_unitdir}/ethercat.service ${bindir_native}/* ${sbindir_native}/* ${libdir_native}/* ${sysconfdir_native}/* ${datadir}/bash-completion/completions/ethercat ${datadir}/examples/dc_user/*" +SYSTEMD_SERVICE_ethercat = "ethercat.service" +SYSTEMD_AUTO_ENABLE = "disable" + +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" diff --git a/meta-bsp/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch b/meta-bsp/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch new file mode 100644 index 0000000000000000000000000000000000000000..69f0bc9fa08ebbbd4e2f0b0310466518140bf6eb --- /dev/null +++ b/meta-bsp/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch @@ -0,0 +1,68 @@ +From 833353f269792c753d0b523dbcf093b14c4e197e Mon Sep 17 00:00:00 2001 +From: Chunrong Guo +Date: Tue, 11 Jul 2023 17:02:12 +0800 +Subject: [PATCH] tools/scripts: update shebang to python3 + +Signed-off-by: Chunrong Guo +--- + src/jailhouse/tools/jailhouse-cell-linux | 2 +- + src/jailhouse/tools/jailhouse-cell-stats | 2 +- + src/jailhouse/tools/jailhouse-config-check | 2 +- + src/jailhouse/tools/jailhouse-config-create | 2 +- + src/jailhouse/tools/jailhouse-hardware-check | 3 +-- + 5 files changed, 5 insertions(+), 6 deletions(-) + +diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux +index 4178d4e..6d1743f 100755 +--- a/tools/jailhouse-cell-linux ++++ b/tools/jailhouse-cell-linux +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-cell-stats b/tools/jailhouse-cell-stats +index 2f7e966..4c5289f 100755 +--- a/tools/jailhouse-cell-stats ++++ b/tools/jailhouse-cell-stats +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-config-check b/tools/jailhouse-config-check +index 5294967..62db24c 100755 +--- a/tools/jailhouse-config-check ++++ b/tools/jailhouse-config-check +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create +index 3005c2e..2095f4e 100755 +--- a/tools/jailhouse-config-create ++++ b/tools/jailhouse-config-create +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Jailhouse, a Linux-based partitioning hypervisor + # +diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check +index f9b2cf5..4cbc5fc 100755 +--- a/tools/jailhouse-hardware-check ++++ b/tools/jailhouse-hardware-check +@@ -1,5 +1,4 @@ +-#!/usr/bin/env python +- ++#!/usr/bin/env python3 + # Jailhouse, a Linux-based partitioning hypervisor + # + # Copyright (c) Siemens AG, 2018 +-- +2.25.1 + diff --git a/meta-bsp/recipes-extended/jailhouse/jailhouse_0.12.bb b/meta-bsp/recipes-extended/jailhouse/jailhouse_0.12.bb new file mode 100644 index 0000000000000000000000000000000000000000..105818f98c6dfb8d650a4befe11bb3a603038408 --- /dev/null +++ b/meta-bsp/recipes-extended/jailhouse/jailhouse_0.12.bb @@ -0,0 +1,111 @@ +SUMMARY = "Jailhouse, phytium fork" +HOMEPAGE = "https://gitee.com/phytium_embedded/phytium-jailhouse" +SECTION = "jailhouse" +LICENSE = "GPL-2.0-or-later" + +LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ +" + +SRCBRANCH = "master" +SRCREV = "aaa04d2f4a958e9f593ebb11699132426edaacb1" + +SRC_URI = "git://gitee.com/phytium_embedded/phytium-jailhouse.git;protocol=https;branch=${SRCBRANCH} \ + file://0001-tools-scripts-update-shebang-to-python3.patch \ +" + +DEPENDS = " \ + virtual/kernel \ + make-native \ + python3-mako-native \ + python3-mako \ + dtc-native \ +" + +inherit module python3native bash-completion deploy setuptools3 + +S = "${WORKDIR}/git/src/jailhouse" +B = "${S}" + +JH_ARCH = "arm64" +JH_DATADIR ?= "${datadir}/jailhouse" +CELL_DIR ?= "${JH_DATADIR}/cells" +CELLCONF_DIR ?= "${JH_DATADIR}/configs" +INMATES_DIR ?= "${JH_DATADIR}/inmates" + + +do_configure() { + if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; + then + cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/${ARCH}/ + fi +} + +USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ + -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \ + -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \ + -I../driver' + +TOOLS_SRC_DIR = "${S}/tools" +TOOLS_OBJ_DIR = "${S}/tools" + +do_compile() { + unset LDFLAGS + oe_runmake V=1 CC="${CC}" \ + ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} \ + KDIR=${STAGING_KERNEL_BUILDDIR} + + cd ${TOOLS_SRC_DIR} + export JAILHOUSE_VERSION=$(cat ../VERSION) + oe_runmake V=1 \ + CFLAGS="${USER_SPACE_CFLAGS}" \ + src=${TOOLS_SRC_DIR} obj=${TOOLS_OBJ_DIR} \ + ${TOOLS_OBJ_DIR}/jailhouse-config-collect ${TOOLS_OBJ_DIR}/jailhouse +} + +do_install() { + oe_runmake \ + PYTHON=python3 \ + V=1 \ + LDFLAGS="" \ + CC="${CC}" \ + ARCH=${JH_ARCH} \ + CROSS_COMPILE=${TARGET_PREFIX} \ + KDIR=${STAGING_KERNEL_BUILDDIR} \ + DESTDIR=${D} install + + install -d ${D}${CELL_DIR} + install ${B}/configs/${JH_ARCH}/*.cell ${D}${CELL_DIR}/ + + install -d ${D}${INMATES_DIR}/tools/${JH_ARCH} + install ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR} + + install -d ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-cell-linux ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-cell-stats ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-config-collect ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-config-create ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-gcov-extract ${D}${JH_DATADIR}/tools + install ${B}/tools/jailhouse-hardware-check ${D}${JH_DATADIR}/tools + install ${B}/inmates/tools/${JH_ARCH}/linux-loader.bin ${D}${INMATES_DIR}/tools/${JH_ARCH} +} + +PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse" + +FILES:${PN} += "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}" +FILES:pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}/pyjailhouse" + +RDEPENDS:${PN} += " \ + python3-curses \ + python3-datetime \ + python3-mmap \ +" + +RDEPENDS:pyjailhouse = " \ + python3-core \ + python3-ctypes \ + python3-fcntl \ + python3-shell \ +" + +KERNEL_MODULE_AUTOLOAD += "jailhouse" +INSANE_SKIP:${PN} = "ldflags" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium-rt_4.19.bb b/meta-bsp/recipes-kernel/linux/linux-phytium-rt_4.19.bb index accc2d25859246704aafebb2b9de6573a3584c43..de63e05d901aca62e948411b7ebc210799f7bec1 100644 --- a/meta-bsp/recipes-kernel/linux/linux-phytium-rt_4.19.bb +++ b/meta-bsp/recipes-kernel/linux/linux-phytium-rt_4.19.bb @@ -3,4 +3,4 @@ require linux-phytium.inc LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" KERNEL_BRANCH = "linux-4.19-rt" -SRCREV = "914e82f191f5539554c654c9cd32b6fb1bc07289" +SRCREV = "eba9781dad5f795426c0565040ff30c9816e0762" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium-rt_5.10.bb b/meta-bsp/recipes-kernel/linux/linux-phytium-rt_5.10.bb index 435da61058cc23418817e3fab499c2b75be31abc..a865d64999d152d0764ffabf272db47c17ddb18c 100644 --- a/meta-bsp/recipes-kernel/linux/linux-phytium-rt_5.10.bb +++ b/meta-bsp/recipes-kernel/linux/linux-phytium-rt_5.10.bb @@ -3,4 +3,4 @@ require linux-phytium.inc LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" KERNEL_BRANCH = "linux-5.10-rt" -SRCREV = "a2c1c3edea6bdf76ff47f45061ecc68c9d4a7708" +SRCREV = "ba7ec5ca34e8f4fbd12417fbc894ecca3e1d4d80" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium.inc b/meta-bsp/recipes-kernel/linux/linux-phytium.inc index 4bd67c3f870d85d78558ae40b8a32fc7814a1a23..2cf2c7f5b55fd247649c58e3166570e2589d7547 100644 --- a/meta-bsp/recipes-kernel/linux/linux-phytium.inc +++ b/meta-bsp/recipes-kernel/linux/linux-phytium.inc @@ -6,7 +6,6 @@ SECTION = "kernel" LICENSE = "GPL-2.0-only" SRC_URI = "git://gitee.com/phytium_embedded/phytium-linux-kernel.git;protocol=https;branch=${KERNEL_BRANCH} " -#SRC_URI = "git://git@gitee.com:22/phytium_embedded/phytium-linux-kernel.git;protocol=ssh;branch=${KERNEL_BRANCH} " SRC_URI += " \ file://iso.config \ diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium/0001-modify-the-dts-of-e2000-linux-4.19-kernel-to-reserve.patch b/meta-bsp/recipes-kernel/linux/linux-phytium/0001-modify-the-dts-of-e2000-linux-4.19-kernel-to-reserve.patch new file mode 100644 index 0000000000000000000000000000000000000000..d57784b589386b68539af8f85c62ee9057333c55 --- /dev/null +++ b/meta-bsp/recipes-kernel/linux/linux-phytium/0001-modify-the-dts-of-e2000-linux-4.19-kernel-to-reserve.patch @@ -0,0 +1,42 @@ +From 1cfc4bafbb86449d20565bac2ccd5ec401a15d55 Mon Sep 17 00:00:00 2001 +From: weishanshan1084 +Date: Thu, 13 Jul 2023 07:15:58 +0000 +Subject: [PATCH] modify the dts of e2000 linux-4.19 kernel to reserve memory + for jailhouse. + +Signed-off-by: weishanshan1084 +--- + arch/arm64/boot/dts/phytium/pe2204.dtsi | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/arch/arm64/boot/dts/phytium/pe2204.dtsi b/arch/arm64/boot/dts/phytium/pe2204.dtsi +index 950a35b64..574c9653d 100644 +--- a/arch/arm64/boot/dts/phytium/pe2204.dtsi ++++ b/arch/arm64/boot/dts/phytium/pe2204.dtsi +@@ -15,15 +15,20 @@ + #size-cells = <0x2>; + ranges; + +- reserved0: reserved@0 { ++ rproc: rproc@0x2110100000 { + no-map; +- reg = <0x0 0xb0100000 0x0 0x19900000>; ++ reg = <0x21 0x10100000 0x0 0x19900000>; + }; ++ ++ jailhouse@b0000000 { ++ reg = <0x00000000 0xb0000000 0x00000000 0x10000000>; ++ no-map; ++ }; + }; + + remoteproc: remoteproc@0 { + compatible = "phytium,rproc"; +- memory-region = <&reserved0>; ++ memory-region = <&rproc>; + status = "disabled"; + }; + +-- +2.25.1 + diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium/0001-modify-the-dts-of-e2000-linux-5.10-kernel-to-reserve.patch b/meta-bsp/recipes-kernel/linux/linux-phytium/0001-modify-the-dts-of-e2000-linux-5.10-kernel-to-reserve.patch new file mode 100644 index 0000000000000000000000000000000000000000..29019cf2296691e38a77c1ec488203951bf2fe38 --- /dev/null +++ b/meta-bsp/recipes-kernel/linux/linux-phytium/0001-modify-the-dts-of-e2000-linux-5.10-kernel-to-reserve.patch @@ -0,0 +1,35 @@ +From ec7f731688b27c812d7c9d210f705ff10c55ab0d Mon Sep 17 00:00:00 2001 +From: weishanshan1084 +Date: Wed, 19 Jul 2023 14:43:34 +0800 +Subject: [PATCH] modify the dts of e2000 linux-5.10 kernel to reserve memory + for jailhouse. + +Signed-off-by: weishanshan1084 +--- + arch/arm64/boot/dts/phytium/pe2204.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/arch/arm64/boot/dts/phytium/pe2204.dtsi b/arch/arm64/boot/dts/phytium/pe2204.dtsi +index 2cd699de4..9344ad756 100644 +--- a/arch/arm64/boot/dts/phytium/pe2204.dtsi ++++ b/arch/arm64/boot/dts/phytium/pe2204.dtsi +@@ -10,6 +10,16 @@ + / { + compatible = "phytium,pe2204"; + ++ reserved-memory { ++ #address-cells = <0x00000002>; ++ #size-cells = <0x00000002>; ++ ranges; ++ reserved@b0000000 { ++ reg = <0x00000000 0xb0000000 0x00000000 0x10000000>; ++ no-map; ++ }; ++ }; ++ + aliases { + ethernet0 = &macb0; + ethernet1 = &macb1; +-- +2.25.1 + diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb b/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb index 86fcec20c8a2ccf75752fb996fc473ba85a32a8a..5d59eea8f2544030b86d0a40b68d16bb1948f4d4 100644 --- a/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb +++ b/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb @@ -3,4 +3,4 @@ require linux-phytium.inc LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" KERNEL_BRANCH = "linux-4.19" -SRCREV = "223bb34aec6d5e9ba36718797d722426be6ba1dd" +SRCREV = "428f2e7d9d3a17528b96e95bc28ff757c9f73b2f" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bbappend b/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bbappend index 87071c84f7720eb12d7bb4836f4bc683140f1c11..a0fea0ca1ed0c7d9507fc5e4d48c663312374b4c 100644 --- a/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bbappend +++ b/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bbappend @@ -1,6 +1,9 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" XEN_PATCHES = " file://xen.cfg" +JAJLHOUSE_PATCHES = " file://0001-modify-the-dts-of-e2000-linux-4.19-kernel-to-reserve.patch" + SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${XEN_PATCHES}', '', d)}" +SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'jailhouse', '${JAJLHOUSE_PATCHES}', '', d)}" DELTA_KERNEL_DEFCONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen.cfg', '', d)}" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bb b/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bb index d8b311efd474b41fae3a70617ec1a063f4928657..345fa3fabb16b3c4ca4b58ae7a6a8b4e4521cdea 100644 --- a/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bb +++ b/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bb @@ -3,5 +3,5 @@ require linux-phytium.inc LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" KERNEL_BRANCH = "linux-5.10" -SRCREV = "093dd1e872318dca8b1b10a991435265886b07df" +SRCREV = "4515501159ee97faf80a2afa80a5208eb0d7a915" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bbappend b/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..3d338762e3810ed72cac1aaa11ee4198e8809d86 --- /dev/null +++ b/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +JAJLHOUSE_PATCHES = " file://0001-modify-the-dts-of-e2000-linux-5.10-kernel-to-reserve.patch" + +SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'jailhouse', '${JAJLHOUSE_PATCHES}', '', d)}" diff --git a/meta-bsp/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch b/meta-bsp/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch new file mode 100644 index 0000000000000000000000000000000000000000..a84290218de48997f197eb4000050d70a2c60faf --- /dev/null +++ b/meta-bsp/recipes-protocols/opcua/open62541/0001-fix-build-do-not-install-git-files.patch @@ -0,0 +1,24 @@ +From a490e82dca5a669b0af27a13d74759d8f77e2333 Mon Sep 17 00:00:00 2001 +From: Vyacheslav Yurkov +Date: Mon, 3 Oct 2022 18:25:15 +0200 +Subject: [PATCH] fix(build): do not install git files + +Signed-off-by: Vyacheslav Yurkov +--- +Upstream-Status: Pending + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1934374e..bc5c8bad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1703,6 +1703,7 @@ install(DIRECTORY ${UA_install_tools_dirs} + FILES_MATCHING + PATTERN "*" + PATTERN "*.pyc" EXCLUDE ++ PATTERN ".git*" EXCLUDE + ) + + install(FILES ${UA_install_tools_files} DESTINATION ${open62541_install_tools_dir}) diff --git a/meta-bsp/recipes-protocols/opcua/open62541_1.3.6.bb b/meta-bsp/recipes-protocols/opcua/open62541_1.3.6.bb new file mode 100644 index 0000000000000000000000000000000000000000..c7437eb9ed2db042f5bc402a8b8251f99ee9f579 --- /dev/null +++ b/meta-bsp/recipes-protocols/opcua/open62541_1.3.6.bb @@ -0,0 +1,53 @@ +DESCRIPTION = "open62541 is an implementation of OPC UA (OPC Unified Architecture)" +HOMEPAGE = "https://github.com/open62541/open62541.git" +LICENSE = "MPL-2.0 & BSD-3-Clause & MIT" +LIC_FILES_CHKSUM = "\ + file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad \ + file://deps/mdnsd/LICENSE;md5=3bb4047dc4095cd7336de3e2a9be94f0 \ + file://deps/mqtt-c/LICENSE;md5=9226377baf0b79174c89a1ab55592456 \ +" + +SRCREV_FORMAT = "opcua_mdnsd_ua-nodeset_mqtt-c" +SRCREV_opcua = "1b7e2b5d669661c568fda5577ee92011a029cf75" +SRCREV_mdnsd = "3151afe5899dba5125dffa9f4cf3ae1fe2edc0f0" +SRCREV_ua-nodeset = "f71b3f411d5cb16097c3ae0c744f67ad45535ffb" +SRCREV_mqtt-c = "f69ce1e7fd54f3b1834c9c9137ce0ec5d703cb4d" + +SRC_URI = " \ + git://github.com/open62541/open62541.git;name=opcua;branch=1.3;protocol=https \ + git://github.com/Pro/mdnsd.git;name=mdnsd;protocol=https;branch=master;destsuffix=git/deps/mdnsd \ + git://github.com/OPCFoundation/UA-Nodeset;name=ua-nodeset;protocol=https;branch=v1.04;destsuffix=git/deps/ua-nodeset \ + git://github.com/LiamBindle/MQTT-C.git;name=mqtt-c;protocol=https;branch=master;destsuffix=git/deps/mqtt-c \ + file://0001-fix-build-do-not-install-git-files.patch \ +" + +S = "${WORKDIR}/git" + +inherit cmake python3native + +EXTRA_OECMAKE += "\ + -DBUILD_SHARED_LIBS=ON \ + -DUA_NAMESPACE_ZERO=FULL \ + -DUA_LOGLEVEL=600 \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ +" + +PACKAGECONFIG ?= "encryption-mbedtls pubsub pubsub-eth subscriptions subscriptions-events" +PACKAGECONFIG[amalgamation] = "-DUA_ENABLE_AMALGAMATION=ON, -DUA_ENABLE_AMALGAMATION=OFF" +PACKAGECONFIG[encryption-mbedtls] = "-DUA_ENABLE_ENCRYPTION=MBEDTLS, , mbedtls, , , encryption-openssl" +PACKAGECONFIG[encryption-openssl] = "-DUA_ENABLE_ENCRYPTION=OPENSSL, , openssl, , , encryption-mbedtls" +PACKAGECONFIG[multithreading] = "-DUA_MULTITHREADING=100, -DUA_MULTITHREADING=0" +PACKAGECONFIG[pubsub] = "-DUA_ENABLE_PUBSUB=ON, -DUA_ENABLE_PUBSUB=OFF" +PACKAGECONFIG[pubsub-eth] = "-DUA_ENABLE_PUBSUB_ETH_UADP=ON, -DUA_ENABLE_PUBSUB_ETH_UADP=OFF" +PACKAGECONFIG[subscriptions] = "-DUA_ENABLE_SUBSCRIPTIONS=ON, -DUA_ENABLE_SUBSCRIPTIONS=OFF" +PACKAGECONFIG[subscriptions-events] = "-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON, -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=OFF" +PACKAGECONFIG[werror] = "-DUA_FORCE_WERROR=ON, -DUA_FORCE_WERROR=OFF" + +do_configure:prepend:toolchain-clang:riscv64() { + sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt +} + +do_configure:prepend:toolchain-clang:riscv32() { + sed -i -e 's/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)/set(CMAKE_INTERPROCEDURAL_OPTIMIZATION OFF)/' ${S}/CMakeLists.txt +} + diff --git a/meta-xenomai/recipes-core/images/core-image-rt.bb b/meta-xenomai/recipes-core/images/core-image-rt.bb index 33bda443cb830eb136951ca2af8e560ec1f7f7a8..1bb497b9d16e796ef879b2232a50b4846bfd4087 100644 --- a/meta-xenomai/recipes-core/images/core-image-rt.bb +++ b/meta-xenomai/recipes-core/images/core-image-rt.bb @@ -16,6 +16,7 @@ IMAGE_INSTALL += "grub-efi rt-tests hwlatdetect kernel-modules xenomai xenomai-d packagegroup-core-buildessential \ xenomai-dev \ wireless-regdb-static \ + igh-ethercat open62541 \ " LICENSE = "MIT" diff --git a/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_4.19.bb b/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_4.19.bb index d7a81fcf9f92eec498f49629998f3c2a84159512..86d3f9e0e96a3a18f2326dc61b9f4babe873cfff 100644 --- a/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_4.19.bb +++ b/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_4.19.bb @@ -5,4 +5,4 @@ SRC_URI:append = " file://0001-perf-bench-Share-some-global-variables-to-fix-bui file://0001-perf-tests-bp_account-Make-global-variable-static.patch \ file://0001-libtraceevent-Fix-build-with-binutils-2.35.patch \ " -SRCREV = "94d20013f323c68ee898ef2c0d1f64fd617a0f64" +SRCREV = "5ff07e67818ca4d57a28c3f0f084119ea42e2173" diff --git a/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_5.10.bb b/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_5.10.bb index b1f5b4efb2054b890739b15dbff56ca3d33550e8..8aab6211003915937fa56eb4004f27d45e97f525 100644 --- a/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_5.10.bb +++ b/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_5.10.bb @@ -1,4 +1,4 @@ require linux-xenomai.inc LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" KERNEL_BRANCH ?= "master" -SRCREV = "fca90914023e71279cd31917d5f372606d82cc3b" +SRCREV = "5165d968e0f947d8d97f67cf7d4323230f523a3a" diff --git "a/\351\243\236\350\205\276\345\265\214\345\205\245\345\274\217Linux Yocto4.0\347\224\250\346\210\267\346\211\213\345\206\214 v2.0.pdf" "b/\351\243\236\350\205\276\345\265\214\345\205\245\345\274\217Linux Yocto4.0\347\224\250\346\210\267\346\211\213\345\206\214 v2.0.pdf" deleted file mode 100644 index c0af7a3bbd8249448db56ea4a47dc4ce8baa7cc8..0000000000000000000000000000000000000000 Binary files "a/\351\243\236\350\205\276\345\265\214\345\205\245\345\274\217Linux Yocto4.0\347\224\250\346\210\267\346\211\213\345\206\214 v2.0.pdf" and /dev/null differ