mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 22:04:19 +08:00
Build installer and redoxfs for host outside of podman
This commit is contained in:
parent
491ffcfb4a
commit
5e2bc43891
@ -84,11 +84,12 @@ else
|
||||
export GNU_TARGET=$(TARGET)
|
||||
endif
|
||||
BUILD=build/$(ARCH)/$(CONFIG_NAME)
|
||||
FSTOOLS_PATH=build/fstools/bin
|
||||
INSTALLER=$(FSTOOLS_PATH)/redox_installer
|
||||
INSTALLER=build/fstools/redox_installer
|
||||
INSTALLER_OPTS=
|
||||
LIST_PACKAGES=$(FSTOOLS_PATH)/list_packages
|
||||
LIST_PACKAGES=installer/target/release/list_packages
|
||||
LIST_PACKAGES_OPTS=
|
||||
REDOXFS=build/fstools/bin/redoxfs
|
||||
REDOXFS_MKFS=build/fstools/bin/redoxfs-mkfs
|
||||
ifeq ($(REPO_BINARY),0)
|
||||
INSTALLER_OPTS+=--cookbook=cookbook
|
||||
else
|
||||
|
||||
@ -34,9 +34,9 @@ $(BUILD)/filesystem.img: $(FSTOOLS_TAG) $(REPO_TAG)
|
||||
FILESYSTEM_SIZE=$(shell $(INSTALLER) --filesystem-size -c $(FILESYSTEM_CONFIG)); \
|
||||
fi && \
|
||||
truncate -s "$$FILESYSTEM_SIZE"m $@.partial
|
||||
$(FSTOOLS_PATH)/redoxfs-mkfs $(REDOXFS_MKFS_FLAGS) $@.partial
|
||||
$(REDOXFS_MKFS) $(REDOXFS_MKFS_FLAGS) $@.partial
|
||||
mkdir -p $(BUILD)/filesystem/
|
||||
$(FSTOOLS_PATH)/redoxfs $@.partial $(BUILD)/filesystem/
|
||||
$(REDOXFS) $@.partial $(BUILD)/filesystem/
|
||||
sleep 1
|
||||
pgrep redoxfs
|
||||
umask 002 && $(INSTALLER) $(INSTALLER_OPTS) -c $(FILESYSTEM_CONFIG) $(BUILD)/filesystem/
|
||||
@ -47,13 +47,13 @@ $(BUILD)/filesystem.img: $(FSTOOLS_TAG) $(REPO_TAG)
|
||||
|
||||
mount: $(FSTOOLS_TAG) FORCE
|
||||
mkdir -p $(BUILD)/filesystem/
|
||||
$(FSTOOLS_PATH)/redoxfs $(BUILD)/harddrive.img $(BUILD)/filesystem/
|
||||
$(REDOXFS) $(BUILD)/harddrive.img $(BUILD)/filesystem/
|
||||
sleep 2
|
||||
pgrep redoxfs
|
||||
|
||||
mount_extra: $(FSTOOLS_TAG) FORCE
|
||||
mkdir -p $(BUILD)/filesystem/
|
||||
$(FSTOOLS_PATH)/redoxfs $(BUILD)/extra.img $(BUILD)/filesystem/
|
||||
$(REDOXFS) $(BUILD)/extra.img $(BUILD)/filesystem/
|
||||
sleep 2
|
||||
pgrep redoxfs
|
||||
|
||||
|
||||
@ -2,21 +2,27 @@
|
||||
|
||||
fstools: $(FSTOOLS_TAG)
|
||||
|
||||
## The installer runs on the host, even when using Podman build
|
||||
$(FSTOOLS_TAG): cookbook installer redoxfs $(CONTAINER_TAG)
|
||||
# These tools run inside Podman if it is used, or on the host if Podman is not used
|
||||
$(FSTOOLS_TAG): cookbook installer build/fstools $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) $(MAKE) $@
|
||||
else
|
||||
rm -rf build/fstools
|
||||
mkdir -p build/fstools
|
||||
$(HOST_CARGO) build --manifest-path cookbook/Cargo.toml --release
|
||||
$(HOST_CARGO) build --manifest-path cookbook/pkgar/Cargo.toml --release
|
||||
$(HOST_CARGO) install --root build/fstools --path installer --bin list_packages --bin redox_installer
|
||||
$(HOST_CARGO) install --root build/fstools --path redoxfs --bin redoxfs --bin redoxfs-mkfs
|
||||
$(HOST_CARGO) build --manifest-path installer/Cargo.toml --bin list_packages
|
||||
mkdir -p build
|
||||
touch $@
|
||||
endif
|
||||
|
||||
## The installer and redoxfs run on the host, even when using Podman build
|
||||
build/fstools: installer redoxfs
|
||||
rm -rf $@ $@.partial
|
||||
mkdir -p $@.partial
|
||||
$(HOST_CARGO) install --root $@.partial --path installer --bin redox_installer
|
||||
$(HOST_CARGO) install --root $@.partial --path redoxfs --bin redoxfs --bin redoxfs-mkfs
|
||||
mv $@.partial $@
|
||||
touch $@
|
||||
|
||||
fstools_clean: FORCE $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) $(MAKE) $@
|
||||
|
||||
Loading…
Reference in New Issue
Block a user