[meta-intel] [PATCH] rmc: enable serial console when running under QEMU

Dmitry Rozhkov dmitry.rozhkov at linux.intel.com
Wed Mar 22 01:58:31 PDT 2017


On Tue, 2017-03-21 at 23:02 +0000, Minchev, Todor wrote:
> QEMU inserts its default machine type into the processor information
> field (SMBIOS type 2 structure) which results in different
> fingerprints.
> 
> QEMU 2.6
> Finger 2 value  : pc-i440fx-2.6
> 
> QEMU 2.8
> Finger 2 value  : pc-i440fx-2.8
> 
> The 'pc' machine type is an alias to the default machine.
> pc -> pc-i440fx-2.6 (qemu 2.6)
> pc -> pc-i440fx-2.8 (qemu 2.8)
> 
> Using the pc machine alias should result in identical fingerprints
> for
> all versions of qemu (provided that the same OVMF is used).
> 
> runqemu ovmf qemuparams="-machine pc"
> refkit-image-common wic intel-corei7-64 slirp serial nographic

I've added qemuparams="-machine pc" to the command, but Finger 2 value
still resolves to pc-i440fx-2.8.

The full command was

runqemu - INFO - Running /home/rojkov/work/iot-ref-kit/build/tmp-
glibc/work/intel_corei7_64-refkit-linux/refkit-image-common/1.0-
r0/recipe-sysroot-native/usr/bin/qemu-system-x86_64 -device virtio-net-
pci,netdev=net0,mac=52:54:00:12:35:02 -netdev
user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::2323-:23 -drive
if=virtio,file=/home/rojkov/work/iot-ref-kit/build/tmp-
glibc/deploy/images/intel-corei7-64/refkit-image-common-intel-corei7-
64.wic,format=raw -no-reboot -vga vmware -show-cursor -usb -usbdevice
tablet -device virtio-rng-pci -drive
if=pflash,format=qcow2,file=/home/rojkov/work/iot-ref-kit/build/tmp-
glibc/deploy/images/intel-corei7-64/ovmf.qcow2 -vga std  -machine pc  -
cpu Nehalem -m 256 -serial mon:vc -serial null 

And rmc's output:

root at intel-corei7-64:~# rmc -F
Got Fingerprint for board:

Finger 0 type   : 0x01
Finger 0 offset : 0x05
Finger 0 name:  : product_name
Finger 0 value  : Standard PC (i440FX + PIIX, 1996)

Finger 1 type   : 0x02
Finger 1 offset : 0x05
Finger 1 name:  : product_name
Finger 1 value  : 

Finger 2 type   : 0x04
Finger 2 offset : 0x10
Finger 2 name:  : version
Finger 2 value  : pc-i440fx-2.8

Finger 3 type   : 0x7f
Finger 3 offset : 0x00
Finger 3 name:  : reserved
Finger 3 value  : 

Finger 4 type   : 0x7f
Finger 4 offset : 0x00
Finger 4 name:  : reserved
Finger 4 value  : 

BR,
Dmitry


> Thanks,
> Todor
>  
> On Tue, 2017-03-21 at 14:37 +0200, Dmitry Rozhkov wrote:
> > 
> > Since we can run ordinary intel-corei7-64 wic images under QEMU
> > it makes sense to add QEMU quirks enabling serial console
> > to the RMC DB.
> > 
> > This patch appends "console=ttyS0,115200" to kernel command
> > line in case the image is used to run a QEMU VM e.g. with the
> > command:
> > 
> >     $ runqemu ovmf refkit-image-common wic intel-corei7-64 slirp
> > serial nographic
> > 
> > Unfortunately different major versions of QEMU produce different
> > RMC fingerprints, so the QEMU versions 2.6.x and 2.8.x should be
> > treated as different boards.
> > 
> > Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov at linux.intel.com>
> > ---
> >  common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM  |   1 +
> >  common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp | Bin 0 -> 113
> > bytes
> >  common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM  |   1 +
> >  common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp | Bin 0 -> 113
> > bytes
> >  4 files changed, 2 insertions(+)
> >  create mode 100644 common/recipes-bsp/rmc/boards/qemu-
> > 2.6/KBOOTPARAM
> >  create mode 100644 common/recipes-bsp/rmc/boards/qemu-2.6/qemu-
> > 2.6.fp
> >  create mode 100644 common/recipes-bsp/rmc/boards/qemu-
> > 2.8/KBOOTPARAM
> >  create mode 100644 common/recipes-bsp/rmc/boards/qemu-2.8/qemu-
> > 2.8.fp
> > 
> > diff --git a/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM
> > b/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM
> > new file mode 100644
> > index 0000000..476b1fb
> > --- /dev/null
> > +++ b/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM
> > @@ -0,0 +1 @@
> > +console=ttyS0,115200
> > diff --git a/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp
> > b/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp
> > new file mode 100644
> > index
> > 0000000000000000000000000000000000000000..e4c41657f2e98b6c1b836e088
> > b56d477941de5fd
> > GIT binary patch
> > literal 113
> > zcmZQ%Ehx%QDNQbk&r8frWe6 at w%u7iuN>K=KR?x^aF)?t9P|#Kg at brw(Q82W$G}B~Y
> > rLe;>)B2boERGgWg$54>03(}ERp=+dP#!$~tlv<oxRF;~;fWig<a~B~<
> > 
> > literal 0
> > HcmV?d00001
> > 
> > diff --git a/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM
> > b/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM
> > new file mode 100644
> > index 0000000..476b1fb
> > --- /dev/null
> > +++ b/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM
> > @@ -0,0 +1 @@
> > +console=ttyS0,115200
> > diff --git a/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp
> > b/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp
> > new file mode 100644
> > index
> > 0000000000000000000000000000000000000000..7f28f37c33e01186c0f87cea9
> > 611b58ef11edcc1
> > GIT binary patch
> > literal 113
> > zcmZQ%Ehx%QDNQbk&r8frWe6 at w%u7iuN>K=KR?x^aF)?t9P|#Kg at brw(Q82W$G}B~Y
> > rLe;>)B2boERGgWg$54>03(}ERp=+dP!BEdolv<oxRF;~;fWig<b4wvg
> > 
> > literal 0
> > HcmV?d00001
> > 
> > -- 
> > 2.7.4
> > 
> 


More information about the meta-intel mailing list