Added ASK's cmm config

This commit is contained in:
2026-05-10 23:20:59 +08:00
parent 9ccd41bc54
commit e0bb9d72a4
2 changed files with 48 additions and 1 deletions

View File

@@ -282,7 +282,10 @@ RUN KERNEL_VER=$(ls /out/rootfs/lib/modules/) && \
RUN mkdir -p /out/rootfs-cfg/etc/dpa && \ RUN mkdir -p /out/rootfs-cfg/etc/dpa && \
cp -r "${ASK_DIR}/dpa_app/files/etc/"* /out/rootfs-cfg/etc/dpa/ && \ cp -r "${ASK_DIR}/dpa_app/files/etc/"* /out/rootfs-cfg/etc/dpa/ && \
cp "${ASK_DIR}/config/gateway-dk/cdx_cfg.xml" /out/rootfs-cfg/etc/dpa/ && \ cp "${ASK_DIR}/config/gateway-dk/cdx_cfg.xml" /out/rootfs-cfg/etc/dpa/ && \
cp -r /src/fmc/etc/* /out/rootfs-cfg/etc cp -r /src/fmc/etc/* /out/rootfs-cfg/etc && \
mkdir -p /out/rootfs-cfg/etc/cmm && \
cp "${ASK_DIR}/config/fastforward" /out/rootfs-cfg/etc/cmm/
FROM scratch AS export FROM scratch AS export

View File

@@ -78,3 +78,47 @@ SIZE=$(
echo 'echo exit=$?' echo 'echo exit=$?'
) | nc 10.0.0.10 1234 ) | nc 10.0.0.10 1234
``` ```
## Testing cmm
You'll need to run dpa_app first before running this
```base
#!/bin/bash
set -eu
FILES="
bin/cmm
rootfs-cfg/etc/cmm/fastforward
"
SIZE=$(
tar -C ./out/ASK -czf - $FILES | wc -c
)
(
echo 'set -eux'
echo 'rm -rf /var/cmm-test'
echo 'mkdir -p /var/cmm-test'
echo 'mkdir -p /var/ask/bin'
echo 'mkdir -p /var/ask/etc/cmm'
echo 'base64 -d > /tmp/cmm-test.tar.gz <<'"'"'EOF'"'"''
tar -C ./out/ASK -czf - $FILES | pv -s "$SIZE" | base64
echo 'EOF'
echo 'tar -xzf /tmp/cmm-test.tar.gz -C /var/cmm-test'
echo 'install -m 0755 /var/cmm-test/bin/cmm /var/ask/bin/cmm'
echo 'install -m 0644 /var/cmm-test/rootfs-cfg/etc/cmm/fastforward /var/ask/etc/cmm/fastforward'
echo 'ls -l /var/ask/bin/cmm /var/ask/etc/cmm/fastforward /dev/cdx_ctrl'
echo 'ldd /var/ask/bin/cmm || true'
echo 'test -e /sys/class/vwd/vwd0/vwd_fast_path_enable && echo 1 > /sys/class/vwd/vwd0/vwd_fast_path_enable || true'
echo 'echo Running cmm'
echo '/var/ask/bin/cmm -f /var/ask/etc/cmm/fastforward -n 131072'
echo 'echo exit=$?'
) | nc 10.0.0.10 1234
```