[Top][All Lists]

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

Re: [Qemu-discuss] Coldfire 5282 Support

From: Thomas Huth
Subject: Re: [Qemu-discuss] Coldfire 5282 Support
Date: Wed, 13 Sep 2017 10:34:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 12.09.2017 21:05, William Mahoney wrote:
> OK a bit of an update and another question or two. First, you’re right, “it 
> just plain works”. What I’d like to verify today is that I am “doing the 
> right thing” is all. 
> 1) I made a copy of qemu/hw/m68k/mcf5208.c as mcf5282.c and I - for now - 
> changed all 5208 to 5282 inside the source. Threw in some fprintfs while I 
> was at it.
> 2) Added mcf5282.o to the Makefile.objs that is in that directory.

That sounds right.

> 3) Went into emu/target/m68k/cpu.c and duplicated (with a name change) the 
> init function for the 5208, then added the 5282 (currently named 
> “m5282-bill”) to the list of m68k_cpus. Took a bit of grepping. 

I think that's likely the right thing to do ... but I currently wonder
whether we really want to have a duplicate entry for each of the MCF
variants, or rather a generic ColdFire V2 core instead (we already have
a generic "cfv4e" for V4, for example). So the "cfv2" core could be
shared between the mcf5208evb and the mcf5282evb machine ...?

> Now I can do 'qemu-system-m68k -cpu m5282-bill -bios /tmp/mybios’ and it 
> stops (gdb) at the init function in my 5282 with everything set and ready to 
> rock and roll.

You likely still ended up with the m5208 machine here. You've got to
select the right machine with "-M mcf5282evb", too. Please also make
sure to remove the "mc->is_default = 1" line from your new machine
(since we likely do not want to change the default machine).

> So after all this description, just a simple question. Is this “how you are 
> supposed to do it”, in general? There’s no master list of dependencies I 
> needed to update, or a Makefile I need to change, or… ? As long as I do 
> another configure to let it know the dependencies, that’s pretty much it, 
> right? Just wanting to do it the correct way for future use.

Right, adding your new board to hw/m68k/Makefile.objs should be
sufficient here.


reply via email to

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