patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob f984bc8d5a93733a246ccc901674be06bbcbb69e 2291 bytes (raw)
name: release/live/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
 
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021-2025 Alyssa Ross <hi@alyssa.is>

.POSIX:

ROOT = ../..
include $(ROOT)/lib/common.mk

dest = build/live.img

$(dest): ../../scripts/format-uuid.sh ../../scripts/make-gpt.sh ../../scripts/sfdisk-field.awk build/boot.fat $(ROOT_FS_IMAGES)
	../../scripts/make-gpt.sh $@.tmp \
	    build/boot.fat:c12a7328-f81f-11d2-ba4b-00a0c93ec93b \
	    $(ROOT_FS_VERITY):verity:$$(../../scripts/format-uuid.sh "$$(dd if=$(ROOT_FS_VERITY_ROOTHASH) bs=32 skip=1 count=1 status=none)"):Spectrum_'$(VERSION).verity:162' \
	    $(ROOT_FS_IMAGE):root:$$(../../scripts/format-uuid.sh "$$(head -c 32 $(ROOT_FS_VERITY_ROOTHASH))"):Spectrum_'$(VERSION):20000' \
	    /dev/null:verity:18f2ccff-92f1-4bb1-a80e-24f76ecda90c:_empty:162 \
	    /dev/null:root:ec0c5ff3-f6b1-4adf-82b4-61336c4d135f:_empty:20000
	mv $@.tmp $@

build/boot.fat: $(SYSTEMD_BOOT_EFI) $(SPECTRUM_EFI)
	mkdir -p build
	$(TRUNCATE) -s 440401920 $@
	$(MKFS_FAT) $@
	$(MMD) -i $@ ::/EFI ::/EFI/BOOT ::/EFI/Linux
	$(MCOPY) -i $@ $(SPECTRUM_EFI) ::/EFI/Linux/'Spectrum_$(VERSION).efi'
	$(MCOPY) -i $@ $(SYSTEMD_BOOT_EFI) ::/EFI/BOOT/$(EFINAME)

run: build/empty $(dest)
	@set -xueo pipefail && \
	img="$$(mktemp build/spectrum-rootfs.XXXXXXXXX.img)" && \
	cp $(dest) "$$img" && \
	exec 3<>"$$img" && \
	rm -f "$$img" && \
	userdata="$$(mktemp build/spectrum-userdata.XXXXXXXXXX.img)" && \
	truncate -s 10G "$$userdata" && \
	unshare --map-user 1000 --map-group 1000 mkfs.btrfs -r build/empty "$$userdata" && \
	exec 4<>"$$userdata" && \
	rm -f "$$userdata" && \
	set +x && \
	exec ../../scripts/run-qemu.sh -m 4G \
	    -machine virtualization=on \
	    -cpu max \
	    -smbios type=11,value=io.systemd.stub.kernel-cmdline-extra=console=hvc0 \
	    -chardev vc,id=virtiocon0 \
	    -device virtio-serial \
	    -device virtconsole,chardev=virtiocon0 \
	    -device virtio-keyboard \
	    -device virtio-mouse \
	    -device virtio-gpu \
	    -parallel none \
	    -vga none \
	    -device qemu-xhci \
	    -device usb-storage,drive=drive1,removable=true \
	    -drive file=$(OVMF_CODE),format=raw,if=pflash,readonly=true \
	    -drive file=/proc/self/fd/3,id=drive1,format=raw,if=none \
	    -drive file=/proc/self/fd/4,if=virtio,format=raw
.PHONY: run

include $(ROOT)/lib/targets.mk

debug log:

solving f984bc8d5a93733a246ccc901674be06bbcbb69e ...
found f984bc8d5a93733a246ccc901674be06bbcbb69e in https://inbox.spectrum-os.org/spectrum-devel/20260711-cgroups-v3-2-5cba61a20cba@gmail.com/
found 85319d0eec06df4e7ab1e28030e3bb78608194df in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100644 85319d0eec06df4e7ab1e28030e3bb78608194df	release/live/Makefile

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20260711-cgroups-v3-2-5cba61a20cba@gmail.com/
diff --git a/release/live/Makefile b/release/live/Makefile
index 85319d0eec06df4e7ab1e28030e3bb78608194df..f984bc8d5a93733a246ccc901674be06bbcbb69e 100644

Checking patch release/live/Makefile...
Applied patch release/live/Makefile cleanly.

index at:
100644 f984bc8d5a93733a246ccc901674be06bbcbb69e	release/live/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).