23 lines
628 B
Bash
Executable file
23 lines
628 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Entrypoint for reform-build-kernel docker image
|
|
OUTPUT="/output/$KERNEL_VERSION"
|
|
|
|
[[ -d "$OUTPUT" ]] || mkdir "$OUTPUT"
|
|
|
|
if [ -f "$OUTPUT/Image" ]
|
|
then
|
|
printf "Kernel image exist in destination aborting compilation.\n"
|
|
exit 0
|
|
fi
|
|
|
|
if ./make_kernel.sh
|
|
then
|
|
cp linux/arch/arm64/boot/Image "$OUTPUT"
|
|
cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2.dtb "$OUTPUT/imx8mq-mnt-reform2-single-display.dtb"
|
|
cp linux/arch/arm64/boot/dts/freescale/imx8mq-mnt-reform2-hdmi.dtb "$OUTPUT/imx8mq-mnt-reform2-dual-display.dtb"
|
|
else
|
|
printf "Error when building Kernel\n" 1>&2
|
|
exit 10
|
|
fi
|
|
exit 0
|