Skip to content

embedded dpdk example#90

Open
baydakov-georgiy wants to merge 1 commit intomainfrom
84_dpdk_example_risc_v
Open

embedded dpdk example#90
baydakov-georgiy wants to merge 1 commit intomainfrom
84_dpdk_example_risc_v

Conversation

@baydakov-georgiy
Copy link
Collaborator

#84

@baydakov-georgiy baydakov-georgiy self-assigned this Feb 17, 2026

DEPENDS = "go-native protobuf-native protoc-gen-go-native protoc-gen-go-grpc-native"

S = "${WORKDIR}/git"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Во всех рецептах (*.bb) добавил S (Source) директорию, без этого не собиралось


GOARCH = "${@ "amd64" if d.getVar('TARGET_ARCH') == "x86_64" else "riscv64"}"

do_configure[noexec] = "1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В do_configure была ошибка проверки хеш суммы, поэтому отключил

@@ -0,0 +1,32 @@
From 121e5d019f0bb6dec0ace2b361611edd10fc8ff8 Mon Sep 17 00:00:00 2001
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Взял патч из meta-dpdk, без него сборка dpdk в yocto-project не работает
https://git.yoctoproject.org/meta-dpdk/tree/recipes-extended/dpdk/dpdk/0001-config-meson-get-cpu_instruction_set-from-meson-opti.patch

if [ ! -d "meta-openembedded" ]; then
git clone -b scarthgap https://github.com/openembedded/meta-openembedded
fi

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Временно добавил, чтобы сборка происходила из текущей папки vm_build_risc_v, а не из репозитория vm_build_risc_v

docker buildx build -t $(IMAGE_NAME) .

yocto:
docker run --rm -it \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавил ограничения по использованию ресурсов компьютера, потому что у меня пару раз намертво зависал компьютер, при попытке сборки.
Возможно стоит задавать эти ограничения параметрами.

cd /home/builder/qemu/

if [ ! -d "poky" ]; then
git clone -b scarthgap https://git.yoctoproject.org/poky
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Указал ветку scarthgap, потому что master ветка больше не поддерживается. Об этом подробнее писал в rocket chat: https://chat.moevm.info/group/QEMU-DPDK-2026?msg=AphSco6bhqQGc9NAn


inherit meson pkgconfig

EXTRA_OEMESON = " \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,67 @@
SUMMARY = "Data Plane Development Kit - helloworld example for RISC-V"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF
}

do_install:append() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Взято из meta-dpdk и немного переписано:
https://git.yoctoproject.org/meta-dpdk/tree/recipes-extended/dpdk/dpdk_23.11.5.bb


COPY scripts/build/build.sh /home/builder/scripts/build.sh
COPY scripts/build/run.sh /home/builder/scripts/run.sh
COPY meta-cluster /home/builder/meta-cluster
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Копируется текущая папка meta-cluster, чтобы использовать ее при сборке, а не ту что в репозитории vm_build_risc_v

@baydakov-georgiy baydakov-georgiy linked an issue Feb 17, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Запуск DPDK программы под risc-v

1 participant