* QEMU build dependencies for new board
@ 2020-11-23 17:29 Ancuta, Cristian
2020-11-23 18:49 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Ancuta, Cristian @ 2020-11-23 17:29 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]
Hi all,
I've implemented a new CPU target in ./target/arch_name and I'm also trying to add a new board to emulate that target on in system mode in ./hw/arch_name. The board is based on the versatilepb, but I'll gradually be removing all the arm implementation from it, aiming for a minimal implementation with just my custom cpu architecture, system bus, main memory and an UART.
I've also added all the necessary stuff required by minikconf.py in ./default-configs/<target>-softmmu.mak, ./hw/<arch>/Kconfig and a source entry in ./hw/Kconfig.
Here's what the ./hw/<arch>/Kconfig file looks like
config NEW_BOARD
bool
select PL011 # UART
select PL080 # DMA controller
The problem is that the build system is bringing in other files that I didn't specify (CONFIG_A15MPCORE, CONFIG_A15MPCORE, CONFIG_9MPCORE, etc. ), and I'm not sure how they're ending up in ./build/<target>-softmmu/config_device.mak:
CONFIG_A15MPCORE=y
CONFIG_A9MPCORE=y
CONFIG_A9SCU=y
CONFIG_A9_GTIMER=y
CONFIG_ARM11MPCORE=y
CONFIG_ARM11SCU=y
CONFIG_ARM_GIC=y
CONFIG_ARM_MPTIMER=y
CONFIG_ARM_TIMER=y
CONFIG_BITBANG_I2C=y
CONFIG_DS1338=y
CONFIG_FRAMEBUFFER=y
CONFIG_I2C=y
CONFIG_LAN9118=y
CONFIG_LSI_SCSI_PCI=y
CONFIG_MSI_NONBROKEN=y
CONFIG_<NEW_BOARD>=y
CONFIG_PCI=y
CONFIG_PL011=y
CONFIG_PL031=y
CONFIG_PL041=y
CONFIG_PL050=y
CONFIG_PL061=y
CONFIG_PL080=y
CONFIG_PL110=y
CONFIG_PL181=y
CONFIG_PL310=y
CONFIG_PS2=y
CONFIG_PTIMER=y
CONFIG_SCSI=y
CONFIG_SD=y
And because a15mpcore.c is trying to include "kvm_arm.h" from /target/arm which I don't include in my build, it obviously doesn't compile.
Any help would be appreciated
Thanks,
Cristian
[-- Attachment #2: Type: text/html, Size: 7766 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: QEMU build dependencies for new board
2020-11-23 17:29 QEMU build dependencies for new board Ancuta, Cristian
@ 2020-11-23 18:49 ` Peter Maydell
2020-11-24 15:47 ` Ancuta, Cristian
0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2020-11-23 18:49 UTC (permalink / raw)
To: Ancuta, Cristian; +Cc: qemu-devel
On Mon, 23 Nov 2020 at 17:31, Ancuta, Cristian
<cristian.ancuta@intel.com> wrote:
> I’ve implemented a new CPU target in ./target/arch_name and I’m also trying to add a new board to emulate that target on in system mode in ./hw/arch_name. The board is based on the versatilepb, but I’ll gradually be removing all the arm implementation from it, aiming for a minimal implementation with just my custom cpu architecture, system bus, main memory and an UART.
Incidentally, versatilepb is a really bad board to start with
as a template, because it's one of the oldest we have, and it
does a lot of things in ways that work but which aren't how
we'd recommend writing a new board model today. You might be
better off looking at something added more recently.
> I’ve also added all the necessary stuff required by minikconf.py in
> ./default-configs/<target>-softmmu.mak,
This suggests you're not basing this on current head-of-git,
because this is default-configs/targets/<target>-softmmu.mak
and default-configs/devices/<target>-softmmu.mak now.
> ./hw/<arch>/Kconfig and a source entry in ./hw/Kconfig.
> The problem is that the build system is bringing in other files
> that I didn’t specify (CONFIG_A15MPCORE, CONFIG_A15MPCORE,
> CONFIG_9MPCORE, etc. ), and I’m not sure how they’re ending
> up in ./build/<target>-softmmu/config_device.mak:
This shouldn't happen, but it's not really possible to identify
the exact problem since you don't provide your code. I would
try first doing a complete build from scratch (ie delete
the build directory) in case the problem is that there are
stale files in the build tree that are getting picked up.
Otherwise re-double-check your default-config files to make
sure they really don't have any CONFIG_whatever or "SELECT whatever"
in that they shouldn't. (Looking at the list of devices, an
accidental "select REALVIEW" would have that effect.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: QEMU build dependencies for new board
2020-11-23 18:49 ` Peter Maydell
@ 2020-11-24 15:47 ` Ancuta, Cristian
2020-11-24 15:51 ` Peter Maydell
0 siblings, 1 reply; 4+ messages in thread
From: Ancuta, Cristian @ 2020-11-24 15:47 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
Hi Peter,
Thanks for your input.
I was indeed quite a few commits behind master, I'll give it a try now with the latest.
Since I see the RISCV stuff is quite new, would the associated boards be a good starting point?
Best regards,
Cristian
-----Original Message-----
From: Peter Maydell <peter.maydell@linaro.org>
Sent: Monday, November 23, 2020 8:50 PM
To: Ancuta, Cristian <cristian.ancuta@intel.com>
Cc: qemu-devel@nongnu.org
Subject: Re: QEMU build dependencies for new board
On Mon, 23 Nov 2020 at 17:31, Ancuta, Cristian <cristian.ancuta@intel.com> wrote:
> I’ve implemented a new CPU target in ./target/arch_name and I’m also trying to add a new board to emulate that target on in system mode in ./hw/arch_name. The board is based on the versatilepb, but I’ll gradually be removing all the arm implementation from it, aiming for a minimal implementation with just my custom cpu architecture, system bus, main memory and an UART.
Incidentally, versatilepb is a really bad board to start with as a template, because it's one of the oldest we have, and it does a lot of things in ways that work but which aren't how we'd recommend writing a new board model today. You might be better off looking at something added more recently.
> I’ve also added all the necessary stuff required by minikconf.py in
> ./default-configs/<target>-softmmu.mak,
This suggests you're not basing this on current head-of-git, because this is default-configs/targets/<target>-softmmu.mak
and default-configs/devices/<target>-softmmu.mak now.
> ./hw/<arch>/Kconfig and a source entry in ./hw/Kconfig.
> The problem is that the build system is bringing in other files that I
> didn’t specify (CONFIG_A15MPCORE, CONFIG_A15MPCORE, CONFIG_9MPCORE,
> etc. ), and I’m not sure how they’re ending up in
> ./build/<target>-softmmu/config_device.mak:
This shouldn't happen, but it's not really possible to identify the exact problem since you don't provide your code. I would try first doing a complete build from scratch (ie delete the build directory) in case the problem is that there are stale files in the build tree that are getting picked up.
Otherwise re-double-check your default-config files to make sure they really don't have any CONFIG_whatever or "SELECT whatever"
in that they shouldn't. (Looking at the list of devices, an accidental "select REALVIEW" would have that effect.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: QEMU build dependencies for new board
2020-11-24 15:47 ` Ancuta, Cristian
@ 2020-11-24 15:51 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-11-24 15:51 UTC (permalink / raw)
To: Ancuta, Cristian; +Cc: qemu-devel
On Tue, 24 Nov 2020 at 15:47, Ancuta, Cristian
<cristian.ancuta@intel.com> wrote:
> I was indeed quite a few commits behind master, I'll give it a try now with the latest.
>
> Since I see the RISCV stuff is quite new, would the associated boards be a good starting point?
Possibly. Or look at a new arm board like sbsa-ref,
or raspi.
thanks
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-24 15:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 17:29 QEMU build dependencies for new board Ancuta, Cristian
2020-11-23 18:49 ` Peter Maydell
2020-11-24 15:47 ` Ancuta, Cristian
2020-11-24 15:51 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.