1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2025-01-06 03:27:17 +03:00

boot: switch_root: Ensure /run/boot exists before writing to it

This commit is contained in:
Samuel Dionne-Riel 2022-10-16 01:16:10 -04:00
parent 59e3d0386d
commit 135c063420

View File

@ -233,6 +233,7 @@ class Tasks::SwitchRoot < SingletonTask
%Q{/ { mobile-nixos,stage-0,uptime = #{`uptime`.to_json}; };},
].join("\n")
FileUtils.mkdir_p("/run/boot/")
File.write("/run/boot/fdt.dts", dts)
System.run("fdt-forward --to-dtb < /run/boot/fdt.dts > /run/boot/fdt.dtb")