Commit c5c38947 authored by Guido Günther's avatar Guido Günther

Move redpine module build into separate function

parent c901dc78
......@@ -18,6 +18,24 @@ 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 "
......@@ -111,22 +129,7 @@ mkdir -p ${KERNEL_OUTPUT}
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}
build_redpine
echo ${KERNEL_REPO} > kernel-git-${ARCH}.txt
git log | head -n 1 | awk '{ print $2 };' >> kernel-git-${ARCH}.txt
......
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