patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob c3d600ad5a55d81b8ca9c7a3e182ef5f4fd90f4b 2269 bytes (raw)
name: host/initramfs/Makefile 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
 
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021-2024 Alyssa Ross <hi@alyssa.is>

.POSIX:

include ../../lib/common.mk

dest = build/initramfs

RUN_IMAGE = build/live.img

$(dest): $(MICROCODE) build/local.cpio $(PACKAGES_CPIO)
	cat /dev/null $(MICROCODE) > $@
	cat build/local.cpio $(PACKAGES_CPIO) | gzip -9n >> $@

# etc/init isn't included in ETC_FILES, because it gets installed to
# the root.
ETC_FILES = etc/getuuids etc/probe etc/fstab etc/mdev.conf
MOUNTPOINTS = dev mnt/root proc sys tmp

build/local.cpio: $(ETC_FILES) etc/init build/mountpoints
	printf "%s\n" $(ETC_FILES) | \
	    awk '{while (length) { print; sub("/?[^/]*$$", "") }}' | \
	    sort -u | \
	    $(CPIO) -o $(CPIOFLAGS) > $@
	cd etc && echo init | $(CPIO) -o $(CPIOFLAGS) -AF ../$@
	cd build/mountpoints && printf "%s\n" $(MOUNTPOINTS) | \
	    awk '{while (length) { print; sub("/?[^/]*$$", "") }}' | \
	    sort -u | \
	    $(CPIO) -o $(CPIOFLAGS) -AF ../../$@

build/mountpoints:
	rm -rf build/mountpoints
	mkdir -p build/mountpoints
	cd build/mountpoints && mkdir -p $(MOUNTPOINTS)
	find build/mountpoints -mindepth 1 -exec touch -d @0 {} ';'

build/live.img: ../../scripts/format-uuid.awk ../../scripts/make-gpt.sh ../../scripts/sfdisk-field.awk $(ROOT_FS_IMAGES)
	uuids=$$(awk -f ../../scripts/format-uuid.awk < $(ROOT_FS_VERITY_ROOTHASH)) && \
	set -u -- $$uuids && \
	bash ../../scripts/make-gpt.sh $@.tmp \
	    $(ROOT_FS_VERITY):verity:$$2 \
	    $(ROOT_FS_IMAGE):root:$$1
	mv $@.tmp $@

clean:
	rm -rf build
.PHONY: clean

run: $(dest) $(RUN_IMAGE) $(ROOT_FS_VERITY_ROOTHASH)
	@../../scripts/run-qemu.sh -m 4G \
	    -machine virtualization=on \
	    -kernel $(KERNEL) \
	    -initrd $(dest) \
	    -append "ro earlycon console=hvc0 intel_iommu=on roothash=$$(< $(ROOT_FS_VERITY_ROOTHASH)) nokaslr" \
	    -cpu max \
	    -gdb unix:build/gdb.sock,server,nowait \
	    -parallel none \
	    -chardev vc,id=virtiocon0 \
	    -device virtio-serial \
	    -device virtconsole,chardev=virtiocon0 \
	    -device virtio-keyboard \
	    -device virtio-mouse \
	    -device virtio-gpu \
	    -vga none \
	    -device qemu-xhci \
	    -device usb-storage,drive=drive1,removable=true \
	    -drive file=$(RUN_IMAGE),id=drive1,format=raw,if=none,readonly=true
.PHONY: run

debug log:

solving c3d600ad5a55d81b8ca9c7a3e182ef5f4fd90f4b ...
found c3d600ad5a55d81b8ca9c7a3e182ef5f4fd90f4b in https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-7-40c438d2dcaf@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-7-fd746748febd@gmail.com/
found 392dcfc8af3d6924fae717025124f228a2362b94 in https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-5-40c438d2dcaf@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-5-fd746748febd@gmail.com/
found e04e2ff471750410926f14099cee9786d582de86 in https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-4-40c438d2dcaf@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-4-fd746748febd@gmail.com/
found 2304b0885a152d8a659dddcc58f948d096034e2d in https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-2-40c438d2dcaf@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-2-fd746748febd@gmail.com/
found f27f5e07c4707914962197b4fea8f385729370aa in https://inbox.spectrum-os.org/spectrum-devel/20251126-refactor-verity-v5-1-0aa3d8bd180d@gmail.com/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251126-refactor-verity-v6-1-f09555546a85@gmail.com/
found cb13fbb35f065b67d291d4a35591d6f12720060c in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100644 cb13fbb35f065b67d291d4a35591d6f12720060c	host/initramfs/Makefile

applying [1/5] https://inbox.spectrum-os.org/spectrum-devel/20251126-refactor-verity-v5-1-0aa3d8bd180d@gmail.com/
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile
index cb13fbb35f065b67d291d4a35591d6f12720060c..f27f5e07c4707914962197b4fea8f385729370aa 100644

Checking patch host/initramfs/Makefile...
Applied patch host/initramfs/Makefile cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20251126-refactor-verity-v6-1-f09555546a85@gmail.com/ for f27f5e07c4707914962197b4fea8f385729370aa
index at:
100644 f27f5e07c4707914962197b4fea8f385729370aa	host/initramfs/Makefile

applying [2/5] https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-2-40c438d2dcaf@gmail.com/
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile
index f27f5e07c4707914962197b4fea8f385729370aa..2304b0885a152d8a659dddcc58f948d096034e2d 100644

Checking patch host/initramfs/Makefile...
Applied patch host/initramfs/Makefile cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-2-fd746748febd@gmail.com/ for 2304b0885a152d8a659dddcc58f948d096034e2d
index at:
100644 2304b0885a152d8a659dddcc58f948d096034e2d	host/initramfs/Makefile

applying [3/5] https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-4-40c438d2dcaf@gmail.com/
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile
index 2304b0885a152d8a659dddcc58f948d096034e2d..e04e2ff471750410926f14099cee9786d582de86 100644

Checking patch host/initramfs/Makefile...
Applied patch host/initramfs/Makefile cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-4-fd746748febd@gmail.com/ for e04e2ff471750410926f14099cee9786d582de86
index at:
100644 e04e2ff471750410926f14099cee9786d582de86	host/initramfs/Makefile

applying [4/5] https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-5-40c438d2dcaf@gmail.com/
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile
index e04e2ff471750410926f14099cee9786d582de86..392dcfc8af3d6924fae717025124f228a2362b94 100644

Checking patch host/initramfs/Makefile...
Applied patch host/initramfs/Makefile cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-5-fd746748febd@gmail.com/ for 392dcfc8af3d6924fae717025124f228a2362b94
index at:
100644 392dcfc8af3d6924fae717025124f228a2362b94	host/initramfs/Makefile

applying [5/5] https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v4-7-40c438d2dcaf@gmail.com/
diff --git a/host/initramfs/Makefile b/host/initramfs/Makefile
index 392dcfc8af3d6924fae717025124f228a2362b94..c3d600ad5a55d81b8ca9c7a3e182ef5f4fd90f4b 100644

Checking patch host/initramfs/Makefile...
Applied patch host/initramfs/Makefile cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20251126-updates-v5-7-fd746748febd@gmail.com/ for c3d600ad5a55d81b8ca9c7a3e182ef5f4fd90f4b
index at:
100644 c3d600ad5a55d81b8ca9c7a3e182ef5f4fd90f4b	host/initramfs/Makefile

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).