| Summary: | Suggested rewriting of the (currently semi-nonsensical) INITRAMFS_IMAGE glossary entry | ||
|---|---|---|---|
| Product: | [Documentation] Reference | Reporter: | ulfalizer |
| Component: | handbook | Assignee: | Scott Rifenbark <srifenbark> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bluelightning, poky.doc.watcher, poky.watcher, richard.purdie, srifenbark |
| Version: | 2.2 | ||
| Target Milestone: | 2.2 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | 01 August 2016: RESOLVED | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Done (doc changes complete) | |
Updated version (INITRAMFS_FSTYPES update stays the same):
INITRAMFS_IMAGE:
Specifies the ([PROVIDES]) name of an image recipe that is used to build an
initial RAM disk (initramfs) image. An initramfs provides a temporary root
filesystem used for early system initialization, e.g. loading of modules
needed to locate and mount the "real" root filesystem. The specified recipe
is added as a dependency of the root filesystem recipe (e.g.
core-image-sato).
See core-image-sato-initramfs.bb for an example initramfs image recipe. Note
that the initramfs image recipe should set [IMAGE_FSTYPES] to
[INITRAMFS_FSTYPES].
More information can be found in [local.conf.sample.extended]. You can also
reference [image.bbclass] and [kernel.bbclass] to see how the variable is
used.
If INITRAMFS_IMAGE is empty (the default), then no initramfs is built.
See also [INITRAMFS_IMAGE_BUNDLE], which allows the generated image to be
bundled inside the kernel image.
Hi Ulf, See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-INITRAMFS_IMAGE for the INITRAMFS_IMAGE change. For INITRAMF_FSTYPES, see http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-INITRAMFS_FSTYPES. One question I have for that change is the reference to the "initrd mechanism". I would like to spell that out and also "linkify" it. You referenced it as something earlier, which we don't want to do. It would be best to actually provide a link if a target exists. thanks, Scott (In reply to comment #2) > Hi Ulf, > > See > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > INITRAMFS_IMAGE for the INITRAMFS_IMAGE change. "See the core-image-sato-initramfs.bb recipe, which is created, for an example recipe" sounds weird. No recipes are created by INITRAMFS_IMAGE. I think this would better: See core-image-sato-initramfs.bb for an example initramfs recipe. To select this recipe to provide the initramfs, you would set INITRAMFS_IMAGE to "core-image-sato-initramfs". > For INITRAMF_FSTYPES, see > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > INITRAMFS_FSTYPES. One question I have for that change is the reference to > the "initrd mechanism". I would like to spell that out and also "linkify" > it. You referenced it as something earlier, which we don't want to do. It > would be best to actually provide a link if a target exists. Not sure if there's a good place in the manual to link for for initrd. initrd and initramfs are two different mechanisms in the kernel to provide an early root filesystem during boot. If wiki links are okay, then https://en.wikipedia.org/wiki/Initrd would be a good one. Confusingly, "initrd" is sometimes used to refer to any kind of early root filesystem. This is probably a leftover from when initrd was the only mechanism there was, before initramfs. Cheers, Ulf (In reply to comment #3) > (In reply to comment #2) > > Hi Ulf, > > > > See > > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > > INITRAMFS_IMAGE for the INITRAMFS_IMAGE change. > > "See the core-image-sato-initramfs.bb recipe, which is created, for an > example recipe" sounds weird. No recipes are created by INITRAMFS_IMAGE. I > think this would better: > > See core-image-sato-initramfs.bb for an example initramfs recipe. To > select this recipe to provide the initramfs, you would set > INITRAMFS_IMAGE to "core-image-sato-initramfs". Ulf - I took a guess that maybe the recipe was created. I dug all through the poky repository and could not find an existing "core-image-sato-initramfs.bb" file anywhere. Do you know where it is? If you do, I can be more specific on where the user can find it. http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-INITRAMFS_IMAGE > > > For INITRAMF_FSTYPES, see > > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > > INITRAMFS_FSTYPES. One question I have for that change is the reference to > > the "initrd mechanism". I would like to spell that out and also "linkify" > > it. You referenced it as something earlier, which we don't want to do. It > > would be best to actually provide a link if a target exists. > > Not sure if there's a good place in the manual to link for for initrd. > initrd and initramfs are two different mechanisms in the kernel to provide > an early root filesystem during boot. If wiki links are okay, then > https://en.wikipedia.org/wiki/Initrd would be a good one. Ulf - thanks. I updated that last paragraph to include the full spelling since it is an initial use and to include that link into the wiki. See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-INITRAMFS_FSTYPES > > Confusingly, "initrd" is sometimes used to refer to any kind of early root > filesystem. This is probably a leftover from when initrd was the only > mechanism there was, before initramfs. > > Cheers, > Ulf (In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > Hi Ulf, > > > > > > See > > > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > > > INITRAMFS_IMAGE for the INITRAMFS_IMAGE change. > > > > "See the core-image-sato-initramfs.bb recipe, which is created, for an > > example recipe" sounds weird. No recipes are created by INITRAMFS_IMAGE. I > > think this would better: > > > > See core-image-sato-initramfs.bb for an example initramfs recipe. To > > select this recipe to provide the initramfs, you would set > > INITRAMFS_IMAGE to "core-image-sato-initramfs". > > Ulf - I took a guess that maybe the recipe was created. I dug all through > the poky repository and could not find an existing > "core-image-sato-initramfs.bb" file anywhere. Do you know where it is? If > you do, I can be more specific on where the user can find it. > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > INITRAMFS_IMAGE > Ops... it's supposed to be core-image-minimal-initramfs(.bb). The fact that the old version mentions both core-image-sato-initramfs and core-image-minimal-initramfs confused me. Sorry about that. > > > > > For INITRAMF_FSTYPES, see > > > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > > > INITRAMFS_FSTYPES. One question I have for that change is the reference to > > > the "initrd mechanism". I would like to spell that out and also "linkify" > > > it. You referenced it as something earlier, which we don't want to do. It > > > would be best to actually provide a link if a target exists. > > > > Not sure if there's a good place in the manual to link for for initrd. > > initrd and initramfs are two different mechanisms in the kernel to provide > > an early root filesystem during boot. If wiki links are okay, then > > https://en.wikipedia.org/wiki/Initrd would be a good one. > > Ulf - thanks. I updated that last paragraph to include the full spelling > since it is an initial use and to include that link into the wiki. See > http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var- > INITRAMFS_FSTYPES Looks good to me! Thanks, Ulf Thanks Ulf, See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-INITRAMFS_IMAGE. So the core-image-minimal-initramfs.bb recipe is just the example. The rest of the paragraph does apply to the core-image-sato-initramfs.bb recipe correct? Scott One typo left: To select this recipe to provide the initramfs, set INITRAMFS_IMAGE to "core-image-sato-initramfs". should be To select this recipe to provide the initramfs, set INITRAMFS_IMAGE to "core-image-minimal-initramfs". Looks fine otherwise. Ulf, Got it. See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-INITRAMFS_IMAGE for the change. Thanks, Scott Looks good to me now. Thanks, Ulf Thanks Ulf, Resetting to RESOLVED and placing the doc flag into "done." Scott |
Hello, The current glossary entry for INITRAMFS_IMAGE is difficult to understand. The following part doesn't even make any sense: The following example, which is set in the local.conf configuration file, causes a separate recipe to be created that results in an initramfs image named core-image-sato-initramfs.bb to be created: INITRAMFS_IMAGE = "core-image-minimal-initramfs" No recipe is created (but an image), and the image that's created is not called core-image-sato-initramfs.bb (that's a recipe name). Since it's in pretty bad shape at the moment, I suggest rewriting the entire thing as follows: INITRAMFS_IMAGE: Specifies the ([PROVIDES]) name of an image recipe that is used to build an initial RAM disk (initramfs) image. An initramfs provides a temporary root filesystem used for early system initialization (e.g. loading of modules needed to locate and mount the "real" root filesystem). The recipe is added as a dependency of the root filesystem recipe (e.g. core-image-sato). See core-image-sato-initramfs.bb for an example initramfs image recipe. Note that the initramfs image recipe should set [IMAGE_FSTYPES] to [INITRAMFS_FSTYPES]. More information can be found in local.conf.sample.extended. You can also reference [image.bbclass] and [kernel.bbclass] to see how the variable is used. If INITRAMFS_IMAGE is empty (the default), then no initramfs is built. The following could be added to the end of the entry for INITRAMFS_FSTYPES as well: The default value of this variable, set in bitbake.conf, is "cpio.gz". The Linux kernel's initramfs mechanism (as opposed to the earlier initrd mechanism) expects an (optionally compressed) cpio archive. On thing that's still confusing is how you're supposed to deal with INITRAMFS_IMAGE when building multiple images. Maybe each image recipe is meant to set INITRAMFS_IMAGE separately in that case. Maybe someone could clarify that separately though. Cheers, Ulf