how the openbmc running in qemu communicate with the operating system running in another qemu via KCS/BT?

Stephen Beckwith embeddedsteve at gmail.com
Fri Dec 20 00:37:38 AEDT 2019


Lui Hongwei;
   Here is how we handled our initial setup for OpenBMC:
1) all of this runs in a single VirtualMachine on a Host System (an Apple
Macbook in my case) - the VM is running an ubuntu 18.04 LTS OS.
2) Within this VM:
a) Build the OpenBMC image for AST2500
b) You will need to rebuild from downloaded source the QEMU version 4.1.0
to run the AST2500.  The "stock" version that is delivered with Ubuntu
18.03 is 2.11, and does not work.   Rebuild this and keep a copy to
re-install as necessary.
c) you will also need to install ipmitool on this system.
3)  In Terminal Window 1:   Use this command to run the image:
qemu-system-arm \
-machine ast2500-evb \
-m 256 \
-nographic \
-drive file=obmc-phosphor-image-evb-ast2500.static.mtd,format=raw,if=mtd \
-net nic \
-net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443
-:443,hostfwd=udp:127.0.0.1:2623-:623,hostname=qemu
3) In Terminal Window 2:  You can run the ipmitool to talk to the AST2500
BMC image:
ipmitool -H 127.0.0.1 -I lanplus -p 2623  -U root -P 0penBmc chassis power
status
Chassis Power is off

IPMI "raw" commands also work:
ipmitool -H 127.0.0.1 -I lanplus -p 2623  -U root -P 0penBmc raw 0x00 0x0f
 3c 00 00 00 00

Hope this helps.
Regards,
Stephen Beckwith




On Thu, Dec 19, 2019 at 3:26 AM 南野ムルシエラゴ <1181052146 at qq.com> wrote:

> Greetings!
>
> I am a learner of openbmc, for some reason I do not have a real BMC nor a
> real server, I run openbmc in qemu. Recentlly I want to learn how BMC
> communicate with HOST System. But it seems qemu can not emulate this
> scenario.
> Can someone help tell me:
> Is there a mechanism allow me to run openbmc in qemu1 and at the same time
> run OS in qemu2. And let qemu1 run as the qemu2's BMC hardware and
> communicate via KCS or BT interface? Like the following sequence:
> [qemu1  [openbmc  [bt-bmc]]]<------LPC-------->|-----system
> IPC-----|<------LPC-------->[[[ipmi_si]  host]  qemu2]
> And what can I do?
> I have seen there is some code in qemu source code:
> qemu/hw/ipmi/*
> and in linux-5.3 source code:
> drivers/char/ipmi/*
> Dose this can help mitigate my problem?
>
> Best Regards!
> Liu Hongwei
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20191219/ea81fb54/attachment.htm>


More information about the openbmc mailing list