[meta-zephyr][PATCH v4] Restructure and remove MACHINEOVERRIDES
Eilís Ní Fhlannagáin
From: Eilís Ní Fhlannagáin <elizabeth.flanagan@...>
This set of patches relates to what I discussed at https://lists.yoctoproject.org/g/yocto/message/55285. Four major issues (and one minor issue)are dealt with in this series. The first is a logical split of the meta-zephyr layer into a machine BSP layer and a functional core layer. The second is the removal for the need of MACHINEOVERRIDES as a method of telling zephyr it's'-DZEPHYR_MODULES. Zephyr already knows this, so by abusing west list a bit, we can pull that information out and generate the needed config line to be passed into cmake. Out of tree ZEPHYR_MODULES should be added via ZEPHYR_EXTRA_MODULES. The third major issue is as we're now relying on west to know what modules Zephyr needs, we need to checkout the complete Zephyr source. The last major issue is that Zephyr knows it's own machine config and I would like us to support as many of the Zephyr machines as possible. As I've yet to find a way to do this at build time, with a little abuse of cmake exports we can generate machine configurations based on what is in Zephyr itself. These have obviously not all been tested I've not added the machines it generates as there are still some issues around automatic machine generation that I wish to solve before adding those machines, however 288 machines will build helloworld without issue. More work needs to be done here. A few machines will most likely never work at all without some significant work. Lastly there was a minor issue with the 2.6.1 kernel in that the dtc patch Ross created for 2.7.0 (moved to 2.7.1) wasn't applied which causes 2.6.1 to fail with the same error Eilís Ní Fhlannagáin (8): meta-zephyr-core/bsp: Restructure into sublayers west: Add west and python dependencies zephyr.bbclass: Remove need for MACHINEOVERRIDES for ZEPHYR_MODULES zephyr-kernel-src: Add complete zephyr source zephyr-kernel-src-2.6.1: Add dtc patch. recipes-meta: Abuse CMake to create OE machine definitions zephyr-kernel: Modify recipes to work with new -DZEPHYR_MODULES README.txt: Document generate-zephyr-machine use README.txt | 18 +- {conf => meta-zephyr-bsp/conf}/layer.conf | 12 +- .../conf}/machine/96b-avenger96.conf | 0 .../conf}/machine/96b-nitrogen.conf | 0 .../conf}/machine/arduino-nano-33-ble.conf | 0 .../conf}/machine/include/nrf52.inc | 2 - .../machine/include/stm32mp1-cortex-m4.inc | 3 - .../conf}/machine/include/tune-arc.inc | 0 .../machine/include/tune-corei7-common.inc | 0 .../conf}/machine/include/tune-cortexm0.inc | 0 .../conf}/machine/include/tune-cortexm3.inc | 0 .../conf}/machine/include/tune-cortexm4.inc | 0 .../conf}/machine/include/tune-iamcu.inc | 0 .../conf}/machine/include/tune-nios2.inc | 0 .../conf}/machine/intel-x86-64.conf | 0 .../conf}/machine/nrf52840dk-nrf52840.conf | 0 .../conf}/machine/qemu-cortex-m3.conf | 0 .../conf}/machine/qemu-nios2.conf | 0 .../conf}/machine/qemu-x86.conf | 0 .../conf}/machine/stm32mp157c-dk2.conf | 0 ...xport-an-OpenEmbedded-machine-config.patch | 184 ++++++++++++++++++ .../meta/generate-zephyr-machines.bb | 45 +++++ COPYING.MIT => meta-zephyr-core/COPYING.MIT | 0 meta-zephyr-core/README.txt | 119 +++++++++++ .../classes}/siteinfo-zephyr.bbclass | 0 .../classes}/zephyr-flash-bossac.bbclass | 0 .../classes}/zephyr-flash-dfu.bbclass | 0 .../classes}/zephyr-flash-pyocd.bbclass | 0 .../classes}/zephyr-qemuboot.bbclass | 0 .../classes}/zephyr.bbclass | 42 ++++ .../classes}/zephyrtest.bbclass | 0 .../conf}/distro/zephyr.conf | 0 meta-zephyr-core/conf/layer.conf | 22 +++ .../lib}/oeqa/controllers/__init__.py | 0 .../oeqa/controllers/zephyrtargetcontrol.py | 0 .../lib}/oeqa/runtime/__init__.py | 0 .../lib}/oeqa/runtime/cases/zephyr.py | 0 .../lib}/oeqa/utils/qemuzephyrrunner.py | 0 .../recipes-core}/newlib/newlib_%.bbappend | 0 .../binutils/binutils-2.26arc.inc | 0 .../binutils-cross-canadian_2.26arc.bb | 0 .../binutils/binutils-cross_2.26arc.bb | 0 ...e54244cd02bdcf4f1057be3ce96631f35ac3.patch | 0 .../recipes-devtools-arc}/gcc/gcc-6.x.arc.inc | 0 .../gcc/gcc-cross-canadian_6.x.arc.bb | 0 .../gcc/gcc-cross_6.x.arc .bb | 0 .../gcc/gcc-source_6.x.arc.bb | 0 .../gcc/libgcc_6.x.arc.bb | 0 .../gcc/gcc-cross_6.%.bbappend | 0 .../recipes-devtools}/gcc/libgcc_6.%.bbappend | 0 .../python/python3-anytree_2.8.0.bb | 14 ++ .../python/python3-breathe_4.31.0.bb | 17 ++ .../python/python3-canopen_1.2.1.bb | 17 ++ .../python/python3-cbor_1.0.0.bb | 19 ++ .../python/python3-gitlint_0.15.1.bb | 14 ++ .../python/python3-imgtool_1.7.2.bb | 14 ++ .../python/python3-junithtml_30.0.4.bb | 14 ++ .../python/python3-junitparser_2.1.1.bb | 14 ++ .../python/python3-lpc-checksum_2.2.0.bb | 14 ++ .../python/python3-packaging_21.0.bb | 14 ++ .../python/python3-pyelftools_0.27.bb | 14 ++ .../python/python3-pygithub_1.55.bb | 14 ++ .../python/python3-pygments_2.10.0.bb | 15 ++ .../recipes-devtools/python/python3-pylink | 11 ++ .../python/python3-pyocd_0.32.0.bb | 14 ++ .../python/python3-pyparsing_2.4.7.bb | 14 ++ .../python/python3-sphinx_4.2.0.bb | 14 ++ .../qemu/files/nios2-add-support.patch | 0 .../recipes-devtools}/qemu/qemu_%.bbappend | 0 .../recipes-devtools/west/west_0.12.99.bb | 22 +++ .../0001-cmake-add-yocto-toolchain.patch | 0 ...0001-cmake-added-missing-file-ext-to.patch | 0 ...ry-generation-issue-in-cross-compila.patch | 0 ...rduino-nano-33-ble-storage-partition.patch | 0 .../zephyr-kernel/files/dtc.patch | 0 .../zephyr-kernel/zephyr-blinky.bb | 0 .../zephyr-kernel/zephyr-coap-client.bb | 2 - .../zephyr-kernel/zephyr-coap-server.bb | 2 - .../zephyr-kernel/zephyr-echo-client.bb | 2 - .../zephyr-kernel/zephyr-hci-uart.bb | 0 .../zephyr-kernel/zephyr-helloworld.bb | 0 .../zephyr-kernel/zephyr-http-client.bb | 1 - .../zephyr-kernel/zephyr-image.inc | 0 .../zephyr-kernel/zephyr-kernel-common.inc | 13 +- .../zephyr-kernel/zephyr-kernel-src-2.6.1.inc | 54 +++++ .../zephyr-kernel/zephyr-kernel-src-2.7.1.inc | 69 +++++++ .../zephyr-kernel/zephyr-kernel-src-dev.inc | 0 .../zephyr-kernel/zephyr-kernel-src.bb | 0 .../zephyr-kernel/zephyr-kernel-src.inc | 58 ++++++ .../zephyr-kernel/zephyr-kernel-test-all.bb | 0 .../zephyr-kernel/zephyr-kernel-test.bb | 0 .../zephyr-kernel/zephyr-kernel-test.inc | 0 .../zephyr-kernel/zephyr-lvgl.bb | 8 + .../zephyr-kernel/zephyr-mqtt-publisher.bb | 2 - .../zephyr-kernel/zephyr-openamp-rsc-table.bb | 0 .../zephyr-openthread-echo-client.bb | 3 - .../zephyr-kernel/zephyr-peripheral-esp.bb | 2 - .../zephyr-kernel/zephyr-peripheral-hr.bb | 2 - .../zephyr-kernel/zephyr-philosophers.bb | 0 .../zephyr-kernel/zephyr-sample.inc | 0 .../zephyr-kernel/zephyr-websocket-client.bb | 2 - .../zephyr-kernel/zephyr-kernel-src-2.6.1.inc | 20 -- .../zephyr-kernel/zephyr-kernel-src-2.7.1.inc | 20 -- .../zephyr-kernel/zephyr-kernel-src.inc | 27 --- recipes-kernel/zephyr-kernel/zephyr-lvgl.bb | 18 -- 105 files changed, 898 insertions(+), 123 deletions(-) rename {conf => meta-zephyr-bsp/conf}/layer.conf (62%) rename {conf => meta-zephyr-bsp/conf}/machine/96b-avenger96.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/96b-nitrogen.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/arduino-nano-33-ble.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/include/nrf52.inc (89%) rename {conf => meta-zephyr-bsp/conf}/machine/include/stm32mp1-cortex-m4.inc (67%) rename {conf => meta-zephyr-bsp/conf}/machine/include/tune-arc.inc (100%) rename {conf => meta-zephyr-bsp/conf}/machine/include/tune-corei7-common.inc (100%) rename {conf => meta-zephyr-bsp/conf}/machine/include/tune-cortexm0.inc (100%) rename {conf => meta-zephyr-bsp/conf}/machine/include/tune-cortexm3.inc (100%) rename {conf => meta-zephyr-bsp/conf}/machine/include/tune-cortexm4.inc (100%) rename {conf => meta-zephyr-bsp/conf}/machine/include/tune-iamcu.inc (100%) rename {conf => meta-zephyr-bsp/conf}/machine/include/tune-nios2.inc (100%) rename {conf => meta-zephyr-bsp/conf}/machine/intel-x86-64.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/nrf52840dk-nrf52840.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/qemu-cortex-m3.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/qemu-nios2.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/qemu-x86.conf (100%) rename {conf => meta-zephyr-bsp/conf}/machine/stm32mp157c-dk2.conf (100%) create mode 100644 meta-zephyr-bsp/recipes-meta/meta/files/0001-zephyr-Export-an-OpenEmbedded-machine-config.patch create mode 100644 meta-zephyr-bsp/recipes-meta/meta/generate-zephyr-machines.bb rename COPYING.MIT => meta-zephyr-core/COPYING.MIT (100%) create mode 100644 meta-zephyr-core/README.txt rename {classes => meta-zephyr-core/classes}/siteinfo-zephyr.bbclass (100%) rename {classes => meta-zephyr-core/classes}/zephyr-flash-bossac.bbclass (100%) rename {classes => meta-zephyr-core/classes}/zephyr-flash-dfu.bbclass (100%) rename {classes => meta-zephyr-core/classes}/zephyr-flash-pyocd.bbclass (100%) rename {classes => meta-zephyr-core/classes}/zephyr-qemuboot.bbclass (100%) rename {classes => meta-zephyr-core/classes}/zephyr.bbclass (54%) rename {classes => meta-zephyr-core/classes}/zephyrtest.bbclass (100%) rename {conf => meta-zephyr-core/conf}/distro/zephyr.conf (100%) create mode 100644 meta-zephyr-core/conf/layer.conf rename {lib => meta-zephyr-core/lib}/oeqa/controllers/__init__.py (100%) rename {lib => meta-zephyr-core/lib}/oeqa/controllers/zephyrtargetcontrol.py (100%) rename {lib => meta-zephyr-core/lib}/oeqa/runtime/__init__.py (100%) rename {lib => meta-zephyr-core/lib}/oeqa/runtime/cases/zephyr.py (100%) rename {lib => meta-zephyr-core/lib}/oeqa/utils/qemuzephyrrunner.py (100%) rename {recipes-core => meta-zephyr-core/recipes-core}/newlib/newlib_%.bbappend (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/binutils/binutils-2.26arc.inc (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/binutils/binutils-cross-canadian_2.26arc.bb (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/binutils/binutils-cross_2.26arc.bb (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/gcc/files/cbd8e54244cd02bdcf4f1057be3ce96631f35ac3.patch (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/gcc/gcc-6.x.arc.inc (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/gcc/gcc-cross-canadian_6.x.arc.bb (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/gcc/gcc-cross_6.x.arc .bb (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/gcc/gcc-source_6.x.arc.bb (100%) rename {recipes-devtools-arc => meta-zephyr-core/recipes-devtools-arc}/gcc/libgcc_6.x.arc.bb (100%) rename {recipes-devtools => meta-zephyr-core/recipes-devtools}/gcc/gcc-cross_6.%.bbappend (100%) rename {recipes-devtools => meta-zephyr-core/recipes-devtools}/gcc/libgcc_6.%.bbappend (100%) create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-anytree_2.8.0.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-breathe_4.31.0.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-canopen_1.2.1.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-cbor_1.0.0.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-gitlint_0.15.1.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-imgtool_1.7.2.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-junithtml_30.0.4.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-junitparser_2.1.1.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-lpc-checksum_2.2.0.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-packaging_21.0.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-pyelftools_0.27.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-pygithub_1.55.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-pygments_2.10.0.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-pylink create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-pyocd_0.32.0.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-pyparsing_2.4.7.bb create mode 100644 meta-zephyr-core/recipes-devtools/python/python3-sphinx_4.2.0.bb rename {recipes-devtools => meta-zephyr-core/recipes-devtools}/qemu/files/nios2-add-support.patch (100%) rename {recipes-devtools => meta-zephyr-core/recipes-devtools}/qemu/qemu_%.bbappend (100%) create mode 100644 meta-zephyr-core/recipes-devtools/west/west_0.12.99.bb rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/files/0001-cmake-add-yocto-toolchain.patch (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/files/0001-cmake-added-missing-file-ext-to.patch (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/files/0001-x86-fix-efi-binary-generation-issue-in-cross-compila.patch (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/files/arduino-nano-33-ble-storage-partition.patch (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/files/dtc.patch (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-blinky.bb (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-coap-client.bb (60%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-coap-server.bb (60%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-echo-client.bb (60%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-hci-uart.bb (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-helloworld.bb (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-http-client.bb (61%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-image.inc (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-kernel-common.inc (76%) create mode 100644 meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.1.inc create mode 100644 meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.1.inc rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-kernel-src-dev.inc (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-kernel-src.bb (100%) create mode 100644 meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-kernel-test-all.bb (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-kernel-test.bb (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-kernel-test.inc (100%) create mode 100644 meta-zephyr-core/recipes-kernel/zephyr-kernel/zephyr-lvgl.bb rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-mqtt-publisher.bb (59%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-openamp-rsc-table.bb (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-openthread-echo-client.bb (77%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-peripheral-esp.bb (58%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-peripheral-hr.bb (58%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-philosophers.bb (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-sample.inc (100%) rename {recipes-kernel => meta-zephyr-core/recipes-kernel}/zephyr-kernel/zephyr-websocket-client.bb (61%) delete mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.6.1.inc delete mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel-src-2.7.1.inc delete mode 100644 recipes-kernel/zephyr-kernel/zephyr-kernel-src.inc delete mode 100644 recipes-kernel/zephyr-kernel/zephyr-lvgl.bb -- 2.25.1 |
|