aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-01-29 15:00:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-01-29 15:00:01 +0000
commit3dcb6c6a73cd16acc7bcae9e54cda16fed89f35b (patch)
treee2b2b231622470ddc95a74f62b3cebcdcc492914 /Makefile
parent5809b2dc1536794cff7df2ab4f79d2fe7b6720bc (diff)
downloadlh-bootstrap-3dcb6c6a73cd16acc7bcae9e54cda16fed89f35b.tar.xz
Reimport userfs, rwfs and s6-rc from master
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 20 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index dda35b1..b2e254e 100644
--- a/Makefile
+++ b/Makefile
@@ -20,12 +20,15 @@ NORMALUSER_GID := $(shell id -g $(NORMALUSER))
it: all
-.PHONY: it all rootfs kernel qemu-boot clean distclean
+.PHONY: it all kernel rootfs rwfs userfs images qemu-boot clean distclean
-all: $(OUTPUT)/tmp/.lh_rootfs_installed $(OUTPUT)/build-host/kernel/.lh_installed
-rootfs: $(OUTPUT)/tmp/.lh_rootfs_installed
+all: kernel rootfs rwfs userfs images
kernel: $(OUTPUT)/build-host/kernel/.lh_installed
+rootfs: $(OUTPUT)/tmp/.lh_rootfs_installed
+rwfs: $(OUTPUT)/tmp/.lh_rwfs_installed
+userfs: $(OUTPUT)/tmp/.lh_userfs_installed
+images: $(OUTPUT)/tmp/.lh_diskimages_done
# clean everything
@@ -40,7 +43,7 @@ clean:
# Prepare the output directory. This is at the bottom of the dependency tree.
$(OUTPUT)/tmp/.lh_prepared: lh-config
- exec mkdir -p -m 0755 -- $(OUTPUT)/tmp $(OUTPUT)/rootfs $(OUTPUT)/build-build/bin $(OUTPUT)/build-build/opt $(OUTPUT)/build-build/tmp $(OUTPUT)/build-host/bin $(OUTPUT)/build-host/opt $(OUTPUT)/build-host/tmp $(OUTPUT)/host-host $(OUTPUT)/sources
+ exec mkdir -p -m 0755 -- $(OUTPUT)/tmp $(OUTPUT)/rootfs $(OUTPUT)/rwfs $(OUTPUT)/userfs $(OUTPUT)/build-build/bin $(OUTPUT)/build-build/opt $(OUTPUT)/build-build/tmp $(OUTPUT)/build-host/bin $(OUTPUT)/build-host/opt $(OUTPUT)/build-host/tmp $(OUTPUT)/host-host $(OUTPUT)/sources
exec chown -R -- $(NORMALUSER_UID):$(NORMALUSER_GID) $(OUTPUT)/tmp $(OUTPUT)/build-build $(OUTPUT)/build-host $(OUTPUT)/host-host
exec chown -- $(NORMALUSER_UID):$(NORMALUSER_GID) $(OUTPUT)/sources $(OUTPUT)
exec setuidgid $(NORMALUSER) touch $@
@@ -52,20 +55,27 @@ $(OUTPUT)/build-build/.lh_done: $(OUTPUT)/build-build/.lh_skarnet_installed $(OU
exec setuidgid $(NORMALUSER) touch $@
-# The rootfs
+# The filesystems
$(OUTPUT)/tmp/.lh_rootfs_installed: $(OUTPUT)/tmp/.lh_layout_installed $(OUTPUT)/build-host/.lh_skarnet_installed $(OUTPUT)/build-host/.lh_bb_installed $(OUTPUT)/build-host/.lh_dropbear_installed
exec setuidgid $(NORMALUSER) touch $@
+$(OUTPUT)/tmp/.lh_rwfs_installed: $(OUTPUT)/tmp/.lh_layout_installed
+ exec setuidgid $(NORMALUSER) touch $@
+
+$(OUTPUT)/tmp/.lh_userfs_installed: $(OUTPUT)/tmp/.lh_layout_installed
+ exec setuidgid $(NORMALUSER) touch $@
+
-# The qemu disk image (requires qemu and libguestfs-tools)
+# The qemu disk images (requires qemu and libguestfs-tools)
-$(OUTPUT)/tmp/.lh_diskimage_done: $(OUTPUT)/tmp/.lh_rootfs_installed
- exec setuidgid $(NORMALUSER) qemu-img create -f qcow2 $(OUTPUT)/disk-image.qcow2 1G
- exec virt-make-fs --format=qcow2 --size=2G --type=ext4 $(OUTPUT)/rootfs $(OUTPUT)/disk-image.qcow2
+$(OUTPUT)/tmp/.lh_diskimages_done: $(OUTPUT)/tmp/.lh_rootfs_installed $(OUTPUT)/tmp/.lh_rwfs_installed $(OUTPUT)/tmp/.lh_userfs_installed
+ exec virt-make-fs --format=qcow2 --size=1G --type=ext4 $(OUTPUT)/rootfs $(OUTPUT)/rootfs.qcow2
+ exec virt-make-fs --format=qcow2 --size=512M --type=ext4 $(OUTPUT)/rwfs $(OUTPUT)/rwfs.qcow2
+ exec virt-make-fs --format=qcow2 --size=512M --type=ext4 $(OUTPUT)/userfs $(OUTPUT)/userfs.qcow2
exec setuidgid $(NORMALUSER) touch $@
-qemu-boot: $(OUTPUT)/build-host/kernel/.lh_installed $(OUTPUT)/tmp/.lh_diskimage_done run-qemu
+qemu-boot: $(OUTPUT)/build-host/kernel/.lh_installed $(OUTPUT)/tmp/.lh_diskimages_done run-qemu
exec ./run-qemu
@@ -74,7 +84,6 @@ qemu-boot: $(OUTPUT)/build-host/kernel/.lh_installed $(OUTPUT)/tmp/.lh_diskimage
## libc, toolchains, utilities, for the build itself, or for building the host
include sub/kernel/Makefile
-# include sub/util-linux/Makefile
include sub/xz/Makefile
include sub/kmod/Makefile