| Summary: | initrdscripts ignores virtual runtime "base-utils", hard dependency on busybox | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | jbk <jbk> |
| Component: | core | Assignee: | Christos Gavros <gavrosc> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | gavrosc, kexin.hao, meta.mr.watcher, meta.watcher, randy.macleod, yoann.congal |
| Version: | 5.99 | ||
| Target Milestone: | 5.2 M3 | ||
| Hardware: | Other | ||
| OS: | x86_64 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
jbk
2025-01-14 10:13:24 UTC
Kevin may have an idea about how to handle this bug but I'm just CCing him for now. Other people are welcome to submit a patch if they have one. hi jbk, thank you for the description. It is very detailed. I tried to reproduce the issue. I set the following variables in local.conf: PREFERRED_PROVIDER_virtual/base-utils = "packagegroup-core-base-utils" VIRTUAL-RUNTIME_base-utils ?= "packagegroup-core-base-utils" INITRAMFS_IMAGE = "core-image-minimal-initramfs" INITRAMFS_MAXSIZE = "160000" execute: bitbake core-image-minimal Then i tried to use qemu( runqemu qemux86_64 ) but i couldnt reproduce it. - Are the above settings ok? if yes then probably qemu can not reproduce this behavior - Did you use another hardware? Br Christos JBK - ping. hi i reproduced it using qemu. add lines in local.conf: PREFERRED_PROVIDER_virtual/base-utils = "packagegroup-core-base-utils" VIRTUAL-RUNTIME_base-utils ?= "packagegroup-core-base-utils" INITRAMFS_IMAGE = "core-image-minimal-initramfs" INITRAMFS_MAXSIZE = "160000" INITRAMFS_IMAGE_BUNDLE = "1" IMAGE_FSTYPES += "cpio.gz" Run: bitbake core-image-minimal-initramfs Run: qemu-system-x86_64 -kernel tmp/deploy/images/qemux86-64/bzImage \ -initrd tmp/deploy/images/qemux86-64/core-image-minimal-initramfs-qemux86-64.cpio.gz \ -nographic -append "console=ttyS0 rdinit=/bin/sh" The result is kernel panic. If i set busybox as provider (PREFERRED_PROVIDER_virtual/base-utils and VIRTUAL-RUNTIME_base-utils) then boot is ok. I will prepare a patch the upcoming week. Randy and Richard thank you for the support yesterday :). Br Christos hi i think the right way to reproduce it is the following (and not in the previous comment i made): add in local.conf: PREFERRED_PROVIDER_virtual/base-utils = "packagegroup-core-base-utils" VIRTUAL-RUNTIME_base-utils ?= "packagegroup-core-base-utils" INITRAMFS_IMAGE = "core-image-minimal-initramfs" INITRAMFS_MAXSIZE = "160000" Run: bitbake core-image-minimal Run qemu manually including initramfs: sudo qemu-system-x86_64 \ -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 \ -netdev tap,id=net0,ifname=tap0,script=no,downscript=no \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ -drive file=/home/cg/poky/build/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs.ext4,if=virtio,format=raw \ -usb \ -device usb-tablet \ -usb \ -device usb-kbd \ -cpu IvyBridge \ -machine q35 \ -smp 4 \ -m 256 \ -serial mon:vc \ -serial null \ -device virtio-vga \ -display sdl,show-cursor=on \ -kernel /home/cg/poky/build/tmp/deploy/images/qemux86-64/bzImage \ -initrd /home/cg/poky/build/tmp/deploy/images/qemux86-64/core-image-minimal-initramfs-qemux86-64.cpio.gz \ -append 'root=/dev/vda rw ip=192.168.7.2::192.168.7.1:255.255.255.0::eth0:off:8.8.8.8 net.ifnames=0 oprofile.timer=1 tsc=reliable no_timer_check rcupdate.rcu_expedited=1 swiotlb=0' The result is that boot stops with message: "Switch_root: invalid option — ‘c’ Try ‘switch_root –help’ for more information" If i set busybox as provider (PREFERRED_PROVIDER_virtual/base-utils and VIRTUAL-RUNTIME_base-utils) then boot is ok. The patch is merged in the master: https://git.openembedded.org/openembedded-core/commit/?id=0f745024fd40518f98390008b4f613d5641df416 |