Switch to ASK's kernel

This commit is contained in:
2026-05-02 06:10:30 +08:00
parent 083198c4c1
commit c2716412f8
5 changed files with 34 additions and 16 deletions

View File

@@ -110,6 +110,7 @@ WORKDIR /src/ASK
COPY patches/mono-ask.mk .
COPY kernel-extra.config /src/kernel-extra.config
COPY kernel-build/ensure-kconfig.sh /src/ensure-kconfig.sh
COPY kernel-build/dts/*.dts /src/linux/arch/arm64/boot/dts/freescale/
# 1. This step patches the kernel, merges kernel-extra.config, and builds the modules
RUN make -f mono-ask.mk modules
@@ -120,7 +121,28 @@ RUN make -f mono-ask.mk userspace
# 3. Stage the artifacts
RUN make -f mono-ask.mk dist
# 4. Stage the in-tree Linux kernel modules
RUN mkdir -p /out/rootfs && \
make -C /src/linux ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
modules_install INSTALL_MOD_PATH=/out/rootfs
RUN KERNEL_VER=$(ls /out/rootfs/lib/modules/) && \
mkdir -p /out/rootfs/lib/modules/$KERNEL_VER/extra && \
mv /src/ASK/dist/*.ko /out/rootfs/lib/modules/$KERNEL_VER/extra/ && \
depmod -b /out/rootfs $KERNEL_VER && \
cd /out && tar zcf rootfs.tar.gz rootfs
# Export stage
FROM scratch AS export
COPY --from=build /src/ASK/dist/ /ask/
# Export the newly staged in-tree modules
COPY --from=build /out/rootfs.tar.gz /
COPY --from=build /src/linux/System.map /kernel/System.map
COPY --from=build /src/linux/.config /kernel/.config
COPY --from=build /src/linux/arch/arm64/boot/Image /kernel/Image
COPY --from=build /src/linux/arch/arm64/boot/dts/freescale/mono-gateway-dk-sdk.dtb /kernel/mono-gateway-dk-sdk.dtb
# Grab the proprietary Mono Gateway XML configs
COPY --from=build /src/ASK/config/gateway-dk/cdx_cfg.xml /xml/cdx_cfg.xml
COPY --from=build /src/ASK/dpa_app/files/etc/cdx_pcd.xml /xml/cdx_pcd.xml