Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Touchpad while typing. Fix eve-recovery-files loop regex. Keyboard mapping additions #15

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a056ce2
Update eve-recovery-files loop dev regex
flantel May 25, 2019
89e5996
Disable Touchpad while typing
flantel Jun 26, 2019
58963cb
Merge pull request #1 from flantel/flantel-patch-1
flantel Dec 3, 2019
0e001cc
Support (optional) remapping of keyboard to use Chromebook top key ma…
barryflanagan Dec 3, 2019
6d963f1
Ensure /etc/libinput directory exists. Fixes issue #17
barryflanagan Dec 3, 2019
8a00d2a
update to the latest chromeos release kernel
daemonp Dec 18, 2019
9585049
update readme to include kernel build instructions
daemonp Dec 18, 2019
362dd4e
switch to chromeos release-R75-12105.B-chromeos-4.4 kernel branch pro…
daemonp Dec 18, 2019
5835c30
fix filename
daemonp Dec 19, 2019
4ddb2af
Merge pull request #2 from daemonp/kernel-upgrade
flantel Dec 19, 2019
a6c80e3
Use Ubuntu 19.10
kyzn May 9, 2020
4556f9c
Add 'ccd reset factory' while removing write protect
kyzn May 9, 2020
b71fe25
Remount two folders for MrChromebox script as exec
kyzn May 9, 2020
213fb6c
Add a quick note about firmware-util backup
kyzn May 9, 2020
1a8f650
Get the most updated repo
kyzn May 9, 2020
693cd23
Make sure to use the 'alternative' way as that one seems to work.
kyzn May 9, 2020
ded8fda
Install gcc-8 to get around gcc/cras issues
kyzn May 9, 2020
56f3ce0
Create /etc/libinput by hand before starting script
kyzn May 9, 2020
5b24d5b
Add an optional note about seeing boot menu
kyzn May 9, 2020
32e700f
A quick note about checking kernel running and removing old kernel
kyzn May 9, 2020
b044276
Minor typos and leading spaces
kyzn May 9, 2020
57d3cd0
Merge pull request #3 from kyzn/master
flantel May 26, 2020
e2195b3
Default to src installation, drop deb install
kyzn Jul 19, 2020
1884327
Fix broken see details link
kyzn Jul 19, 2020
855328f
Update README.md
flantel Jul 20, 2020
6140dbd
Fix kernel name
kyzn Jul 20, 2020
6188171
Don't add KEYBOARD_KEY_d8 twice
kyzn Jul 21, 2020
f4776e6
Don't add KEYBOARD_KEY_db twice
kyzn Aug 19, 2020
af28198
Merge pull request #4 from kyzn/master
flantel Aug 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 70 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# NOTE: I am no longer using a Pixelbook, so will not be maintaining this. Someone should either fork it or let me know and if they want to be able to commit new changes/PRs - @flantel

# Installing "real" linux on a Google Pixelbook

This repo documents the process of replacing ChromeOS on a stock [Google Pixelbook][pixelbook_product_page]
Expand All @@ -10,7 +12,7 @@ the battery cable to disable the firmware write protect. This method avoids the
you will need to spend ~$20 USD on a special USB cable. See the [installation instructions](#installation)
for details.

The automated configuration targets Ubuntu 19.04 (Disco Dingo), although it's likely that the basic techniques
The automated configuration targets Ubuntu 19.10 (Eoan Ermine), although it's likely that the basic techniques
used will work for any distribution. I initially tried using Fedora Workstation 29, but ran into an issue where
the system would crash immediately after resuming from suspend. I assumed this was due to my tweaks, but decided
to give another distro a shot and found Ubuntu worked without issue. As a nice bonus, bluetooth works out of the
Expand All @@ -19,7 +21,7 @@ box on Ubuntu, whereas Fedora required some fiddling post-install.
## Why

I absolutely love the Pixelbook hardware. The keyboard is better than any laptop keyboard I've ever used,
including the sorely missed pre-butterfly MacBook Pro keyboards. I also really like the 3:2 screen aspect ratio, the
including the sorely missed pre-butterfly MacBook Pro keyboards. I also really like the 3:2 screen aspect ratio, the
beautiful chassis and design, etc.

I bought the machine in the first place because I was excited about [Crostini](https://reddit.com/r/crostini), which is
Expand All @@ -44,7 +46,7 @@ Here's what's working at the moment:
| Display backlight | Always on at 100% | Adjustable using standard controls |
| Sound | Broken | Working, [see details](implementation-details.md#audio-support) |
| Keyboard backlight | Broken | Working (using helper script to adjust) |
| Swap | Working | zram swap only [see details](implementation-details#swap-support) |
| Swap | Working | zram swap only [see details](implementation-details.md#swap-support) |
| Hibernate | Untested | Unsupported, [see details](implementation-details.md#hibernation) |


Expand All @@ -54,10 +56,10 @@ Here's what's working at the moment:
full UEFI firmware) [fail to extract files from the recovery
image](https://github.com/yusefnapora/pixelbook-linux/issues/3).
- Running the install script while booting from an external USB has not been
verified to work, and might suffer from a similar issue. Please update
verified to work, and might suffer from a similar issue. Please update
[this issue](https://github.com/yusefnapora/pixelbook-linux/issues/1) if
you're able to test it out.

Please [open an issue](https://github.com/yusefnapora/pixelbook-linux/issues/new) if you find other problems.


Expand Down Expand Up @@ -99,7 +101,7 @@ help as time allows.
### Flashing UEFI Firmware

To boot operating systems other than ChromeOS, we need to replace the Pixelbook firmware with a more
standard UEFI firmare implementation.
standard UEFI firmware implementation.

Luckily, the indefatigable [MrChromebox](https://mrchromebox.tech) has developed a full replacement
firmware for many ChromeOS devices, including the Pixelbook.
Expand Down Expand Up @@ -178,7 +180,7 @@ ls /dev/tty*
```

**Important Note**: If you don't see any `/dev/ttyUSB` devices showing up when you plug in the
cable, flip the USB-C end of the CCD cable over! Unlike most USB-C cables, the pins on the CCD
cable, flip the USB-C end of the CCD cable over! Unlike most USB-C cables, the pins on the CCD
cable **are not bidirectional.**

Now we can send commands to the `cr50` console at `/dev/ttyUSB0`:
Expand All @@ -189,18 +191,19 @@ echo "wp false" > /dev/ttyUSB0
echo "wp false atboot" > /dev/ttyUSB0
echo "ccd set OverrideWP Always" > /dev/ttyUSB0
echo "ccd set FlashAP Always" > /dev/ttyUSB0
echo "ccd reset factory" > /dev/ttyUSB0
```

That will disable write protect, and also change the capabilities to allow overriding the write
protect setting and flashing the firmware even if the CCD is locked. This makes it possible to
recover if anything goes wrong during flashing and makes it easier to restore the original
firmawre.
firmware.

Once you've issued the commands above, check the status with `gsctool -a -I` - you should see
that the `OverrideWP` and `FlashAP` capabilities have changed from the default of `IfOpened`
to `Always`.
everything listed there have "Always". Some of them are changed from "IfOpened" (in parentheses).

Now run `crossystem wpsw_cur` to verify the current write protect setting.
Now run `crossystem wpsw_cur` to verify the current write protect setting. This should show `0`.
Also do `crossystem wpsw_boot` to verify write protect status on boot. This should be `0` too.

Alright, now that you've disabled Write Protect, you can flash the firmware!

Expand All @@ -211,6 +214,14 @@ You won't be needing the CCD cable anymore, so feel free to disconnect it and pu
We'll be using MrChromebox's [firmware utility script](https://mrchromebox.tech/#fwscript) to flash
the UEFI firmware.

Before we begin, we need to remount two folders this script will use with exec.
Run following in `crosh` shell.

```
sudo mount /tmp -o remount,exec
sudo mount /home/chronos/user -o remount,exec
```

I made an ascii-cast for this as well, if you want to follow along:

[![asciicast](https://asciinema.org/a/241665.svg)](https://asciinema.org/a/241665)
Expand All @@ -227,6 +238,9 @@ prompts.
**Important:** Make a backup when prompted! This is why the requirements section told you to get
2 USB flash drives. Seriously, USB drives are dirt cheap; don't skip this step.

This backup does not make a bootable USB. It creates a `stock-firmware-EVE-<date>.rom` file in
the external USB flash drive. The file is about 15 MB.

After a couple minutes, you should be all set! Say goodbye to ChromeOS; by flashing this firmware
you lose the ability to boot into ChromeOS, and you'll need to restore your firmware from the
backup if you want to go back.
Expand All @@ -236,7 +250,7 @@ backup if you want to go back.
Now that you're running a standard UEFI firmware, installing Ubuntu works just like on a standard
laptop.

Download an ISO image for [Ubuntu Desktop 19.04][ubuntu_dl] - other versions might work, but I make absolutely
Download an ISO image for [Ubuntu Desktop 19.10][ubuntu_dl] - other versions might work, but I make absolutely
no guarantees, and I won't be able to help you out if things are broken. Note that I might not be
able to help regardless, but if you run into issues and you're not running the same distro as me,
chances are much higher I'll shrug my shoulders and ineffectually wish you good luck, rather than
Expand All @@ -257,6 +271,10 @@ unless you wiggle the cursor when the system is booting. If your mouse cursor is
installer (or in the stock Ubuntu install afterward), try rebooting and continuously moving your
finger around on the trackpad while the system starts.

Your screen might come up upside down. This is due to auto screen rotation. You can rotate your machine
upside down, then click triangle at top right, and click the button with lock sign inside rotating arrows.
This will "lock screen rotation" so it will stay in the correct direction.

Now you can go ahead and install Ubuntu using the standard method. The installer defaults should all
work fine, although I recommend encrypting your disk, or at least enabling LVM for volume management.

Expand All @@ -283,12 +301,15 @@ git config --global user.email "[email protected]"
Now clone this repository:

```bash
git clone https://github.com/yusefnapora/pixelbook-linux
git clone https://github.com/flantel/pixelbook-linux

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change might need to be reversed once this PR is merged.

```

Enter the `pixelbook-linux` directory and run the install script:
Enter the `pixelbook-linux` directory and run following:

```bash
sudo apt-get install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo mkdir /etc/libinput
cd pixelbook-linux
./run-ansible.sh
```
Expand All @@ -297,8 +318,28 @@ The script will ask you a couple of questions, after which it will spend ~20 min
downloading and installing stuff. If you don't know how to answer the questions, just
accept the defaults.

If everything goes well, the script should complete successfully, and you can now
reboot:
If everything goes well, the script should complete successfully.

Optionally, if you want to see which-kernel-is-which in boot menu, you can edit grub config:

```bash
sudo gedit /etc/default/grub
```

There, update `GRUB_TIMEOUT` and add `GRUB_TIMEOUT_STYLE`.

```
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE="menu"
```

After saving the file, you have to run:

```bash
sudo update-grub
```

Now you can reboot:

```bash
sudo reboot
Expand All @@ -309,6 +350,18 @@ You'll be able to tell that you're using the correct kernel by the display backl
becoming very dim just after boot. Once the GUI is up, you can adjust the backlight
using the Gnome slider in the upper-right corner.

Once you are logged in, you can also check the kernel version with `uname -r`. You should
see something like `4.4.205chromium-gdc1f94d5` and not `5.something.something`. If that holds,
you can go ahead and drop the old kernel. This is optional.

```bash
sudo apt-get purge linux-image*
sudo apt-get autoremove
```

Feel free to do another restart to make sure it still works.


### After the install

Here's some info about the scripts and other customizations I added. If you're interested
Expand Down Expand Up @@ -419,4 +472,4 @@ Do NOT remove `/opt/google` - it contains some files needed by the audio setup.
[ansible]: https://ansible.com
[pixelbook_product_page]: https://www.google.com/chromebook/device/google-pixelbook/
[suzyqable]: https://www.sparkfun.com/products/14746
[ubuntu_dl]: https://www.ubuntu.com/download/desktop/thank-you?country=US&version=19.04&architecture=amd64
[ubuntu_dl]: https://releases.ubuntu.com/19.10/ubuntu-19.10-desktop-amd64.iso
5 changes: 5 additions & 0 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
default: "rightmeta"
private: no

- name: "eve_keyboard_emulate_chromebook"
prompt: "Do you want to use Chrome top key definitions instead of F1 - F10?\n"
default: "yes"
private: no

tasks:
- name: Install pre-requisites
include_role:
Expand Down
Binary file not shown.
25 changes: 5 additions & 20 deletions ansible/roles/eve-kernel/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,11 @@ main_workdir: /opt/eve-linux-setup
login_user: vagrant # override at command line with local username

# install-kernel.yml
kernel_install_type: deb
force_kernel_install: false
force_kernel_install: false

eve_kernel_name: "4.4.178chromium-g4245c5e1"
eve_kernel_name: "4.4.205chromium-gdc1f94d5"

# vars for source build
eve_kernel_branch: release-R75-12105.B-chromeos-4.4
eve_kernel_compiled_name: vmlinuz-4.4.178chromium-g4245c5e1
eve_kernel_config_file: eve-R75-12105.B-4.4.178.config
eve_kernel_branch: release-R80-12739.B-chromeos-4.4
eve_kernel_compiled_name: vmlinuz-4.4.205chromium-gdc1f94d5
eve_kernel_config_file: eve-R80-12739.B-chromeos-4.4.config
eve_kernel_workdir: "{{ main_workdir }}/kernel"

# vars for deb package install
gh_base_url: "https://github.com/yusefnapora/pixelbook-linux/releases/download"
gh_release: "v0.1"
gh_deb_base_url: "{{ gh_base_url }}/{{ gh_release }}/"
kernel_deb_revision: "{{ eve_kernel_name }}"
kernel_deb_arch: "{{ kernel_deb_revision }}_{{ kernel_deb_revision }}_amd64"
kernel_image_deb: "{{ gh_deb_base_url }}/linux-image-{{ kernel_deb_arch }}.deb"
kernel_debug_deb: "{{ gh_deb_base_url }}/linux-image-{{ kernel_deb_revision }}-dbg_{{ kernel_deb_revision }}_amd64.deb"
kernel_headers_deb: "{{ gh_deb_base_url }}/linux-headers-{{ kernel_deb_arch }}.deb"
kernel_firmware_deb: "{{ gh_deb_base_url }}/linux-firmware-image-{{ kernel_deb_arch }}.deb"
kernel_libc_dev_deb: "{{ gh_deb_base_url }}/linux-libc-dev_{{ kernel_deb_revision }}_amd64.deb"

Loading