Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu: Bump to v5.0.0 #200

Merged
merged 4 commits into from
Jul 10, 2020
Merged

Conversation

stephanosio
Copy link
Member

Signed-off-by: Stephanos Ioannidis root@stephanos.io

@stephanosio
Copy link
Member Author

nios2-softmmu seems to be broken on QEMU 5.0 (building on v5.2.0-rc2 tag):

  LINK    nios2-softmmu/qemu-system-nios2
hw/nios2/boot.o: In function `nios2_load_dtb':
/home/stephanos/Dev/qemu/hw/nios2/boot.c:89: undefined reference to `load_device_tree'
/home/stephanos/Dev/qemu/hw/nios2/boot.c:96: undefined reference to `qemu_fdt_setprop_string'
/home/stephanos/Dev/qemu/hw/nios2/boot.c:104: undefined reference to `qemu_fdt_setprop_cell'
/home/stephanos/Dev/qemu/hw/nios2/boot.c:107: undefined reference to `qemu_fdt_setprop_cell'
collect2: error: ld returned 1 exit status
Makefile:208: recipe for target 'qemu-system-nios2' failed
make[1]: *** [qemu-system-nios2] Error 1
Makefile:527: recipe for target 'nios2-softmmu/all' failed
make: *** [nios2-softmmu/all] Error 2

@stephanosio
Copy link
Member Author

stephanosio commented Apr 8, 2020

nios2-softmmu seems to be broken on QEMU 5.0

The following commit is the culprit, although not the root cause:
qemu/qemu@7ba4a4d

I will prepare/upstream a patch for this. => See https://patchwork.kernel.org/patch/11479585/

NOTE: It can still be built with --enable-fdt without a proper patch.

@stephanosio stephanosio removed the DNM DO NOT MERGE label Apr 8, 2020
@stephanosio
Copy link
Member Author

All QEMU 5.0-related issues have been resolved. Ready for final review/merging.

@stephanosio stephanosio linked an issue Apr 10, 2020 that may be closed by this pull request
@galak galak changed the title qemu: Bump to v5.0.0-rc2 qemu: Bump to v5.0.0-rc4 Apr 23, 2020
@stephanosio stephanosio added the DNM DO NOT MERGE label Apr 28, 2020
@stephanosio
Copy link
Member Author

To be updated to the v5.0.0 release, which is due today.

@stephanosio stephanosio changed the title qemu: Bump to v5.0.0-rc4 qemu: Bump to v5.0.0 Apr 29, 2020
@stephanosio stephanosio removed the DNM DO NOT MERGE label Apr 29, 2020
@stephanosio
Copy link
Member Author

Updated to QEMU 5.0.0

@stephanosio
Copy link
Member Author

NOTE: Need to do something about the newly added massive ARC patch ...

@galak
Copy link
Contributor

galak commented Jun 4, 2020

@abrodkin are you able to look at updating the ARC changes to be based on QEMU 5.0.0?

@abrodkin
Copy link
Collaborator

abrodkin commented Jun 4, 2020

@galak in fact it was done a week ago already, see stephanosio/zephyr-qemu#14 (comment)
Or just cherry-pick this patch - abrodkin/qemu@d2fb10a.

Do you want me to submit a patch with patch for meta-zephyr?

@galak
Copy link
Contributor

galak commented Jun 4, 2020

@galak in fact it was done a week ago already, see stephanosio/zephyr-qemu#14 (comment)
Or just cherry-pick this patch - abrodkin/qemu@d2fb10a.

Do you want me to submit a patch with patch for meta-zephyr?

If you can submit a patch that would be great, might need to be based on this PR.

@abrodkin
Copy link
Collaborator

abrodkin commented Jun 4, 2020

@galak Ok I'll try to do it now. How soon this is needed?

@galak
Copy link
Contributor

galak commented Jun 4, 2020

@galak Ok I'll try to do it now. How soon this is needed?

Not urgent, but in the next week or so? Trying to make some progress on these open PRs.

@abrodkin
Copy link
Collaborator

abrodkin commented Jun 4, 2020

@galak I tried to use Docker container (https://hub.docker.com/r/crops/poky-zephyr-sdk/) as it's suggested here https://github.com/zephyrproject-rtos/sdk-ng/tree/master/meta-zephyr-sdk but see this:

$ bitbake zephyr-qemu

...

ERROR: zephyr-qemu-git-r0 do_configure: Function failed: do_configure (log file is located at /workdir/build/tmp/work/i586-poky-linux/zephyr-qemu/git-r0/temp/log.do_configure.143864)
ERROR: Logfile of failure stored in: /workdir/build/tmp/work/i586-poky-linux/zephyr-qemu/git-r0/temp/log.do_configure.143864
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i586-linux', 'common']
| DEBUG: Executing shell function autotools_preconfigure
| DEBUG: Shell function autotools_preconfigure finished
| DEBUG: Executing python function autotools_copy_aclocals
| DEBUG: Python function autotools_copy_aclocals finished
| DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i586-linux', 'common']
| DEBUG: Executing shell function do_configure
| 
| ERROR: Cannot use '/usr/bin/python3', Python >= 3.5 is required.
|        Use --python=/path/to/python to specify a supported Python.

Is it expected? I guess not :)

@abrodkin
Copy link
Collaborator

abrodkin commented Jun 4, 2020

Was able to build zephyr-qemu finally with help of https://hub.docker.com/r/crops/poky though :)

See stephanosio#1

stephanosio and others added 4 commits June 5, 2020 10:00
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit updates the NIOS2 patch to support QEMU 5.0.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit updates the SPARC patches to support QEMU 5.0.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
We still don't have our repo open so submit this
huge patch bomb here.

This is pretty much the same ARC code rebased and fixed
to work on top of upstream v5.0 release.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
@stephanosio
Copy link
Member Author

Rebased onto the latest master

@stephanosio
Copy link
Member Author

@ioannisg
Copy link
Member

@stephanosio @galak what is the status of this?
Could we merge this and unblock the work for getting Cortex-M4F into Qemu-supported ARCHes, early in the 2.4 release?

@stephanosio
Copy link
Member Author

@stephanosio @galak what is the status of this?
Could we merge this and unblock the work for getting Cortex-M4F into Qemu-supported ARCHes, early in the 2.4 release?

@ioannisg This PR in itself is ready for merging. The rest is up to @galak :)

@ioannisg
Copy link
Member

@stephanosio @galak what is the status of this?
Could we merge this and unblock the work for getting Cortex-M4F into Qemu-supported ARCHes, early in the 2.4 release?

@ioannisg This PR in itself is ready for merging. The rest is up to @galak :)

Hm, interesting :) Then I can merge it myself, perhaps? 🥇

@stephanosio
Copy link
Member Author

Hm, interesting :) Then I can merge it myself, perhaps? 🥇

There have been some subtle/minor changes that potentially warrant 0.11.4 release (e.g. cd1657d). I think that is one thing holding up this PR.

@galak seems to be working on a new CI (that is, hopefully, able to handle different branches) for sdk-ng now, so we should be able to get this PR in without worrying about 0.11.x release soon enough.

@galak
Copy link
Contributor

galak commented Jun 14, 2020

Hm, interesting :) Then I can merge it myself, perhaps? 🥇

There have been some subtle/minor changes that potentially warrant 0.11.4 release (e.g. cd1657d). I think that is one thing holding up this PR.

@galak seems to be working on a new CI (that is, hopefully, able to handle different branches) for sdk-ng now, so we should be able to get this PR in without worrying about 0.11.x release soon enough.

Happy to merge this if someone will take the test build of the SDK and make sure all the qemu platforms still pass and report the results here.

@abrodkin
Copy link
Collaborator

Hm, interesting :) Then I can merge it myself, perhaps? 🥇

There have been some subtle/minor changes that potentially warrant 0.11.4 release (e.g. cd1657d). I think that is one thing holding up this PR.
@galak seems to be working on a new CI (that is, hopefully, able to handle different branches) for sdk-ng now, so we should be able to get this PR in without worrying about 0.11.x release soon enough.

Happy to merge this if someone will take the test build of the SDK and make sure all the qemu platforms still pass and report the results here.

I may give it a spin. Do we have a full list of QEMU platforms to run test for?

@galak
Copy link
Contributor

galak commented Jun 15, 2020

I may give it a spin. Do we have a full list of QEMU platforms to run test for?

[galak@spiff zephyr]$ git grep EMU_PLATFORM | grep qemu
boards/arc/qemu_arc/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/mps2_an385/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/mps2_an521/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_a53/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_m0/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_m3/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_r5/board.cmake:set(EMU_PLATFORM qemu)
boards/nios2/qemu_nios2/board.cmake:set(EMU_PLATFORM qemu)
boards/riscv/hifive1/board.cmake:set(EMU_PLATFORM qemu)
boards/riscv/qemu_riscv32/board.cmake:set(EMU_PLATFORM qemu)
boards/riscv/qemu_riscv64/board.cmake:set(EMU_PLATFORM qemu)
boards/x86/qemu_x86/board.cmake:set(EMU_PLATFORM qemu)
boards/xtensa/qemu_xtensa/board.cmake:set(EMU_PLATFORM qemu)

@abrodkin
Copy link
Collaborator

I may give it a spin. Do we have a full list of QEMU platforms to run test for?

[galak@spiff zephyr]$ git grep EMU_PLATFORM | grep qemu
boards/arc/qemu_arc/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/mps2_an385/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/mps2_an521/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_a53/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_m0/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_m3/board.cmake:set(EMU_PLATFORM qemu)
boards/arm/qemu_cortex_r5/board.cmake:set(EMU_PLATFORM qemu)
boards/nios2/qemu_nios2/board.cmake:set(EMU_PLATFORM qemu)
boards/riscv/hifive1/board.cmake:set(EMU_PLATFORM qemu)
boards/riscv/qemu_riscv32/board.cmake:set(EMU_PLATFORM qemu)
boards/riscv/qemu_riscv64/board.cmake:set(EMU_PLATFORM qemu)
boards/x86/qemu_x86/board.cmake:set(EMU_PLATFORM qemu)
boards/xtensa/qemu_xtensa/board.cmake:set(EMU_PLATFORM qemu)

May I safely guess those platforms except qemu_arc are mapped 1-to-1 to a "platfrom" used for execution? I.e. qemu_cortex_a53 doesn't hide qemu_cortex_a53_XX & qemu_cortex_a53_YY, right? I guess qemu_x86 & qemu_x86_64 are an another example?

Is there a way to just run all QEMU-based boards at once?

@stephanosio
Copy link
Member Author

stephanosio commented Jun 15, 2020

Is there a way to just run all QEMU-based boards at once?

In theory, filtering by CONFIG_QEMU_TARGET=y should work, but it doesn't seem like all QEMU "boards" set this. Actually, it seems this is all we have (I thought we had more but apparently not):

boards/arc/qemu_arc/Kconfig.board:8:    select QEMU_TARGET
boards/arm/mps2_an385/Kconfig.board:7:  select QEMU_TARGET
boards/arm/mps2_an521/Kconfig.board:7:  select QEMU_TARGET
boards/arm/qemu_cortex_a53/Kconfig.board:8:     select QEMU_TARGET
boards/arm/qemu_cortex_m0/Kconfig.board:9:      select QEMU_TARGET
boards/arm/qemu_cortex_m3/Kconfig.board:6:      select QEMU_TARGET
boards/arm/qemu_cortex_r5/Kconfig.board:7:      select QEMU_TARGET
boards/nios2/qemu_nios2/Kconfig.board:6:        select QEMU_TARGET
boards/riscv/qemu_riscv32/Kconfig.board:6:      select QEMU_TARGET
boards/riscv/qemu_riscv64/Kconfig.board:7:      select QEMU_TARGET
boards/x86/qemu_x86/Kconfig.board:6:    select QEMU_TARGET
boards/x86/qemu_x86/Kconfig.board:13:   select QEMU_TARGET
boards/xtensa/qemu_xtensa/Kconfig.board:9:      select QEMU_TARGET

Maybe @nashif has a better idea.

@stephanosio
Copy link
Member Author

@galak https://app.shippable.com/github/zephyrproject-rtos/zephyr/runs/75640/summary/console

That ran with zephyr-qemu, which is based on QEMU v5.0.0 and, for all practical purposes, equivalent to what is in this PR.

As you can see, all tests pass (ignore the two failures that do not have anything to do with QEMU).

@stephanosio
Copy link
Member Author

@galak Shall we merge this now?

@galak galak merged commit 1c0eb67 into zephyrproject-rtos:master Jul 10, 2020
@stephanosio stephanosio deleted the qemu_5_0_rc2 branch July 14, 2020 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade QEMU to 5.0.0
5 participants