43 Commits

Author SHA1 Message Date
Peter Hatina 6838a54f13 Sign initramfs image
Signed-off-by: Peter Hatina <peter@hatina.eu>
2022-12-06 09:16:31 +08:00
Yi Zhao d0a0285971 kernel-initramfs: fix typo for ALTERNATIVE
ALTERNATIVES_${PN} -> ALTERNATIVE:${PN}

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2022-07-02 17:45:13 +08:00
richard 4f0cadf438 added newline 2021-11-19 21:25:00 +08:00
richard ca4ead2536 changed init file from the secure-core-image-initramfs to not load an unencrypted rootfs when using full disk encryption. 2021-11-19 21:25:00 +08:00
Yi Zhao 0e475df858 secure-core-image: pass encrypted password rather than plaintext password to usermod
In oe-core commit 759df7395908f18b3b68f28d043ac9ebd42dd0c8, the
plaintext password setting function was dropped because of the security
issue. So the plaintext password setting method "usermod -P 'password'
user" is not available. Now we should pass the encrypted password to
usermod via -p option.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-08-09 18:51:13 +08:00
Yi Zhao 4042043742 meta-secure-core: Convert to new override syntax
Converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2021-08-09 18:51:13 +08:00
Jason Wessel 363c7a606a secure-core-image: Remove packagegroup-core-lsb
oe-core commit fb064356af615d67d85b65942103bf943d84d290 removed the
packagegroup-core-lsb, so it must be removed from any other image
recipes which refernce the packagegroup-core-lsb.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2019-11-08 13:27:23 +08:00
Jiang Lu 56dbf2a67a secure-core:allow other layer overwrite INITRAMFS_IMAGE
Allow other layer overwrite $INITRAMFS_IMAGE.

Signed-off-by: Jiang Lu <lu.jiang@windriver.com>
Signed-off-by: Liwei Song <liwei.song@windriver.com>
2019-09-12 05:17:43 -04:00
Hongxu Jia 8fc7d850d7 kernel-initramfs: depends on do_image_complete rather than do_rootfs
...
|install: cannot stat 'tmp-glibc/deploy/images/intel-x86-64/secure-core-image-init
ramfs-intel-x86-64.cpio.gz': No such file or directory
...

Depends do_image_complete after required image generated

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2019-05-24 09:18:59 +08:00
Yi Zhao deed416dd8 kernel-initramfs: fix inconsistent indentation
Use spaces consistently to indent do_install()

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
2018-11-30 13:46:35 +08:00
Yunguo Wei bd155539ec initrdscripts-secure-core: remove /sys and /proc from package
The following failure is shown during secure-core-image-initramfs:do_rootfs():

Error: Transaction check error:
  file /proc conflicts between attempted installs of initrdscripts-secure-core-1.0-r0.corei7_64 and base-files-3.0.14-r89.intel_x86_64
  file /sys conflicts between attempted installs of initrdscripts-secure-core-1.0-r0.corei7_64 and base-files-3.0.14-r89.intel_x86_64

So remove /sys and /proc as base-files has already provided them.

Signed-off-by: Yunguo Wei <yunguo.wei@windriver.com>
2018-10-25 14:47:48 +08:00
Jia Zhang 3936cdfa7f Set the default password for secure-core-image
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2018-09-26 04:28:01 -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
Tom Rini 4d27285e28 kernel-initramfs: Rework to use update-alternatives directly
- All valid initramfs types will be listed in INITRAMFS_FSTYPES so use
  that variable rather than open-coding a list of possibilities.
- Since we're using the list of things that must exist now we don't need
  to test if the files exist anymore.  And when signing, we can sign all
  of them now.
- Add some python to do_package to update all of the ALTERNATIVES
  variables dynamically based on how we're configured.  This introduces
  an alternative for the initramfs portion as well so there is a stable
  name.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-06 18:59:55 +08:00
Tom Rini 15a25c9a4a initrdscripts-secure-core: Provide all directories init requires
Our "init" script requires additional directories to exist and since we
don't pull in something like base-files that gives us a full layout we
must make these additional directories on our own.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-27 10:37:13 +08:00
Jackie Huang af05e4860f kernel-initramfs: use oe.utils.read_file
base_read_file has been removed from oe-core so use the
replacement function oe.utils.read_file.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
2018-02-07 14:56:59 +08:00
Wenzong Fan 6dff36ef09 Install packages if distro flag set (#21)
* install 'packagegroup-tpm2-initramfs' of distro flag 'tpm2' is set
* install 'initrdscripts-ima' if distro flag 'ima' is set
* install 'cryptfs-tpm2-initramfs' if distro flag 'luks' is set

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
2017-09-25 03:25:27 -04:00
fli 8206812e75 kernel-initramfs: fix the issue rm kernel source codes (#18)
The "${S}" is not used for kernel-initramfs and it will
cleanup the kernel source codes if it is specified to
${STAGING_KERNEL_DIR}, thus remove this definition.

Signed-off-by: Fupan Li <fupan.li@windriver.com>
2017-09-25 03:24:03 -04:00
Jia Zhang b69537380c meta-secure-core: clean up ${COREBASE}/LICENSE and ${COREBASE}/meta/COPYING.MIT
${COREBASE}/LICENSE is not a valid license file. So it is recommended
to use '${COMMON_LICENSE_DIR}/MIT' for a MIT License file in
LIC_FILES_CHKSUM. This will become an error in the future.

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-09-02 11:11:44 +08:00
Jia Zhang aa14422754 meta-ids: install packagegroup-ids if the feature ids configured
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-24 21:01:32 +08:00
Jia Zhang c1cdc3d466 secure-core-image: install dnf by default
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-23 17:37:33 +08:00
Jia Zhang 1106a2c325 secure-core-image-initramfs: enlarge the max size
Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-23 11:43:18 +08:00
Jia Zhang b1e14f4e88 encrypted-storage: use luks as the feature name for current implementation
encrypted-storage layer will include more security features about encrypted
storage so the term "encrypted-storage" won't be used to specify a dedicated
technology term such as "LUKS".

Signed-off-by: Jia Zhang <lans.zhang2008@gmail.com>
2017-08-20 15:31:11 +08:00
Lans Zhang 0951a620b5 init: don't explicitly set the LUKS partition name
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-09 10:54:48 +08:00
Lans Zhang 59c66fed7a kernel-initramfs: set the default priority to -1
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-08-03 14:38:11 +08:00
Lans Zhang c82c3c56e8 initrdscripts-secure-core: install udevd and udevadm provided by either eudev or udev
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-26 22:51:08 +08:00
Lans Zhang 4eaaa557ff initrdscripts-secure-core: don't install sysvinit
/sbin/init should be covered by rootfs not here.

Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-26 22:40:48 +08:00
Lans Zhang 6f7bf76d94 meta-secure-core: define new image type secure-core-minimal-image
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-20 10:30:41 +08:00
Lans Zhang 7bd761d8bb secure-core-image: install lsb packagegroup
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-11 13:01:04 +08:00
Lans Zhang b9f73cac16 initrdscripts-secure-core: add RRECOMMENDS
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-11 12:50:32 +08:00
Lans Zhang 6882f39224 init: don't need to create /proc /sys and /run
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-05 10:53:18 +08:00
Lans Zhang 6ace7c99ba init: clean up
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-04 17:22:12 +08:00
Lans Zhang 55492bcc10 initrdscripts-secure-core: clean up RDEPENDS
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-04 17:17:56 +08:00
Lans Zhang 71da40089f initrdscripts-secure-core: renamed from initramfs-secure-core
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-04 17:15:30 +08:00
Lans Zhang d9b358b374 initramfs-secure-core: clean up /init script
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-04 12:04:41 +08:00
Lans Zhang 3816bb03fd init: clean up code style
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-03 15:48:25 +08:00
Lans Zhang a93993cdc9 initramfs-secure-core: fix missing the license file
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-03 10:07:38 +08:00
Lans Zhang c3f89c1931 initramfs-secure-core: define the /init script for the initramfs image
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-03 09:22:42 +08:00
Lans Zhang 5135786fa3 kernel-initramfs: define this package to include the initramfs image for kernel boot
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-03 09:21:44 +08:00
Lans Zhang 0551bc8d84 secure-core-image-initramfs: define the initramfs image type
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-03 09:18:51 +08:00
Lans Zhang 8c7accebab secure-core-image: clean up the code style
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-07-03 09:16:40 +08:00
Lans Zhang 9fd5778732 secure-core-image: install ima-related packages if ima feature configured
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-06-26 12:50:52 +08:00
Lans Zhang 1b3e594449 meta-secure-core: initial commit
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
2017-06-22 15:24:04 +08:00