From a00f7c348408928a722c859f48bce37c9efd2be2 Mon Sep 17 00:00:00 2001 From: Ychau Wang Date: Sat, 10 Oct 2020 16:34:02 +0800 Subject: [PATCH] docs: fix the custom agent binary file path for creating initrd image fix the custom agent binary file path for creating an initrd image in the Developer-Guide.md file. Fixes: #919 Signed-off-by: Ychau Wang --- docs/Developer-Guide.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/Developer-Guide.md b/docs/Developer-Guide.md index 32dd3260d..67c7e1a7b 100644 --- a/docs/Developer-Guide.md +++ b/docs/Developer-Guide.md @@ -354,9 +354,12 @@ You MUST choose one of `alpine`, `centos`, `clearlinux`, `euleros`, and `fedora` > > - Check the [compatibility matrix](../tools/osbuilder/README.md#platform-distro-compatibility-matrix) before creating rootfs. -Optionally, add your custom agent binary to the rootfs with the following: +Optionally, add your custom agent binary to the rootfs with the following, `LIBC` default is `musl`, if `ARCH` is `ppc64le`, should set the `LIBC=gnu` and `ARCH=powerpc64le`: ``` -$ sudo install -o root -g root -m 0550 -T ../../agent/kata-agent ${ROOTFS_DIR}/sbin/init +$ export ARCH=$(shell uname -m) +$ [ ${ARCH} == "ppc64le" ] && export LIBC=gnu || export LIBC=musl +$ [ ${ARCH} == "ppc64le" ] && export ARCH=powerpc64le +$ sudo install -o root -g root -m 0550 -T ../../../src/agent/target/$(ARCH)-unknown-linux-$(LIBC)/release/kata-agent ${ROOTFS_DIR}/sbin/init ``` ### Build an initrd image