Official document:
https://chromium.googlesource.com/chromiumos/docs/+/master/developer_guide.md
Fetch code from Google
$ repo init -u https://chromium.googlesource.com/chromiumos/manifest.git –repo-url https://chromium.googlesource.com/external/repo.git -b stable
- If you want to clone single library, using
$ repo sync “src/third_party/libqmi”
If you want to fetch all libraries, using
$ repo sync -c - Enter the root of sdk
$ cd chromite/bin - Enable virtual machine environment
$ ./cros_sdk
/***
cros_sdk:make_chroot: All set up. To enter the chroot, run:
$ cros_sdk –enter
CAUTION: Do NOT rm -rf the chroot directory; if there are stale bind
mounts you may end up deleting your source tree too. To unmount and
delete the chroot cleanly, use:
$ cros_sdk –delete
***/ - Configure cross compiler toolchain
$ setup_board –board=arm64-generic
if you want to build kernel, set your password.
// ./set_shared_user_password.sh
Check libraries
// cros_workon –board=arm64-generic –all list - Fetch toolchain
./build_packages –board=arm64-generic
Some configurations.
// update_chroot –toolchain_boards arm64-generic –usepkg
//loman add –workon chromiumos/third_party/libqmi
//cros_workon –board=arm64-generic start libqmi
//cros_workon_make –board=arm64-generic libqmi - Start to build pre-build libraries and your target.
// https://chromium.googlesource.com/chromiumos/docs/+/master/portage/ebuild_faq.md#How-does-the-cross-compiling-setup-work
$ emerge-arm64-generic libqmi