Commit 81555dac authored by Angus Ainslie (Purism)'s avatar Angus Ainslie (Purism)
Browse files

build_kernel_deb.sh: ship the firmware for HW 1.2 as well



HW verson 1.2 needs new firmware to support the W_DISABLE signal
Signed-off-by: default avatarAngus Ainslie (Purism) <angus@akkea.ca>
parent 0e36b8df
Pipeline #34864 passed with stage
in 15 seconds
......@@ -16,6 +16,7 @@ node {
string(name: 'dot_config', defaultValue: "librem5-evk_defconfig", description: 'Which kernel config should get built?')
string(name: 'build_type', defaultValue: "latest", description: 'What type of build is this?')
string(name: 'publish', defaultValue: "false", description: 'Should the image get published?')
string(name: 'flash_pkg', defaultValue: "false", description: 'Build the firmware packages?')
string(name: 'MAKE_OPTS', defaultValue: "", description: 'extra make options')
}
......@@ -23,7 +24,11 @@ node {
git poll: true, url: gitUrl, branch: branch
}
stage('Build kernel') {
sh "KERNEL_REPO=${kernel_url} KERNEL_BRANCH=${kernel_branch} MAKE_OPTS=${MAKE_OPTS} DOT_CONFIG=${dot_config} ./build_kernel_deb.sh -b ${board}"
extra_args = ""
if( "${params.flash_pkg}"=="true" ) {
extra_args = "-r"
}
sh "KERNEL_REPO=${kernel_url} KERNEL_BRANCH=${kernel_branch} MAKE_OPTS=${MAKE_OPTS} DOT_CONFIG=${dot_config} ./build_kernel_deb.sh -b ${board} ${extra_args}"
}
stage('Publish') {
if( "${params.publish}"=="true" ) {
......
......@@ -22,7 +22,7 @@ COMPILER_ARCH=arm64
GIT_OPTS=(--depth 1)
DTS_FILE=""
RSI_VER=RS9116.NB0.NL.LNX.PURISM_FW_UPGRADE.1.0.5
KERNEL_VER=""
build_redpine () {
tar -xf "files/${RSI_VER}.tgz"
......@@ -32,10 +32,16 @@ build_redpine () {
sed "s/KERNELDIR=.*/KERNELDIR=${ESCAPED_KERNEL_DIR}/" -i "${RSI_BUILD_PATH}/Makefile"
mv "${CWD}/${RSI_VER}/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps" "${CWD}/${RSI_VER}/Firmware/RS9116_NLINK_WLAN_BT_IMA
GE.HW1_1.rps"
cp files/RS9116_NLINK_WLAN_BT_IMAGE.rps "${CWD}/${RSI_VER}/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.HW1_2.rps"
ln -s "RS9116_NLINK_WLAN_BT_IMAGE.HW1_2.rps" "${CWD}/${RSI_VER}/Firmware/RS9116_NLINK_WLAN_BT_IMAGE.rps"
cp files/update_redpine.sh "${CWD}/${RSI_VER}/Firmware/"
cd ${RSI_BUILD_PATH}
make -j "${NPROC}" "${MAKE_OPTS[@]}" ARCH="${ARCH}" CROSS_COMPILE="${CROSS_COMPILER}" -C "${CWD}/${LINUX_DIR}" M="$PWD" modules
cd "${CWD}/${RSI_BUILD_PATH}" && tar -cf "${OUTPUT_DIR}/rsi_upgrade.tar" ./*.ko
cd "${CWD}/${RSI_VER}/Firmware" && tar -cf "${OUTPUT_DIR}/rsi_firmware.tar" ./*
cd "${CWD}/${RSI_BUILD_PATH}" && tar -cf "${OUTPUT_DIR}/rsi_upgrade_${KERNEL_VER}.tar" ./*.ko
cd "${CWD}/${RSI_VER}/Firmware" && tar -cf "${OUTPUT_DIR}/rsi_firmware_${KERNEL_VER}.tar" ./*
cd "${CWD}"
}
......@@ -89,9 +95,9 @@ case ${pureos_board} in
DOT_CONFIG="${DOT_CONFIG:-emcraft-som-imx8_defconfig}"
;;
devkit)
KERNEL_BRANCH="${KERNEL_BRANCH:-imx8-4.18-wip}"
KERNEL_REPO="${KERNEL_REPO:-https://source.puri.sm/Librem5/linux-emcraft.git}"
DOT_CONFIG="${DOT_CONFIG:-librem5-evk_defconfig}"
KERNEL_BRANCH="${KERNEL_BRANCH:-imx8-5.2-devkit}"
KERNEL_REPO="${KERNEL_REPO:-https://source.puri.sm/Librem5/linux-next.git}"
DOT_CONFIG="${DOT_CONFIG:-librem5-devkit_defconfig}"
;;
\?)
echo "unrecognized board type ${pureos_board}"
......@@ -133,7 +139,8 @@ mkdir -p "${OUTPUT_DIR}"
mv "${CWD}"/*"${COMPILER_ARCH}".deb "${CWD}"/*.buildinfo "${CWD}"/*.changes "${OUTPUT_DIR}"
echo "${KERNEL_REPO}" > "${OUTPUT_DIR}/kernel-git-${ARCH}.txt"
git log | head -n 1 | awk '{ print $2 };' >> "${OUTPUT_DIR}/kernel-git-${ARCH}.txt"
KERNEL_VER=$(git log | head -n 1 | awk '{ print $2 };')
echo "${KERNEL_VER}" >> "${OUTPUT_DIR}/kernel-git-${ARCH}.txt"
cd "${CWD}"
......
Supports Markdown
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