[webkit-changes] [WebKit/WebKit] 809263: [WPE] Add support for generating a cross toolchain...

Carlos Alberto Lopez Perez noreply at github.com
Fri Jan 27 05:05:23 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 80926377d6a9f2454a3fd3c5f586b2a8f6c7ad34
      https://github.com/WebKit/WebKit/commit/80926377d6a9f2454a3fd3c5f586b2a8f6c7ad34
  Author: Carlos Alberto Lopez Perez <clopez at igalia.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Tools/CISupport/built-product-archive
    M Tools/Scripts/build-webkit
    A Tools/Scripts/cross-toolchain-helper
    M Tools/Scripts/update-webkitgtk-libs
    M Tools/Scripts/update-webkitwpe-libs
    M Tools/Scripts/webkitdirs.pm
    A Tools/yocto/README.md
    A Tools/yocto/rpi/bblayers.conf
    A Tools/yocto/rpi/fix-nativesdk-image-defs.patch
    A Tools/yocto/rpi/local-rpi3-32bits-mesa.conf
    A Tools/yocto/rpi/local-rpi3-32bits-userland.conf
    A Tools/yocto/rpi/local-rpi3-64bits-mesa.conf
    A Tools/yocto/rpi/local-rpi4-32bits-mesa.conf
    A Tools/yocto/rpi/local-rpi4-64bits-mesa.conf
    A Tools/yocto/rpi/manifest.xml
    A Tools/yocto/targets.conf

  Log Message:
  -----------
  [WPE] Add support for generating a cross toolchain, images and cross building easily for a set of curated embedded targets with Yocto
https://bugs.webkit.org/show_bug.cgi?id=249604

Reviewed by Philippe Normand.

This adds a new script named 'cross-toolchain-helper' that
automates the process of building a cross-toolchain and an
image with Yocto.

The script also is able to automatically deploy the Yocto
workdir and set the target build configs from a set of
configuration files.

The main configuration file for this script is at the path
'Tools/yocto/targets.conf'. Inside this file several targets
can be defined. Each target defines a set of Yocto layers
and local.conf configurations. It can be also defined the
default WebKit parameters for each target.

The following WebKit tool scripts are also patched to be
aware of the cross-target builds:
  - Tools/Scripts/update-webkitwpe-libs
  - Tools/Scripts/update-webkitgtk-libs
  - Tools/Scripts/build-webkit
  - Tools/CISupport/built-product-archive

To enable the cross-target builds the flag '--cross-target=target_name'
should be passed. Alternatively the environment variable
'WEBKIT_CROSS_TARGET' can be used instead.

The list of targets defined at 'Tools/yocto/targets.conf'
is curated and is expected to build and work without issues.
In the near future a post-commit bot will be checking this.

The tool is designed to automatically wipe and recreate the
cross-toolchain and images when it detects the configuration
for any target has changed. However, this behaviour can be
overriden by optional parameters.

For more info (including examples on how to use this) check the file:
Tools/yocto/README.md

* Tools/CISupport/built-product-archive:
* Tools/Scripts/build-webkit:
* Tools/Scripts/cross-toolchain-helper: Added.
* Tools/Scripts/update-webkitgtk-libs:
* Tools/Scripts/update-webkitwpe-libs:
* Tools/Scripts/webkitdirs.pm:
(determineCrossTarget):
(determineConfigurationProductDir):
(determinePassedConfiguration):
(runInCrossTargetEnvironment):
(inCrossTargetEnvironment):
(getCrossTargetName):
(shouldBuildForCrossTarget):
(wrapperPrefixIfNeeded):
(shouldUseFlatpak):
(cmakeCachePath):
(cmakeFilesPath):
(shouldRemoveCMakeCache):
(cmakeGeneratedBuildfile):
(generateBuildSystemFromCMakeProject):
(productDirForCMake):
(buildCMakeGeneratedProject):
(cleanCMakeGeneratedProject):
* Tools/yocto/README.md: Added.
* Tools/yocto/rpi/bblayers.conf: Added.
* Tools/yocto/rpi/fix-nativesdk-image-defs.patch: Added.
* Tools/yocto/rpi/local-rpi3-32bits-mesa.conf: Added.
* Tools/yocto/rpi/local-rpi3-32bits-userland.conf: Added.
* Tools/yocto/rpi/local-rpi3-64bits-mesa.conf: Added.
* Tools/yocto/rpi/local-rpi4-32bits-mesa.conf: Added.
* Tools/yocto/rpi/local-rpi4-64bits-mesa.conf: Added.
* Tools/yocto/rpi/manifest.xml: Added.
* Tools/yocto/targets.conf: Added.

Canonical link: https://commits.webkit.org/259479@main




More information about the webkit-changes mailing list