T1042 qemu boot issues

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

T1042 qemu boot issues

1,275 Views
mclifford
Contributor I

Hi

I am attempting to build and run a linux image for the T1042 on qemu using the QorIQ SDK v2.0-1703.

As with a number of other users, e.g. 

QEMU - Kernel panic - not syncing: Attempted to ki... - NXP Community

I am experiencing the following error during bootup:

 

init[1]: unhandled signal 4 at 00003fffa363df78 **bleep** 00003fffa363df78 lr 00003fffa363adf4 code 30001
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

 

I get the same error with both 32 and 64 bit builds for the T1042 and I get the same error using the prebuilt images available from the NXP website. This is based on a fresh installation of the SDK with no modifications.

My QEMU command line is:

 

qemu-system-ppc64 -nographic -m 1024 -M ppce500 -cpu e5500 -kernel uImage -initrd fsl-image-minimal-t1042d4rdb-64b.ext2.gz -append "root=/dev/ram rw console=ttyS0,115200" -serial tcp::4444,server

 

I have attempted the fix suggested in the thread linked above (enabling KVM virtualisation options in the target kernel) and this has made no change.

As a sanity check I can build and run images on qemu using a different processor type, the P2041, using the same SDK.

Are there any more ideas?

Thanks

Matt

0 Kudos
Reply
4 Replies

1,250 Views
mclifford
Contributor I

Hi, Thanks for the fast response.

To be clear about my language...

My development host is a CentOS Linux machine

My embedded target is QEMU running on my development host

I had already made the edits to the embedded target kernel that you suggest as i had seen the instructions from the previous post. however. the command line you suggest does not work for two reasons.

1: -enable-kvm does not work with the error

"kvm" accelerator not found.
No accelerator found!

2: you also need to specify the CPU type as i think QEMU defaults to the e500mc which is not compatible with the 64bit build i am using.

Using the command line:

qemu-system-ppc64 -nographic -m 1024 -M ppce500 -cpu e5500 -kernel uImage -initrd fsl-image-minimal-t1042d4rdb-64b.ext2.gz -append "root=/dev/ram rw console=ttyS0,115200" -serial tcp::4444,server

results in the error described.

VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 388K (c000000000ba0000 - c000000000c01000)
init[1]: unhandled signal 4 at 00003fffb359af78 **bleep** 00003fffb359af78 lr 00003fff b3597df4 code 30001
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004

CPU: 0 PID: 1 Comm: init Not tainted 4.1.35-rt41 #1
Call Trace:
[c0000000390538c0] [c0000000008611cc] .dump_stack+0xac/0xec (unreliable)
[c000000039053950] [c00000000085e74c] .panic+0xf0/0x280
[c0000000390539f0] [c0000000000564a8] .do_exit+0xa64/0xa68
[c000000039053ae0] [c000000000057548] .do_group_exit+0x54/0xec
[c000000039053b70] [c000000000063974] .get_signal+0x314/0x6c8
[c000000039053c70] [c000000000007c3c] .do_signal+0x44/0x218
[c000000039053db0] [c000000000007f1c] .do_notify_resume+0x64/0x78
[c000000039053e30] [c000000000000c4c] .ret_from_except_lite+0x78/0x7c

 

Have I misunderstood your instructions about KVM, do I need to enable this on the development host?

EDIT

I have double checked and KVM is enabled on the host:

lsmod | grep kvm
kvm_intel    188793     0
kvm             653928    1 kvm_intel
irqbypass    13503      1 kvm

/EDIT

 

Thanks

Matt

0 Kudos
Reply

1,240 Views
yipingwang
NXP TechSupport
NXP TechSupport

QorIQ SDK 2.0 only supports running KVM/QEMU on the target boards(PowerPC or ARM platforms), it doesn't support running QEMU on x86 host platforms.

0 Kudos
Reply

1,229 Views
mclifford
Contributor I

So how do you simulate your target system during development, and why do you build a host qemu application for the target as part of the Yocto toolchain?

Also, as I said, I can do this for the p2041 so it clearly is supported for some devices.

It clearly isn't a fundamental problem as the kernel initialises, the error appears to be in initrd, but I don't know enough about Linux to diagnose it.

Thanks

Matt

0 Kudos
Reply

1,256 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please enable KVM in Linux Kernel configuration file.

1. From the main menuconfig window enable virtualization:
[*] Virtualization
2. In the virtualization menu enable the following options:
For e500mc-based systems:
[*] KVM support for PowerPC E500MC/E5500/E6500 processors
For all systems:
[*] KVM in-kernel MPIC emulation
<*> Host kernel accelerator for virtio net (EXPERIMENTAL)

Please run the following command on the target board.

qemu-system-ppc64 -enable-kvm -m 512 -nographic -M ppce500 -kernel uImage -initrd rootfs.ext2.gz -append "root=/dev/ram rw console=ttyS0,115200" -serial tcp::4444,server,telnet 

0 Kudos
Reply