Skip to content
Snippets Groups Projects
Commit 12edfe46 authored by Giulio Grechi's avatar Giulio Grechi
Browse files

[CICD] Add CI with build job

Add first .gitlab-ci.yml file with build job. Changed
image and toolchain path to compile for kernel 5.10
parent fbad1670
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,7 @@ modules.order
!.gitattributes
!.gitignore
!.mailmap
!.gitlab-ci.yml
#
# Generated include files
......
stages:
- build
default:
image: secodocker/seco-builder:latest
artifacts:
paths:
- $PATH_MOD
expire_in: 48 hrs
build:
stage: build
variables:
PATH_MOD: "build_${CI_JOB_NAME}"
SRC_DIR: "arch/arm64/boot/dts/seco/"
IMAGE_DIR: "arch/arm64/boot/Image"
DEFCONFIG_FILE: "seco_imx8_linux_defconfig"
TOOLCHAIN_PATH: /opt/fsl-imx-wayland/5.10-hardknott/environment-setup-cortexa53-crypto-poky-linux
FILE_CP_EXT: dtb dtbo
FILE_CP_CPU: imx8mq imx8qm imx8qx imx8mm imx8mn imx8mp
script:
#source the toolchain for iMX8
- source ${TOOLCHAIN_PATH}
- export ARCH=arm64
- unset LD_LIBRARY_PATH
#generate config file and compile
- make ${DEFCONFIG_FILE}
- mkdir ${PATH_MOD}/boot -p
- make -j$(nproc)
#copy image
- cp $IMAGE_DIR $PATH_MOD/boot/ -f
#generate the script that copies the files
- |
touch copy_files.sh
chmod a+x copy_files.sh
echo "#!/bin/bash" >> copy_files.sh
for cpu in ${FILE_CP_CPU[@]}; do
for ext in ${FILE_CP_EXT[@]}; do
echo "find ${SRC_DIR} -name \"*"${cpu}"*"${ext}"\" -exec cp {} ${PATH_MOD}/boot/ \;" >> copy_files.sh
done
done
./copy_files.sh
#make modules
- make -j$(nproc) modules_install INSTALL_MOD_PATH=${PATH_MOD}
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: always
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment