commit | bf4df760e4d96c04af0e32e3b9f572d21fbe32be | [log] [tgz] |
---|---|---|
author | Wayne Piekarski <waynepie@google.com> | Wed Oct 06 22:53:31 2021 +0000 |
committer | CQ Bot <commit-bot@chromium.org> | Wed Oct 06 22:53:31 2021 +0000 |
tree | aabfb6870e9d073f6310b63164293274407350da | |
parent | 9de4f04ee169090dc71165b20415165571b84650 [diff] |
[samples] Fix to use fuchsia_sdk_readelf_exec after renaming in GN SDK Previous commit fxr/575166 used the older variable readelf_exec_override which was renamed to fuchsia_sdk_readelf_exec when committed to the tree, so need to fix this here in the samples repo. Now readelf is being overridden to llvm-readelf as expected. Change-Id: I34776125d9e955ec8eead9ce3b35651b6917ba6a Reviewed-on: https://fuchsia-review.googlesource.com/c/samples/+/590921 Reviewed-by: Clayton Wilkinson <wilkinsonclay@google.com> Commit-Queue: Wayne Piekarski <waynepie@google.com>
A collection of samples demonstrating how to build, run, and test Fuchsia components outside the Fuchsia source code tree.
Caution: These samples might be changed in backward-incompatible ways and are not recommended for production use. This repository is not subject to any SLA or deprecation policy.
Install required dependencies for building:
sudo apt-get install curl unzip clang python3 build-essential
Clone this repo and submodules:
git clone https://fuchsia.googlesource.com/samples --recursive --depth 1
If you have already cloned this repo without the --recursive
flag you can run git submodule init && git submodule update --recursive
to download the submodules. The git history is quite large, and you can download only the newest commit with --depth 1
. Remove this flag if you want the entire history.
Change directory to the root of the repo and setup and run the tests:
cd samples ./scripts/setup-and-test.sh
This script downloads all required dependencies (this may take 5-30min), builds the samples, and runs the tests. If the script completes without errors all tests have passed.
The C++ samples in this repo only support Linux hosts and the GN build system.
To get started see the SDK documentation.
Example application using Scenic to render animated graphics.
To get started, see the README.
FIDL protocol server and client implementing a calculator interface.
To get started, see the README.
Basic component that prints a Hello World greeting.
To get started, see the README.
FIDL protocol server and client implementing a simple ROT13 encoding interface.
To get started, see the README.
The build
directory contains the build configuration for the sample including the toolchain, targets and tests.
The buildtools
directory contains scripts to help with the build process like downloading needed tools (e.g. gn, ninja).
The src
directory contains the source code for the C++ samples.
GN samples has two third_party dependencies: the Fuchsia GN SDK and googletest (googletest is only required for testing):
Fuchsia x64 system images can be started with the included emulator scripts and run on x64 hosts. Native Vulkan support on the host is required for graphics support.
sudo apt-get install libvulkan1 mesa-vulkan-drivers
./scripts/download-build-tools.sh
./buildtools/linux64/gn gen out/x64 --args='target_os="fuchsia" target_cpu="x64"'
./third_party/fuchsia-sdk/bin/femu.sh -N
./third_party/fuchsia-sdk/bin/fserve.sh --image qemu-x64
./third_party/fuchsia-sdk/bin/fssh.sh
Fuchsia arm64 system images can be emulated on x64 hosts with the included emulator scripts, although the performance is much slower since each instruction needs to be emulated. Graphics output is also not supported at this time, access is only via serial console or SSH.
./scripts/download-build-tools.sh
./buildtools/linux64/gn gen out/arm64 --args='target_os="fuchsia" target_cpu="arm64"'
./third_party/fuchsia-sdk/bin/femu.sh -N --experiment-arm64 --image qemu-arm64 --headless --software-gpu
./third_party/fuchsia-sdk/bin/fserve.sh --image qemu-arm64
./third_party/fuchsia-sdk/bin/fssh.sh