from --platform=linux/amd64 git.spirirobotics.com/spiri/tx2-flashing-tool:main as kernel-build ADD ./source/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz /opt/gcc-linaro-7.3.1/ ENV CROSS_COMPILE /opt/gcc-linaro-7.3.1/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- ENV LINUX_FOR_TEGRA /jetson/Linux_for_Tegra ENV KERNEL_LOCATION_FROM_BUILD_DIR ../../spiri-project/source/Jetpack/kernel/kernel-4.9/ ENV KERNEL_LOCATION $KERNEL_LOCATION_FROM_BUILD_DIR COPY ./ /jetson/Linux_for_Tegra/spiri-project WORKDIR /jetson/Linux_for_Tegra/spiri-project/CTI-L4T/ RUN ./install.sh RUN mkdir -p /jetson/Linux_for_Tegra/builds/build_tx2/build WORKDIR /jetson/Linux_for_Tegra/builds/build_tx2/ RUN make -C $KERNEL_LOCATION ARCH=arm64 O=$PWD/build/ tegra_defconfig RUN make -C $KERNEL_LOCATION ARCH=arm64 O=$PWD/build/ CROSS_COMPILE=${CROSS_COMPILE} -j8 --output-sync=target zImage dtbs modules RUN mkdir -p /build/boot/ RUN mkdir -p /build/lib/modules/ from --platform=linux/arm64 scratch COPY --from=kernel-build /jetson/Linux_for_Tegra/builds/build_tx2/build/arch/arm64/boot/Image /boot/spiriImage COPY --from=kernel-build /jetson/Linux_for_Tegra/builds/build_tx2/build/arch/arm64/boot/dts/tegra186-tx2-spiri-revF+.dtb /boot/ COPY ./extlinux.conf /boot/extlinux/extlinux.conf