On 22 Jan 2024, at 18:17, greymattr via lists.yoctoproject.org 
<mfatheree=opto22....@lists.yoctoproject.org> wrote:
> 
> I am using the kirkstone yocto build to build a firmware image that has a 
> kernel with initramfs, and a ext4 root file system on an emmc partition.
> After booting up the kernel doesn't mount the device passed to the kernel as 
> the "root=" parameter and doesn't switch_root, it just mounts everything to 
> ram.
>  
> In my initramfs image recipe I have set:
>  PACKAGE_INSTALL = "util-linux udev busybox base-passwd 
> ${VIRTUAL-RUNTIME_base-utils} ${VIRTUAL-RUNTIME_dev_manager} 
> ${ROOTFS_BOOTSTRAP_INSTALL}"
> 
> and I was under the impression that the ${ROOTFS_BOOTSTRAP_INSTALL} should 
> handle the switch_root portion of the boot after the initramfs loads, but 
> that is not happening.
> Is there a different package I need to add to the PACKAGE_INSTALL to allow 
> the real root partition to be mounted, and switch_root to occur?

$ bitbake-getvar -r core-image-minimal  —value ROOTFS_BOOTSTRAP_INSTALL
ROOTFS_BOOTSTRAP_INSTALL="run-postinsts”

ROOTFS_BOOTSTRAP_INSTALL is the list of recipes that also need to be installed 
to handle rootfs stuff, so typically it’s either empty or includes 
run-postinsts to run any postinstall scripts that couldn’t be ran on the build 
host.

The initramfs-framework recipes have various pieces of the typical initramfs 
setup in (scan for devices, mount, pivot, etc) and these are used in 
core-image-minimal-initramfs.  I actually recently added to master a slimmer 
image which _just_ finds and pivots:

https://git.yoctoproject.org/poky/tree/meta/recipes-core/images/core-image-initramfs-boot.bb

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#62242): https://lists.yoctoproject.org/g/yocto/message/62242
Mute This Topic: https://lists.yoctoproject.org/mt/103892290/21656
Mute #kernel:https://lists.yoctoproject.org/g/yocto/mutehashtag/kernel
Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: 
https://lists.yoctoproject.org/g/yocto/leave/6691583/21656/737036229/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to