VPP = Very Painful Process

This commit is contained in:
2026-04-09 21:30:12 +08:00
parent 4eae2621c9
commit b8bc6a13cf
8 changed files with 392 additions and 74 deletions

22
vpp/start-vpp.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
set -e
echo "--- Starting NXP DPAA1 Hardware Initialization ---"
# 1. Run FMC to configure FMan, QMan, and BMan
# -c: path to config xml
# -p: path to policy xml
# -a: apply the configuration
if [ -f /etc/fmc/config.xml ]; then
echo "Applying FMC Configuration..."
cd /etc/fmc
fmc -c /etc/fmc/config.xml -p /etc/fmc/policy.xml -a
echo "FMC Configuration applied successfully."
else
echo "ERROR: /etc/fmc/config.xml not found!"
echo "VPP will likely fail with 'Main heap allocation failure'."
fi
echo "--- Starting VPP Forwarder ---"
# 2. Start VPP and replace this script's process (exec)
exec vpp -c /etc/vpp/startup.conf