Switch to ASK's kernel
This commit is contained in:
@@ -30,6 +30,7 @@ COPY packages/kubernetes/kubectl-${KUBE_VERSION} /out/rootfs/usr/local/bin/kubec
|
|||||||
# COPY clitools/out/dpdk/bin/dpdk-testpmd /out/rootfs/usr/local/bin/dpdk-testpmd
|
# COPY clitools/out/dpdk/bin/dpdk-testpmd /out/rootfs/usr/local/bin/dpdk-testpmd
|
||||||
# COPY clitools/out/dpdk/usr/local/lib/*.so* /out/rootfs/usr/local/lib/
|
# COPY clitools/out/dpdk/usr/local/lib/*.so* /out/rootfs/usr/local/lib/
|
||||||
# COPY clitools/out/dpdk/usr/local/lib/dpdk/pmds-23.0/*.so* /out/rootfs/usr/local/lib/dpdk/pmds-23.0/
|
# COPY clitools/out/dpdk/usr/local/lib/dpdk/pmds-23.0/*.so* /out/rootfs/usr/local/lib/dpdk/pmds-23.0/
|
||||||
|
|
||||||
COPY alpine/rootfs-extra ./rootfs-extra
|
COPY alpine/rootfs-extra ./rootfs-extra
|
||||||
COPY alpine/migrations ./migrations
|
COPY alpine/migrations ./migrations
|
||||||
COPY out/build-info ./rootfs-extra/etc/profile.d/build-info.sh
|
COPY out/build-info ./rootfs-extra/etc/profile.d/build-info.sh
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ WORKDIR /src/ASK
|
|||||||
COPY patches/mono-ask.mk .
|
COPY patches/mono-ask.mk .
|
||||||
COPY kernel-extra.config /src/kernel-extra.config
|
COPY kernel-extra.config /src/kernel-extra.config
|
||||||
COPY kernel-build/ensure-kconfig.sh /src/ensure-kconfig.sh
|
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
|
# 1. This step patches the kernel, merges kernel-extra.config, and builds the modules
|
||||||
RUN make -f mono-ask.mk modules
|
RUN make -f mono-ask.mk modules
|
||||||
@@ -120,7 +121,28 @@ RUN make -f mono-ask.mk userspace
|
|||||||
# 3. Stage the artifacts
|
# 3. Stage the artifacts
|
||||||
RUN make -f mono-ask.mk dist
|
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
|
# Export stage
|
||||||
FROM scratch AS export
|
FROM scratch AS export
|
||||||
COPY --from=build /src/ASK/dist/ /ask/
|
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/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
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
ARG TAG=dev
|
ARG TAG=dev
|
||||||
ARG DOCKER_IMAGE_ROOT=monok8s
|
ARG DOCKER_IMAGE_ROOT=monok8s
|
||||||
FROM ${DOCKER_IMAGE_ROOT}/kernel-build:${TAG} AS kernel
|
|
||||||
FROM ${DOCKER_IMAGE_ROOT}/fit-build:${TAG} AS fit
|
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM ${DOCKER_IMAGE_ROOT}/build-base:${TAG} AS build
|
FROM --platform=$BUILDPLATFORM ${DOCKER_IMAGE_ROOT}/build-base:${TAG} AS build
|
||||||
|
|
||||||
@@ -11,8 +9,6 @@ RUN mkdir /image
|
|||||||
WORKDIR /image
|
WORKDIR /image
|
||||||
|
|
||||||
COPY [ "./out/Image.gz" \
|
COPY [ "./out/Image.gz" \
|
||||||
, "./out/System.map" \
|
|
||||||
, "./out/.config" \
|
|
||||||
, "./out/initramfs.cpio.gz" \
|
, "./out/initramfs.cpio.gz" \
|
||||||
, "./out/${DEVICE_TREE_TARGET}.dtb", "./" ]
|
, "./out/${DEVICE_TREE_TARGET}.dtb", "./" ]
|
||||||
|
|
||||||
|
|||||||
19
makefile
19
makefile
@@ -130,6 +130,7 @@ $(DOWNLOAD_PACKAGES_STAMP): docker/download-packages.Dockerfile build.env makefi
|
|||||||
--build-arg KUBE_VERSION=$(KUBE_VERSION) \
|
--build-arg KUBE_VERSION=$(KUBE_VERSION) \
|
||||||
--build-arg ARCH=$(ARCH) \
|
--build-arg ARCH=$(ARCH) \
|
||||||
--build-arg BUSYBOX_VERSION=$(BUSYBOX_VERSION) \
|
--build-arg BUSYBOX_VERSION=$(BUSYBOX_VERSION) \
|
||||||
|
--build-arg DEVICE_TREE_TARGET=$(DEVICE_TREE_TARGET) \
|
||||||
--build-arg E2FSPROGS_VERSION=$(E2FSPROGS_VERSION) \
|
--build-arg E2FSPROGS_VERSION=$(E2FSPROGS_VERSION) \
|
||||||
--build-arg DPDK_VERSION=$(DPDK_VERSION) \
|
--build-arg DPDK_VERSION=$(DPDK_VERSION) \
|
||||||
--build-arg FMLIB_VERSION=$(FMLIB_VERSION) \
|
--build-arg FMLIB_VERSION=$(FMLIB_VERSION) \
|
||||||
@@ -175,17 +176,6 @@ $(BUILD_BASE_STAMP): $(BUILD_BASE_DEPS) | $(OUT_DIR)
|
|||||||
docker tag monok8s/build-base:$(TAG) monok8s/build-base:$$iid; \
|
docker tag monok8s/build-base:$(TAG) monok8s/build-base:$$iid; \
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(KERNEL_IMAGE): $(KERNEL_DEPS) $(DOWNLOAD_PACKAGES_STAMP) | $(OUT_DIR)
|
|
||||||
docker build \
|
|
||||||
-f docker/kernel-build.Dockerfile \
|
|
||||||
--build-arg DOCKER_IMAGE_ROOT=$(DOCKER_IMAGE_ROOT) \
|
|
||||||
--build-arg TAG=$(TAG) \
|
|
||||||
--build-arg ARCH=$(ARCH) \
|
|
||||||
--build-arg CROSS_COMPILE=$(CROSS_COMPILE) \
|
|
||||||
--build-arg NXP_VERSION=$(NXP_VERSION) \
|
|
||||||
--build-arg DEVICE_TREE_TARGET=$(DEVICE_TREE_TARGET) \
|
|
||||||
--output type=local,dest=./$(OUT_DIR) .
|
|
||||||
test -f $@
|
|
||||||
|
|
||||||
$(INITRAMFS): $(INITRAMFS_DEPS) $(DOWNLOAD_PACKAGES_STAMP) | $(OUT_DIR)
|
$(INITRAMFS): $(INITRAMFS_DEPS) $(DOWNLOAD_PACKAGES_STAMP) | $(OUT_DIR)
|
||||||
docker build \
|
docker build \
|
||||||
@@ -233,6 +223,13 @@ ASK: $(ASK_TAR) $(LIBNFCT_TAR) $(LIBNFNETLINK_TAR) $(TCLAP_TAR) $(LIBXML2_TAR) |
|
|||||||
--build-arg LIBNFCT_VERSION=$(LIBNFCT_VERSION) \
|
--build-arg LIBNFCT_VERSION=$(LIBNFCT_VERSION) \
|
||||||
--output type=local,dest=./$(OUT_DIR)/ASK .
|
--output type=local,dest=./$(OUT_DIR)/ASK .
|
||||||
|
|
||||||
|
$(KERNEL_IMAGE): ASK $(KERNEL_DEPS) $(DOWNLOAD_PACKAGES_STAMP) | $(OUT_DIR)
|
||||||
|
rm -f "$@"
|
||||||
|
cp $(OUT_DIR)/ASK/rootfs.tar.gz $(OUT_DIR)/rootfs.tar.gz
|
||||||
|
cp $(OUT_DIR)/ASK/kernel/* $(OUT_DIR)/
|
||||||
|
gzip $(OUT_DIR)/Image
|
||||||
|
test -f "$@"
|
||||||
|
|
||||||
vpp: $(BUILD_BASE_STAMP) $(VPP_TAR) $(DPDK_TAR) $(FMLIB_TAR) $(FMC_TAR) $(NXP_TAR)
|
vpp: $(BUILD_BASE_STAMP) $(VPP_TAR) $(DPDK_TAR) $(FMLIB_TAR) $(FMC_TAR) $(NXP_TAR)
|
||||||
@build_base_tag=$$(docker image inspect \
|
@build_base_tag=$$(docker image inspect \
|
||||||
--format '{{.Id}}' \
|
--format '{{.Id}}' \
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ prepare-kernel:
|
|||||||
# 2. Build the kernel tree (mandatory before out-of-tree modules can be built)
|
# 2. Build the kernel tree (mandatory before out-of-tree modules can be built)
|
||||||
build-kernel: prepare-kernel
|
build-kernel: prepare-kernel
|
||||||
@echo "--> Building the Linux kernel natively..."
|
@echo "--> Building the Linux kernel natively..."
|
||||||
$(MAKE) -C $(KDIR) ARCH=$(ARCH) CROSS_COMPILE=$(GNU_CROSS) -j$$(nproc) Image modules
|
# Replace "dtbs" with the exact path to your target dtb
|
||||||
|
$(MAKE) -C $(KDIR) ARCH=$(ARCH) CROSS_COMPILE=$(GNU_CROSS) -j$$(nproc) \
|
||||||
|
Image modules freescale/mono-gateway-dk-sdk.dtb
|
||||||
|
|
||||||
# 3. Build the ASK out-of-tree modules using the vendor Makefile
|
# 3. Build the ASK out-of-tree modules using the vendor Makefile
|
||||||
modules: build-kernel
|
modules: build-kernel
|
||||||
|
|||||||
Reference in New Issue
Block a user