move dev stuff to hack/dev

This commit is contained in:
2025-10-12 18:12:22 -07:00
parent b2b916c2b7
commit 46fb31ef99
12 changed files with 14 additions and 14 deletions

View File

@@ -19,6 +19,8 @@ if command -v docker >/dev/null 2>&1; then
delete_image sprout-utils-copy-polyfill || true delete_image sprout-utils-copy-polyfill || true
delete_image sprout-ovmf-x86_64 || true delete_image sprout-ovmf-x86_64 || true
delete_image sprout-ovmf-aarch64 || 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-x86_64 || true
delete_image sprout-kernel-aarch64 || true delete_image sprout-kernel-aarch64 || true
delete_image sprout-kernel-build-x86_64 || true delete_image sprout-kernel-build-x86_64 || true

View File

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

@@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
set -e set -e
cd "$(dirname "${0}")/.." || exit 1 cd "$(dirname "${0}")/../.." || exit 1
. "hack/common.sh" . "hack/common.sh"
if [ "${SKIP_BUILD}" != "1" ]; then if [ "${SKIP_BUILD}" != "1" ]; then
./hack/build.sh "${TARGET_ARCH}" "${RUST_PROFILE}" ./hack/dev/build.sh "${TARGET_ARCH}" "${RUST_PROFILE}"
fi fi
clear clear

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
set -e set -e
cd "$(dirname "${0}")/.." || exit 1 cd "$(dirname "${0}")/../.." || exit 1
. "hack/common.sh" . "hack/common.sh"
@@ -29,7 +29,7 @@ fi
mkdir -p "${FINAL_DIR}" mkdir -p "${FINAL_DIR}"
if [ "${SKIP_KERNEL_BUILD}" != "1" ] || [ "${SKIP_VM_BUILD}" != "1" ] || [ "${SKIP_SPROUT_BUILD}" != "1" ]; then 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 fi
copy_from_image_direct() { copy_from_image_direct() {
@@ -47,8 +47,7 @@ copy_from_image_polyfill() {
SOURCE="${2}" SOURCE="${2}"
TARGET="${3}" TARGET="${3}"
docker build -t "${IMAGE}-copy-polyfill:${DOCKER_TAG}" --build-arg "TARGET_IMAGE=${IMAGE}:${DOCKER_TAG}" \ docker build -t "${IMAGE}-copy-polyfill:${DOCKER_TAG}" --build-arg "TARGET_IMAGE=${IMAGE}:${DOCKER_TAG}" -f hack/dev/utils/Dockerfile.copy-polyfill hack
-f hack/utils/Dockerfile.copy-polyfill hack
# note: the -w '//' is a workaround for Git Bash where / is magically rewritten. # 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}" 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 if [ "${SKIP_KERNEL_BUILD}" != "1" ]; then
echo "[kernel build] ${TARGET_ARCH} ${RUST_PROFILE}" 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 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 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
build kernel
fi fi
copy_from_image "${DOCKER_PREFIX}/sprout-kernel-${TARGET_ARCH}" "kernel.efi" "${FINAL_DIR}/kernel.efi" 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/dev/configs/${SPROUT_CONFIG_NAME}.sprout.toml" "${FINAL_DIR}/sprout.toml"
cp "hack/assets/edera-splash.png" "${FINAL_DIR}/edera-splash.png" cp "hack/dev/assets/edera-splash.png" "${FINAL_DIR}/edera-splash.png"
fi fi
if [ "${SKIP_VM_BUILD}" != "1" ]; then if [ "${SKIP_VM_BUILD}" != "1" ]; then
echo "[vm build] ${TARGET_ARCH} ${RUST_PROFILE}" 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}" "ovmf.fd" "${FINAL_DIR}/ovmf.fd"
copy_from_image "${DOCKER_PREFIX}/sprout-ovmf-${TARGET_ARCH}" "shell.efi" "${FINAL_DIR}/shell.efi" 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" copy_from_image "${DOCKER_PREFIX}/sprout-initramfs-${TARGET_ARCH}" "initramfs" "${FINAL_DIR}/initramfs"
fi fi
@@ -109,6 +107,6 @@ fi
if [ "${SKIP_BOOT_BUILD}" != "1" ]; then if [ "${SKIP_BOOT_BUILD}" != "1" ]; then
echo "[boot build] ${TARGET_ARCH} ${RUST_PROFILE}" 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" copy_from_image "${DOCKER_PREFIX}/sprout-boot-${TARGET_ARCH}" "sprout.img" "${FINAL_DIR}/sprout.img"
fi fi