blob: f09ff26177eaa9446ff7b52ee5ea0af2d00b1060 [file] [log] [blame]
This is a README file describing how to build Dart for Fuchsia. It assumes that
you have built the magenta kernel under //magenta, its toolchains are
under //toolchains, and that you have a Dart checkout under //dart. It is early
days and this is crufty. The process will improve from here.
1. First, set up some symlinks in your Dart checkout:
-> symlinked to //toolchains
-> symlinked to //magenta/build-magenta-qemu-x86-64/sysroot/
Also, copy the linker script:
//magenta$ cp kernel/arch/x86/64/user.ld build-magenta-qemu-x86-64/sysroot/
and similarly for arm64.
2. Build:
//dart$ tools/ -m product -a x64 --os=fuchsia fuchsia_test
This will produce //dart/out/ProductFuchsiaX64/fuchsia_test
3. Strip it:
//dart$ third_party/fuchsia_tools/toolchains/x86_64-elf-5.3.0-Linux-x86_64/bin/x86_64-elf-strip out/ProductFuchsiaX64/fuchsia_test -o out/ProductFuchsiaX64/fuchsia_test.stripped
4. Make a file //magenta/fuchsia_test.manifest containing:
Where //dart is the actual path to your Dart checkout.
5. Make an extra bootfs:
//magenta$ build-magenta-qemu-x86-64/tools/mkbootfs -o fuchsia_test.bootfs fuchsia_test.manifest
6. Run:
//magenta$ ./scripts/run-magenta-x86-64 -x fuchsia_test.bootfs