Browse Source
support ubuntu22.04 and it is the default version phytiumpi: automatically extend partition Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn>pull/23/head
weishanshan1084
8 months ago
29 changed files with 473 additions and 83 deletions
@ -1,2 +0,0 @@ |
|||||
defaults.pcm.!card phytiumpe220xi2 |
|
||||
defaults.ctl.!card phytiumpe220xi2 |
|
@ -1,7 +0,0 @@ |
|||||
set default="0" |
|
||||
set timeout="5" |
|
||||
|
|
||||
menuentry "Buildroot" { |
|
||||
linux /Image root=/dev/sda2 rootwait rw |
|
||||
initrd /initrd |
|
||||
} |
|
@ -0,0 +1,9 @@ |
|||||
|
# kernel patch for e2000q\phytiumpi\d2000\ft2004, kernel version of 4.19 and 5.10 |
||||
|
BR2_LINUX_KERNEL_PATCH="$(LINUX_PKGDIR)/kernel-patches/openamp/0001-modify-the-dts-of-e2000q-and-phytiumpi-to-enable-hom.patch" |
||||
|
|
||||
|
# rpmsg-demo |
||||
|
BR2_PACKAGE_RPMSG_DEMO=y |
||||
|
|
||||
|
# free-rtos openamp |
||||
|
BR2_PACKAGE_PHYTIUM_FREE_RTOS=y |
||||
|
BR2_PACKAGE_PHYTIUM_FREE_RTOS_CPU_NAME="e2000q" |
@ -0,0 +1,9 @@ |
|||||
|
# kernel patch for e2000q\phytiumpi\d2000\ft2004, kernel version of 4.19 and 5.10 |
||||
|
BR2_LINUX_KERNEL_PATCH="$(LINUX_PKGDIR)/kernel-patches/openamp/0001-modify-the-dts-of-e2000q-and-phytiumpi-to-enable-hom.patch" |
||||
|
|
||||
|
# rpmsg-demo |
||||
|
BR2_PACKAGE_RPMSG_DEMO=y |
||||
|
|
||||
|
# standalone openamp |
||||
|
BR2_PACKAGE_PHYTIUM_STANDALONE=y |
||||
|
BR2_PACKAGE_PHYTIUM_STANDALONE_CPU_NAME="e2000q" |
@ -0,0 +1 @@ |
|||||
|
BR2_ROOTFS_SKELETON_UBUNTU_FOCAL=y |
@ -0,0 +1,153 @@ |
|||||
|
From 628d8bea52ba87c0b46eb6d4b489b6fa6fee561a Mon Sep 17 00:00:00 2001 |
||||
|
From: weishanshan1084 <weishanshan1084@phytium.com.cn> |
||||
|
Date: Wed, 21 Feb 2024 14:11:08 +0800 |
||||
|
Subject: [PATCH] modify the dts of e2000q and phytiumpi to enable homo_rproc |
||||
|
|
||||
|
Signed-off-by: weishanshan1084 <weishanshan1084@phytium.com.cn> |
||||
|
---
|
||||
|
.../boot/dts/phytium/e2000q-come-board.dts | 4 ++++ |
||||
|
.../boot/dts/phytium/e2000q-demo-board.dts | 4 ++++ |
||||
|
.../boot/dts/phytium/e2000q-edu-board.dts | 4 ++++ |
||||
|
.../boot/dts/phytium/e2000q-hanwei-board.dts | 4 ++++ |
||||
|
.../boot/dts/phytium/e2000q-miniitx-board.dts | 4 ++++ |
||||
|
.../boot/dts/phytium/e2000q-vpx-board.dts | 4 ++++ |
||||
|
arch/arm64/boot/dts/phytium/pe2204.dtsi | 20 +++++++++++++++++++ |
||||
|
.../boot/dts/phytium/phytiumpi_firefly.dts | 4 ++++ |
||||
|
8 files changed, 48 insertions(+) |
||||
|
|
||||
|
diff --git a/arch/arm64/boot/dts/phytium/e2000q-come-board.dts b/arch/arm64/boot/dts/phytium/e2000q-come-board.dts
|
||||
|
index 8041464684..57fe545214 100755
|
||||
|
--- a/arch/arm64/boot/dts/phytium/e2000q-come-board.dts
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/e2000q-come-board.dts
|
||||
|
@@ -258,6 +258,10 @@ &gpio5 {
|
||||
|
status = "okay"; |
||||
|
}; |
||||
|
|
||||
|
+&homo_rproc {
|
||||
|
+ status = "okay";
|
||||
|
+};
|
||||
|
+
|
||||
|
&pwm1 { |
||||
|
phytium,db = <0 0 0 1000 1000 0>; |
||||
|
status = "okay"; |
||||
|
diff --git a/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts b/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts
|
||||
|
index a9d892fbbf..6ee897ccb1 100644
|
||||
|
--- a/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/e2000q-demo-board.dts
|
||||
|
@@ -268,6 +268,10 @@ &pmdk_dp {
|
||||
|
status = "okay"; |
||||
|
}; |
||||
|
|
||||
|
+&homo_rproc {
|
||||
|
+ status = "okay";
|
||||
|
+};
|
||||
|
+
|
||||
|
&rng0 { |
||||
|
status = "okay"; |
||||
|
}; |
||||
|
diff --git a/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts b/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts
|
||||
|
index 5e9dd98c04..cdca4ecbff 100755
|
||||
|
--- a/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/e2000q-edu-board.dts
|
||||
|
@@ -345,3 +345,7 @@ &keypad {
|
||||
|
0x03030044 /*KEY_44*/>; |
||||
|
status = "okay"; |
||||
|
}; |
||||
|
+
|
||||
|
+&homo_rproc {
|
||||
|
+ status = "okay";
|
||||
|
+};
|
||||
|
diff --git a/arch/arm64/boot/dts/phytium/e2000q-hanwei-board.dts b/arch/arm64/boot/dts/phytium/e2000q-hanwei-board.dts
|
||||
|
index 5649d0826b..263b3b1f27 100755
|
||||
|
--- a/arch/arm64/boot/dts/phytium/e2000q-hanwei-board.dts
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/e2000q-hanwei-board.dts
|
||||
|
@@ -209,6 +209,10 @@ &gpio4 {
|
||||
|
status = "okay"; |
||||
|
}; |
||||
|
|
||||
|
+&homo_rproc {
|
||||
|
+ status = "okay";
|
||||
|
+};
|
||||
|
+
|
||||
|
&gpio5 { |
||||
|
status = "okay"; |
||||
|
}; |
||||
|
diff --git a/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts b/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts
|
||||
|
index e2adaa4d51..409e6a34ec 100644
|
||||
|
--- a/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/e2000q-miniitx-board.dts
|
||||
|
@@ -323,6 +323,10 @@ &can1 {
|
||||
|
status = "okay"; |
||||
|
}; |
||||
|
|
||||
|
+&homo_rproc {
|
||||
|
+ status = "okay";
|
||||
|
+};
|
||||
|
+
|
||||
|
&rng0 { |
||||
|
status = "okay"; |
||||
|
}; |
||||
|
diff --git a/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts b/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts
|
||||
|
index ce2bc39bc2..4413588b81 100755
|
||||
|
--- a/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/e2000q-vpx-board.dts
|
||||
|
@@ -316,6 +316,10 @@ &can1 {
|
||||
|
status = "okay"; |
||||
|
}; |
||||
|
|
||||
|
+&homo_rproc {
|
||||
|
+ status = "okay";
|
||||
|
+};
|
||||
|
+
|
||||
|
&rng0 { |
||||
|
status = "okay"; |
||||
|
}; |
||||
|
diff --git a/arch/arm64/boot/dts/phytium/pe2204.dtsi b/arch/arm64/boot/dts/phytium/pe2204.dtsi
|
||||
|
index 201a01e752..a2f192c361 100644
|
||||
|
--- a/arch/arm64/boot/dts/phytium/pe2204.dtsi
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/pe2204.dtsi
|
||||
|
@@ -10,6 +10,26 @@
|
||||
|
/ { |
||||
|
compatible = "phytium,pe2204"; |
||||
|
|
||||
|
+ reserved-memory {
|
||||
|
+ #address-cells = <0x2>;
|
||||
|
+ #size-cells = <0x2>;
|
||||
|
+ ranges;
|
||||
|
+ rproc: rproc@b0100000 {
|
||||
|
+ /*下面的保留物理地址可以根据机器实际指定地址范围 */
|
||||
|
+ no-map;
|
||||
|
+ reg = <0x0 0xb0100000 0x0 0x19900000>;
|
||||
|
+ };
|
||||
|
+ };
|
||||
|
+
|
||||
|
+ homo_rproc: homo_rproc@0 {
|
||||
|
+ compatible = "homo,rproc";
|
||||
|
+ remote-processor = <3>;
|
||||
|
+ inter-processor-interrupt = <9>;
|
||||
|
+ memory-region = <&rproc>;
|
||||
|
+ firmware-name = "openamp_core0.elf";
|
||||
|
+ status = "disabled";
|
||||
|
+ };
|
||||
|
+
|
||||
|
aliases { |
||||
|
ethernet0 = &macb0; |
||||
|
ethernet1 = &macb1; |
||||
|
diff --git a/arch/arm64/boot/dts/phytium/phytiumpi_firefly.dts b/arch/arm64/boot/dts/phytium/phytiumpi_firefly.dts
|
||||
|
index 56f4e689ea..651a28156f 100644
|
||||
|
--- a/arch/arm64/boot/dts/phytium/phytiumpi_firefly.dts
|
||||
|
+++ b/arch/arm64/boot/dts/phytium/phytiumpi_firefly.dts
|
||||
|
@@ -311,6 +311,10 @@ &pmdk_dp {
|
||||
|
status = "okay"; |
||||
|
}; |
||||
|
|
||||
|
+&homo_rproc {
|
||||
|
+ status = "okay";
|
||||
|
+};
|
||||
|
+
|
||||
|
&rng0 { |
||||
|
status = "okay"; |
||||
|
}; |
||||
|
--
|
||||
|
2.25.1 |
||||
|
|
@ -0,0 +1,2 @@ |
|||||
|
# Locally calculated |
||||
|
sha256 6f74b1ee370caeb716688d2e467e5b44727fdc0ed56023fe5c72c0620019ecef gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz |
@ -0,0 +1,26 @@ |
|||||
|
################################################################################
|
||||
|
#
|
||||
|
# aarch64-none-elf-toolchain
|
||||
|
#
|
||||
|
################################################################################
|
||||
|
|
||||
|
AARCH64_NONE_ELF_TOOLCHAIN_VERSION = 10.3-2021.07 |
||||
|
AARCH64_NONE_ELF_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/$(AARCH64_NONE_ELF_TOOLCHAIN_VERSION)/binrel |
||||
|
AARCH64_NONE_ELF_TOOLCHAIN_SOURCE = gcc-arm-$(AARCH64_NONE_ELF_TOOLCHAIN_VERSION)-x86_64-aarch64-none-elf.tar.xz |
||||
|
AARCH64_NONE_ELF_TOOLCHAIN_LICENSE = GPL-3.0+ |
||||
|
|
||||
|
HOST_AARCH64_NONE_ELF_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/aarch64-none-elf |
||||
|
|
||||
|
define HOST_AARCH64_NONE_ELF_TOOLCHAIN_INSTALL_CMDS |
||||
|
rm -rf $(HOST_AARCH64_NONE_ELF_TOOLCHAIN_INSTALL_DIR) |
||||
|
mkdir -p $(HOST_AARCH64_NONE_ELF_TOOLCHAIN_INSTALL_DIR) |
||||
|
cp -rf $(@D)/* $(HOST_AARCH64_NONE_ELF_TOOLCHAIN_INSTALL_DIR)/ |
||||
|
|
||||
|
mkdir -p $(HOST_DIR)/bin |
||||
|
cd $(HOST_DIR)/bin && \
|
||||
|
for i in ../opt/aarch64-none-elf/bin/*; do \
|
||||
|
ln -sf $$i; \
|
||||
|
done |
||||
|
endef |
||||
|
|
||||
|
$(eval $(host-generic-package)) |
@ -0,0 +1,16 @@ |
|||||
|
config BR2_PACKAGE_PHYTIUM_FREE_RTOS |
||||
|
bool "phytium-free-rtos" |
||||
|
help |
||||
|
Phytium-FreeRTOS-SDK for OpenAMP |
||||
|
|
||||
|
https://gitee.com/phytium_embedded/phytium-free-rtos-sdk |
||||
|
|
||||
|
if BR2_PACKAGE_PHYTIUM_FREE_RTOS |
||||
|
|
||||
|
config BR2_PACKAGE_PHYTIUM_FREE_RTOS_CPU_NAME |
||||
|
string "CPU name" |
||||
|
help |
||||
|
Supported CPU: |
||||
|
"e2000q", "phytiumpi", "d2000", "ft2004". |
||||
|
|
||||
|
endif |
@ -0,0 +1,31 @@ |
|||||
|
################################################################################
|
||||
|
#
|
||||
|
# phytium-free-rtos
|
||||
|
#
|
||||
|
################################################################################
|
||||
|
|
||||
|
PHYTIUM_FREE_RTOS_VERSION = v0.7.1 |
||||
|
PHYTIUM_FREE_RTOS_SITE = https://gitee.com/phytium_embedded/phytium-free-rtos-sdk.git |
||||
|
PHYTIUM_FREE_RTOS_SITE_METHOD = git |
||||
|
PHYTIUM_FREE_RTOS_DEPENDENCIES = host-phytium-iot-environment host-python3 linux |
||||
|
PHYTIUM_FREE_RTOS_CPU = $(call qstrip,$(BR2_PACKAGE_PHYTIUM_FREE_RTOS_CPU_NAME)) |
||||
|
|
||||
|
define PHYTIUM_FREE_RTOS_CONFIGURE_CMDS |
||||
|
cd $(@D) && \
|
||||
|
$(TARGET_MAKE_ENV) ./install.py |
||||
|
endef |
||||
|
|
||||
|
define PHYTIUM_FREE_RTOS_BUILD_CMDS |
||||
|
if [[ $(LINUX_VERSION_PROBED) = 5.10* ]]; then \
|
||||
|
PHYTIUM_FREE_RTOS_ARCH=aarch64; \
|
||||
|
else \
|
||||
|
PHYTIUM_FREE_RTOS_ARCH=aarch32; \
|
||||
|
fi && \
|
||||
|
. $(HOST_DIR)/etc/profile.d/phytium_dev.sh && \
|
||||
|
cd $(@D)/example/system/amp/openamp_for_linux && \
|
||||
|
$(TARGET_MAKE_ENV) $(MAKE1) config_$(PHYTIUM_FREE_RTOS_CPU)_$${PHYTIUM_FREE_RTOS_ARCH} && \
|
||||
|
mkdir -p $(TARGET_DIR)/lib/firmware && \
|
||||
|
$(TARGET_MAKE_ENV) $(MAKE1) image USR_BOOT_DIR=$(TARGET_DIR)/lib/firmware |
||||
|
endef |
||||
|
|
||||
|
$(eval $(generic-package)) |
@ -0,0 +1,19 @@ |
|||||
|
################################################################################
|
||||
|
#
|
||||
|
# phytium-iot-environment
|
||||
|
#
|
||||
|
################################################################################
|
||||
|
|
||||
|
# source included in the package
|
||||
|
HOST_PHYTIUM_IOT_ENVIRONMENT_DEPENDENCIES = host-arm-gnu-a-toolchain host-aarch64-none-elf-toolchain |
||||
|
|
||||
|
define HOST_PHYTIUM_IOT_ENVIRONMENT_EXTRACT_CMDS |
||||
|
cp $(HOST_PHYTIUM_IOT_ENVIRONMENT_PKGDIR)/phytium_dev.sh $(@D) |
||||
|
endef |
||||
|
|
||||
|
define HOST_PHYTIUM_IOT_ENVIRONMENT_INSTALL_CMDS |
||||
|
mkdir -p $(HOST_DIR)/etc/profile.d |
||||
|
$(INSTALL) -D -m 0755 $(@D)/phytium_dev.sh $(HOST_DIR)/etc/profile.d |
||||
|
endef |
||||
|
|
||||
|
$(eval $(host-generic-package)) |
@ -0,0 +1,7 @@ |
|||||
|
### PHYTIUM DEV SETTING START |
||||
|
export AARCH32_CROSS_PATH=${HOST_DIR}/opt/gcc-arm-none-eabi |
||||
|
export PATH=$PATH:${AARCH32_CROSS_PATH}/bin |
||||
|
export AARCH64_CROSS_PATH=${HOST_DIR}/opt/aarch64-none-elf |
||||
|
export PATH=$PATH:${AARCH64_CROSS_PATH}/bin |
||||
|
export PHYTIUM_DEV_PATH=${HOST_DIR} |
||||
|
### PHYTIUM DEV SETTING END |
@ -0,0 +1,16 @@ |
|||||
|
config BR2_PACKAGE_PHYTIUM_STANDALONE |
||||
|
bool "phytium-standalone" |
||||
|
help |
||||
|
Phytium-Standalone-SDK for OpenAMP |
||||
|
|
||||
|
https://gitee.com/phytium_embedded/phytium-standalone-sdk |
||||
|
|
||||
|
if BR2_PACKAGE_PHYTIUM_STANDALONE |
||||
|
|
||||
|
config BR2_PACKAGE_PHYTIUM_STANDALONE_CPU_NAME |
||||
|
string "CPU name" |
||||
|
help |
||||
|
Supported CPU: |
||||
|
"e2000q", "phytiumpi", "d2000", "ft2004". |
||||
|
|
||||
|
endif |
@ -0,0 +1,26 @@ |
|||||
|
################################################################################
|
||||
|
#
|
||||
|
# phytium-standalone
|
||||
|
#
|
||||
|
################################################################################
|
||||
|
|
||||
|
PHYTIUM_STANDALONE_VERSION = v1.2.3 |
||||
|
PHYTIUM_STANDALONE_SITE = https://gitee.com/phytium_embedded/phytium-standalone-sdk.git |
||||
|
PHYTIUM_STANDALONE_SITE_METHOD = git |
||||
|
PHYTIUM_STANDALONE_DEPENDENCIES = host-phytium-iot-environment host-python3 linux |
||||
|
PHYTIUM_STANDALONE_CPU = $(call qstrip,$(BR2_PACKAGE_PHYTIUM_STANDALONE_CPU_NAME)) |
||||
|
|
||||
|
define PHYTIUM_STANDALONE_BUILD_CMDS |
||||
|
if [[ $(LINUX_VERSION_PROBED) = 5.10* ]]; then \
|
||||
|
PHYTIUM_STANDALONE_ARCH=aarch64; \
|
||||
|
else \
|
||||
|
PHYTIUM_STANDALONE_ARCH=aarch32; \
|
||||
|
fi && \
|
||||
|
. $(HOST_DIR)/etc/profile.d/phytium_dev.sh && \
|
||||
|
cd $(@D)/example/system/amp/openamp_for_linux && \
|
||||
|
$(TARGET_MAKE_ENV) $(MAKE1) config_$(PHYTIUM_STANDALONE_CPU)_$${PHYTIUM_STANDALONE_ARCH} && \
|
||||
|
mkdir -p $(TARGET_DIR)/lib/firmware && \
|
||||
|
$(TARGET_MAKE_ENV) $(MAKE1) image USR_BOOT_DIR=$(TARGET_DIR)/lib/firmware |
||||
|
endef |
||||
|
|
||||
|
$(eval $(generic-package)) |
@ -0,0 +1,16 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
lock_file="/var/tmp/resize.lock" |
||||
|
|
||||
|
if [ -f "$lock_file" ]; then |
||||
|
echo "Partition expansion script has already been executed." |
||||
|
exit 0 |
||||
|
fi |
||||
|
|
||||
|
# if the scripts has not been executed yet, create a lock file |
||||
|
touch "$lock_file" |
||||
|
|
||||
|
# execute the partition expansion script |
||||
|
nohup /usr/bin/resize.sh & |
||||
|
|
||||
|
exit 0 |
@ -0,0 +1,6 @@ |
|||||
|
config BR2_PACKAGE_RPMSG_DEMO |
||||
|
bool "rpmsg-demo" |
||||
|
help |
||||
|
Phytium openamp rpmsg-demo. |
||||
|
|
||||
|
https://gitee.com/phytium_embedded/phytium-embedded-docs/blob/master/open-amp/rpmsg-demo.c |
@ -0,0 +1,2 @@ |
|||||
|
# Locally calculated |
||||
|
sha256 c5fb688bbe06eabebf2a1f3cb37d352e5bf3834e2f5116ecce51cda27dff4ac3 rpmsg-demo.c |
@ -0,0 +1,22 @@ |
|||||
|
################################################################################
|
||||
|
#
|
||||
|
# rpmsg-demo
|
||||
|
#
|
||||
|
################################################################################
|
||||
|
|
||||
|
RPMSG_DEMO_SITE = https://gitee.com/phytium_embedded/phytium-embedded-docs/raw/master/open-amp |
||||
|
RPMSG_DEMO_SOURCE = rpmsg-demo.c |
||||
|
|
||||
|
define RPMSG_DEMO_EXTRACT_CMDS |
||||
|
cp $(RPMSG_DEMO_DL_DIR)/$(RPMSG_DEMO_SOURCE) $(@D) |
||||
|
endef |
||||
|
|
||||
|
define RPMSG_DEMO_BUILD_CMDS |
||||
|
$(TARGET_CC) -o $(@D)/rpmsg-demo $(@D)/$(RPMSG_DEMO_SOURCE) |
||||
|
endef |
||||
|
|
||||
|
define RPMSG_DEMO_INSTALL_TARGET_CMDS |
||||
|
$(INSTALL) -m 0755 -D $(@D)/rpmsg-demo $(TARGET_DIR)/usr/bin/ |
||||
|
endef |
||||
|
|
||||
|
$(eval $(generic-package)) |
Loading…
Reference in new issue