All of lore.kernel.org
 help / color / mirror / Atom feed
* Trouble running Poky 2.7 qemu-x86 build
@ 2019-07-20  4:55 Geoff Shannon
  2019-07-20  7:19 ` Alexander Kanavin
  0 siblings, 1 reply; 5+ messages in thread
From: Geoff Shannon @ 2019-07-20  4:55 UTC (permalink / raw)
  To: poky


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

Hi all, I'm trying to get started using Poky to build a custom image to run
on a beaglebone black.  I started off by trying to follow the Yocto Project
Quickstart and I'm stuck at getting the image to run on QEMU.  I'm new to
both Yocto Project and using QEMU so I expect I'm doing something simple
that's wrong but I haven't been able to figure it out.

I cloned the poky git repository, checked out tag yocto-2.7, ran `source
oe-init-build-env build`, setup my local.conf file with the contents in
file attached to this message, and then ran `bitbake core-image-sato`.

This appeared to complete successfully, so I then proceeded to try and test
the built image by running `runqemu qemux86`. This spit out this output,
and then proceeds to hang indefinitely.

```
runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
runqemu - INFO - Continuing with the following parameters:

KERNEL:
[/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin]
MACHINE: [qemux86]
FSTYPE: [ext4]
ROOTFS:
[/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4]
CONFFILE:
[/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.qemuboot.conf]

runqemu - INFO - Setting up tap interface under sudo
[sudo] password for geoff:
runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255
.255.255.0
runqemu - INFO - Running
/home/geoff/prog/yocto/quick-build/poky/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386
-device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev
tap,id=net0,ifname=tap0,script=no,downscript=no -drive
file=/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4,if=virtio,format=raw
-vga vmware -show-cursor -usb -device usb-tablet -object
rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0
-cpu pentium2 -m 256 -serial mon:vc -serial null -kernel
/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin
-append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2:
:192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32
oprofile.timer=1 uvesafb.task_timeout=-1 '
```

I was under the impression that this would pop up a window with the built
image running in QEMU, but nothing happens.

In case it helps, the output of `uname -a` on my machine is:
Linux pop-os 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12
UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

If anyone has ideas about what is going wrong, further troubleshooting
suggestions I would very much appreciate it.  If there is a more suitable
place to ask for this kind of help my apologies and I would appreciate a
pointer to the correct place to get help.

Thanks,
Geoff

Nothing is ever easy.

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

[-- Attachment #2: local.conf --]
[-- Type: application/octet-stream, Size: 784 bytes --]

BB_NUMBER_THREADS ?= "${@bb.utils.cpu_count()}"
PARALLEL_MAKE ?= "-j ${@bb.utils.cpu_count()}"

MACHINE ?= "qemux86-64"

DL_DIR ?= "${TOPDIR}/downloads"

SSTATE_DIR ?= "${TOPDIR}/sstate-cache"

TMPDIR = "${TOPDIR}/tmp"

DISTRO ?= "poky"

PACKAGE_CLASSES ?= "package_deb"


EXTRA_IMAGE_FEATURES ?= "debug-tweaks"

USER_CLASSES ?= "buildstats image-mklibs image-prelink"

PATCHRESOLVE = "noop"

BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"

PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"

CONF_VERSION = "1"

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

* Re: Trouble running Poky 2.7 qemu-x86 build
  2019-07-20  4:55 Trouble running Poky 2.7 qemu-x86 build Geoff Shannon
@ 2019-07-20  7:19 ` Alexander Kanavin
  2019-07-21 21:16   ` Geoff Shannon
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2019-07-20  7:19 UTC (permalink / raw)
  To: Geoff Shannon; +Cc: Poky Project

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

The line
PACKAGECONFIG_append_pn-qemu-native = " sdl"
looks incorrect. The default local.conf set up for you (when you run
'source oe-init-build-env build') should have the correct one. Where did
that line come from? If it's some manual or guide or wiki, we need to
update it.

Qemu doesn't actually hang, it runs fine but without any graphical output,
because the graphical support is misconfigured (disabled) in your case.

Alex

On Sat, 20 Jul 2019 at 07:56, Geoff Shannon <geoffpshannon@gmail.com> wrote:

> Hi all, I'm trying to get started using Poky to build a custom image to
> run on a beaglebone black.  I started off by trying to follow the Yocto
> Project Quickstart and I'm stuck at getting the image to run on QEMU.  I'm
> new to both Yocto Project and using QEMU so I expect I'm doing something
> simple that's wrong but I haven't been able to figure it out.
>
> I cloned the poky git repository, checked out tag yocto-2.7, ran `source
> oe-init-build-env build`, setup my local.conf file with the contents in
> file attached to this message, and then ran `bitbake core-image-sato`.
>
> This appeared to complete successfully, so I then proceeded to try and
> test the built image by running `runqemu qemux86`. This spit out this
> output, and then proceeds to hang indefinitely.
>
> ```
> runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
> runqemu - INFO - Continuing with the following parameters:
>
> KERNEL:
> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin]
> MACHINE: [qemux86]
> FSTYPE: [ext4]
> ROOTFS:
> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4]
> CONFFILE:
> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.qemuboot.conf]
>
> runqemu - INFO - Setting up tap interface under sudo
> [sudo] password for geoff:
> runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255
> .255.255.0
> runqemu - INFO - Running
> /home/geoff/prog/yocto/quick-build/poky/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386
> -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev
> tap,id=net0,ifname=tap0,script=no,downscript=no -drive
> file=/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4,if=virtio,format=raw
> -vga vmware -show-cursor -usb -device usb-tablet -object
> rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0
> -cpu pentium2 -m 256 -serial mon:vc -serial null -kernel
> /home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin
> -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2:
> :192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32
> oprofile.timer=1 uvesafb.task_timeout=-1 '
> ```
>
> I was under the impression that this would pop up a window with the built
> image running in QEMU, but nothing happens.
>
> In case it helps, the output of `uname -a` on my machine is:
> Linux pop-os 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12
> UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>
> If anyone has ideas about what is going wrong, further troubleshooting
> suggestions I would very much appreciate it.  If there is a more suitable
> place to ask for this kind of help my apologies and I would appreciate a
> pointer to the correct place to get help.
>
> Thanks,
> Geoff
>
> Nothing is ever easy.
> --
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>

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

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

* Re: Trouble running Poky 2.7 qemu-x86 build
  2019-07-20  7:19 ` Alexander Kanavin
@ 2019-07-21 21:16   ` Geoff Shannon
  2019-07-22 13:33     ` William Bourque
  0 siblings, 1 reply; 5+ messages in thread
From: Geoff Shannon @ 2019-07-21 21:16 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Poky Project

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

Interesting! I was unsure about the origin of those lines, and couldn't
find it after looking through the various books and tutorials I've been
reading.  So I decided to just follow the yocto project quick build
instructions, and generate a new build from `source oe-init-build-env`.
And I found that line is actually very similar to a line from the
local.conf generated by the build init script.
PACKAGECONFIG_append_pn-qemu-system-native = " sdl"

I'm really not sure where that edit came from since I believe I made the
first conf file I sent by stripping out all of the comments from the
generated local.conf file and then changing a few values.  But I built poky
using a checkout of tag yocto-2.7.1 and without editing the local.conf
script and now `runqemu qemux86` is popping up a graphical interface and
working just fine.

So thanks for the pointer Alexander, I'm unstuck now!

Geoff

Nothing is ever easy.


On Sat, Jul 20, 2019 at 12:19 AM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> The line
> PACKAGECONFIG_append_pn-qemu-native = " sdl"
> looks incorrect. The default local.conf set up for you (when you run
> 'source oe-init-build-env build') should have the correct one. Where did
> that line come from? If it's some manual or guide or wiki, we need to
> update it.
>
> Qemu doesn't actually hang, it runs fine but without any graphical output,
> because the graphical support is misconfigured (disabled) in your case.
>
> Alex
>
> On Sat, 20 Jul 2019 at 07:56, Geoff Shannon <geoffpshannon@gmail.com>
> wrote:
>
>> Hi all, I'm trying to get started using Poky to build a custom image to
>> run on a beaglebone black.  I started off by trying to follow the Yocto
>> Project Quickstart and I'm stuck at getting the image to run on QEMU.  I'm
>> new to both Yocto Project and using QEMU so I expect I'm doing something
>> simple that's wrong but I haven't been able to figure it out.
>>
>> I cloned the poky git repository, checked out tag yocto-2.7, ran `source
>> oe-init-build-env build`, setup my local.conf file with the contents in
>> file attached to this message, and then ran `bitbake core-image-sato`.
>>
>> This appeared to complete successfully, so I then proceeded to try and
>> test the built image by running `runqemu qemux86`. This spit out this
>> output, and then proceeds to hang indefinitely.
>>
>> ```
>> runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
>> runqemu - INFO - Continuing with the following parameters:
>>
>> KERNEL:
>> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin]
>> MACHINE: [qemux86]
>> FSTYPE: [ext4]
>> ROOTFS:
>> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4]
>> CONFFILE:
>> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.qemuboot.conf]
>>
>> runqemu - INFO - Setting up tap interface under sudo
>> [sudo] password for geoff:
>> runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255
>> .255.255.0
>> runqemu - INFO - Running
>> /home/geoff/prog/yocto/quick-build/poky/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386
>> -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev
>> tap,id=net0,ifname=tap0,script=no,downscript=no -drive
>> file=/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4,if=virtio,format=raw
>> -vga vmware -show-cursor -usb -device usb-tablet -object
>> rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0
>> -cpu pentium2 -m 256 -serial mon:vc -serial null -kernel
>> /home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin
>> -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2:
>> :192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32
>> oprofile.timer=1 uvesafb.task_timeout=-1 '
>> ```
>>
>> I was under the impression that this would pop up a window with the built
>> image running in QEMU, but nothing happens.
>>
>> In case it helps, the output of `uname -a` on my machine is:
>> Linux pop-os 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12
>> UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>>
>> If anyone has ideas about what is going wrong, further troubleshooting
>> suggestions I would very much appreciate it.  If there is a more suitable
>> place to ask for this kind of help my apologies and I would appreciate a
>> pointer to the correct place to get help.
>>
>> Thanks,
>> Geoff
>>
>> Nothing is ever easy.
>> --
>> _______________________________________________
>> poky mailing list
>> poky@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/poky
>>
>

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

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

* Re: Trouble running Poky 2.7 qemu-x86 build
  2019-07-21 21:16   ` Geoff Shannon
@ 2019-07-22 13:33     ` William Bourque
  2019-07-22 19:31       ` Geoff Shannon
  0 siblings, 1 reply; 5+ messages in thread
From: William Bourque @ 2019-07-22 13:33 UTC (permalink / raw)
  To: Geoff Shannon; +Cc: poky

Hi Geoff,

I'm a bit late but I thought I'd share a useful QEMU trick as well.
If you don't want the qemu helper UI to pop or if you cannot use it
(if you are integrating into build system as example), you can tell
QEMU to bind a certain serial port to a TCP port on your host.
Then, assuming your QEMU image passes "console=ttyS0,115200n8" in its
kernel boot parameter, you can then login to the system from your host
using the open TCP port.

The exact commands would look like this:

On the host, open an arbitrary TCP port (here I use netcat, but
anything would do):
     nc -l 50299

Then, start QEMU with a "-serial" pointing to the TCP port you opened
on the host.
Below is the "minimal" full QEMU command I use in my case, the serial
binding "-serial tcp:127.0.0.1:50299" at the end:
    qemu-system-x86_64 -device
virtio-net-pci,netdev=net0,mac=DE:AD:DE:AE:BE:EF -netdev
tap,id=net0,ifname=tap0,script=no,downscript=no -drive
if=none,id=hd,file=qemux86-64/core-image-minimal-qemux86-64.wic,format=raw
-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd -serial
tcp:127.0.0.1:50299

If everything goes well, your system should now bootup and you would get output.
Then when getty login starts (assuming you use it), you should be able to login.

I hope this help!

- William


On Sun, Jul 21, 2019 at 5:17 PM Geoff Shannon <geoffpshannon@gmail.com> wrote:
>
> Interesting! I was unsure about the origin of those lines, and couldn't find it after looking through the various books and tutorials I've been reading.  So I decided to just follow the yocto project quick build instructions, and generate a new build from `source oe-init-build-env`.  And I found that line is actually very similar to a line from the local.conf generated by the build init script.
> PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
>
> I'm really not sure where that edit came from since I believe I made the first conf file I sent by stripping out all of the comments from the generated local.conf file and then changing a few values.  But I built poky using a checkout of tag yocto-2.7.1 and without editing the local.conf script and now `runqemu qemux86` is popping up a graphical interface and working just fine.
>
> So thanks for the pointer Alexander, I'm unstuck now!
>
> Geoff
>
> Nothing is ever easy.
>
>
> On Sat, Jul 20, 2019 at 12:19 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>>
>> The line
>> PACKAGECONFIG_append_pn-qemu-native = " sdl"
>> looks incorrect. The default local.conf set up for you (when you run 'source oe-init-build-env build') should have the correct one. Where did that line come from? If it's some manual or guide or wiki, we need to update it.
>>
>> Qemu doesn't actually hang, it runs fine but without any graphical output, because the graphical support is misconfigured (disabled) in your case.
>>
>> Alex
>>
>> On Sat, 20 Jul 2019 at 07:56, Geoff Shannon <geoffpshannon@gmail.com> wrote:
>>>
>>> Hi all, I'm trying to get started using Poky to build a custom image to run on a beaglebone black.  I started off by trying to follow the Yocto Project Quickstart and I'm stuck at getting the image to run on QEMU.  I'm new to both Yocto Project and using QEMU so I expect I'm doing something simple that's wrong but I haven't been able to figure it out.
>>>
>>> I cloned the poky git repository, checked out tag yocto-2.7, ran `source oe-init-build-env build`, setup my local.conf file with the contents in file attached to this message, and then ran `bitbake core-image-sato`.
>>>
>>> This appeared to complete successfully, so I then proceeded to try and test the built image by running `runqemu qemux86`. This spit out this output, and then proceeds to hang indefinitely.
>>>
>>> ```
>>> runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
>>> runqemu - INFO - Continuing with the following parameters:
>>>
>>> KERNEL: [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin]
>>> MACHINE: [qemux86]
>>> FSTYPE: [ext4]
>>> ROOTFS: [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4]
>>> CONFFILE: [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.qemuboot.conf]
>>>
>>> runqemu - INFO - Setting up tap interface under sudo
>>> [sudo] password for geoff:
>>> runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255.255.255.0
>>> runqemu - INFO - Running /home/geoff/prog/yocto/quick-build/poky/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -device usb-tablet -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0   -cpu pentium2 -m 256 -serial mon:vc -serial null -kernel /home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 '
>>> ```
>>>
>>> I was under the impression that this would pop up a window with the built image running in QEMU, but nothing happens.
>>>
>>> In case it helps, the output of `uname -a` on my machine is:
>>> Linux pop-os 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15 15:27:12 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> If anyone has ideas about what is going wrong, further troubleshooting suggestions I would very much appreciate it.  If there is a more suitable place to ask for this kind of help my apologies and I would appreciate a pointer to the correct place to get help.
>>>
>>> Thanks,
>>> Geoff
>>>
>>> Nothing is ever easy.
>>> --
>>> _______________________________________________
>>> poky mailing list
>>> poky@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/poky
>
> --
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


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

* Re: Trouble running Poky 2.7 qemu-x86 build
  2019-07-22 13:33     ` William Bourque
@ 2019-07-22 19:31       ` Geoff Shannon
  0 siblings, 0 replies; 5+ messages in thread
From: Geoff Shannon @ 2019-07-22 19:31 UTC (permalink / raw)
  To: William Bourque; +Cc: poky

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

Sounds useful William, thanks for the tip!

On Mon, Jul 22, 2019 at 6:34 AM William Bourque <wbourque@gmail.com> wrote:

> Hi Geoff,
>
> I'm a bit late but I thought I'd share a useful QEMU trick as well.
> If you don't want the qemu helper UI to pop or if you cannot use it
> (if you are integrating into build system as example), you can tell
> QEMU to bind a certain serial port to a TCP port on your host.
> Then, assuming your QEMU image passes "console=ttyS0,115200n8" in its
> kernel boot parameter, you can then login to the system from your host
> using the open TCP port.
>
> The exact commands would look like this:
>
> On the host, open an arbitrary TCP port (here I use netcat, but
> anything would do):
>      nc -l 50299
>
> Then, start QEMU with a "-serial" pointing to the TCP port you opened
> on the host.
> Below is the "minimal" full QEMU command I use in my case, the serial
> binding "-serial tcp:127.0.0.1:50299" at the end:
>     qemu-system-x86_64 -device
> virtio-net-pci,netdev=net0,mac=DE:AD:DE:AE:BE:EF -netdev
> tap,id=net0,ifname=tap0,script=no,downscript=no -drive
> if=none,id=hd,file=qemux86-64/core-image-minimal-qemux86-64.wic,format=raw
> -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd -serial
> tcp:127.0.0.1:50299
>
> If everything goes well, your system should now bootup and you would get
> output.
> Then when getty login starts (assuming you use it), you should be able to
> login.
>
> I hope this help!
>
> - William
>
>
> On Sun, Jul 21, 2019 at 5:17 PM Geoff Shannon <geoffpshannon@gmail.com>
> wrote:
> >
> > Interesting! I was unsure about the origin of those lines, and couldn't
> find it after looking through the various books and tutorials I've been
> reading.  So I decided to just follow the yocto project quick build
> instructions, and generate a new build from `source oe-init-build-env`.
> And I found that line is actually very similar to a line from the
> local.conf generated by the build init script.
> > PACKAGECONFIG_append_pn-qemu-system-native = " sdl"
> >
> > I'm really not sure where that edit came from since I believe I made the
> first conf file I sent by stripping out all of the comments from the
> generated local.conf file and then changing a few values.  But I built poky
> using a checkout of tag yocto-2.7.1 and without editing the local.conf
> script and now `runqemu qemux86` is popping up a graphical interface and
> working just fine.
> >
> > So thanks for the pointer Alexander, I'm unstuck now!
> >
> > Geoff
> >
> > Nothing is ever easy.
> >
> >
> > On Sat, Jul 20, 2019 at 12:19 AM Alexander Kanavin <
> alex.kanavin@gmail.com> wrote:
> >>
> >> The line
> >> PACKAGECONFIG_append_pn-qemu-native = " sdl"
> >> looks incorrect. The default local.conf set up for you (when you run
> 'source oe-init-build-env build') should have the correct one. Where did
> that line come from? If it's some manual or guide or wiki, we need to
> update it.
> >>
> >> Qemu doesn't actually hang, it runs fine but without any graphical
> output, because the graphical support is misconfigured (disabled) in your
> case.
> >>
> >> Alex
> >>
> >> On Sat, 20 Jul 2019 at 07:56, Geoff Shannon <geoffpshannon@gmail.com>
> wrote:
> >>>
> >>> Hi all, I'm trying to get started using Poky to build a custom image
> to run on a beaglebone black.  I started off by trying to follow the Yocto
> Project Quickstart and I'm stuck at getting the image to run on QEMU.  I'm
> new to both Yocto Project and using QEMU so I expect I'm doing something
> simple that's wrong but I haven't been able to figure it out.
> >>>
> >>> I cloned the poky git repository, checked out tag yocto-2.7, ran
> `source oe-init-build-env build`, setup my local.conf file with the
> contents in file attached to this message, and then ran `bitbake
> core-image-sato`.
> >>>
> >>> This appeared to complete successfully, so I then proceeded to try and
> test the built image by running `runqemu qemux86`. This spit out this
> output, and then proceeds to hang indefinitely.
> >>>
> >>> ```
> >>> runqemu - INFO - Running MACHINE=qemux86 bitbake -e...
> >>> runqemu - INFO - Continuing with the following parameters:
> >>>
> >>> KERNEL:
> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin]
> >>> MACHINE: [qemux86]
> >>> FSTYPE: [ext4]
> >>> ROOTFS:
> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4]
> >>> CONFFILE:
> [/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.qemuboot.conf]
> >>>
> >>> runqemu - INFO - Setting up tap interface under sudo
> >>> [sudo] password for geoff:
> >>> runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255
> .255.255.0
> >>> runqemu - INFO - Running
> /home/geoff/prog/yocto/quick-build/poky/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386
> -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev
> tap,id=net0,ifname=tap0,script=no,downscript=no -drive
> file=/home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/core-image-sato-qemux86-20190520070424.rootfs.ext4,if=virtio,format=raw
> -vga vmware -show-cursor -usb -device usb-tablet -object
> rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0
>  -cpu pentium2 -m 256 -serial mon:vc -serial null -kernel
> /home/geoff/prog/yocto/quick-build/poky/build/tmp/deploy/images/qemux86/bzImage--5.0.3+git0+f0b575cda6_3df4aae607-r0-qemux86-20190520070424.bin
> -append 'root=/dev/vda rw highres=off  mem=256M ip=192.168.7.2::
> 192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32
> oprofile.timer=1 uvesafb.task_timeout=-1 '
> >>> ```
> >>>
> >>> I was under the impression that this would pop up a window with the
> built image running in QEMU, but nothing happens.
> >>>
> >>> In case it helps, the output of `uname -a` on my machine is:
> >>> Linux pop-os 4.18.0-17-generic #18~18.04.1-Ubuntu SMP Fri Mar 15
> 15:27:12 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
> >>>
> >>> If anyone has ideas about what is going wrong, further troubleshooting
> suggestions I would very much appreciate it.  If there is a more suitable
> place to ask for this kind of help my apologies and I would appreciate a
> pointer to the correct place to get help.
> >>>
> >>> Thanks,
> >>> Geoff
> >>>
> >>> Nothing is ever easy.
> >>> --
> >>> _______________________________________________
> >>> poky mailing list
> >>> poky@yoctoproject.org
> >>> https://lists.yoctoproject.org/listinfo/poky
> >
> > --
> > _______________________________________________
> > poky mailing list
> > poky@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/poky
>
-- 
Geoff (from mobile) Nothing is ever easy.

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

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

end of thread, other threads:[~2019-07-22 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-20  4:55 Trouble running Poky 2.7 qemu-x86 build Geoff Shannon
2019-07-20  7:19 ` Alexander Kanavin
2019-07-21 21:16   ` Geoff Shannon
2019-07-22 13:33     ` William Bourque
2019-07-22 19:31       ` Geoff Shannon

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.