All of lore.kernel.org
 help / color / mirror / Atom feed
* New Hardware model emulation
@ 2020-02-24 11:57 Priyamvad Acharya
  2020-03-02 17:36 ` Stefan Hajnoczi
  0 siblings, 1 reply; 14+ messages in thread
From: Priyamvad Acharya @ 2020-02-24 11:57 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 176 bytes --]

Hello Qemu development community members,

I have created a virtual device in Qemu.
Now I want to run Qemu with the virtual device,so how to do it ?

Thanks,
Priyamvad Acharya

[-- Attachment #2: Type: text/html, Size: 296 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-02-24 11:57 New Hardware model emulation Priyamvad Acharya
@ 2020-03-02 17:36 ` Stefan Hajnoczi
       [not found]   ` <CAPV47zdPz+Z5=bOFNGjTG8nEWgH4gb78_AE3SGU0TD_7TNmSLw@mail.gmail.com>
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-03-02 17:36 UTC (permalink / raw)
  To: Priyamvad Acharya; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

On Mon, Feb 24, 2020 at 05:27:44PM +0530, Priyamvad Acharya wrote:
> I have created a virtual device in Qemu.
> Now I want to run Qemu with the virtual device,so how to do it ?

Hi,
It's unclear what you mean.  Please provide a bit more background on
what you are trying to accomplish.

For example, are you trying to run a VM and need help with QEMU
command-line parameters to configure devices?  Or are you writing code
to emulate a custom device (please include a link to the code)?

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
       [not found]   ` <CAPV47zdPz+Z5=bOFNGjTG8nEWgH4gb78_AE3SGU0TD_7TNmSLw@mail.gmail.com>
@ 2020-03-03 10:46     ` Stefan Hajnoczi
  2020-03-03 12:45       ` Priyamvad Acharya
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-03-03 10:46 UTC (permalink / raw)
  To: Priyamvad Acharya; +Cc: qemu-devel

On Tue, Mar 3, 2020 at 7:45 AM Priyamvad Acharya
<priyamvad.agnisys@gmail.com> wrote:

Please use Reply-All when replying to mailing list emails so that
qemu-devel@nongnu.org is included in the CC list.  That way the
discussion stays on the mailing list.

> Hi,
> I have written code to emulate a custom PCI device.
> Now I want to run custom device with Qemu, so that user application can perform read/write operation with custom PCI device.
> So what is the method to do it?

1. Add the source file somewhere below hw/.
2. Add a make rule to build the object file in Makefile.objs in the
same directory as the source file.
3. Compile QEMU and run with -device testpci.

> I am new to emulating a custom device model in Qemu, so request you to explain me in that way.

Reading the source code is necessary to understand how things work.
You can find many examples of devices in the hw/ directory.  Using
git-log(1) can be helpful because it shows how new devices were
introduced.

Stefan


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-03 10:46     ` Stefan Hajnoczi
@ 2020-03-03 12:45       ` Priyamvad Acharya
  2020-03-03 12:53         ` Priyamvad Acharya
  2020-03-03 15:36         ` Stefan Hajnoczi
  0 siblings, 2 replies; 14+ messages in thread
From: Priyamvad Acharya @ 2020-03-03 12:45 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 1524 bytes --]

Thanks Stefan for explaining the method.
After following above method when I run below command to compile my custom
device in Qemu source code , I get the output on terminal which is attached
in a file for your reference.

Command:- make -j8 -C build

Most of the lines in attached file indicate that error might be due to
helper.c file.

How to resolve it?

My qemu version:4.2.50


Thanks,
Priyamvad Acharya

On Tue, 3 Mar 2020 at 16:16, Stefan Hajnoczi <stefanha@gmail.com> wrote:

> On Tue, Mar 3, 2020 at 7:45 AM Priyamvad Acharya
> <priyamvad.agnisys@gmail.com> wrote:
>
> Please use Reply-All when replying to mailing list emails so that
> qemu-devel@nongnu.org is included in the CC list.  That way the
> discussion stays on the mailing list.
>
> > Hi,
> > I have written code to emulate a custom PCI device.
> > Now I want to run custom device with Qemu, so that user application can
> perform read/write operation with custom PCI device.
> > So what is the method to do it?
>
> 1. Add the source file somewhere below hw/.
> 2. Add a make rule to build the object file in Makefile.objs in the
> same directory as the source file.
> 3. Compile QEMU and run with -device testpci.
>
> > I am new to emulating a custom device model in Qemu, so request you to
> explain me in that way.
>
> Reading the source code is necessary to understand how things work.
> You can find many examples of devices in the hw/ directory.  Using
> git-log(1) can be helpful because it shows how new devices were
> introduced.
>
> Stefan
>

[-- Attachment #1.2: Type: text/html, Size: 2197 bytes --]

[-- Attachment #2: qemu_arm_build_hello_err1.txt --]
[-- Type: text/plain, Size: 5825 bytes --]

target/arm/arm-semi.o: In function `do_arm_semihosting':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/arm-semi.c:784: undefined reference to `qemu_semihosting_console_outc'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/arm-semi.c:787: undefined reference to `qemu_semihosting_console_outs'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/arm-semi.c:815: undefined reference to `qemu_semihosting_console_inc'
target/arm/cpu.o: In function `arm_v7m_cpu_exec_interrupt':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/cpu.c:483: undefined reference to `armv7m_nvic_can_take_pending_exception'
target/arm/m_helper.o: In function `v7m_stack_write':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:260: undefined reference to `armv7m_nvic_set_pending_derived'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:263: undefined reference to `armv7m_nvic_set_pending_lazyfp'
target/arm/m_helper.o: In function `v7m_stack_read':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:329: undefined reference to `armv7m_nvic_set_pending'
target/arm/m_helper.o: In function `helper_v7m_preserve_fp_state':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:356: undefined reference to `armv7m_nvic_set_pending_lazyfp'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:360: undefined reference to `armv7m_nvic_set_pending_lazyfp'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:399: undefined reference to `armv7m_nvic_can_take_pending_exception'
target/arm/m_helper.o: In function `arm_v7m_load_vector':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:728: undefined reference to `armv7m_nvic_set_pending_derived'
target/arm/m_helper.o: In function `v7m_push_callee_stack':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:796: undefined reference to `armv7m_nvic_set_pending'
target/arm/m_helper.o: In function `v7m_exception_taken':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:838: undefined reference to `armv7m_nvic_get_pending_irq_info'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:946: undefined reference to `armv7m_nvic_acknowledge_irq'
target/arm/m_helper.o: In function `v7m_update_fpccr':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:988: undefined reference to `armv7m_nvic_neg_prio_requested'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1004: undefined reference to `armv7m_nvic_get_ready_status'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1007: undefined reference to `armv7m_nvic_get_ready_status'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1010: undefined reference to `armv7m_nvic_get_ready_status'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1013: undefined reference to `armv7m_nvic_get_ready_status'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1016: undefined reference to `armv7m_nvic_get_ready_status'
target/arm/m_helper.o:/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1020: more undefined references to `armv7m_nvic_get_ready_status' follow
target/arm/m_helper.o: In function `v7m_push_stack':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1204: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1249: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1254: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1272: undefined reference to `armv7m_nvic_set_pending'
target/arm/m_helper.o: In function `do_v7m_exception_exit':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1408: undefined reference to `armv7m_nvic_raw_execution_priority'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1416: undefined reference to `armv7m_nvic_complete_irq'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1497: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1515: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1528: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1545: undefined reference to `armv7m_nvic_can_take_pending_exception'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1595: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1669: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1684: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1711: undefined reference to `armv7m_nvic_set_pending'
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1721: undefined reference to `armv7m_nvic_set_pending'
target/arm/m_helper.o:/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:1820: more undefined references to `armv7m_nvic_set_pending' follow
target/arm/m_helper.o: In function `arm_v7m_mmu_idx_for_secstate_and_priv':
/lhome/priyamvad/debian_qemu_arm32_updated/qemu/target/arm/m_helper.c:2710: undefined reference to `armv7m_nvic_neg_prio_requested'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:206: qemu-system-arm] Error 1
make: *** [Makefile:494: arm-softmmu/all] Error 2

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-03 12:45       ` Priyamvad Acharya
@ 2020-03-03 12:53         ` Priyamvad Acharya
  2020-03-03 15:32           ` Stefan Hajnoczi
  2020-03-03 15:36         ` Stefan Hajnoczi
  1 sibling, 1 reply; 14+ messages in thread
From: Priyamvad Acharya @ 2020-03-03 12:53 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1813 bytes --]

 >.* Using git-log(1) can be helpful because it shows how new devices were
introduced.*

What is git-log(1) ?
How to use git-log(1) in Qemu?

On Tue, 3 Mar 2020 at 18:15, Priyamvad Acharya <priyamvad.agnisys@gmail.com>
wrote:

> Thanks Stefan for explaining the method.
> After following above method when I run below command to compile my custom
> device in Qemu source code , I get the output on terminal which is attached
> in a file for your reference.
>
> Command:- make -j8 -C build
>
> Most of the lines in attached file indicate that error might be due to
> helper.c file.
>
> How to resolve it?
>
> My qemu version:4.2.50
>
>
> Thanks,
> Priyamvad Acharya
>
> On Tue, 3 Mar 2020 at 16:16, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
>> On Tue, Mar 3, 2020 at 7:45 AM Priyamvad Acharya
>> <priyamvad.agnisys@gmail.com> wrote:
>>
>> Please use Reply-All when replying to mailing list emails so that
>> qemu-devel@nongnu.org is included in the CC list.  That way the
>> discussion stays on the mailing list.
>>
>> > Hi,
>> > I have written code to emulate a custom PCI device.
>> > Now I want to run custom device with Qemu, so that user application can
>> perform read/write operation with custom PCI device.
>> > So what is the method to do it?
>>
>> 1. Add the source file somewhere below hw/.
>> 2. Add a make rule to build the object file in Makefile.objs in the
>> same directory as the source file.
>> 3. Compile QEMU and run with -device testpci.
>>
>> > I am new to emulating a custom device model in Qemu, so request you to
>> explain me in that way.
>>
>> Reading the source code is necessary to understand how things work.
>> You can find many examples of devices in the hw/ directory.  Using
>> git-log(1) can be helpful because it shows how new devices were
>> introduced.
>>
>> Stefan
>>
>

[-- Attachment #2: Type: text/html, Size: 3127 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-03 12:53         ` Priyamvad Acharya
@ 2020-03-03 15:32           ` Stefan Hajnoczi
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-03-03 15:32 UTC (permalink / raw)
  To: Priyamvad Acharya; +Cc: qemu-devel

On Tue, Mar 3, 2020 at 12:53 PM Priyamvad Acharya
<priyamvad.agnisys@gmail.com> wrote:
>
> >. Using git-log(1) can be helpful because it shows how new devices were introduced.
>
> What is git-log(1) ?
> How to use git-log(1) in Qemu?

It's the git command that shows commit history:
https://git-scm.com/docs/git-log

Stefan


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-03 12:45       ` Priyamvad Acharya
  2020-03-03 12:53         ` Priyamvad Acharya
@ 2020-03-03 15:36         ` Stefan Hajnoczi
  2020-03-03 17:11           ` Priyamvad Acharya
  1 sibling, 1 reply; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-03-03 15:36 UTC (permalink / raw)
  To: Priyamvad Acharya; +Cc: qemu-devel

On Tue, Mar 3, 2020 at 12:45 PM Priyamvad Acharya
<priyamvad.agnisys@gmail.com> wrote:
> Thanks Stefan for explaining the method.
> After following above method when I run below command to compile my custom device in Qemu source code , I get the output on terminal which is attached in a file for your reference.
>
> Command:- make -j8 -C build
>
> Most of the lines in attached file indicate that error might be due to helper.c file.
>
> How to resolve it?

These errors are probably due to the Makefile.objs changes in your commit:
https://github.com/PriyamvadAcharya/virtual_prototype_qemu/commit/4c71c2759a96cf1db83a74027b93c6ceeab24bf1#diff-a8f0482bb5eda5c20e2054e1b1d263f2

Stefan


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-03 15:36         ` Stefan Hajnoczi
@ 2020-03-03 17:11           ` Priyamvad Acharya
  2020-03-03 20:35             ` Stefan Hajnoczi
  0 siblings, 1 reply; 14+ messages in thread
From: Priyamvad Acharya @ 2020-03-03 17:11 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

 > These errors are probably due to the Makefile.objs changes in your
commit:

If I am not wrong, we need to add a rule i.e *"
common-obj-$(CONFIG_TESTPCI) += testpci.o "* in Makefile.objs to compile
custom device in Qemu.
Shall I should remove that rule to remove the errors?

On Tue, 3 Mar 2020 at 21:06, Stefan Hajnoczi <stefanha@gmail.com> wrote:

> On Tue, Mar 3, 2020 at 12:45 PM Priyamvad Acharya
> <priyamvad.agnisys@gmail.com> wrote:
> > Thanks Stefan for explaining the method.
> > After following above method when I run below command to compile my
> custom device in Qemu source code , I get the output on terminal which is
> attached in a file for your reference.
> >
> > Command:- make -j8 -C build
> >
> > Most of the lines in attached file indicate that error might be due to
> helper.c file.
> >
> > How to resolve it?
>
> These errors are probably due to the Makefile.objs changes in your commit:
>
> https://github.com/PriyamvadAcharya/virtual_prototype_qemu/commit/4c71c2759a96cf1db83a74027b93c6ceeab24bf1#diff-a8f0482bb5eda5c20e2054e1b1d263f2
>
> Stefan
>

[-- Attachment #2: Type: text/html, Size: 2018 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-03 17:11           ` Priyamvad Acharya
@ 2020-03-03 20:35             ` Stefan Hajnoczi
  2020-03-04 11:15               ` Priyamvad Acharya
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-03-03 20:35 UTC (permalink / raw)
  To: Priyamvad Acharya; +Cc: qemu-devel

On Tue, Mar 3, 2020 at 5:12 PM Priyamvad Acharya
<priyamvad.agnisys@gmail.com> wrote:
> > These errors are probably due to the Makefile.objs changes in your commit:
>
> If I am not wrong, we need to add a rule i.e " common-obj-$(CONFIG_TESTPCI) += testpci.o " in Makefile.objs to compile custom device in Qemu.
> Shall I should remove that rule to remove the errors?

No, keep that line.  All the other changes to Makefile.objs in that
commit seem spurious though and should be removed.

Stefan


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-03 20:35             ` Stefan Hajnoczi
@ 2020-03-04 11:15               ` Priyamvad Acharya
  2020-03-04 11:18                 ` Stefan Hajnoczi
  2020-03-04 11:21                 ` Priyamvad Acharya
  0 siblings, 2 replies; 14+ messages in thread
From: Priyamvad Acharya @ 2020-03-04 11:15 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

Hi,
I have commented all the lines of other hardware models except custom
device line *" common-obj-$(CONFIG_TESTPCI) += testpci.o "*.
But when I run *make* I get errors  similar to error shown in file which I
have shared with you in previous replies.

Thanks,
Priyamvad

On Wed, 4 Mar 2020 at 02:05, Stefan Hajnoczi <stefanha@gmail.com> wrote:

> On Tue, Mar 3, 2020 at 5:12 PM Priyamvad Acharya
> <priyamvad.agnisys@gmail.com> wrote:
> > > These errors are probably due to the Makefile.objs changes in your
> commit:
> >
> > If I am not wrong, we need to add a rule i.e "
> common-obj-$(CONFIG_TESTPCI) += testpci.o " in Makefile.objs to compile
> custom device in Qemu.
> > Shall I should remove that rule to remove the errors?
>
> No, keep that line.  All the other changes to Makefile.objs in that
> commit seem spurious though and should be removed.
>
> Stefan
>

[-- Attachment #2: Type: text/html, Size: 1393 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-04 11:15               ` Priyamvad Acharya
@ 2020-03-04 11:18                 ` Stefan Hajnoczi
  2020-03-04 11:21                 ` Priyamvad Acharya
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-03-04 11:18 UTC (permalink / raw)
  To: Priyamvad Acharya; +Cc: qemu-devel

On Wed, Mar 4, 2020 at 11:16 AM Priyamvad Acharya
<priyamvad.agnisys@gmail.com> wrote:
> I have commented all the lines of other hardware models except custom device line " common-obj-$(CONFIG_TESTPCI) += testpci.o ".
> But when I run make I get errors  similar to error shown in file which I have shared with you in previous replies.

Try this:
1. Start with a fresh qemu.git tree (no modifications) and check that
it compiles successfully.
2. Add testpci.c and add the testpci.o line to Makefile.objs.
3. Compilation should succeed now.

Stefan


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-04 11:15               ` Priyamvad Acharya
  2020-03-04 11:18                 ` Stefan Hajnoczi
@ 2020-03-04 11:21                 ` Priyamvad Acharya
  2020-03-04 13:04                   ` Priyamvad Acharya
  1 sibling, 1 reply; 14+ messages in thread
From: Priyamvad Acharya @ 2020-03-04 11:21 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1579 bytes --]

 > I have commented all the lines of other hardware models except custom
device line *" common-obj-$(CONFIG_TESTPCI) += testpci.o "*.
> But when I run *make* I get errors  similar to error shown in file which
I have shared with you in previous replies.
Above custom device I am building for Qemu ARM(32 bit architecture)

When I tried building  custom devicefor Qemu RISCV(32 bit architecture),
*make* get successfully executed and I get my custom device *.o and .d *files
in build/hw/misc directory.

I think there might be some problems with missing libraries for ARM
architecture ?




On Wed, 4 Mar 2020 at 16:45, Priyamvad Acharya <priyamvad.agnisys@gmail.com>
wrote:

> Hi,
> I have commented all the lines of other hardware models except custom
> device line *" common-obj-$(CONFIG_TESTPCI) += testpci.o "*.
> But when I run *make* I get errors  similar to error shown in file which
> I have shared with you in previous replies.
>
> Thanks,
> Priyamvad
>
> On Wed, 4 Mar 2020 at 02:05, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
>> On Tue, Mar 3, 2020 at 5:12 PM Priyamvad Acharya
>> <priyamvad.agnisys@gmail.com> wrote:
>> > > These errors are probably due to the Makefile.objs changes in your
>> commit:
>> >
>> > If I am not wrong, we need to add a rule i.e "
>> common-obj-$(CONFIG_TESTPCI) += testpci.o " in Makefile.objs to compile
>> custom device in Qemu.
>> > Shall I should remove that rule to remove the errors?
>>
>> No, keep that line.  All the other changes to Makefile.objs in that
>> commit seem spurious though and should be removed.
>>
>> Stefan
>>
>

[-- Attachment #2: Type: text/html, Size: 2893 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-04 11:21                 ` Priyamvad Acharya
@ 2020-03-04 13:04                   ` Priyamvad Acharya
  2020-03-04 15:36                     ` Stefan Hajnoczi
  0 siblings, 1 reply; 14+ messages in thread
From: Priyamvad Acharya @ 2020-03-04 13:04 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 2019 bytes --]

Hello,

I tried to boot linux on qemu for RISCV(32 bit) with busybear-linux image.
When I run script containing qemu command line configuration it just hangs
with following message shown by attached image.

How to fix it?

I am also attaching script for you reference.

Thanks,
Priyamvad Acharya

On Wed, 4 Mar 2020 at 16:51, Priyamvad Acharya <priyamvad.agnisys@gmail.com>
wrote:

> > I have commented all the lines of other hardware models except custom
> device line *" common-obj-$(CONFIG_TESTPCI) += testpci.o "*.
> > But when I run *make* I get errors  similar to error shown in file
> which I have shared with you in previous replies.
> Above custom device I am building for Qemu ARM(32 bit architecture)
>
> When I tried building  custom devicefor Qemu RISCV(32 bit architecture),
> *make* get successfully executed and I get my custom device *.o and .d *files
> in build/hw/misc directory.
>
> I think there might be some problems with missing libraries for ARM
> architecture ?
>
>
>
>
> On Wed, 4 Mar 2020 at 16:45, Priyamvad Acharya <
> priyamvad.agnisys@gmail.com> wrote:
>
>> Hi,
>> I have commented all the lines of other hardware models except custom
>> device line *" common-obj-$(CONFIG_TESTPCI) += testpci.o "*.
>> But when I run *make* I get errors  similar to error shown in file which
>> I have shared with you in previous replies.
>>
>> Thanks,
>> Priyamvad
>>
>> On Wed, 4 Mar 2020 at 02:05, Stefan Hajnoczi <stefanha@gmail.com> wrote:
>>
>>> On Tue, Mar 3, 2020 at 5:12 PM Priyamvad Acharya
>>> <priyamvad.agnisys@gmail.com> wrote:
>>> > > These errors are probably due to the Makefile.objs changes in your
>>> commit:
>>> >
>>> > If I am not wrong, we need to add a rule i.e "
>>> common-obj-$(CONFIG_TESTPCI) += testpci.o " in Makefile.objs to compile
>>> custom device in Qemu.
>>> > Shall I should remove that rule to remove the errors?
>>>
>>> No, keep that line.  All the other changes to Makefile.objs in that
>>> commit seem spurious though and should be removed.
>>>
>>> Stefan
>>>
>>

[-- Attachment #1.2: Type: text/html, Size: 3709 bytes --]

[-- Attachment #2: qemu_riscv32_busybear_run.PNG --]
[-- Type: image/png, Size: 156130 bytes --]

[-- Attachment #3: qemu_run.sh --]
[-- Type: application/octet-stream, Size: 1772 bytes --]

#!/bin/bash

##########################busybear qemu run################################

#KERNEL="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/riscv-pk/build/bbl"
#RAM=2G
#DISK="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/busybear-linux/busybear.bin"
#IFUP="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/busybear-linux/scripts/ifup.sh"
#IFDOWN="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/busybear-linux/scripts/ifdown.sh"
#qemu-system-riscv32 \
#	-nographic \
#	-machine virt \
#	-m 2G \
#	-kernel $KERNEL \
#	-append "console=ttyS0 ro root=/dev/vda" \
#	-drive file=$DISK,format=raw,id=hd0 \
#	-device virtio-blk-device,drive=hd0 \
#	-netdev type=tap,script=$IFUP,downscript=$IFDOWN,id=net0 \
#	-device virtio-net-device,netdev=net0 \




###########################buybear qemu run1################################


KERNEL="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/riscv-pk/build/bbl"
RAM=2G
DISK="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/busybear-linux/busybear.bin"
#DISK1="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/stage4-disk.img"
IFUP="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/busybear-linux/scripts/ifup.sh"
IFDOWN="/lhome/priyamvad/riscv_qemu_build_files_original/riscv64-linux/busybear-linux/scripts/ifdown.sh"
./qemu-system-riscv32 \
	-nographic \
	-machine virt \
	-m 2G \
	-kernel $KERNEL \
	-object rng-random,filename=/dev/urandom,id=rng0 \
	-device virtio-rng-device,rng=rng0 \
	-append "console=ttyS0 ro root=/dev/vda" \
	-drive file=$DISK,format=raw,id=hd0 \
	-device virtio-blk-device,drive=hd0 \
	-device virtio-net-device,netdev=usernet \
	-netdev user,id=usernet,hostfwd=tcp::2222-:22 \

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: New Hardware model emulation
  2020-03-04 13:04                   ` Priyamvad Acharya
@ 2020-03-04 15:36                     ` Stefan Hajnoczi
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Hajnoczi @ 2020-03-04 15:36 UTC (permalink / raw)
  To: Priyamvad Acharya; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Wed, Mar 4, 2020, 13:04 Priyamvad Acharya <priyamvad.agnisys@gmail.com>
wrote:

> Hello,
>
> I tried to boot linux on qemu for RISCV(32 bit) with busybear-linux image.
> When I run script containing qemu command line configuration it just hangs
> with following message shown by attached image.
>
> How to fix it?
>
> I am also attaching script for you reference
>

Unfortunately I don't have time to help further.  Maybe someone else is
willing to help.

Good luck!

Stefan

>

[-- Attachment #2: Type: text/html, Size: 1165 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-03-04 15:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24 11:57 New Hardware model emulation Priyamvad Acharya
2020-03-02 17:36 ` Stefan Hajnoczi
     [not found]   ` <CAPV47zdPz+Z5=bOFNGjTG8nEWgH4gb78_AE3SGU0TD_7TNmSLw@mail.gmail.com>
2020-03-03 10:46     ` Stefan Hajnoczi
2020-03-03 12:45       ` Priyamvad Acharya
2020-03-03 12:53         ` Priyamvad Acharya
2020-03-03 15:32           ` Stefan Hajnoczi
2020-03-03 15:36         ` Stefan Hajnoczi
2020-03-03 17:11           ` Priyamvad Acharya
2020-03-03 20:35             ` Stefan Hajnoczi
2020-03-04 11:15               ` Priyamvad Acharya
2020-03-04 11:18                 ` Stefan Hajnoczi
2020-03-04 11:21                 ` Priyamvad Acharya
2020-03-04 13:04                   ` Priyamvad Acharya
2020-03-04 15:36                     ` Stefan Hajnoczi

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.