mirror of
https://github.com/systemd/systemd
synced 2024-07-23 03:04:57 +00:00
Merge pull request #21871 from keszybz/meson-sbat-report
Report sbat settings in meson summary
This commit is contained in:
commit
d3d6b38f46
16
meson.build
16
meson.build
|
@ -43,6 +43,10 @@ endif
|
|||
skip_deps = want_ossfuzz or want_libfuzzer
|
||||
fuzzer_build = want_ossfuzz or want_libfuzzer
|
||||
|
||||
# Create a title-less summary section early, so it ends up first in the output.
|
||||
# More items are added later after they have been detected.
|
||||
summary({'build mode' : get_option('mode')})
|
||||
|
||||
#####################################################################
|
||||
|
||||
# Try to install the git pre-commit hook
|
||||
|
@ -3886,7 +3890,6 @@ alt_time_epoch = run_command('date', '-Is', '-u', '-d', '@@0@'.format(time_epoch
|
|||
check : true).stdout().strip()
|
||||
|
||||
summary({
|
||||
'build mode' : get_option('mode'),
|
||||
'split /usr' : split_usr,
|
||||
'split bin-sbin' : split_bin,
|
||||
'prefix directory' : prefixdir,
|
||||
|
@ -3944,17 +3947,6 @@ summary({
|
|||
# CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
|
||||
# LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
|
||||
|
||||
if conf.get('ENABLE_EFI') == 1 and conf.get('HAVE_GNU_EFI') == 1
|
||||
summary({
|
||||
'EFI machine type' : efi_arch[0],
|
||||
'EFI CC' : '@0@'.format(' '.join(efi_cc)),
|
||||
'EFI LD' : efi_ld,
|
||||
'EFI lds' : efi_lds,
|
||||
'EFI crt0' : efi_crt0,
|
||||
'EFI include directory' : efi_incdir},
|
||||
section : 'Extensible Firmware Interface')
|
||||
endif
|
||||
|
||||
found = []
|
||||
missing = []
|
||||
|
||||
|
|
|
@ -99,59 +99,6 @@ if efi_lds == ''
|
|||
subdir_done()
|
||||
endif
|
||||
|
||||
efi_headers = files('''
|
||||
bcd.h
|
||||
console.h
|
||||
cpio.h
|
||||
devicetree.h
|
||||
disk.h
|
||||
drivers.h
|
||||
graphics.h
|
||||
linux.h
|
||||
measure.h
|
||||
missing_efi.h
|
||||
pe.h
|
||||
random-seed.h
|
||||
shim.h
|
||||
splash.h
|
||||
util.h
|
||||
xbootldr.h
|
||||
'''.split())
|
||||
|
||||
common_sources = '''
|
||||
assert.c
|
||||
devicetree.c
|
||||
disk.c
|
||||
graphics.c
|
||||
measure.c
|
||||
pe.c
|
||||
secure-boot.c
|
||||
util.c
|
||||
'''.split()
|
||||
|
||||
systemd_boot_sources = '''
|
||||
bcd.c
|
||||
boot.c
|
||||
console.c
|
||||
drivers.c
|
||||
random-seed.c
|
||||
shim.c
|
||||
xbootldr.c
|
||||
'''.split()
|
||||
|
||||
stub_sources = '''
|
||||
cpio.c
|
||||
initrd.c
|
||||
splash.c
|
||||
stub.c
|
||||
'''.split()
|
||||
|
||||
if efi_arch[1] in ['ia32', 'x86_64']
|
||||
stub_sources += 'linux_x86.c'
|
||||
else
|
||||
stub_sources += 'linux.c'
|
||||
endif
|
||||
|
||||
conf.set10('HAVE_GNU_EFI', true)
|
||||
conf.set_quoted('EFI_MACHINE_TYPE_NAME', efi_arch[0])
|
||||
|
||||
|
@ -183,7 +130,6 @@ elif get_option('sbat-distro') != ''
|
|||
if (value == '' or value == 'auto') and not meson.is_cross_build()
|
||||
cmd = 'if [ -e /etc/os-release ]; then . /etc/os-release; else . /usr/lib/os-release; fi; echo $@0@'.format(sbatvar[1])
|
||||
value = run_command(sh, '-c', cmd).stdout().strip()
|
||||
message('@0@ (from @1@): @2@'.format(sbatvar[0], sbatvar[1], value))
|
||||
endif
|
||||
if value == ''
|
||||
error('Required @0@ option not set and autodetection failed'.format(sbatvar[0]))
|
||||
|
@ -200,8 +146,11 @@ elif get_option('sbat-distro') != ''
|
|||
pkgver = get_option('sbat-distro-version')
|
||||
if pkgver == ''
|
||||
efi_conf.set('SBAT_DISTRO_VERSION', 'GIT_VERSION')
|
||||
# This is determined during build, not configuration, so we can't display it yet.
|
||||
sbat_distro_version_display = '(git version)'
|
||||
else
|
||||
efi_conf.set_quoted('SBAT_DISTRO_VERSION', pkgver)
|
||||
sbat_distro_version_display = pkgver
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -332,6 +281,76 @@ if efi_cc_version.contains('clang') and efi_cc_version.split('.')[0].split(' ')[
|
|||
efi_ldflags += ['-Wl,-T,' + efi_lds, '-Wno-unused-command-line-argument']
|
||||
endif
|
||||
|
||||
summary({
|
||||
'EFI machine type' : efi_arch[0],
|
||||
'EFI CC' : '@0@'.format(' '.join(efi_cc)),
|
||||
'EFI LD' : efi_ld,
|
||||
'EFI lds' : efi_lds,
|
||||
'EFI crt0' : efi_crt0,
|
||||
'EFI include directory' : efi_incdir},
|
||||
section : 'Extensible Firmware Interface')
|
||||
|
||||
if efi_conf.get('SBAT_DISTRO', '') != ''
|
||||
summary({
|
||||
'SBAT distro': efi_conf.get('SBAT_DISTRO'),
|
||||
'SBAT distro generation': efi_conf.get('SBAT_DISTRO_GENERATION'),
|
||||
'SBAT distro version': sbat_distro_version_display,
|
||||
'SBAT distro summary': efi_conf.get('SBAT_DISTRO_SUMMARY'),
|
||||
'SBAT distro URL': efi_conf.get('SBAT_DISTRO_URL')},
|
||||
section : 'Extensible Firmware Interface')
|
||||
endif
|
||||
|
||||
############################################################
|
||||
|
||||
efi_headers = files(
|
||||
'bcd.h',
|
||||
'console.h',
|
||||
'cpio.h',
|
||||
'devicetree.h',
|
||||
'disk.h',
|
||||
'drivers.h',
|
||||
'graphics.h',
|
||||
'linux.h',
|
||||
'measure.h',
|
||||
'missing_efi.h',
|
||||
'pe.h',
|
||||
'random-seed.h',
|
||||
'shim.h',
|
||||
'splash.h',
|
||||
'util.h',
|
||||
'xbootldr.h')
|
||||
|
||||
common_sources = [
|
||||
'assert.c',
|
||||
'devicetree.c',
|
||||
'disk.c',
|
||||
'graphics.c',
|
||||
'measure.c',
|
||||
'pe.c',
|
||||
'secure-boot.c',
|
||||
'util.c']
|
||||
|
||||
systemd_boot_sources = [
|
||||
'bcd.c',
|
||||
'boot.c',
|
||||
'console.c',
|
||||
'drivers.c',
|
||||
'random-seed.c',
|
||||
'shim.c',
|
||||
'xbootldr.c']
|
||||
|
||||
stub_sources = [
|
||||
'cpio.c',
|
||||
'initrd.c',
|
||||
'splash.c',
|
||||
'stub.c']
|
||||
|
||||
if efi_arch[1] in ['ia32', 'x86_64']
|
||||
stub_sources += 'linux_x86.c'
|
||||
else
|
||||
stub_sources += 'linux.c'
|
||||
endif
|
||||
|
||||
systemd_boot_objects = []
|
||||
stub_objects = []
|
||||
foreach file : fundamental_source_paths + common_sources + systemd_boot_sources + stub_sources
|
||||
|
|
Loading…
Reference in a new issue