Adapted from Tomasz's instructions here Applying the downstream patchesThere are a few patches you must apply to Chrome OS and the kernel to get things working. The following commands will bootstrap your repo. 1- Cherry pick the CLs from this tag. For convenience, just run the following commands from your src dir in your chromiumos checkout: pushd third_party/chromiumos-overlay/ && \ repo start rockchip_upstream . && \ git fetch https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay refs/changes/89/1348489/4 && git cherry-pick FETCH_HEAD && \ git fetch https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay refs/changes/36/1458536/1 && git cherry-pick FETCH_HEAD && \ popd pushd overlays/ && \ repo start rockchip_upstream . && \ git fetch https://chromium.googlesource.com/chromiumos/overlays/board-overlays refs/changes/11/1351911/1 && git cherry-pick FETCH_HEAD && \ popd pushd platform/minigbm && \ repo start rockchip_upstream . && \ git fetch https://chromium.googlesource.com/chromiumos/platform/minigbm refs/changes/52/1347652/4 && git cherry-pick FETCH_HEAD && \ popd 1a- If you have an internal checkout, also cherry pick the patch from this tag. Again, for convenience, here is the command: pushd private-overlays/baseboard-gru-private/ && \ 2- Check out an upstream kernel into the v4.4 kernel directory, and apply the attached patches: pushd third_party/kernel/v4.4/ && \ Alternatively, you can use the following branch with the patches already applied: pushd third_party/kernel/v4.4/ && \ git remote add seanpaul_gitlab https://gitlab.freedesktop.org/seanpaul/kernel.git && \ git fetch seanpaul_gitlab && \ git branch -t rockchip_upstream seanpaul_gitlab/rockchip_upstream && \ If you use the provided branch, you might want to rebase it on a fresher kernel if it becomes stale [exercise left to the reader]. Building the imageAll of the pieces are in place to build your image with the upstream kernel! Run the following commands in your chroot to build your image: export BOARD="kevin|scarlet"
# Only run once
./setup_board --board=$BOARD
cros_workon-$BOARD start minigbm chromeos-kernel-4_4
For scarlet: VIDEO_CARDS="llvmpipe rockchip" USE="llvm llvm_targets_ARM gpu_sandbox_failures_not_fatal -gpu_sandbox_start_early -tpm2 mocktpm $USE" ./build_packages --board=$BOARD For kevin: VIDEO_CARDS="llvmpipe rockchip" USE="llvm llvm_targets_ARM gpu_sandbox_failures_not_fatal -gpu_sandbox_start_early $USE" ./build_packages --board=$BOARDBuild a test image: ./build_image --boot_args="noinitrd kgdboc=ttyS2 slub_debug=FZPUA" --enable_serial=ttyS2 --board=${BOARD} --noenable_rootfs_verification test Now follow the instructions from the Chromium OS Developer Guide to flash your image to a USB stick and boot it on your device. Deploying changes to the kernel is as easy as: emerge-${BOARD} chromeos-kernel-4_4 |
Chromium OS > How Tos and Troubleshooting > Arch Linux + Mainline kernel on kevin (Chromebook Plus) >