os: build bootable images

This commit is contained in:
Alex Zenla
2024-03-10 00:22:24 +00:00
parent 817509bcef
commit 4894bd9d1c
28 changed files with 384 additions and 82 deletions

View File

@ -12,6 +12,11 @@ cd "${KRATA_DIR}"
. "${KERNEL_DIR}/config.sh"
KERNEL_SRC="${KERNEL_DIR}/linux-${KERNEL_VERSION}"
if [ -z "${KRATA_KERNEL_BUILD_JOBS}" ]
then
KRATA_KERNEL_BUILD_JOBS="2"
fi
if [ ! -f "${KERNEL_SRC}/Makefile" ]
then
rm -rf "${KERNEL_SRC}"
@ -34,14 +39,14 @@ then
fi
cp "${KERNEL_CONFIG_FILE}" "${KERNEL_SRC}/.config"
make -C "${KERNEL_SRC}" ARCH="${TARGET_ARCH}" "${@}" olddefconfig
make -C "${KERNEL_SRC}" ARCH="${TARGET_ARCH}" olddefconfig
if [ "${TARGET_ARCH}" = "x86_64" ]
then
make -C "${KERNEL_SRC}" ARCH="${TARGET_ARCH}" "${@}" bzImage
make -C "${KERNEL_SRC}" ARCH="${TARGET_ARCH}" -j"${KRATA_KERNEL_BUILD_JOBS}" bzImage
elif [ "${TARGET_ARCH}" = "arm64" ]
then
make -C "${KERNEL_SRC}" ARCH="${TARGET_ARCH}" "${@}" Image.gz
make -C "${KERNEL_SRC}" ARCH="${TARGET_ARCH}" -j"${KRATA_KERNEL_BUILD_JOBS}" Image.gz
fi
if [ "${TARGET_ARCH}" = "x86_64" ]