Commit Graph

283 Commits

Author SHA1 Message Date
Hongxu Jia
15ed238b0f trousers: support openssl 1.1.x
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-09-26 08:28:11 +08:00
Hongxu Jia
ef419deace tpm-tools: support openssl 1.1.x
- Support openssl 1.1.x

-  Fix compile warning
|tpm_extendpcr.c:55:4: warning: 'strncpy' specified bound 4096 equals
destination size [-Wstringop-truncation]
|    strncpy(in_filename, aArg, PATH_MAX);

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-09-26 08:28:11 +08:00
Hongxu Jia
896365daea tpm-tools: refresh patch to fix QA WARNING
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-09-26 08:28:11 +08:00
Jia Zhang
139a9b656d Clean up the stuffs for stable branches
The following commits are reverted by the way:

- seloader: Fix building for rocko (bc6bbe2)
- meta-integrity: rpm: Add back in required patches for rocko (5fa9c85)

Because they are only applicable to rocko.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-20 21:21:37 -04:00
Jia Zhang
f450605d48 libsign: Fix build faiure due to -fstack-protector-strong
SECURITY_LDFLAGS includes -fstack-protector-strong which cannot work
with CCLD. To work around this issue, filter out it from LDFLAGS.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-17 23:21:43 -04:00
Jia Zhang
be735c09cb libsign: Update to the latest
- Use CCLD to build executable and library.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-17 23:21:41 -04:00
Jia Zhang
3a7a940160 mokutil: Fix build failure due to missing crypt.h
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-17 23:21:36 -04:00
Yi Zhao
13fcb2ff56 kernel-initramfs: rename INITRAMFS_BASE_NAME to INITRAMFS_NAME
The *_BASE_NAME was renamed to *_NAME in oe-core commit
f952c8e08b4798aa0f8bf764cfd70bda0eae9b8b. So we also need to do the same
thing here.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-09-18 11:11:12 +08:00
Yi Zhao
f998cc01a8 linux-yocto-efi-secure-boot: rename type variable to imageType
The oe-core commit 8d454ea754c96561257b1cc011fa638ceaa771db renamed type
variable to imageType in kernel.bbclass to avoid confusion with "type"
command in shell. We also do the same thing here.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-09-18 11:11:12 +08:00
Yi Zhao
32037a3aa7 linux-yocto-efi-secure-boot: rename KERNEL_IMAGE_BASE_NAME to KERNEL_IMAGE_NAME and KERNEL_IMAGE_SYMLINK_NAME to KERNEL_IMAGE_LINK_NAME
The *_BASE_NAME was renamed to *_NAME and *_SYMLINK_NAME was renamed to
*_LINK_NAME in oe-core commit f952c8e08b4798aa0f8bf764cfd70bda0eae9b8b.
So we also need to do the same thing here.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-09-18 11:11:12 +08:00
Jia Zhang
74af5e3644 cryptfs-tpm2: Fix build faiure due to -fstack-protector-strong
SECURITY_LDFLAGS includes -fstack-protector-strong which cannot work
with CCLD. To work around this issue, filter out it from LDFLAGS.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-17 09:31:31 -04:00
Jia Zhang
b3f12e7803 cryptfs-tpm2: Update to the latest
- Follow up the regular way to include header file.
- Use CCLD to build executable and library.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-17 09:29:52 -04:00
Yunguo Wei
cc40f6c890 cryptfs-tpm2: uprev to 0.7
Now cryptfs-tpm2 supports both TSS 1.x and 2.x API.

Please specify "TSS2_VER=1" in EXTRA_OEMAKE to support 1.x API.

Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
2018-09-12 17:49:31 +08:00
Yi Zhao
41c93d4802 efitools: refresh patch to fix QA warning
Refresh patch Build-DBX-by-default.patch

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-09-06 16:58:07 +08:00
Yi Zhao
ec8e07c9fd efitools: add the deployed artifacts to SSTATE_DUPWHITELIST
The oe-core commit 05f6042a40bb772f7ce8d6819c5b2937d8c9808d removed
DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELIST which caused a do_depoy error
when enable multilib:

$ bitbake efitools lib32-efitools

ERROR: lib32-efitools-1.7.0+gitAUTOINC+0649468475-r0 do_deploy: The
recipe lib32-efitools is trying to install files into a shared area when
those files already exist. Those files and their manifest location are:
  /buildarea/build/tmp-glibc/deploy/images/qemux86-64/LockDown.efi
      (matched in manifest-qemux86_64-efitools.deploy)
Please verify which recipe should provide the above files.

Add the deployed artifacts to SSTATE_DUPWHITELIST to fix this issue.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-09-06 16:57:21 +08:00
Yi Zhao
e778286de8 seloader: add the deployed artifacts to SSTATE_DUPWHITELIST
The oe-core commit 05f6042a40bb772f7ce8d6819c5b2937d8c9808d removed
DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELIST which caused a do_depoy error
when enable multilib:

$ bitbake seloader lib32-seloader

ERROR: lib32-seloader-0.4.6+gitAUTOINC+8b90f76a8d-r0 do_deploy: The
recipe lib32-seloader is trying to install files into a shared area when
those files already exist. Those files and their manifest location are:
  /buildarea/build/tmp-glibc/deploy/images/qemux86-64/Pkcs7VerifyDxe.efi
      (matched in manifest-qemux86_64-seloader.deploy)
  /buildarea/build/tmp-glibc/deploy/images/qemux86-64/Hash2DxeCrypto.efi
      (matched in manifest-qemux86_64-seloader.deploy)
  /buildarea/build/tmp-glibc/deploy/images/qemux86-64/efi-unsigned/Pkcs7VerifyDxe.efi
      (matched in manifest-qemux86_64-seloader.deploy)
  /buildarea/build/tmp-glibc/deploy/images/qemux86-64/efi-unsigned/Hash2DxeCrypto.efi
      (matched in manifest-qemux86_64-seloader.deploy)
Please verify which recipe should provide the above files.

Add the deployed artifacts to SSTATE_DUPWHITELIST to fix this issue.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-09-06 16:57:21 +08:00
Hongxu Jia
13ae980796 key-store: fix incorrect postpone to first boot
After postinst was executed at do_rootfs successfully,
there will be no first boot to redo.

Since `229f4e9 package.bbclass: add support for
pkg_postinst_ontarget()' applied in oe-core, use
pkg_postinst_ontarget to instead.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-09-05 18:53:58 +08:00
Hongxu Jia
23b208c08c cryptsetup_%.bbappend: move lvm2-udevrules from RDEPEND to RRECOMMENDS
when configuring lvm2 without udev, lvm2-udevrules package is empty,
causing do_rootfs failure.

Error:
ERROR: wrlinux-image-glibc-std-1.0-r5 do_rootfs: Function failed: do_rootfs
 Problem: conflicting requests
  - nothing provides lvm2-udevrules needed by cryptsetup-1.7.4-r0.corei7_64

Move lvm2-udevrules from RDEPEND to RRECOMMENDS could workaround the issue.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-08-27 10:50:37 +08:00
Tom Rini
93bba33166 libsign: Enable nativesdk support
Bump up to the current top of libsign so that we can easily get a copy
of selsign that can be put into an SDK.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-08-25 08:14:56 +08:00
Tom Rini
e3f8b0e054 sbsigntool: Enable nativesdk support
There are times were we might want to include sbsigntool into an SDK so
rename the recipe and extend to include nativesdk.  We also need gnu-efi
to support nativesdk so include that in a bbappend.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-08-25 08:14:56 +08:00
Trevor Woerner
c2e3fe9168 tpm2: move configure option
The --with-udevrulesdir configure option has been moved from tpm2-abrmd to
tpm2-tss in the code, therefore move its associated EXTRA_OECONF to suit.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-08-03 10:49:00 +08:00
Trevor Woerner
dc173c7a8d tpm2: update release recipes
tpm2-tss: 1.4.0 -> 2.0.0
tpm2-abrmd: 1.3.1 -> 2.0.1
tpm2-tools: 3.0.4 -> 3.1.1

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-08-03 10:49:00 +08:00
Tom Rini
5fa9c850bd meta-integrity: rpm: Add back in required patches for rocko
In 59a9f43b89 ("meta-integrity: Drop RPM patches that are upstream
now") we removed patches to RPM that were not required with a move up to
4.14.0 as they are upstream.  However, rocko ships with an older version
of RPM and still needs these patches.  Add conditional logic to apply
these patches only for rocko.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-31 22:48:35 +08:00
Tom Rini
bc6bbe2bde seloader: Fix building for rocko
When building on rocko we have gnu-efi version 3.0.6 around and seloader
needs to be told this for certain string functions to be provided by
itself rather than gnu-efi.  Add in conditional logic to pass this only
for rocko.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-31 22:48:35 +08:00
Tom Rini
cd40815e69 layer.conf: Mark as compatible with rocko
As we also work with the 'rocko' release list that in our
LAYERSERIES_COMPAT.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-25 20:41:35 +08:00
Mark Hatle
e64e9c12f1 layer.conf: Include secure-core for kernel-initramfs.bb
The kernel-initramfs.bbappend depends on kernel-initramfs.bb in
meta-secure-core/meta/recipes-core/images/

Fix parsing error:
ERROR: No recipes available for:
  meta-secure-core/meta-efi-secure-boot/recipes-core/images/kernel-initramfs.bbappend

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-07-18 09:06:13 +08:00
Jia Zhang
b127b760c0 seloader: Update to 0.4.6
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-07-17 05:40:04 -04:00
Trevor Woerner
089dd7e811 tpm2 git AUTOREV fix for BB_NO_NETWORK
Bitbake will try an ls-remote for any recipe whose SRCREV is AUTOREV,
even if that recipe will not ultimately be used for a particular build.
Therefore if the user specifies 'BB_NO_NETWORK = "1"', the _git versions of
the tpm2 recipes will cause the build to fail even if the _git versions are
not going to be built (which they won't be by default on account of their
DEFAULT_PREFERENCE being set to "-1").

This fix follows the same pattern as
721fcc89c5

With this fix, the user can disable networking and successfully build the
non-_git versions of the tpm2 recipes. If the user wants to build the _git
versions, networking must be enabled. The build is expected to fail if the
user asks for the _git versions, but disables networking.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-07-10 09:30:16 +08:00
Joe Slater
4a357121bf util-linux: allow -static linking for switch_root.static
Specify -no-pie to override possible -pie default.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-07-06 14:50:47 +08:00
fraser
086aa9d299 Fix parsing bug where SYSTEM_TRUSTED and SECONDARY_TRUSTED were always parsed as true 2018-06-29 09:21:29 +08:00
Trevor Woerner
ce1bb2fa28 Revert "tpm2-abrmd: move tpm2-abrmd.default to tpm2-abrmd.inc"
This reverts commit 0bb383b60a.
2018-06-26 09:58:27 +08:00
Jinliang Li
1812c8755b Add root parameter configuration in boot command line.
It is helpful when secure boot is enabled, because you can not
modify boot command line after boot-menu.inc is signed before deploying.

Signed-off-by: Jinliang Li <jinliang.li@linux.alibaba.com>
2018-06-26 09:40:48 +08:00
Yi Zhao
33ec1d1f82 linux-yocto-efi-secure-boot: using shutil.copyfile instead of shutil.move to copy kernel p7b file
In commit 1c96c0d096, the kernel p7b file
is moved from ${B}/${KERNEL_OUTPUT_DIR}/ to ${D}/boot/. But in
do_deploy(), it still try to copy p7b file from ${B}/${KERNEL_OUTPUT_DIR}/
to ${DEPLOYDIR}/. Using shutil.copyfile instead of shutil.move to fix
this issue.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-06-20 13:11:47 +08:00
Yi Zhao
231fc4906f linux-yocto-efi-secure-boot: fix typo
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-06-20 13:11:47 +08:00
Jia Zhang
a4fda23803 cryptfs-tpm2: update to 0.6.3
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-16 22:16:02 -04:00
Jia Zhang
5497078ef4 tpm2-tools: refresh the dlopen patch for 3.0.4
The latest git version has updated to use dl interface to load
the library of tpm2-abrmd, instead of linking it on compilation.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-16 05:33:13 -04:00
Jia Zhang
0bb383b60a tpm2-abrmd: move tpm2-abrmd.default to tpm2-abrmd.inc
Use separate directories to store tpm2-abrmd.default for stable
and git version.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-16 05:12:46 -04:00
Jia Zhang
60be51b4ee tpm2-abrmd: code style cleanup
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-16 04:41:05 -04:00
Jia Zhang
62638c5a24 tpm2-abrmd: Fix missing tpm2-abrmd.service
The default value of --with-systemdsystemunitdir with the prefix
"/usr" cannot be used to search tpm2-abrmd.service. In order to
fix this issue, explicitly set --with-systemdsystemunitdir as
before. In addition, place .perset to the dedicated system-preset
directory.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-16 04:35:55 -04:00
Jia Zhang
23d074cba7 tpm2-tss: code style cleanup
Replace tab with four spaces.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-16 04:09:39 -04:00
Trevor Woerner
de08228a0d tpm2-abrmd: update daemon cmdline options
In the latest git version of abrmd:
	- the following option has been renamed:
		--max-transient-objects -> --max-transients

	- the following option has been removed:
		--fail-on-loaded-trans

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-06-15 13:01:25 +08:00
Trevor Woerner
ec19d0a8ec tpm2-tools: cleanup and update
Cleanup the tpm2-tools recipe such that there is a recipe for
building the latest release (the default) and one for building
the latest, auto-incrementing version from git master placing
all pieces common to the two recipes into an include file.

Update release from 3.0.3 to 3.0.4.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-06-15 13:01:25 +08:00
Trevor Woerner
a504af5587 tpm2-abrmd: cleanup and update
Cleanup the tpm2-abrmd recipe such that there is a recipe for
building the latest release (the default) and one for building
the latest, auto-incrementing version from git master placing
all pieces common to the two recipes into an include file.

Update release from 1.2.0 to 1.3.1.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-06-15 13:01:25 +08:00
Trevor Woerner
156cf92528 tpm2-tss: cleanup and update
Cleanup the tpm2-tss recipe such that there is a recipe for
building the latest release (the default) and one for building
the latest, auto-incrementing version from git master placing
all pieces common to the two recipes in an include file.

Update release from 1.3.0 to 1.4.0.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-06-15 13:01:25 +08:00
Jia Zhang
7d4f711413 meta-intel-sgx: Initial support of linux-sgx-driver
As the initial support, linux-sgx-driver is integrated into this
layer. SDK and PSW will be provided soon.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-06-06 10:03:28 -04:00
Trevor Woerner
b50b53dad2 tpm2-abrmd-init: fix for /dev/tpmrmX
In addition to the expected /dev/tpmX device nodes, newer Linux kernels now
also create /dev/tpmrmX nodes. This causes the daemon's startup script to
fail, meaning the abrmd daemon is not started automatically.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-06-06 21:59:18 +08:00
Jia Zhang
e8df96cf47 Update MAINTAINERS info
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-05-30 23:29:42 -04:00
Hongxu Jia
38ba593841 sign_rpm_ext.bbclass: fix check_rpm_public_key racing at recipe parsing time
All recipe will be parsed which caused lockfile of
check_rpm_public_key racing issue.
...
|WARNING: meta-secure-core/meta/recipes-core/images/secure-core-image-initramfs.bb:
oe-core/bitbake/lib/bb/utils.py:400: ResourceWarning: unclosed file
<_io.TextIOWrapper name='tmp-glibc/check_rpm_public_key.lock' mode='a+' encoding='UTF-8'>
...

Refer do_package_write_rpm, add check_rpm_public_key to
prefunc of do_rootfs, only the running image recipe will
invoke check_rpm_public_key.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2018-05-31 11:26:13 +08:00
Trevor Woerner
6ca33b325d tpm2.0-tss: rename -> tpm2-tss
Unify how the TPM2 recipes are named.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-05-30 09:38:05 +08:00
Trevor Woerner
4b2c94fb64 tpm2.0-tools: rename -> tpm2-tools
Unify how the TPM2 recipes are named.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2018-05-30 09:38:05 +08:00