mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 21:21:32 +00:00
add kernel build infra and introduce development guide to README
This commit is contained in:
22
kernel/build.sh
Executable file
22
kernel/build.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd "$(dirname "${0}")"
|
||||
|
||||
# shellcheck source=config.sh
|
||||
. "${PWD}/config.sh"
|
||||
|
||||
if [ ! -f "${SRC_DIR_NAME}/Makefile" ]
|
||||
then
|
||||
rm -rf "${SRC_DIR_NAME}"
|
||||
curl -L -o "${SRC_DIR_NAME}.txz" "${KERNEL_SRC_URL}"
|
||||
tar xvf "${SRC_DIR_NAME}.txz"
|
||||
rm "${SRC_DIR_NAME}.txz"
|
||||
fi
|
||||
|
||||
mkdir -p "${OUTPUT_DIR_NAME}"
|
||||
|
||||
cp hypha.config "${SRC_DIR_NAME}/.config"
|
||||
make -C "${SRC_DIR_NAME}" "${@}" olddefconfig
|
||||
make -C "${SRC_DIR_NAME}" "${@}" bzImage
|
||||
cp "${SRC_DIR_NAME}/arch/x86/boot/bzImage" "${OUTPUT_DIR_NAME}/kernel"
|
Reference in New Issue
Block a user