commit 9027132a7d510e5f7919ff6f6bfd0c344c30b413409bcc3b0c68e61f17d7e601
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2026-04-10T09:30:57Z |
| subject | Fixed oops due to incorrect build flags |
commit 9027132a7d510e5f7919ff6f6bfd0c344c30b413409bcc3b0c68e61f17d7e601
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2026-04-10T09:30:57Z
Fixed oops due to incorrect build flags
---
docker/vpp.Dockerfile | 39 +++++++++++---------------------
kernel-build/dts/mono-gateway-dk-sdk.dts | 14 +++++-------
vpp/start-vpp.sh | 15 +-----------
3 files changed, 20 insertions(+), 48 deletions(-)
diff --git a/docker/vpp.Dockerfile b/docker/vpp.Dockerfile
index 8fda4b0..dc980ee 100644
--- a/docker/vpp.Dockerfile
+++ b/docker/vpp.Dockerfile
@@ -192,29 +192,20 @@ RUN chroot /mnt/rootfs apt-get install -y --no-install-recommends \
libxml2-dev libtclap-dev \
&& rm -rf /var/lib/apt/lists/*
+# Patch the callback signature in FMC source to match libxml2
+RUN set -eux; \
+ sed -i 's/const xmlError \*/xmlError */g' /src/fmc/source/FMCGenericError.h; \
+ sed -i 's/const xmlError \*/xmlError */g' /src/fmc/source/FMCGenericError.cpp;
+
RUN set -eux; make -C source clean && \
- make -C source -j8 \
- # Force the use of the ARM64 compiler triple if on x86 host,
- # or ensure we pass the right machine flags
- CC="aarch64-linux-gnu-gcc --sysroot=/mnt/rootfs" \
- CXX="aarch64-linux-gnu-g++ --sysroot=/mnt/rootfs" \
- # We add -v to see exactly where the linker is looking if it fails
- # and we point to the fmlib source directory so it finds -lfmc and -lfm
- LDFLAGS="-L/mnt/rootfs/usr/lib/aarch64-linux-gnu \
- -L/mnt/rootfs/lib/aarch64-linux-gnu \
- -L/src/fmlib/lib \
- -L/src/fmc/source" \
- CFLAGS="-Wno-write-strings -fpermissive -DLS1046 -DNCSW_LINUX \
- -I/mnt/rootfs/usr/include/aarch64-linux-gnu \
- -I/mnt/rootfs/usr/include/libxml2 \
- -I/src/fmlib/include \
- -I/src/fmlib/include/fmd \
- -I/src/fmlib/include/fmd/Peripherals \
- -I/src/fmlib/include/fmd/integrations" \
- FMD_USPACE_HEADER_PATH=/src/nxplinux/include/uapi/linux/fmd \
- FMD_USPACE_LIB_PATH=/mnt/rootfs/usr/lib \
- LIBXML2_HEADER_PATH=/mnt/rootfs/usr/include/libxml2 \
- TCLAP_HEADER_PATH=/mnt/rootfs/usr/include
+ make -C source -j8 \
+ MACHINE=ls1046 \
+ CC="aarch64-linux-gnu-gcc --sysroot=/mnt/rootfs" \
+ CXX="aarch64-linux-gnu-g++ --sysroot=/mnt/rootfs" \
+ FMD_USPACE_HEADER_PATH=/mnt/rootfs/usr/include/fmd \
+ FMD_USPACE_LIB_PATH=/mnt/rootfs/usr/lib/aarch64-linux-gnu \
+ LIBXML2_HEADER_PATH=/mnt/rootfs/usr/include/libxml2 \
+ TCLAP_HEADER_PATH=/mnt/rootfs/usr/include
# Locate and Fix the XML + Schemas + Sub-configs
RUN set -eux; \
@@ -262,10 +253,6 @@ RUN set -eux; \
cat << 'EOF' >> /tmp/fmc_staging/policy.xml
<distribution name="dist_dummy">
<protocols><protocolref name="ethernet"/></protocols>
- <standardhash>
- <algorithm name="fms_hash_default"/>
- </standardhash>
- <keycount>1</keycount>
</distribution>
</netpcd>
EOF
diff --git a/kernel-build/dts/mono-gateway-dk-sdk.dts b/kernel-build/dts/mono-gateway-dk-sdk.dts
index dea3305..8270375 100644
--- a/kernel-build/dts/mono-gateway-dk-sdk.dts
+++ b/kernel-build/dts/mono-gateway-dk-sdk.dts
@@ -252,10 +252,6 @@
};
&fsldpaa {
- compatible = "fsl,ls1046a", "fsl,dpaa", "simple-bus";
- dma-coherent;
-
-
ethernet@0 { status = "disabled"; }; /* MAC1 - not on Mono Gateway DK */
ethernet@2 { status = "disabled"; }; /* MAC3 - not on Mono Gateway DK */
ethernet@3 { status = "disabled"; }; /* MAC4 - not on Mono Gateway DK */
@@ -275,12 +271,14 @@
};
/* Add MAC10 - not in qoriq-dpaa-eth.dtsi */
- ethernet@9 {
+ ethernet@9 {
compatible = "fsl,dpa-ethernet-init";
+ fsl,fman-mac = <&enet7>;
fsl,bman-buffer-pools = <&bp7 &bp8 &bp9>;
- fsl,qman-frame-queues-rx = <0x5c 1 0x5d 1>;
- fsl,qman-frame-queues-tx = <0x7c 1 0x7d 1>;
- };
+ fsl,qman-frame-queues-rx = <0x5e 1 0x5f 1>;
+ fsl,qman-frame-queues-tx = <0x7e 1 0x7f 1>;
+ dma-coherent;
+ };
};
&fman0 {
diff --git a/vpp/start-vpp.sh b/vpp/start-vpp.sh
index 1b4b9a0..50f1c30 100755
--- a/vpp/start-vpp.sh
+++ b/vpp/start-vpp.sh
@@ -17,20 +17,7 @@ for port in $SFP_PORTS; do
fi
done
-# 1. PRE-REQUISITE: Unbind ports from the kernel
-# This frees the hardware so FMC/VPP can claim it.
-# MAC 3 usually maps to fm0-port.3 or similar in sysfs.
-echo "Releasing hardware ports from kernel..."
-for port in 3 4 5 6 9 10; do
- # Try to unbind from the DPAA Ethernet driver if it exists
- if [ -e /sys/bus/platform/drivers/fsl-dpa-ethernet/fm0-port.$port ]; then
- echo "fm0-port.$port" > /sys/bus/platform/drivers/fsl-dpa-ethernet/unbind 2>/dev/null || true
- fi
- # Ensure the interface is DOWN
- # Note: You may need to map MAC numbers to eth names (eth0, eth1, etc.)
-done
-
-# 2. Run FMC
+# Run FMC
if [ -f /etc/fmc/config.xml ]; then
echo "Applying FMC Configuration..."
cd /etc/fmc