patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob 8f36cd68e0450ff1a77ed5338e992323577a9f87 897 bytes (raw)
name: host/initramfs/etc/init 	 # 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
 
#!/bin/execlineb -S0
# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
# SPDX-License-Identifier: EUPL-1.2+

export PATH /bin

if { mount -a }

if { mkfifo /dev/rootfs.poll }

background {
  mdevd -C -b134217728
}

multisubstitute {
  importas -iu mdevd_pid !
  importas -i roothash x-spectrum-roothash
}

if { modprobe erofs }

# Do a blocking read on the fifo to wait for mdevd to find the
# partition.
if {
  redirfd -r 0 /dev/rootfs.poll
  redirfd -w 1 /dev/null
  head -c 1
}
background { kill $mdevd_pid }
background { rm /dev/rootfs.poll }

if {
  veritysetup open /dev/rootfs root-verity /dev/verity $roothash
}

background { rm /dev/rootfs /dev/verity }

if { mount /dev/mapper/root-verity /mnt/root }
wait { $mdevd_pid }

if { mount --move /proc /mnt/root/proc }
if { mount --move /sys /mnt/root/sys }
if { mount --move /dev /mnt/root/dev }

switch_root /mnt/root
/etc/init

debug log:

solving 8f36cd68e0450ff1a77ed5338e992323577a9f87 ...
found 8f36cd68e0450ff1a77ed5338e992323577a9f87 in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
found 719488741b6d31564c2c17c0e41f15d16b1c0a08 in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100755 719488741b6d31564c2c17c0e41f15d16b1c0a08	host/initramfs/etc/init

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
diff --git a/host/initramfs/etc/init b/host/initramfs/etc/init
index 719488741b6d31564c2c17c0e41f15d16b1c0a08..8f36cd68e0450ff1a77ed5338e992323577a9f87 100755

Checking patch host/initramfs/etc/init...
Applied patch host/initramfs/etc/init cleanly.

index at:
100755 8f36cd68e0450ff1a77ed5338e992323577a9f87	host/initramfs/etc/init

(*) 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).