buildroot: allow creating device nodes on s390x
The z Initial Program Loader (zipl) when creating the bootmap in bootmap_creat (src/zipl/bootmap.c) wants to create a device node via misc_temp_dev (bootmap_create:1141) for the device that it is installing the bootloader to[1]. Currently access to loopback devices is allowed from within the container (it is used to mount the image), but only read/write access. On s390x also allow the creation of device nodes, so zipl can do its work and install the bootloader stages on the "disk". [1] zipl source at commit dcce14923c3e9615df53773d1d8a3a22cbb23b96
This commit is contained in:
parent
bf41326ac6
commit
64addbe2d2
1 changed files with 8 additions and 1 deletions
|
|
@ -79,13 +79,20 @@ class BuildRoot:
|
|||
# pylint suggests to epxlicitly pass `check` to subprocess.run()
|
||||
check = kwargs.pop("check", False)
|
||||
|
||||
# we need read-write access to loopback devices
|
||||
loopback_allow = "rw"
|
||||
if platform.machine() == "s390x":
|
||||
# on s390x, the bootloader installation program (zipl)
|
||||
# wants to be able create devices nodes, so allow that
|
||||
loopback_allow += "m"
|
||||
|
||||
return subprocess.run([
|
||||
"systemd-nspawn",
|
||||
"--quiet",
|
||||
"--register=no",
|
||||
"--as-pid2",
|
||||
"--link-journal=no",
|
||||
"--property=DeviceAllow=block-loop rw",
|
||||
f"--property=DeviceAllow=block-loop {loopback_allow}",
|
||||
f"--directory={self.root}",
|
||||
f"--bind-ro={self.libdir}:/run/osbuild/lib",
|
||||
*[f"--bind={b}" for b in (binds or [])],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue