patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob e6e91eee0f418114174e20384531788759a7db09 2195 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
60
61
62
63
64
65
66
67
68
69
70
71
72
 
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021-2025 Alyssa Ross <hi@alyssa.is>

.POSIX:

include ../../lib/common.mk
include ../../lib/kcmdline-utils.mk
include ../../lib/verity.mk

DTBS ?= build/empty

dest = build/live.img

$(dest): $(LIVE_IMAGE_DEPS) build/boot.fat
	../../scripts/make-live-image.sh release $(dest) $(ROOT_FS)

build/empty:
	mkdir -p $@

build/spectrum.efi: build/rootfs.verity.roothash $(DTBS) $(KERNEL) $(INITRAMFS) ../../lib/kcmdline-utils.mk
	set -euo pipefail; \
	$(READ_ROOTHASH) && \
	{ \
	    printf "[UKI]\nDeviceTreeAuto=" && \
	    find $(DTBS) -name '*.dtb' -print0 | tr '\0' ' ' ;\
	} | $(UKIFY) build \
	    --output $@ \
	    --config /dev/stdin \
	    --linux $(KERNEL) \
	    --initrd $(INITRAMFS) \
	    --os-release $$'NAME="Spectrum"\n' \
	    --cmdline "ro intel_iommu=on x-spectrum-roothash=$$roothash x-spectrum-version=$$VERSION"

install: build/rootfs.verity.superblock $(ROOT_FS) build/spectrum.efi $(dest)
	set -euo pipefail; \
	$(READ_ROOTHASH); \
	mkdir -p -- $(DESTDIR) build; \
	cp -- build/rootfs.verity.superblock $(DESTDIR)/"Spectrum_OS_$$VERSION.verity"; \
	cp -- $(ROOT_FS) $(DESTDIR)/"Spectrum_OS_$$VERSION.root"; \
	cp -- build/spectrum.efi $(DESTDIR)/"Spectrum_OS_$$VERSION.efi"; \
	cp $(dest) $(DESTDIR)/live.img; \
	cd $(DESTDIR); \
	sha256sum live.img \
	   "Spectrum_OS_$$VERSION.root" \
	   "Spectrum_OS_$$VERSION.verity" \
	   "Spectrum_OS_$$VERSION.efi" > SHA256SUMS

build/boot.fat: $(SYSTEMD_BOOT_EFI) build/spectrum.efi
	$(TRUNCATE) -s 440401920 $@
	$(MKFS_FAT) $@
	$(MMD) -i $@ ::/EFI ::/EFI/BOOT ::/EFI/Linux
	$(MCOPY) -i $@ build/spectrum.efi ::/EFI/Linux
	$(MCOPY) -i $@ $(SYSTEMD_BOOT_EFI) ::/EFI/BOOT/$(EFINAME)

clean:
	rm -rf build
.PHONY: clean

run: $(dest)
	@../../scripts/run-qemu.sh -m 4G \
	    -machine virtualization=on \
	    -cpu max \
	    -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=$(dest),id=drive1,format=raw,if=none,readonly=true
.PHONY: run

debug log:

solving e6e91eee0f418114174e20384531788759a7db09 ...
found e6e91eee0f418114174e20384531788759a7db09 in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-6-401c1be2a11b@gmail.com/
found 9aa2488a57ba583ff49f0d95af4f91878a0cd5dd in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-5-401c1be2a11b@gmail.com/
found 3072d869f13efbf5ea196d191881aeab85726d2e in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
found 6dcbdeedda5d6ccf293f60dc62043f46c81ecf83 in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100644 6dcbdeedda5d6ccf293f60dc62043f46c81ecf83	release/live/Makefile

applying [1/3] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
diff --git a/release/live/Makefile b/release/live/Makefile
index 6dcbdeedda5d6ccf293f60dc62043f46c81ecf83..3072d869f13efbf5ea196d191881aeab85726d2e 100644


applying [2/3] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-5-401c1be2a11b@gmail.com/
diff --git a/release/live/Makefile b/release/live/Makefile
index 3072d869f13efbf5ea196d191881aeab85726d2e..9aa2488a57ba583ff49f0d95af4f91878a0cd5dd 100644


applying [3/3] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-6-401c1be2a11b@gmail.com/
diff --git a/release/live/Makefile b/release/live/Makefile
index 9aa2488a57ba583ff49f0d95af4f91878a0cd5dd..e6e91eee0f418114174e20384531788759a7db09 100644

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

index at:
100644 e6e91eee0f418114174e20384531788759a7db09	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).