qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] Boot QEMU Arm from NAND Flash


From: Peter Maydell
Subject: Re: [Qemu-arm] Boot QEMU Arm from NAND Flash
Date: Mon, 18 Mar 2019 12:57:55 +0000

On Mon, 18 Mar 2019 at 12:10, Madhusudan A <address@hidden> wrote:
> I am relatively new to the embedded domain and ARM architecture
>
> I have devices that use a dual bank NAND flash. The flash has 18 partitions. 
> The project creates the kernel images (zImage and uImage), a u-boot.bin and 4 
> different filesystems that are loaded onto different partitions (MTD).
>
> I have tried a lot of things to try and use qemu to emulate this. The board 
> being used is very old (Marvell PXA166), so I am using machine type as 
> virtual.
>
> Somehow, even if I just specify the kernel image, QEMU just starts and shows 
> the QEMU prompt. It never attempts to load the kernel or anything.

The most important thing to understand about arm embedded
systems is that they are all very different at the hardware
level. They have RAM at different physical addresses, they
have different devices even for simple things like the serial
port, and so on. This is not like the x86 world, where every
x86 board is basically the same as a desktop PC.

The result of this diversity is that you cannot take a
kernel for board A and run it on board B, unless the
kernel was specifically compiled with support for both
boards A and B. This applies both for trying to run a
kernel on real hardware, and also for running a kernel
on emulated hardware such as that which QEMU provides.
If you try to boot a kernel which doesn't support the hardware
it's being run on, then the most usual outcome is that the
kernel crashes before even being able to print anything out
to the serial port -- so you just see a blank screen in QEMU.

So you need to make sure you pick a QEMU machine model
which matches what the kernel you're booting wants.
If QEMU does not have a model of the specific hardware
your kernel requires, then unfortunately you're out of
luck: your kernel will not boot on QEMU. You would need
to write an emulation of your hardware's board, SoC and
devices to get it to work -- this is a lot of effort.

In this particular case QEMU doesn't have a PXA166 CPU
emulation either -- we only have the later PXA2xx CPUs --
so you would also probably need to adjust the CPU emulation.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]