Export missing bin, dpa_app to support env vars
This commit is contained in:
@@ -262,11 +262,11 @@ RUN mkdir -p /out/ASK/dist && \
|
|||||||
cp "${ASK_DIR}/cdx/cdx.ko" /out/ASK/dist && \
|
cp "${ASK_DIR}/cdx/cdx.ko" /out/ASK/dist && \
|
||||||
cp "${ASK_DIR}/fci/fci.ko" /out/ASK/dist && \
|
cp "${ASK_DIR}/fci/fci.ko" /out/ASK/dist && \
|
||||||
cp "${ASK_DIR}/auto_bridge/auto_bridge.ko" /out/ASK/dist && \
|
cp "${ASK_DIR}/auto_bridge/auto_bridge.ko" /out/ASK/dist && \
|
||||||
mkdir -p /out/ask/bin && \
|
mkdir -p /out/ASK/bin && \
|
||||||
cp /src/fmc/source/fmc /out/ASK/bin && \
|
cp /src/fmc/source/fmc /out/ASK/bin/ && \
|
||||||
cp "${ASK_DIR}/cmm/src/cmm" /out/ASK/bin && \
|
cp "${ASK_DIR}/cmm/src/cmm" /out/ASK/bin/ && \
|
||||||
cp "${ASK_DIR}/dpa_app/dpa_app" /out/ASK/bin && \
|
cp "${ASK_DIR}/dpa_app/dpa_app" /out/ASK/bin/ && \
|
||||||
aarch64-linux-musl-strip /out/ASK/bin/fmc /out/ASK/bin/cmm /out/ASK/bin/dpa_app || true
|
aarch64-linux-musl-strip /out/ASK/bin/fmc /out/ASK/bin/cmm /out/ASK/bin/dpa_app
|
||||||
|
|
||||||
# in-tree Linux kernel modules
|
# in-tree Linux kernel modules
|
||||||
RUN mkdir -p /out/rootfs && \
|
RUN mkdir -p /out/rootfs && \
|
||||||
@@ -297,5 +297,7 @@ COPY --from=build \
|
|||||||
/src/linux/arch/arm64/boot/dts/freescale/${DEVICE_TREE_TARGET}.dtb \
|
/src/linux/arch/arm64/boot/dts/freescale/${DEVICE_TREE_TARGET}.dtb \
|
||||||
/kernel/
|
/kernel/
|
||||||
|
|
||||||
|
COPY --from=build /out/ASK/bin/ /bin/
|
||||||
|
|
||||||
# Export the configs for Gateway Development Kit
|
# Export the configs for Gateway Development Kit
|
||||||
COPY --from=build /out/rootfs-cfg/ /rootfs-cfg/
|
COPY --from=build /out/rootfs-cfg/ /rootfs-cfg/
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: monok8s <monok8s@example.invalid>
|
||||||
|
Date: Sun, 10 May 2026 00:00:00 +0000
|
||||||
|
Subject: [PATCH] dpa_app: allow XML config paths to be overridden by env
|
||||||
|
|
||||||
|
Keep the vendor default XML paths, but allow deployments to override them
|
||||||
|
without patching the binary or placing board-specific XML files directly
|
||||||
|
under /etc.
|
||||||
|
|
||||||
|
Supported environment variables:
|
||||||
|
|
||||||
|
CDX_CFG_FILE
|
||||||
|
CDX_PCD_FILE
|
||||||
|
CDX_PDL_FILE
|
||||||
|
CDX_SP_FILE
|
||||||
|
|
||||||
|
This is useful for monok8s/OpenRC integration where board-specific DPA
|
||||||
|
configuration can live under a managed config directory.
|
||||||
|
---
|
||||||
|
dpa_app/dpa.c | 30 ++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 30 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/dpa_app/dpa.c b/dpa_app/dpa.c
|
||||||
|
index 91ca1d4..960afcd 100644
|
||||||
|
--- a/dpa_app/dpa.c
|
||||||
|
+++ b/dpa_app/dpa.c
|
||||||
|
@@ -91,6 +91,34 @@ char *pcd_file = DEFAULT_PCD_FILE;
|
||||||
|
char *pdl_file = DEFAULT_PDL_FILE;
|
||||||
|
char *sp_file = DEFAULT_SP_FILE;
|
||||||
|
|
||||||
|
+static void dpa_load_env_paths(void)
|
||||||
|
+{
|
||||||
|
+ char *v;
|
||||||
|
+
|
||||||
|
+ v = getenv("CDX_CFG_FILE");
|
||||||
|
+ if (v && *v)
|
||||||
|
+ cfg_file = v;
|
||||||
|
+
|
||||||
|
+ v = getenv("CDX_PCD_FILE");
|
||||||
|
+ if (v && *v)
|
||||||
|
+ pcd_file = v;
|
||||||
|
+
|
||||||
|
+ v = getenv("CDX_PDL_FILE");
|
||||||
|
+ if (v && *v)
|
||||||
|
+ pdl_file = v;
|
||||||
|
+
|
||||||
|
+ v = getenv("CDX_SP_FILE");
|
||||||
|
+ if (v && *v)
|
||||||
|
+ sp_file = v;
|
||||||
|
+
|
||||||
|
+#ifdef DPA_C_DEBUG
|
||||||
|
+ printf("%s::cfg_file %s\n", __func__, cfg_file);
|
||||||
|
+ printf("%s::pcd_file %s\n", __func__, pcd_file);
|
||||||
|
+ printf("%s::pdl_file %s\n", __func__, pdl_file);
|
||||||
|
+ printf("%s::sp_file %s\n", __func__, sp_file);
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
//fmc model from xml files
|
||||||
|
static struct fmc_model_t cmodel;
|
||||||
|
|
||||||
|
@@ -752,6 +780,8 @@ int dpa_init(void)
|
||||||
|
char devname[64];
|
||||||
|
int retval;
|
||||||
|
|
||||||
|
+ dpa_load_env_paths();
|
||||||
|
+
|
||||||
|
//open cdx control device
|
||||||
|
sprintf(devname, "/dev/%s", CDX_CTRL_CDEVNAME);
|
||||||
|
cdx_dev_handle = open(devname, O_RDWR);
|
||||||
|
--
|
||||||
|
2.39.5
|
||||||
Reference in New Issue
Block a user