Commit 828663ae authored by Angus Ainslie's avatar Angus Ainslie

Merge branch '4.21-nxp-evk' into 'master'

Switch NXP evk kernel build to 4.21 (linux-next)

See merge request !74
parents 2f67d133 27362954
Pipeline #3233 passed with stage
in 20 seconds
......@@ -11,11 +11,31 @@ MAKE_OPTS="${MAKE_OPTS}"
set -u
set -e
CROSS_COMPILER=arm-linux-gnueabihf-
ARCH=arm
CROSS_COMPILER=aarch64-linux-gnu-
ARCH=arm64
COMPILER_ARCH="${ARCH}"
KERNEL_OUTPUT=../../files
CWD=`pwd`
pureos_board=imx6
DTS_FILE=
RSI_VER=RS9116.NB0.NL.LNX.PURISM_FW_UPGRADE.1.0.5
build_redpine () {
tar -xf files/${RSI_VER}.tgz
RSI_BUILD_PATH=${RSI_VER}/rsi/
ESCAPED_KERNEL_DIR=$(echo "${LINUX_DIR}" | sed 's/\//\\\//g')
sed "s/KERNELDIR=.*/KERNELDIR=${ESCAPED_KERNEL_DIR}/" -i ${RSI_BUILD_PATH}/Makefile
cd ${RSI_BUILD_PATH}
make ${MAKE_OPTS} ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILER} -C ${CWD}/${LINUX_DIR} M=$PWD modules
cd ${CWD}/${RSI_BUILD_PATH} && tar -cf ${CWD}/../files/rsi_upgrade.tar *.ko
cd ${CWD}/${RSI_VER}/Firmware && tar -cf ${CWD}/../files/rsi_firmware.tar *
cd ${CWD}
}
usage() {
echo "Usage : $1 "
......@@ -47,40 +67,28 @@ case ${pureos_board} in
KERNEL_BRANCH=purism-nitrogen6_4.16.x
KERNEL_REPO=https://source.puri.sm/Librem5/linux-nitrogen6.git
DOT_CONFIG=imx6_dot_config
CROSS_COMPILER=arm-linux-gnueabihf-
ARCH=arm
COMPILER_ARCH=armhf
GIT_OPTS="--depth 1"
DTS_FILE=""
;;
imx8)
KERNEL_BRANCH=imx_4.9.51_imx8m_beta
KERNEL_REPO=https://source.codeaurora.org/external/imx/linux-imx.git
CROSS_COMPILER=aarch64-linux-gnu-
DOT_CONFIG=imx8_dot_config
ARCH=arm64
COMPILER_ARCH=arm64
KERNEL_BRANCH=imx8-4.21-evk
KERNEL_REPO=https://source.puri.sm/Librem5/linux-next.git
DOT_CONFIG=imx8mq-evk_defconfig
GIT_OPTS="--depth 1"
DTS_FILE=""
;;
ec-som)
KERNEL_BRANCH=imx8-4.18-wip
KERNEL_REPO=https://source.puri.sm/Librem5/linux-emcraft.git
CROSS_COMPILER=aarch64-linux-gnu-
DOT_CONFIG=emcraft-som-imx8_defconfig
ARCH=arm64
COMPILER_ARCH=arm64
GIT_OPTS="--depth 1"
DTS_FILE=""
;;
devkit)
KERNEL_BRANCH=imx8-4.18-wip
KERNEL_REPO=https://source.puri.sm/Librem5/linux-emcraft.git
CROSS_COMPILER=aarch64-linux-gnu-
DOT_CONFIG=librem5-evk_defconfig
ARCH=arm64
COMPILER_ARCH=arm64
GIT_OPTS="--depth 1"
DTS_FILE=""
;;
\?)
echo "unrecognized board type ${pureos_board}"
......@@ -122,21 +130,13 @@ cp ../*${COMPILER_ARCH}.deb ${KERNEL_OUTPUT}
cd ${CWD}
RSI_VER=RS9116.NB0.NL.LNX.PURISM_FW_UPGRADE.1.0.5
tar -xf files/${RSI_VER}.tgz
RSI_BUILD_PATH=${RSI_VER}/rsi/
ESCAPED_KERNEL_DIR=$(echo "${LINUX_DIR}" | sed 's/\//\\\//g')
sed "s/KERNELDIR=.*/KERNELDIR=${ESCAPED_KERNEL_DIR}/" -i ${RSI_BUILD_PATH}/Makefile
cd ${RSI_BUILD_PATH}
make ${MAKE_OPTS} ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILER} -C ${CWD}/${LINUX_DIR} M=$PWD modules
cd ${CWD}/${RSI_BUILD_PATH} && tar -cf ${CWD}/../files/rsi_upgrade.tar *.ko
cd ${CWD}/${RSI_VER}/Firmware && tar -cf ${CWD}/../files/rsi_firmware.tar *
cd ${CWD}
case "${pureos_board}" in
devkit)
build_redpine
;;
*)
;;
esac
echo ${KERNEL_REPO} > kernel-git-${ARCH}.txt
git log | head -n 1 | awk '{ print $2 };' >> kernel-git-${ARCH}.txt
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment