blob: dacdc8bf06dc35c95c90e10338d0612e4b19eaf2 [file] [log] [blame]
Brad Bishop15ae2502019-06-18 21:44:24 -04001# This recipe creates a module for the initramfs-framework in OE-core
2# which initializes IMA by loading a policy before transferring
3# control to the init process in the rootfs. The advantage over having
4# that init process doing the policy loading (which systemd could do)
5# is that already the integrity of the init binary itself will be
6# checked by the kernel.
7
8SUMMARY = "IMA module for the modular initramfs system"
9LICENSE = "MIT"
10LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
11
12# This policy file will get installed as /etc/ima/ima-policy.
13# It is located via the normal file search path, so a .bbappend
14# to this recipe can just point towards one of its own files.
Brad Bishop1fdf4aa2019-09-09 14:56:41 -040015IMA_POLICY ?= "ima-policy-hashed"
Brad Bishop15ae2502019-06-18 21:44:24 -040016
17SRC_URI = " file://ima"
18
Brad Bishopa48c0142020-01-06 09:48:41 -050019inherit features_check
20REQUIRED_DISTRO_FEATURES = "ima"
21
Brad Bishop15ae2502019-06-18 21:44:24 -040022do_install () {
23 install -d ${D}/${sysconfdir}/ima
24 install -d ${D}/init.d
25 install ${WORKDIR}/ima ${D}/init.d/20-ima
26}
27
28FILES_${PN} = "/init.d ${sysconfdir}"
29
30RDEPENDS_${PN} = "keyutils ${IMA_POLICY}"
31RDEPENDS_${PN} += "initramfs-framework-base"