systemd-boot.bbclass: Fix SYSYTEMD_BOOT_CFG creation

This patch makes sure the directory which will contain
the systemd configuration (loader.conf) is created before
the configuration file is written, fixing errors when it
tried to write it to a non-existent directory

(From OE-Core rev: f4ba23212c97fb8c3351a3cf981ee355ae2fc9b1)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alejandro Hernandez 2016-12-05 11:00:56 -06:00 committed by Richard Purdie
parent 1cae998af9
commit 928a93d516
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ python build_efi_cfg() {
return
cfile = d.getVar('SYSTEMD_BOOT_CFG')
cdir = os.path.dirname(cfile)
if not os.path.exists(cdir):
os.makedirs(cdir)
try:
cfgfile = open(cfile, 'w')
except OSError: