From 8842e1d504d626c0853b4c1495f78b2d4d70b9ce Mon Sep 17 00:00:00 2001 From: Guochun Rong Date: Thu, 27 Nov 2025 10:06:07 +0800 Subject: [PATCH] update to phytium_linux_yocto_4.0 v3.3 Signed-off-by: Guochun Rong --- README.md | 21 +--- default.xml | 2 +- meta-bsp/conf/machine/phytium-base.inc | 2 - meta-bsp/conf/machine/phytium.conf | 14 --- .../phydisk/genimage-efiphytium.config | 24 ++-- .../recipes-core/images/core-image-xfce.bb | 5 +- .../packagegroups/packagegroup-gui-base.bb | 10 +- .../packagegroup-phy-gstreamer1.0-full.bb | 1 + .../packagegroup-phy-gstreamer1.0.bb | 1 + .../packagegroups/packagegroup-x100um-sdk.bb | 11 +- .../recipes-core/systemd/systemd_%.bbappend | 1 + .../igh-ethercat/igh-ethercat.bb | 2 +- .../jailhouse/jailhouse_0.12.bb | 2 +- .../xorg-app/x11perf_1.7.0.bb | 30 +++++ .../kernel-module-ftd330_git.bb | 26 +++++ .../kernel-modules/kernel-module-ftg340.bb | 26 +++++ .../kernel-modules/kernel-module-ftv310.bb | 25 ++++ .../kernel-modules/rtl8821cs.bb | 8 +- ...not-preserve-ownership-in-cp-command.patch | 40 +++++++ .../libtraceevent/libtraceevent_1.8.4.bb | 26 +++++ .../linux/linux-phytium-rt_4.19.bb | 6 - .../linux/linux-phytium-rt_5.10.bb | 9 -- .../linux/linux-phytium-rt_6.6.bb | 14 +++ .../recipes-kernel/linux/linux-phytium.inc | 2 - .../linux/linux-phytium/xen.cfg | 23 ---- .../linux/linux-phytium_4.19.bb | 10 -- .../linux/linux-phytium_5.10.bb | 11 -- .../recipes-kernel/linux/linux-phytium_6.6.bb | 17 +++ meta-bsp/recipes-kernel/perf/perf.bbappend | 1 + .../recipes-multimedia/ffmpeg/ffmpeg_4.2.4.bb | 2 +- .../xserver-xfce-init_1.0.bb | 5 +- .../linux/linux-xenomai-phytium_4.19.bb | 9 -- .../linux/linux-xenomai-phytium_5.10.bb | 5 - .../linux/linux-xenomai-phytium_6.6.bb | 5 + .../xenomai/files/0001-mercury.patch | 107 ++++++++++++++++++ .../recipes-xenomai/xenomai/xenomai_3.1.5.bb | 31 ----- .../{xenomai_3.2.6.bb => xenomai_3.3.bb} | 11 +- phyt_yocto_setenv.sh | 4 +- poky/meta/classes/kernel.bbclass | 2 +- 39 files changed, 376 insertions(+), 175 deletions(-) create mode 100644 meta-bsp/recipes-core/systemd/systemd_%.bbappend create mode 100644 meta-bsp/recipes-graphics/xorg-app/x11perf_1.7.0.bb create mode 100644 meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftd330_git.bb create mode 100644 meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftg340.bb create mode 100644 meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftv310.bb create mode 100644 meta-bsp/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch create mode 100644 meta-bsp/recipes-kernel/libtraceevent/libtraceevent_1.8.4.bb delete mode 100644 meta-bsp/recipes-kernel/linux/linux-phytium-rt_4.19.bb delete mode 100644 meta-bsp/recipes-kernel/linux/linux-phytium-rt_5.10.bb create mode 100644 meta-bsp/recipes-kernel/linux/linux-phytium-rt_6.6.bb delete mode 100644 meta-bsp/recipes-kernel/linux/linux-phytium/xen.cfg delete mode 100644 meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb delete mode 100644 meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bb create mode 100644 meta-bsp/recipes-kernel/linux/linux-phytium_6.6.bb create mode 100644 meta-bsp/recipes-kernel/perf/perf.bbappend delete mode 100644 meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_4.19.bb delete mode 100644 meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_5.10.bb create mode 100644 meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_6.6.bb create mode 100644 meta-xenomai/recipes-xenomai/xenomai/files/0001-mercury.patch delete mode 100644 meta-xenomai/recipes-xenomai/xenomai/xenomai_3.1.5.bb rename meta-xenomai/recipes-xenomai/xenomai/{xenomai_3.2.6.bb => xenomai_3.3.bb} (74%) diff --git a/README.md b/README.md index 1a6433a..2411510 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Yocto Project 是一个开源的协作软件,提供模板、工具和方法帮你创建定制的 Linux 系统和嵌入式产品,而无需关心硬件体系。适合嵌入式Linux开发人员使用。 -phytium-linux-yocto基于Yocto,适配了飞腾E2000,D2000,FT-2000/4等CPU和X100套片,支持用户定制系统。 +phytium-linux-yocto基于Yocto,适配了飞腾D3000M, E2000,D2000,FT-2000/4等CPU和X100套片,支持用户定制系统。 用户手册位于https://gitee.com/phytium_embedded/phytium-embedded-docs/tree/master/linux @@ -27,6 +27,8 @@ $ git clone https://gitee.com/phytium_embedded/phytium-linux-yocto.git $ cd phytium-linux-yocto +$ git checkout -b kernel-6.6 origin/kernel-6.6 + $ source phyt_yocto_setenv.sh 该脚本实现了自动安装主机环境、工具链部署和构建目录生成 @@ -66,14 +68,14 @@ phytium-linux-yocto 需要主机系统上安装如下软件包 $: cd - $: repo init -u https://gitee.com/phytium_embedded/phytium-linux-yocto -m default.xml + $: repo init -u https://gitee.com/phytium_embedded/phytium-linux-yocto -b kernel-6.6 $: repo sync --force-sync ``` # 支持开发板 -支持飞腾嵌入式CPU, E2000 D2000 FT-2000/4 等CPU. +支持飞腾嵌入式CPU,D3000M E2000 D2000 FT-2000/4 等CPU. # 构建镜像 @@ -92,13 +94,6 @@ phytium-linux-yocto 需要主机系统上安装如下软件包 $: bitbake phydisk -``` - -## 支持GNOME桌面 -``` - -$: bitbake core-image-gnome - ``` ## 支持编译SD卡镜像 @@ -131,7 +126,7 @@ $: bitbake core-image-gnome ``` =>setenv bootargs console=ttyAMA1,115200 audit=0 earlycon=pl011,0x2800d000 root=PARTUUID="0a52c129-7e0f-43ad-989f-d96b07ccdbb2" rootdelay=5 rw; - =>setenv bootcmd 'usb start;fatload usb 0:1 0x90100000 Image;fatload usb 0:1 0x90000000 e2000q-demo-board.dtb;booti 0x90100000 - 0x90000000' + =>setenv bootcmd 'usb start;fatload usb 0:1 0x90100000 Image;fatload usb 0:1 0x90000000 pe2204-demo-ddr4.dtb;booti 0x90100000 - 0x90000000' =>saveenv @@ -183,10 +178,6 @@ $: bitbake core-image-gnome ## 如何编译Linux RT 内核? 在local.conf 里添加变量 PREFERRED_PROVIDER_virtual/kernel = "linux-phytium-rt" . - -## 如何编译Linux 4.19 版本内核 ? - - 在local.conf 里添加变量 PREFERRED_VERSION_linux-phytium = "4.19". ## 如何编译用户自定义内核 ? diff --git a/default.xml b/default.xml index 7233da9..dc6a98c 100644 --- a/default.xml +++ b/default.xml @@ -9,7 +9,7 @@ - + diff --git a/meta-bsp/conf/machine/phytium-base.inc b/meta-bsp/conf/machine/phytium-base.inc index 385dc10..f5d075a 100644 --- a/meta-bsp/conf/machine/phytium-base.inc +++ b/meta-bsp/conf/machine/phytium-base.inc @@ -30,6 +30,4 @@ XSERVER ?= "xserver-xorg \ " PREFERRED_VERSION_gstreamer1.0-libav ?= "1.16.0" PREFERRED_VERSION_ffmpeg ?= "4.2.4" -PREFERRED_VERSION_xen = "4.15+stableAUTOINC+e25aa9939a" -PREFERRED_VERSION_xen-tools = "4.15+stableAUTOINC+e25aa9939a" PREFERRED_VERSION_lshw = "02.18" diff --git a/meta-bsp/conf/machine/phytium.conf b/meta-bsp/conf/machine/phytium.conf index 71da173..ffa30a2 100644 --- a/meta-bsp/conf/machine/phytium.conf +++ b/meta-bsp/conf/machine/phytium.conf @@ -8,19 +8,5 @@ UBOOT_ENTRYPOINT = "0x80080000" UBOOT_MACHINE = "config" -KERNEL_DEVICETREE ?= "\ - phytium/e2000d-demo-board.dtb \ - phytium/e2000d-miniitx-board.dtb \ - phytium/e2000d-power-board.dtb \ - phytium/e2000q-come-board.dtb \ - phytium/e2000q-demo-board.dtb \ - phytium/e2000q-edu-board.dtb \ - phytium/e2000q-hanwei-board.dtb \ - phytium/e2000q-miniitx-board.dtb \ - phytium/e2000q-vpx-board.dtb \ - phytium/e2000s-demo-board.dtb \ - phytium/phytiumpi_firefly.dtb \ -" KERNEL_DEFCONFIG ?= "phytium_defconfig" -DEF_DEVICETREE = "e2000d-demo-board.dtb e2000s-demo-board.dtb e2000q-demo-board.dtb" diff --git a/meta-bsp/recipes-bsp/phydisk/phydisk/genimage-efiphytium.config b/meta-bsp/recipes-bsp/phydisk/phydisk/genimage-efiphytium.config index 0fd01ba..1ee37ec 100644 --- a/meta-bsp/recipes-bsp/phydisk/phydisk/genimage-efiphytium.config +++ b/meta-bsp/recipes-bsp/phydisk/phydisk/genimage-efiphytium.config @@ -7,16 +7,20 @@ image efi-part.vfat { image = "Image" } 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" + "pe2201-demo-ddr4.dtb", + "pe2202-chillipi-edu-board.dtb", + "pe2202-demo-ddr4-local.dtb", + "pe2202-demo-ddr4.dtb", + "pe2202-miniitx-board.dtb", + "pe2202-power-board.dtb", + "pe2204-come-board.dtb", + "pe2204-demo-ddr4-local.dtb", + "pe2204-demo-ddr4.dtb", + "pe2204-edu-board.dtb", + "pe2204-hanwei-board.dtb", + "pe2204-miniitx-board.dtb", + "pe2204-vpx-board.dtb", + "phytiumpi_firefly.dtb" } } diff --git a/meta-bsp/recipes-core/images/core-image-xfce.bb b/meta-bsp/recipes-core/images/core-image-xfce.bb index 7b984cb..6554947 100644 --- a/meta-bsp/recipes-core/images/core-image-xfce.bb +++ b/meta-bsp/recipes-core/images/core-image-xfce.bb @@ -6,7 +6,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" CORE_IMAGE_EXTRA_INSTALL += "grub-efi lsb-release" - IMAGE_INSTALL = "packagegroup-core-boot \ packagegroup-core-x11 \ packagegroup-xfce-base \ @@ -48,7 +47,9 @@ IMAGE_INSTALL += " ${@bb.utils.contains('DISTRO_FEATURES', 'jailhouse', 'package gtk+3 default-locale xdg-user-dirs \ packagegroup-gui-base \ wireless-regdb-static \ - ${@bb.utils.contains('MACHINE_FEATURES', 'sd', 'rtl8821cs iw wpa-supplicant', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'sd', ' rtl8821cs iw wpa-supplicant', '', d)} \ ${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'packagegroup-optee', '', d)} \ ${@bb.utils.contains('MACHINE_FEATURES', 'x100', 'packagegroup-x100um-sdk', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'd3000m', 'packagegroup-x100um-sdk', '', d)} \ " +#IMAGE_ROOTFS_EXTRA_SPACE = "5242880" diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb index 03f19fc..9d36eab 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-gui-base.bb @@ -7,10 +7,12 @@ PACKAGE_ARCH = "${TUNE_PKGARCH}" inherit packagegroup -PACKAGES = "${PN}" +PACKAGES = "${PN}" -X100LIB = " kernel-module-phytium-gpu kernel-module-phytium-dma x265 x264 dracut" +X100LIB = " kernel-module-phytium-vpu kernel-module-phytium-gpu kernel-module-phytium-dma x265 x264 dracut" VPULIB = " kernel-module-phytium-vpu x265 x264 dracut" +D3000M = " kernel-module-ftg340 kernel-module-ftv310 kernel-module-ftd330" + RDEPENDS:${PN} = " \ ttf-dejavu-sans ttf-dejavu-sans-mono ttf-dejavu-common \ ttf-liberation-sans ttf-liberation-mono ttf-liberation-serif \ @@ -19,9 +21,9 @@ RDEPENDS:${PN} = " \ gedit gtksourceview-classic-light \ xarchiver \ shared-mime-info \ - xterm \ xserver-xfce-init xfce-phytium-settings xfce4-screenshooter xfce4-power-manager \ xfce4-pulseaudio-plugin \ ${@bb.utils.contains('MACHINE_FEATURES', 'x100', '${X100LIB}', '', d)} \ - ${@bb.utils.contains('MACHINE_FEATURES', 'vpu', '${VPULIB}', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'vpu', '${VPULIB}', '', d)} \ + ${@bb.utils.contains('MACHINE_FEATURES', 'd3000m', '${D3000M}', '', d)} \ " diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0-full.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0-full.bb index cb00c20..e8950a1 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0-full.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0-full.bb @@ -7,5 +7,6 @@ inherit packagegroup RDEPENDS:${PN} = " \ packagegroup-phy-gstreamer1.0 \ + packagegroup-phy-gstreamer1.0-base \ ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'packagegroup-phy-gstreamer1.0-commercial', '', d)} \ " diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0.bb index 81245df..e31e372 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-phy-gstreamer1.0.bb @@ -39,6 +39,7 @@ GST_WAYLAND_PACKAGES = " \ # basic plugins required in virtually every pipeline RDEPENDS:${PN}-base = " \ gstreamer1.0 \ + gstreamer1.0-vaapi \ gstreamer1.0-plugins-base-playback \ ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'gstreamer1.0-plugins-base-alsa', '', d)} \ gstreamer1.0-plugins-base-audioconvert \ diff --git a/meta-bsp/recipes-core/packagegroups/packagegroup-x100um-sdk.bb b/meta-bsp/recipes-core/packagegroups/packagegroup-x100um-sdk.bb index 51b73fe..56d28f7 100644 --- a/meta-bsp/recipes-core/packagegroups/packagegroup-x100um-sdk.bb +++ b/meta-bsp/recipes-core/packagegroups/packagegroup-x100um-sdk.bb @@ -6,8 +6,9 @@ inherit packagegroup PACKAGES = "${PN}" -RDEPENDS:${PN} = "bison flex gawk gcc g++ make ninja m4 meson patch pkgconfig tar zip automake bc cmake dpkg-dev ncurses \ - opencl-headers perl qemu texinfo wget gperf intltool libtool python3-mako \ - libxslt xkbutils git libglvnd libglvnd-dev libdrm-dev libgbm-dev pixman libepoxy-dev libudev libxcb \ - libxshmfence-dev libxrandr-dev ffmpeg x264 x265 libomxil libegl-mesa-dev mesa xserver-xorg-dev xserver-xorg-extension-glx \ - x265 x265-dev x264 x264-dev dracut kernel-devsrc" +RDEPENDS:${PN} = "binutils-symlinks cpp-symlinks gcc-symlinks g++-symlinks autoconf bison flex gawk gcc g++ make ninja m4 meson patch pkgconfig tar zip automake bc cmake dpkg-dev ncurses opencl-headers perl qemu texinfo wget gperf intltool libtool python3-mako \ + libva libva-dev libxslt xkbutils git libdrm-dev libsdl2-dev libgbm-dev pixman libepoxy-dev libudev libxcb libxcb-randr \ + libxshmfence-dev libxrandr-dev ffmpeg ffmpeg-dev libomxil-dev libomxil libegl-mesa-dev libgstvideo-1.0 gstreamer1.0-plugins-base-dev gstreamer1.0-omx mesa xserver-xorg-dev xserver-xorg-extension-glx \ + gstreamer1.0-libav libavdevice x265 x265-dev x264 x264-dev dracut kernel-devsrc systemtap-dev systemtap \ + ${@bb.utils.contains('MACHINE_FEATURES', 'x100', 'libglvnd libglvnd-dev', '', d)} \ +" diff --git a/meta-bsp/recipes-core/systemd/systemd_%.bbappend b/meta-bsp/recipes-core/systemd/systemd_%.bbappend new file mode 100644 index 0000000..5572e51 --- /dev/null +++ b/meta-bsp/recipes-core/systemd/systemd_%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG:append = " efi" diff --git a/meta-bsp/recipes-extended/igh-ethercat/igh-ethercat.bb b/meta-bsp/recipes-extended/igh-ethercat/igh-ethercat.bb index ed1db47..a23a3ee 100644 --- a/meta-bsp/recipes-extended/igh-ethercat/igh-ethercat.bb +++ b/meta-bsp/recipes-extended/igh-ethercat/igh-ethercat.bb @@ -7,7 +7,7 @@ SRCBRANCH ?= "master" SRC_URI = "git://gitee.com/phytium_embedded/ether-cat.git;branch=${SRCBRANCH};protocol=https" -SRCREV = "47dc5942ff6b982197e70342279e7788e8cf1425" +SRCREV = "ea5f8fc3845781fb4ca0e46e02a96ea86f3bd07f" S = "${WORKDIR}/git" PACKAGECONFIG ??= "generic cadence" diff --git a/meta-bsp/recipes-extended/jailhouse/jailhouse_0.12.bb b/meta-bsp/recipes-extended/jailhouse/jailhouse_0.12.bb index f9c800c..ad5e68c 100644 --- a/meta-bsp/recipes-extended/jailhouse/jailhouse_0.12.bb +++ b/meta-bsp/recipes-extended/jailhouse/jailhouse_0.12.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ " SRCBRANCH = "master" -SRCREV = "086b03865bea241c49efd53f5a77891637a2128e" +SRCREV = "0d7d61c65ab166fc67c59e357cfae4586806a3c2" SRC_URI = "git://gitee.com/phytium_embedded/phytium-jailhouse.git;protocol=https;branch=${SRCBRANCH} \ file://0001-tools-scripts-update-shebang-to-python3.patch \ diff --git a/meta-bsp/recipes-graphics/xorg-app/x11perf_1.7.0.bb b/meta-bsp/recipes-graphics/xorg-app/x11perf_1.7.0.bb new file mode 100644 index 0000000..1c410f5 --- /dev/null +++ b/meta-bsp/recipes-graphics/xorg-app/x11perf_1.7.0.bb @@ -0,0 +1,30 @@ +require recipes-graphics/xorg-app/xorg-app-common.inc + +SUMMARY = "X11 server performance test program" + +DESCRIPTION = "The x11perf program runs one or more performance tests \ +and reports how fast an X server can execute the tests." + +SRC_URI = "https://xorg.freedesktop.org/archive/individual/test/${BPN}-${PV}.tar.gz" + + +DEPENDS += "libxmu libxrender libxft libxext fontconfig" + +LIC_FILES_CHKSUM = "file://COPYING;md5=428ca4d67a41fcd4fc3283dce9bbda7e \ + file://x11perf.h;endline=24;md5=db924bdf63cdb0a903adbdcf47313aae" + +PE = "1" + +inherit multilib_script + +MULTILIB_SCRIPTS = "${PN}:${bindir}/x11perfcomp" + +do_install:append:class-target () { + sed -i -e 's:${HOSTTOOLS_DIR}/::g' ${D}${bindir}/x11perfcomp +} + +FILES:${PN} += "${libdir}/X11/x11perfcomp/* \ + ${datadir}/*" + +SRC_URI[md5sum] = "98e4c22df11c0dd8bea97439dfb5a22e" +SRC_URI[sha256sum] = "88563b4bcd0082285bad9c0d0596851cce021a8318e66669fa528dc86c6ae8c1" diff --git a/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftd330_git.bb b/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftd330_git.bb new file mode 100644 index 0000000..f5bd3e3 --- /dev/null +++ b/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftd330_git.bb @@ -0,0 +1,26 @@ +SUMMARY = "Phytium d3000 dc driver for module " +LICENSE = "GPL-2.0-only" + +SRCBRANCH = "phytium-embedded" +SRC_URI = "" +SRCREV = "${AUTOREV}" + +do_fetch:prepend() { + src_uri = (d.getVar('SRC_URI') or "").split() + if len(src_uri) == 0: + bb.fatal("Please Checking vpu code in /home/path-to-your-source-tree") +} + +do_configure:prepend() { + rm -rf ${S}/Kbuild +} + +inherit module + +EXTRA_OEMAKE = "KDIR=${STAGING_KERNEL_DIR} -C ${STAGING_KERNEL_DIR} M=${S}" + +LIC_FILES_CHKSUM = "file://README.md;md5=314dd92e05acde38f73bf4a26c4f9915" + +PROVIDES += "kernel-module-ftd330" + +S = "${WORKDIR}/git" diff --git a/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftg340.bb b/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftg340.bb new file mode 100644 index 0000000..71ce88e --- /dev/null +++ b/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftg340.bb @@ -0,0 +1,26 @@ +SUMMARY = "Phytium d3000 dc driver for module " +LICENSE = "GPL-2.0-only" + +SRCBRANCH = "phytium-embedded" +SRC_URI = "" +SRCREV = "${AUTOREV}" + +do_fetch:prepend() { + src_uri = (d.getVar('SRC_URI') or "").split() + if len(src_uri) == 0: + bb.fatal("Please Checking vpu code in /home/path-to-your-source-tree") +} + +do_configure:prepend() { + rm -rf ${S}/Kbuild + sed -i 's|^AQROOT ?= $(CURDIR)|AQROOT ?= $(src)|' ${S}/Makefile +} + +inherit module + +EXTRA_OEMAKE = "KDIR=${STAGING_KERNEL_DIR} -C ${STAGING_KERNEL_DIR} M=${S}" + +LIC_FILES_CHKSUM = "file://config;md5=bc56d26991c5b674d7ce4d4de234780f" + +PROVIDES += "kernel-module-ftg340" +S = "${WORKDIR}/git" diff --git a/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftv310.bb b/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftv310.bb new file mode 100644 index 0000000..3faecf6 --- /dev/null +++ b/meta-bsp/recipes-kernel/kernel-modules/kernel-module-ftv310.bb @@ -0,0 +1,25 @@ +SUMMARY = "Phytium d3000 dc driver for module " +LICENSE = "GPL-2.0-only" + +SRCBRANCH = "phytium-embedded" +SRC_URI = "" +SRCREV = "${AUTOREV}" + +do_fetch:prepend() { + src_uri = (d.getVar('SRC_URI') or "").split() + if len(src_uri) == 0: + bb.fatal("Please Checking vpu code in /home/path-to-your-source-tree") +} + +do_configure:prepend() { + sed -i '6s/\$(PWD)/$(src)/' ${S}/Makefile +} + +inherit module + +EXTRA_OEMAKE = "KDIR=${STAGING_KERNEL_DIR} -C ${STAGING_KERNEL_DIR} M=${S}" + +LIC_FILES_CHKSUM = "file://readme.txt;md5=37f75729976884fd08458bae617ac982" + +PROVIDES += "kernel-module-ftv310" +S = "${WORKDIR}/git/leopard_vpu_driver" diff --git a/meta-bsp/recipes-kernel/kernel-modules/rtl8821cs.bb b/meta-bsp/recipes-kernel/kernel-modules/rtl8821cs.bb index 1c774a6..cfeae77 100644 --- a/meta-bsp/recipes-kernel/kernel-modules/rtl8821cs.bb +++ b/meta-bsp/recipes-kernel/kernel-modules/rtl8821cs.bb @@ -3,7 +3,7 @@ DESCRIPTION = "RTL8192CS kernel driver" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" -SRCREV = "bce547e2de6ef07cf7b51aeb3ec0cbc28c40c10a" +SRCREV = "1a4f9b8558bb051c94d346b951990b426c187335" SRC_URI = "git://gitee.com/phytium_embedded/phytium-rogue-umlibs.git;subpath=rtl8821cs;protocol=https;branch=develop;destsuffix=git/" S = "${WORKDIR}/git" @@ -12,11 +12,7 @@ inherit module do_configure:prepend () { tar zxvf ${S}/rtl8821cs.tar.gz -C ${S}/ mv ${S}/rtl8821cs/* ${S}/ - sed -i '2472i\ - modules_install:\ - $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules_install' Makefile - } KERNEL_MODULE_AUTOLOAD = "8821cs" -EXTRA_OEMAKE:append = " KSRC=${STAGING_KERNEL_DIR}" +EXTRA_OEMAKE:append = " ARCH=arm64 KSRC=${STAGING_KERNEL_DIR}" diff --git a/meta-bsp/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch b/meta-bsp/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch new file mode 100644 index 0000000..5e88048 --- /dev/null +++ b/meta-bsp/recipes-kernel/libtraceevent/libtraceevent/0001-makefile-Do-not-preserve-ownership-in-cp-command.patch @@ -0,0 +1,40 @@ +From ed0a31000305d937abe47c44d705b5b52bb36f79 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 22 Dec 2022 18:32:17 -0800 +Subject: [PATCH] makefile: Do not preserve ownership in cp command + +Fixes + +ERROR: libtraceevent-1.7.0-r0 do_package_qa: QA Issue: libtraceevent: /usr/lib/libtraceevent.a is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 965ff47..0e782cb 100644 +--- a/Makefile ++++ b/Makefile +@@ -287,7 +287,7 @@ $(BUILD_PREFIX): force + $(Q)$(call build_prefix,$(prefix)) + + define do_make_pkgconfig_file +- cp -f ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ ++ install -m 0644 ${PKG_CONFIG_SOURCE_FILE}.template ${PKG_CONFIG_FILE}; \ + sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \ + sed -i "s|LIB_VERSION|${EVENT_PARSE_VERSION}|g" ${PKG_CONFIG_FILE}; \ + sed -i "s|LIB_DIR|${libdir_relative}|g" ${PKG_CONFIG_FILE}; \ +@@ -335,7 +335,7 @@ install: install_libs install_plugins + + install_libs: libs install_headers install_pkgconfig + $(Q)$(call do_install,$(LIBTRACEEVENT_SHARED),$(libdir_SQ)); \ +- cp -fpR $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ) ++ cp --no-preserve=ownership --recursive $(LIB_INSTALL) $(DESTDIR)$(libdir_SQ) + $(Q)$(call install_ld_config) + + install_pkgconfig: $(PKG_CONFIG_FILE) +-- +2.39.0 + diff --git a/meta-bsp/recipes-kernel/libtraceevent/libtraceevent_1.8.4.bb b/meta-bsp/recipes-kernel/libtraceevent/libtraceevent_1.8.4.bb new file mode 100644 index 0000000..450b56c --- /dev/null +++ b/meta-bsp/recipes-kernel/libtraceevent/libtraceevent_1.8.4.bb @@ -0,0 +1,26 @@ +# Copyright (C) 2022 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "API to access the kernel tracefs directory" +HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \ + file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" +SECTION = "libs" + +SRCREV = "1c6f0f3b2bb47571fc455dc565dc343152517d98" +SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https \ + file://0001-makefile-Do-not-preserve-ownership-in-cp-command.patch" + +S = "${WORKDIR}/git" + +inherit pkgconfig + +do_install() { + oe_runmake install DESTDIR=${D} pkgconfig_dir=${libdir}/pkgconfig +} + +PACKAGES += "${PN}-plugins" + +FILES:${PN}-plugins += "${libdir}/traceevent/plugins" + 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 deleted file mode 100644 index 299e30b..0000000 --- a/meta-bsp/recipes-kernel/linux/linux-phytium-rt_4.19.bb +++ /dev/null @@ -1,6 +0,0 @@ -require linux-phytium.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -KERNEL_BRANCH = "linux-4.19-rt" - -SRCREV = "c45781eabbdb730a202197baf3f22a486fb59cd3" 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 deleted file mode 100644 index 15ceb3c..0000000 --- a/meta-bsp/recipes-kernel/linux/linux-phytium-rt_5.10.bb +++ /dev/null @@ -1,9 +0,0 @@ -require linux-phytium.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -KERNEL_BRANCH = "linux-5.10-rt" - -SRC_URI:append = " file://0001-Makfile-add-dtbo.patch" - -SRCREV = "b363ff25a2aa82a3f220123540a983c06a180db6" -KERNEL_DEVICETREE:append = " phytium/px210.dtbo phytium/usb2_host_for_pe220x.dtbo" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium-rt_6.6.bb b/meta-bsp/recipes-kernel/linux/linux-phytium-rt_6.6.bb new file mode 100644 index 0000000..ba692a4 --- /dev/null +++ b/meta-bsp/recipes-kernel/linux/linux-phytium-rt_6.6.bb @@ -0,0 +1,14 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +require linux-phytium.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" +KERNEL_BRANCH = "linux-6.6-rt" + +SRCREV = "2b1ffe57fc698ac7d1ecee6e6aa8ada82324297e" + +DELTA_KERNEL_DEFCONFIG:prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'phytium_optee.config', '', d)}" + +KERNEL_DEVICETREE ?= " phytium/pe2201-demo-ddr4.dtb phytium/pe2202-chillipi-edu-board.dtb phytium/pe2202-demo-ddr4-local.dtb phytium/pe2202-demo-ddr4.dtb phytium/pe2202-miniitx-board.dtb phytium/pe2202-power-board.dtb phytium/pe2204-come-board.dtb phytium/pe2204-demo-ddr4-local.dtb phytium/pe2204-demo-ddr4.dtb phytium/pe2204-edu-board.dtb phytium/pe2204-hanwei-board.dtb phytium/pe2204-miniitx-board.dtb phytium/pe2204-vpx-board.dtb phytium/phytiumpi_firefly.dtb" + +DEF_DEVICETREE ?= " pe2201-demo-ddr4.dtb pe2202-chillipi-edu-board.dtb pe2202-demo-ddr4-local.dtb pe2202-demo-ddr4.dtb pe2202-miniitx-board.dtb pe2202-power-board.dtb pe2204-come-board.dtb pe2204-demo-ddr4-local.dtb pe2204-demo-ddr4.dtb pe2204-edu-board.dtb pe2204-hanwei-board.dtb pe2204-miniitx-board.dtb pe2204-vpx-board.dtb phytiumpi_firefly.dtb" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium.inc b/meta-bsp/recipes-kernel/linux/linux-phytium.inc index 25b5422..90d95e2 100644 --- a/meta-bsp/recipes-kernel/linux/linux-phytium.inc +++ b/meta-bsp/recipes-kernel/linux/linux-phytium.inc @@ -69,8 +69,6 @@ do_uboot_mkimage() { uboot-mkimage -f kernel.its fitImage cp fitImage ${DEPLOY_DIR_IMAGE}/fitImage fi - - uboot-mkimage -A arm64 -O linux -T kernel -C none -a 0x80080000 -e 0x80080000 -n "Linux" -d ${DEPLOY_DIR_IMAGE}/Image ${DEPLOY_DIR_IMAGE}/uImage } addtask merge_delta_config before do_preconfigure after do_patch do_prepare_recipe_sysroot addtask uboot_mkimage before do_package_write_rpm after do_deploy diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium/xen.cfg b/meta-bsp/recipes-kernel/linux/linux-phytium/xen.cfg deleted file mode 100644 index 0d72a83..0000000 --- a/meta-bsp/recipes-kernel/linux/linux-phytium/xen.cfg +++ /dev/null @@ -1,23 +0,0 @@ -ONFIG_XEN_DOM0=y -CONFIG_XEN=y -CONFIG_XEN_BLKDEV_FRONTEND=y -CONFIG_XEN_NETDEV_FRONTEND=y -CONFIG_XEN_NETDEV_BACKEND=y -CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y -CONFIG_HVC_XEN=y -CONFIG_HVC_XEN_FRONTEND=y -CONFIG_XEN_FBDEV_FRONTEND=y -CONFIG_XEN_BALLOON=y -CONFIG_XEN_SCRUB_PAGES_DEFAULT=y -CONFIG_XEN_DEV_EVTCHN=y -CONFIG_XEN_BACKEND=y -CONFIG_XENFS=y -CONFIG_XEN_COMPAT_XENFS=y -CONFIG_XEN_SYS_HYPERVISOR=y -CONFIG_XEN_XENBUS_FRONTEND=y -CONFIG_XEN_GNTDEV=y -CONFIG_XEN_GRANT_DEV_ALLOC=y -CONFIG_SWIOTLB_XEN=y -CONFIG_XEN_PRIVCMD=y -CONFIG_XEN_EFI=y -CONFIG_XEN_AUTO_XLATE=y diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb b/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb deleted file mode 100644 index f2a9d10..0000000 --- a/meta-bsp/recipes-kernel/linux/linux-phytium_4.19.bb +++ /dev/null @@ -1,10 +0,0 @@ -require linux-phytium.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -KERNEL_BRANCH = "linux-4.19" - -SRCREV = "c7b904a3861d37d85c0a04d368deb0ee1b1b37fd" - -XEN_PATCHES = " file://xen.cfg" -SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${XEN_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 deleted file mode 100644 index 3060ae0..0000000 --- a/meta-bsp/recipes-kernel/linux/linux-phytium_5.10.bb +++ /dev/null @@ -1,11 +0,0 @@ -require linux-phytium.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -KERNEL_BRANCH = "linux-5.10" - -SRCREV = "cee620455f83bf02724b5aa6a579d60764089d0e" - -SRC_URI:append = " file://0001-Makfile-add-dtbo.patch" -DELTA_KERNEL_DEFCONFIG:prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'phytium_optee.config', '', d)}" - -KERNEL_DEVICETREE:append = " phytium/px210.dtbo phytium/usb2_host_for_pe220x.dtbo" diff --git a/meta-bsp/recipes-kernel/linux/linux-phytium_6.6.bb b/meta-bsp/recipes-kernel/linux/linux-phytium_6.6.bb new file mode 100644 index 0000000..9f92c12 --- /dev/null +++ b/meta-bsp/recipes-kernel/linux/linux-phytium_6.6.bb @@ -0,0 +1,17 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +require linux-phytium.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" +KERNEL_BRANCH = "linux-6.6" + +SRCREV = "9a452dbab14761e765e2a92551e64baa9b4d8283" + +JAJLHOUSE_PATCHES = " file://0001-disable-smmu-in-dts.patch \ +" +#SRC_URI:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'jailhouse', '${JAJLHOUSE_PATCHES}', '', d)}" +DELTA_KERNEL_DEFCONFIG:prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'phytium_optee.config', '', d)}" + +KERNEL_DEVICETREE ?= " phytium/pe2201-demo-ddr4.dtb phytium/pe2202-chillipi-edu-board.dtb phytium/pe2202-demo-ddr4-local.dtb phytium/pe2202-demo-ddr4.dtb phytium/pe2202-miniitx-board.dtb phytium/pe2202-power-board.dtb phytium/pe2204-come-board.dtb phytium/pe2204-demo-ddr4-local.dtb phytium/pe2204-demo-ddr4.dtb phytium/pe2204-edu-board.dtb phytium/pe2204-hanwei-board.dtb phytium/pe2204-miniitx-board.dtb phytium/pe2204-vpx-board.dtb phytium/phytiumpi_firefly.dtb" + +DEF_DEVICETREE ?= " pe2201-demo-ddr4.dtb pe2202-chillipi-edu-board.dtb pe2202-demo-ddr4-local.dtb pe2202-demo-ddr4.dtb pe2202-miniitx-board.dtb pe2202-power-board.dtb pe2204-come-board.dtb pe2204-demo-ddr4-local.dtb pe2204-demo-ddr4.dtb pe2204-edu-board.dtb pe2204-hanwei-board.dtb pe2204-miniitx-board.dtb pe2204-vpx-board.dtb phytiumpi_firefly.dtb" diff --git a/meta-bsp/recipes-kernel/perf/perf.bbappend b/meta-bsp/recipes-kernel/perf/perf.bbappend new file mode 100644 index 0000000..55a0848 --- /dev/null +++ b/meta-bsp/recipes-kernel/perf/perf.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent" diff --git a/meta-bsp/recipes-multimedia/ffmpeg/ffmpeg_4.2.4.bb b/meta-bsp/recipes-multimedia/ffmpeg/ffmpeg_4.2.4.bb index 8460e20..738acb5 100644 --- a/meta-bsp/recipes-multimedia/ffmpeg/ffmpeg_4.2.4.bb +++ b/meta-bsp/recipes-multimedia/ffmpeg/ffmpeg_4.2.4.bb @@ -40,7 +40,7 @@ DEPENDS = "nasm-native" inherit autotools pkgconfig PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ - alsa bzlib gpl lzma theora zlib sdl2 \ + alsa bzlib gpl lzma theora zlib sdl2 vaapi \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" # libraries to build in addition to avutil diff --git a/meta-bsp/recipes-xfce/xserver-xfce-init/xserver-xfce-init_1.0.bb b/meta-bsp/recipes-xfce/xserver-xfce-init/xserver-xfce-init_1.0.bb index d343e92..67eaa71 100644 --- a/meta-bsp/recipes-xfce/xserver-xfce-init/xserver-xfce-init_1.0.bb +++ b/meta-bsp/recipes-xfce/xserver-xfce-init/xserver-xfce-init_1.0.bb @@ -11,6 +11,7 @@ SRC_URI = "file://xserver-xfce \ file://xserver-xfce.service \ file://system.conf \ " + S = "${WORKDIR}" inherit allarch update-rc.d systemd @@ -32,7 +33,9 @@ do_install() { install -d ${D}${sysconfdir}/default/ install -m 0644 ${S}/${XFCECONF} ${D}${sysconfdir}/default/xserver-xfce install -m 0644 ${S}/xserver-xfce.service ${D}${systemd_unitdir}/system - + fi + if ${@bb.utils.contains('MACHINE_FEATURES','d3000m','true','false',d)}; then + sed -i '$a GST_VAAPI_ALL_DRIVERS=1\nLIBVA_DRIVER_NAME=ftd330\n' ${D}${sysconfdir}/default/xserver-xfce fi } 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 deleted file mode 100644 index bb42083..0000000 --- a/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_4.19.bb +++ /dev/null @@ -1,9 +0,0 @@ -require linux-xenomai.inc -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" -KERNEL_BRANCH ?= "4.19.209-cip59" -SRC_URI:append = " file://0001-perf-bench-Share-some-global-variables-to-fix-build-.patch \ - file://0001-perf-tests-bp_account-Make-global-variable-static.patch \ - file://0001-libtraceevent-Fix-build-with-binutils-2.35.patch \ -" -SRCREV = "62e2da7f646fc9424f64c3138cf47ccbd43e5477" -KERNEL_DEVICETREE ?= "phytium/e2000d-chillipi-edu-board.dtb phytium/e2000d-demo-board.dtb phytium/e2000d-miniitx-board.dtb phytium/e2000d-power-board.dtb phytium/e2000q-come-board.dtb phytium/e2000q-demo-board-xenomai-uart2.dtb phytium/e2000q-demo-board.dtb phytium/e2000q-edu-board.dtb phytium/e2000q-hanwei-board.dtb phytium/e2000q-miniitx-board.dtb phytium/e2000q-vpx-board.dtb phytium/e2000s-demo-board.dtb phytium/pd1904-devboard-d4-dsk.dtb phytium/pd1904c-devboard-d4-dsk.dtb phytium/pd2008-devboard-dsk.dtb phytium/phytiumpi_firefly.dtb" 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 deleted file mode 100644 index bea17f2..0000000 --- a/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_5.10.bb +++ /dev/null @@ -1,5 +0,0 @@ -require linux-xenomai.inc -LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" -KERNEL_BRANCH ?= "5.10.209-dovetail1" -SRCREV = "c326dd201ea3af77542370ca3c81e2791db14429" -KERNEL_DEVICETREE ?= "phytium/e2000d-chillipi-edu-board.dtb phytium/e2000d-demo-board.dtb phytium/e2000d-miniitx-board.dtb phytium/e2000d-power-board.dtb phytium/e2000q-come-board.dtb phytium/e2000q-demo-board.dtb phytium/e2000q-edu-board.dtb phytium/e2000q-hanwei-board.dtb phytium/e2000q-miniitx-board.dtb phytium/e2000q-vpx-board.dtb phytium/e2000s-demo-board.dtb phytium/pd1904-devboard-d4-dsk.dtb phytium/pd1904c-devboard-d4-dsk.dtb phytium/pd2008-devboard-dsk.dtb phytium/phytiumpi_firefly.dtb" diff --git a/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_6.6.bb b/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_6.6.bb new file mode 100644 index 0000000..bf38992 --- /dev/null +++ b/meta-xenomai/recipes-kernel/linux/linux-xenomai-phytium_6.6.bb @@ -0,0 +1,5 @@ +require linux-xenomai.inc +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" +KERNEL_BRANCH ?= "6.6.y-dovetail" +SRCREV = "b4404bc16d6ac1fa8d146674a977b11123f4fcb4" +KERNEL_DEVICETREE ?= " phytium/pe2201-demo-ddr4.dtb phytium/pe2202-chillipi-edu-board.dtb phytium/pe2202-demo-ddr4-local.dtb phytium/pe2202-demo-ddr4.dtb phytium/pe2202-miniitx-board.dtb phytium/pe2202-power-board.dtb phytium/pe2204-come-board.dtb phytium/pe2204-demo-ddr4-local.dtb phytium/pe2204-demo-ddr4.dtb phytium/pe2204-edu-board.dtb phytium/pe2204-hanwei-board.dtb phytium/pe2204-miniitx-board.dtb phytium/pe2204-vpx-board.dtb phytium/phytiumpi_firefly.dtb" diff --git a/meta-xenomai/recipes-xenomai/xenomai/files/0001-mercury.patch b/meta-xenomai/recipes-xenomai/xenomai/files/0001-mercury.patch new file mode 100644 index 0000000..4cb1cc9 --- /dev/null +++ b/meta-xenomai/recipes-xenomai/xenomai/files/0001-mercury.patch @@ -0,0 +1,107 @@ +diff -Nur xenomai-v3.3/lib/boilerplate/setup.c xenomai-v3.3-mercury/lib/boilerplate/setup.c +--- xenomai-v3.3/lib/boilerplate/setup.c 2024-10-22 00:27:33.000000000 +0800 ++++ xenomai-v3.3-mercury/lib/boilerplate/setup.c 2025-03-14 11:15:23.058291260 +0800 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + struct base_setup_data __base_setup_data = { +diff -Nur xenomai-v3.3/lib/copperplate/internal.c xenomai-v3.3-mercury/lib/copperplate/internal.c +--- xenomai-v3.3/lib/copperplate/internal.c 2024-10-22 00:27:33.000000000 +0800 ++++ xenomai-v3.3-mercury/lib/copperplate/internal.c 2025-03-14 11:16:15.375803540 +0800 +@@ -25,7 +25,7 @@ + #include + #include + #include +- ++#include + #include + #include + #include +diff -Nur xenomai-v3.3/testsuite/gpiobench/gpiobench.c xenomai-v3.3-mercury/testsuite/gpiobench/gpiobench.c +--- xenomai-v3.3/testsuite/gpiobench/gpiobench.c 2024-10-22 00:27:33.000000000 +0800 ++++ xenomai-v3.3-mercury/testsuite/gpiobench/gpiobench.c 2025-03-14 11:10:41.586603280 +0800 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + + #define NS_PER_MS (1000000) +diff -Nur xenomai-v3.3/testsuite/smokey/alchemytests/Makefile.am xenomai-v3.3-mercury/testsuite/smokey/alchemytests/Makefile.am +--- xenomai-v3.3/testsuite/smokey/alchemytests/Makefile.am 2024-10-22 00:27:33.000000000 +0800 ++++ xenomai-v3.3-mercury/testsuite/smokey/alchemytests/Makefile.am 2025-03-14 11:11:16.205539420 +0800 +@@ -21,7 +21,6 @@ + alchemytests_mq3 \ + alchemytests_mutex1 \ + alchemytests_mutex2 \ +- alchemytests_pipe1 \ + alchemytests_sem1 \ + alchemytests_sem2 \ + alchemytests_task1 \ +@@ -35,6 +34,10 @@ + alchemytests_task9 \ + alchemytests_task10 \ + alchemytests_task11 ++if XENO_COBALT ++test_PROGRAMS += \ ++ alchemytests_pipe1 ++endif + + alchemycppflags = \ + $(XENO_USER_CFLAGS) \ +@@ -75,10 +78,6 @@ + alchemytests_mutex2_CPPFLAGS = $(alchemycppflags) + alchemytests_mutex2_LDADD = $(alchemyldadd) + alchemytests_mutex2_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ +-alchemytests_pipe1_SOURCES = pipe-1.c +-alchemytests_pipe1_CPPFLAGS = $(alchemycppflags) +-alchemytests_pipe1_LDADD = $(alchemyldadd) +-alchemytests_pipe1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ + alchemytests_mq1_SOURCES = mq-1.c + alchemytests_mq1_CPPFLAGS = $(alchemycppflags) + alchemytests_mq1_LDADD = $(alchemyldadd) +@@ -143,3 +142,9 @@ + alchemytests_task11_CPPFLAGS = $(alchemycppflags) + alchemytests_task11_LDADD = $(alchemyldadd) + alchemytests_task11_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ ++if XENO_COBALT ++alchemytests_pipe1_SOURCES = pipe-1.c ++alchemytests_pipe1_CPPFLAGS = $(alchemycppflags) ++alchemytests_pipe1_LDADD = $(alchemyldadd) ++alchemytests_pipe1_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ ++endif +diff -Nur xenomai-v3.3/testsuite/smokey/alchemytests/alchemytests.c xenomai-v3.3-mercury/testsuite/smokey/alchemytests/alchemytests.c +--- xenomai-v3.3/testsuite/smokey/alchemytests/alchemytests.c 2024-10-22 00:27:33.000000000 +0800 ++++ xenomai-v3.3-mercury/testsuite/smokey/alchemytests/alchemytests.c 2025-03-14 11:11:22.755236760 +0800 +@@ -1,4 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0 ++#include + #include + #include + #include +diff -Nur xenomai-v3.3/testsuite/smokey/alchemytests/task-11.c xenomai-v3.3-mercury/testsuite/smokey/alchemytests/task-11.c +--- xenomai-v3.3/testsuite/smokey/alchemytests/task-11.c 2024-10-22 00:27:33.000000000 +0800 ++++ xenomai-v3.3-mercury/testsuite/smokey/alchemytests/task-11.c 2025-03-14 11:11:30.892819240 +0800 +@@ -1,5 +1,6 @@ + // SPDX-License-Identifier: GPL-2.0 + #include ++#include + #include + #include + #include +diff -Nur xenomai-v3.3/testsuite/smokey/alchemytests/task-2.c xenomai-v3.3-mercury/testsuite/smokey/alchemytests/task-2.c +--- xenomai-v3.3/testsuite/smokey/alchemytests/task-2.c 2024-10-22 00:27:33.000000000 +0800 ++++ xenomai-v3.3-mercury/testsuite/smokey/alchemytests/task-2.c 2025-03-14 11:11:38.029262840 +0800 +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include + #include + diff --git a/meta-xenomai/recipes-xenomai/xenomai/xenomai_3.1.5.bb b/meta-xenomai/recipes-xenomai/xenomai/xenomai_3.1.5.bb deleted file mode 100644 index 885a80c..0000000 --- a/meta-xenomai/recipes-xenomai/xenomai/xenomai_3.1.5.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "Provides userspace xenomai support and libraries needed to for \ -real-time applications using the xenomai RTOS implementation" -LICENSE = "LGPL-2.1-or-later" -LIC_FILES_CHKSUM = "file://README;md5=d804868a35cdacf02fc7ec9fc0d016a7" -SECTION = "xenomai" -HOMEPAGE = "http://www.xenomai.org/" - -XENOMAI_SRC = "xenomai-v3.1.5" -SRC_URI = "https://source.denx.de/Xenomai/xenomai/-/archive/v3.1.5/${XENOMAI_SRC}.tar.bz2" - -S = "${WORKDIR}/xenomai-v${PV}" - -inherit autotools pkgconfig - -includedir = "/usr/include/xenomai" - -SRC_URI[md5sum] = "7ed9b0bda5e72e04fc0164d37244dcfe" - -PACKAGES += "${PN}-demos" - -FILES:${PN}-demos = "/usr/demo" -FILES:${PN}-dev += "/dev" -FILES:${PN} += " \ - /usr/lib/modechk.wrappers \ - /usr/lib/cobalt.wrappers \ - /usr/lib/dynlist.ld \ -" - -EXTRA_OECONF += " --enable-pshared --enable-smp \ - --with-core=cobalt" - diff --git a/meta-xenomai/recipes-xenomai/xenomai/xenomai_3.2.6.bb b/meta-xenomai/recipes-xenomai/xenomai/xenomai_3.3.bb similarity index 74% rename from meta-xenomai/recipes-xenomai/xenomai/xenomai_3.2.6.bb rename to meta-xenomai/recipes-xenomai/xenomai/xenomai_3.3.bb index d1fd642..fbc39b9 100644 --- a/meta-xenomai/recipes-xenomai/xenomai/xenomai_3.2.6.bb +++ b/meta-xenomai/recipes-xenomai/xenomai/xenomai_3.3.bb @@ -5,8 +5,12 @@ LIC_FILES_CHKSUM = "file://README;md5=d804868a35cdacf02fc7ec9fc0d016a7" SECTION = "xenomai" HOMEPAGE = "http://www.xenomai.org/" -XENOMAI_SRC = "xenomai-v3.2.6" -SRC_URI = "https://source.denx.de/Xenomai/xenomai/-/archive/v3.2.6/${XENOMAI_SRC}.tar.bz2" +XENOMAI_SRC = "xenomai-v3.3" +SRC_URI = "https://source.denx.de/Xenomai/xenomai/-/archive/v3.3/${XENOMAI_SRC}.tar.bz2" + +SRC_URI += " \ + file://0001-mercury.patch \ +" S = "${WORKDIR}/xenomai-v${PV}" @@ -14,7 +18,7 @@ inherit autotools pkgconfig includedir = "/usr/xenomai" -SRC_URI[md5sum] = "90267599c58a84e372aae172338ec44c" +SRC_URI[md5sum] = "e2f529e135a0a9b026cf228e756721a1" do_install:append() { install -d ${D}/usr/xenomai/include/ @@ -29,6 +33,7 @@ FILES:${PN} += " \ /usr/lib/modechk.wrappers \ /usr/lib/cobalt.wrappers \ /usr/lib/dynlist.ld \ + /usr/lib/cobalt-glibc-time64.wrappers \ " EXTRA_OECONF += " --enable-pshared --enable-smp \ diff --git a/phyt_yocto_setenv.sh b/phyt_yocto_setenv.sh index a1c3d9e..71f98eb 100644 --- a/phyt_yocto_setenv.sh +++ b/phyt_yocto_setenv.sh @@ -4,7 +4,7 @@ toolchain=phytium-glibc-x86_64-meta-toolchain-aarch64-toolchain-4.0.6.sh -host_pkg="build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd \ +host_pkg="build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd curl \ " check_host_env() { @@ -47,7 +47,7 @@ PATH=~/bin:${PATH} if [ ! -d yocto-sdk ]; then mkdir yocto-sdk cd yocto-sdk - repo init -u https://gitee.com/phytium_embedded/phytium-linux-yocto.git -m default.xml + repo init -u https://gitee.com/phytium_embedded/phytium-linux-yocto.git -b kernel-6.6 repo sync --force-sync . ./setup-env -m phytium diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass index 54b0065..71ef222 100644 --- a/poky/meta/classes/kernel.bbclass +++ b/poky/meta/classes/kernel.bbclass @@ -443,7 +443,7 @@ kernel_do_install() { if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then oe_runmake DEPMOD=echo MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build" - rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source" + #rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source" # Remove empty module directories to prevent QA issues find "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel" -type d -empty -delete else -- Gitee