Bug 249604 - [WPE] Add support for generating a cross toolchain, images and cross building easily for a set of curated embedded targets with Yocto
Summary: [WPE] Add support for generating a cross toolchain, images and cross building...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords: InRadar
Depends on:
Blocks: 249031
  Show dependency treegraph
 
Reported: 2022-12-19 13:15 PST by Carlos Alberto Lopez Perez
Modified: 2023-01-27 05:06 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2022-12-19 13:15:56 PST
It will be a good idea to have built-in support in the WebKit tooling scripts for building WebKit for different embedded boards with curated configurations.

This support would be used by the upcoming performance-bot  ( see bug 249031 ) for building WebKit for the target board.

This should allow to do the following:

- Build the cross-toolchain from scratch from the configuration files
- Build WebKit with this cross-toolchain
- Build an image for the target board (without WebKit)
- Generate a release.zip archive with WebKit for the board
- Detect when the configuration files change and rebuild the toolchain and WebKit

Proposed implementation:

1.
$ Tools/Scripts/build-webkit --wpe --release --cross-target=rpi3-32bits-mesa
This does:
 - If still not built, then builds cross-toolchain for embedded target: rpi3-32bits-mesa
 - Builds WebKit with the previous toolchain

2.
Tools/Scripts/cross-toolchain-helper --cross-target=rpi3-32bits-mesa --build-image 
This does:
  - Generates an image for the rpi3 that you can flash to an SDCard and boot with it.
  - Note: the image doesn't include WebKit (WPE) itself, but it includes everything needed to build WebKit or run tests.

3.
$ Tools/CISupport/built-product-archive --platform=wpe --release --cross-target=rpi3-32bits-mesa archive
This does:
 - Generates 'release.zip' with the built-product for the embedded target: rpi3-32bits-mesa
 - You can copy this 'release.zip' to the board running the image above and run the minibrowser or any test (like layout tests or perf tests) with this


For more details and examples, check the file: Tools/yocto/README.md on the upcoming patch.

Related: bug 249031
Comment 1 Carlos Alberto Lopez Perez 2022-12-19 16:55:13 PST
Pull request: https://github.com/WebKit/WebKit/pull/7885
Comment 2 EWS 2023-01-27 05:05:13 PST
Committed 259479@main (80926377d6a9): <https://commits.webkit.org/259479@main>

Reviewed commits have been landed. Closing PR #7885 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-01-27 05:06:24 PST
<rdar://problem/104741374>