mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 10:10:17 +00:00
move dev stuff to hack/dev
This commit is contained in:
@@ -19,6 +19,8 @@ if command -v docker >/dev/null 2>&1; then
|
||||
delete_image sprout-utils-copy-polyfill || true
|
||||
delete_image sprout-ovmf-x86_64 || true
|
||||
delete_image sprout-ovmf-aarch64 || true
|
||||
delete_image sprout-initramfs-x86_64 || true
|
||||
delete_image sprout-initramfs-aarch64 || true
|
||||
delete_image sprout-kernel-x86_64 || true
|
||||
delete_image sprout-kernel-aarch64 || true
|
||||
delete_image sprout-kernel-build-x86_64 || true
|
||||
|
||||
|
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd "$(dirname "${0}")/.." || exit 1
|
||||
cd "$(dirname "${0}")/../.." || exit 1
|
||||
|
||||
. "hack/common.sh"
|
||||
|
||||
if [ "${SKIP_BUILD}" != "1" ]; then
|
||||
./hack/build.sh "${TARGET_ARCH}" "${RUST_PROFILE}"
|
||||
./hack/dev/build.sh "${TARGET_ARCH}" "${RUST_PROFILE}"
|
||||
fi
|
||||
|
||||
clear
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd "$(dirname "${0}")/.." || exit 1
|
||||
cd "$(dirname "${0}")/../.." || exit 1
|
||||
|
||||
. "hack/common.sh"
|
||||
|
||||
@@ -29,7 +29,7 @@ fi
|
||||
mkdir -p "${FINAL_DIR}"
|
||||
|
||||
if [ "${SKIP_KERNEL_BUILD}" != "1" ] || [ "${SKIP_VM_BUILD}" != "1" ] || [ "${SKIP_SPROUT_BUILD}" != "1" ]; then
|
||||
docker build -t "${DOCKER_PREFIX}/sprout-utils-copy-direct:${DOCKER_TAG}" -f hack/utils/Dockerfile.copy-direct hack
|
||||
docker build -t "${DOCKER_PREFIX}/sprout-utils-copy-direct:${DOCKER_TAG}" -f hack/dev/utils/Dockerfile.copy-direct hack
|
||||
fi
|
||||
|
||||
copy_from_image_direct() {
|
||||
@@ -47,8 +47,7 @@ copy_from_image_polyfill() {
|
||||
SOURCE="${2}"
|
||||
TARGET="${3}"
|
||||
|
||||
docker build -t "${IMAGE}-copy-polyfill:${DOCKER_TAG}" --build-arg "TARGET_IMAGE=${IMAGE}:${DOCKER_TAG}" \
|
||||
-f hack/utils/Dockerfile.copy-polyfill hack
|
||||
docker build -t "${IMAGE}-copy-polyfill:${DOCKER_TAG}" --build-arg "TARGET_IMAGE=${IMAGE}:${DOCKER_TAG}" -f hack/dev/utils/Dockerfile.copy-polyfill hack
|
||||
# note: the -w '//' is a workaround for Git Bash where / is magically rewritten.
|
||||
docker run --rm -i -w '//' "${IMAGE}-copy-polyfill:${DOCKER_TAG}" cat "image/${SOURCE}" >"${TARGET}"
|
||||
}
|
||||
@@ -62,24 +61,23 @@ copy_from_image() {
|
||||
|
||||
if [ "${SKIP_KERNEL_BUILD}" != "1" ]; then
|
||||
echo "[kernel build] ${TARGET_ARCH} ${RUST_PROFILE}"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-kernel-${TARGET_ARCH}:${DOCKER_TAG}" -f kernel/Dockerfile kernel
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-kernel-${TARGET_ARCH}:${DOCKER_TAG}" -f hack/dev/kernel/Dockerfile hack/dev/kernel
|
||||
|
||||
if [ "${KERNEL_BUILD_TAG}" = "1" ]; then
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-kernel-build-${TARGET_ARCH}:${DOCKER_TAG}" -f kernel/Dockerfile --target
|
||||
build kernel
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-kernel-build-${TARGET_ARCH}:${DOCKER_TAG}" -f hack/dev/kernel/Dockerfile --target build hack/dev/kernel
|
||||
fi
|
||||
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-kernel-${TARGET_ARCH}" "kernel.efi" "${FINAL_DIR}/kernel.efi"
|
||||
cp "hack/configs/${SPROUT_CONFIG_NAME}.sprout.toml" "${FINAL_DIR}/sprout.toml"
|
||||
cp "hack/assets/edera-splash.png" "${FINAL_DIR}/edera-splash.png"
|
||||
cp "hack/dev/configs/${SPROUT_CONFIG_NAME}.sprout.toml" "${FINAL_DIR}/sprout.toml"
|
||||
cp "hack/dev/assets/edera-splash.png" "${FINAL_DIR}/edera-splash.png"
|
||||
fi
|
||||
|
||||
if [ "${SKIP_VM_BUILD}" != "1" ]; then
|
||||
echo "[vm build] ${TARGET_ARCH} ${RUST_PROFILE}"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}:${DOCKER_TAG}" -f vm/Dockerfile.ovmf "${FINAL_DIR}"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}:${DOCKER_TAG}" -f hack/dev/vm/Dockerfile.ovmf "${FINAL_DIR}"
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}" "ovmf.fd" "${FINAL_DIR}/ovmf.fd"
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}" "shell.efi" "${FINAL_DIR}/shell.efi"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-initramfs-${TARGET_ARCH}:${DOCKER_TAG}" -f vm/Dockerfile.initramfs "${FINAL_DIR}"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-initramfs-${TARGET_ARCH}:${DOCKER_TAG}" -f hack/dev/vm/Dockerfile.initramfs "${FINAL_DIR}"
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-initramfs-${TARGET_ARCH}" "initramfs" "${FINAL_DIR}/initramfs"
|
||||
fi
|
||||
|
||||
@@ -109,6 +107,6 @@ fi
|
||||
|
||||
if [ "${SKIP_BOOT_BUILD}" != "1" ]; then
|
||||
echo "[boot build] ${TARGET_ARCH} ${RUST_PROFILE}"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-boot-${TARGET_ARCH}:${DOCKER_TAG}" --build-arg "EFI_NAME=${EFI_NAME}" -f boot/Dockerfile "${FINAL_DIR}"
|
||||
docker build --platform="${DOCKER_TARGET}" -t "${DOCKER_PREFIX}/sprout-boot-${TARGET_ARCH}:${DOCKER_TAG}" --build-arg "EFI_NAME=${EFI_NAME}" -f hack/dev/boot/Dockerfile "${FINAL_DIR}"
|
||||
copy_from_image "${DOCKER_PREFIX}/sprout-boot-${TARGET_ARCH}" "sprout.img" "${FINAL_DIR}/sprout.img"
|
||||
fi
|
||||
Reference in New Issue
Block a user