[OE-core] dracut is impossible to run in do_rootfs
Böszörményi Zoltán
zboszor at pr.hu
Fri Feb 15 12:33:26 UTC 2019
Hi again,
I am now replying to myself.
If anyone is interested, I have solved it in dracut so it can use a sysroot.
See: https://github.com/dracutdevs/dracut/pull/535
Then, the dracut recipe also needs changes so it can be built as native.
A recipe is needed for a cross-compiler ldd from this:
https://gist.github.com/jerome-pouiller/c403786c1394f53f44a3b61214489e6f
Then a dracut.bbclass to be used by a kernel recipe or anything else
that wants to be included in the initramfs, like extra dracut modules
or custom boot splash themes.
I have all of this working now in Yocto 2.5 via a bbappend for dracut
and the two extras.
Eventually, I would like to upstream these changes when my dracut PR
is merged, hopefully before 050 is released.
2018. 11. 14. 10:53 keltezéssel, Böszörményi Zoltán via Openembedded-core írta:
> Hi,
>
> I need to create the initramfs for the target build during
> do_rootfs using dracut to include systemd and plymouth into it and
> using the modules from the kernel version the image was built with.
> Currently I am on Yocto 2.5.
>
> There are several problem I am facing.
>
> First, the dracut recipe needs some fixes in the
> RDEPENDS/RRECOMMENDS clauses to only use subpackages of the
> recipes it depends on in class-target only. I could fix this
> with a bbappend file.
>
> Then, all the packages in the system that use the
> update-alternatives.bbclass have unusable symlinks during the
> do_rootfs stage.
>
> E.g. coreutils's binaries use this:
>
> zboszormenyi at buildbox-0001 rootfs]$ ls -l usr/bin/[
> lrwxrwxrwx 1 zboszormenyi zboszormenyi 27 nov 14 03.51 usr/bin/[ ->
> /usr/bin/lbracket.coreutils
>
> Of course, the target of the symlink does not exist on
> the build host. As a consequence, dracut will not find anything
> that it needs to copy to the initramfs.
>
> Is there a way to tell update-alternatives.bbclass (e.g. globally
> from my layer.conf) to just use the relative symlink it is given?
>
> Thanks in advance,
> Zoltán Böszörményi
More information about the Openembedded-core
mailing list