Skip to content

Instantly share code, notes, and snippets.

@mariotpc
Last active August 23, 2020 01:20
Show Gist options
  • Save mariotpc/504ac6620f1348556beb16e152e12dad to your computer and use it in GitHub Desktop.
Save mariotpc/504ac6620f1348556beb16e152e12dad to your computer and use it in GitHub Desktop.
Booting the Kernel 4.9.13-MarioTPC on QEmu
At this point I've the Kernel and the DTBS for ARM Boards and QEmu previously created
********************************************************************************************
qemu-system-arm -m 256M -nographic -M vexpress-a9 -kernel zImage -append "console=ttyAMA0,115200" -dtb ./dts/vexpress-v2p-ca9.dtb
Here we go !!!!
********************************
mariotpc@fedora31 boot]$ qemu-system-arm -m 256M -nographic -M vexpress-a9 -kernel zImage -append "console=ttyAMA0,115200" -dtb ./dts/vexpress-v2p-ca9.dtb
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.13-MarioTPC (mariotpc@fedora31) (gcc version 8.4.0 (crosstool-NG 1.24.0.105_5659366) ) #1 SMP Sat Aug 22 16:24:20 CST 2020
..
..
Ends with !!!
******************************
[ 1.933499] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.934372] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.13-MarioTPC #1
[ 1.935123] Hardware name: ARM-Versatile Express
[ 1.936770] [<c03103e4>] (unwind_backtrace) from [<c030ba24>] (show_stack+0x10/0x14)
[ 1.937124] [<c030ba24>] (show_stack) from [<c059e708>] (dump_stack+0x8c/0xa0)
[ 1.937452] [<c059e708>] (dump_stack) from [<c03d14c8>] (panic+0xdc/0x268)
[ 1.937858] [<c03d14c8>] (panic) from [<c1101234>] (mount_block_root+0x1c0/0x258)
[ 1.938285] [<c1101234>] (mount_block_root) from [<c11014b8>] (mount_root+0x100/0x108)
[ 1.938770] [<c11014b8>] (mount_root) from [<c110163c>] (prepare_namespace+0x17c/0x1c4)
[ 1.939259] [<c110163c>] (prepare_namespace) from [<c1100e2c>] (kernel_init_freeable+0x1d4/0x1e4)
[ 1.939835] [<c1100e2c>] (kernel_init_freeable) from [<c0bdf9f0>] (kernel_init+0x8/0x110)
[ 1.940661] [<c0bdf9f0>] (kernel_init) from [<c0307eb8>] (ret_from_fork+0x14/0x3c)
[ 1.941563] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
It show us that the Kernel it self is not so useful without a root filesystem user space!!!!
The kernel tries to run the init program, usualy located at:
/sbin/init
followed by:
/etc/init
/bin/init
and finally by:
/bin/sh
it stops at the first one, that kernel is able to find and executed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment