Hi,

I'm trying to use qemu to boot generic linux image.

I'm trying to add some custom drivers into kernel and confirm it on qemu.

I clone the poky repository, build and boot as below steps:
----------------------------------------------------------------------------
1. clone poky (poky only)
    $ git clone git://git.yoctoproject.org/poky
2. initialize build folder by oe-init-build-env
    $ source poky/oe-init-build-env ./build
3. extract linux repository (but do no modifications)
    $ devtool modify virtual/kernel
4. build with default configurations
    $ bitbake core-image-minimal
5. boot on qemux86-64
    $ runqemu nographic
----------------------------------------------------------------------------
I can boot linux without any panic at this time (first build time
after extracting linux's repository)


However, when I try to re-build and boot after as below steps, kernel
panic occurs:
----------------------------------------------------------------------------
6. re-build with clean
    $ bitbake virtual/kernel -c clean && bitbake core-image-minimal -c
clean && bitbake core-image-minimal
    (I also tried replacing "-c clean" with "-c cleanall", adding "rm
-rf tmp/ cache/ sstate/", but got same panic error)
7. boot on qemux86-64
    $ runqemu nographic
    (also tried "runqemu qemux86-64 nographic")
----------------------------------------------------------------------------
I got below panic on boot time, and it occurs 100%:
============= panic log ===============
[    2.177811] rtc_cmos 00:00: setting system clock to
2020-04-03T22:35:00 UTC (1585953300)
[    2.186697] md: Waiting for all devices to be available before autodetect
[    2.186838] md: If you don't use raid, use raid=noautodetect
[    2.189483] md: Autodetecting RAID arrays.
[    2.189595] md: autorun ...
[    2.189665] md: ... autorun DONE.
[    2.190837] VFS: Cannot open root device "vda" or
unknown-block(0,0): error -6
[    2.190993] Please append a correct "root=" boot option; here are
the available partitions:
[    2.191290] 0b00         1048575 sr0
[    2.191310]  driver: sr
[    2.191485] VFS: Unable to mount root fs on unknown-block(0,0)
[    2.191606] User configuration error - no valid root filesystem found
[    2.191797] Kernel panic - not syncing: Invalid configuration from
end user prevents continuing
[    2.192134] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.2.32 #1
[    2.192279] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
[    2.192613] Call Trace:
[    2.193218]  dump_stack+0x6d/0x9a
[    2.193337]  panic+0x101/0x2d7
[    2.193445]  mount_block_root+0x2cf/0x2f2
[    2.193538]  mount_root+0x7d/0x80
[    2.193612]  prepare_namespace+0x13f/0x177
[    2.193701]  kernel_init_freeable+0x236/0x25a
[    2.193798]  ? rest_init+0xb0/0xb0
[    2.193872]  kernel_init+0xe/0x100
[    2.193946]  ret_from_fork+0x35/0x40
[    2.194488] Kernel Offset: 0x2e00000 from 0xffffffff81000000
(relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    2.194918] ---[ end Kernel panic - not syncing: Invalid
configuration from end user prevents continuing ]---
======================================

P.S. Kernel panic didn't happen if I didn't extract linux repository
with "devtool modify".


I've tried to search answers on yocto-mailing-list, stackoverflow, nxp
community and other websites, but can not find solution for this
problem.

Could anyone please help to fix this problem?

It's been bothering me for a long time.
I'm very apprecaite whoever offers any advice.

Thank you very much.

Best regards,
Qian
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#49048): https://lists.yoctoproject.org/g/yocto/message/49048
Mute This Topic: https://lists.yoctoproject.org/mt/72761343/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to