ni / meta-security

MIT License
2 stars 13 forks source link

Circular dependency issue when using dm-verity #6

Closed arun-cheriyan closed 1 year ago

arun-cheriyan commented 1 year ago

Hi,

I was trying to build a linux image with dm-verity feature. but adding dm-verity related changes to my recipes causes a circular dependency error during build.

my local.conf changes:

INITRAMFS_IMAGE_BUNDLE = "1" INITRAMFS_IMAGE = "dm-verity-image-initramfs"

DM_VERITY_IMAGE = "custom-image-sama7" DM_VERITY_IMAGE_TYPE = "squashfs" IMAGE_CLASSES += "dm-verity-img"

I have to comment out the line:

do_rootfs[depends] += "${DM_VERITY_IMAGE}:doimage${DM_VERITY_IMAGE_TYPE}"

in the dm-verity-image-initramfs.bb file to avoid this circular dependency. But then the initramfs and fit images are not updated with the new rootfs ROOT_HASH. so the image wont boot.

I'm using dunfell branch. Is there any workaround to make the image build with dm-verity?

amstewart commented 1 year ago

Hello.

Are you trying to build a dm-verity initramfs in the context of an NI LinuxRT distribution, or within your own OpenEmbedded distro configuration?

arun-cheriyan commented 1 year ago

Hi,

I'm building for microchip SAMA7 platform. But I'm guessing this will be an issue for all platforms? I'm kind of new to yocto and any pointers will be helpful.

amstewart commented 1 year ago

Ah; OK. This repo is the NI fork of the upstream canonical meta-security on the yocto project's git server. We use this layer for our NI LinuxRT distribution. But we don't use the dm-verity components; so we won't be much help.

You should post to the yocto mailing list [yocto@lists.yoctoproject.org](mailto:yocto@lists.yoctoproject.org) and follow the subject line instructions in the meta-security README. You'll get a more general audience there.

I'll go ahead and close this issue. Let me know if you disagree.