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 22 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
85 changes: 68 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,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 +19,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 Down Expand Up @@ -54,10 +54,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 +99,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 +178,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 +189,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 +212,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 +236,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 +248,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 +269,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,22 +299,45 @@ 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
./run-ansible.sh -e "kernel_install_type=src"
```

The script will ask you a couple of questions, after which it will spend ~20 minutes
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 +348,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 +470,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
6 changes: 3 additions & 3 deletions ansible/roles/eve-kernel/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ force_kernel_install: false
eve_kernel_name: "4.4.178chromium-g4245c5e1"

# 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-g3c27733e
eve_kernel_config_file: eve-R80-12739.B-chromeos-4.4.config
eve_kernel_workdir: "{{ main_workdir }}/kernel"

# vars for deb package install
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.4.178 Kernel Configuration
# Linux/x86 4.4.205 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
Expand Down Expand Up @@ -485,6 +485,7 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
CONFIG_COMPACTION=y
# CONFIG_PROCESS_RECLAIM is not set
CONFIG_MIGRATION=y
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
Expand Down Expand Up @@ -533,6 +534,9 @@ CONFIG_ARCH_USES_PG_UNCACHED=y
CONFIG_ARCH_RANDOM=y
CONFIG_X86_SMAP=y
CONFIG_X86_INTEL_MPX=y
CONFIG_X86_INTEL_TSX_MODE_OFF=y
# CONFIG_X86_INTEL_TSX_MODE_ON is not set
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_MIXED=y
Expand Down Expand Up @@ -571,7 +575,6 @@ CONFIG_USE_PERCPU_NUMA_NODE_ID=y
#
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_WAKELOCK=y
# CONFIG_HIBERNATION is not set
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
Expand Down Expand Up @@ -2365,6 +2368,7 @@ CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
# CONFIG_NOZOMI is not set
# CONFIG_N_GSM is not set
# CONFIG_TRACE_SINK is not set
CONFIG_LDISC_AUTOLOAD=y
CONFIG_DEVMEM=y
# CONFIG_DEVKMEM is not set

Expand Down Expand Up @@ -2398,32 +2402,14 @@ CONFIG_HW_RANDOM_INTEL=y
# CONFIG_HW_RANDOM_AMD is not set
# CONFIG_HW_RANDOM_VIA is not set
# CONFIG_HW_RANDOM_VIRTIO is not set
CONFIG_HW_RANDOM_TPM=y
CONFIG_NVRAM=y
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
CONFIG_HPET=y
# CONFIG_HPET_MMAP is not set
# CONFIG_HANGCHECK_TIMER is not set
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
# CONFIG_TCG_TIS_SPI is not set
# CONFIG_TCG_TIS_I2C_ATMEL is not set
# CONFIG_TCG_TIS_I2C_INFINEON is not set
# CONFIG_TCG_TIS_I2C_NUVOTON is not set
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
CONFIG_TCG_CR50=y
CONFIG_TCG_CR50_I2C=y
CONFIG_TCG_CR50_SPI=y
# CONFIG_TCG_INFINEON is not set
# CONFIG_TCG_CRB is not set
# CONFIG_TCG_VTPM_PROXY is not set
# CONFIG_TCG_TIS_ST33ZP24_I2C is not set
# CONFIG_TCG_TIS_ST33ZP24_SPI is not set
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
# CONFIG_XILLYBUS is not set
Expand Down Expand Up @@ -3080,7 +3066,6 @@ CONFIG_MEDIA_PCI_SUPPORT=y
# CONFIG_VIDEO_TW68 is not set
# CONFIG_VIDEO_ZORAN is not set
CONFIG_VIDEO_IPU3_CIO2=m
CONFIG_VIDEO_IPU3_IMGU=m
# CONFIG_V4L_PLATFORM_DRIVERS is not set
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
CONFIG_V4L_TEST_DRIVERS=y
Expand Down Expand Up @@ -3327,7 +3312,6 @@ CONFIG_DRM_PANEL_BRIDGE=y
# CONFIG_DRM_GENERIC_GPIO_MUX is not set
# CONFIG_DRM_PARADE_PS8640 is not set
# CONFIG_DRM_ANALOGIX_ANX7688 is not set
# CONFIG_DRM_POWERVR_ROGUE_1_9 is not set
# CONFIG_DRM_LIB_RANDOM is not set

#
Expand All @@ -3343,9 +3327,9 @@ CONFIG_FB=y
CONFIG_FB_CMDLINE=y
# CONFIG_FB_DDC is not set
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
# CONFIG_FB_CFB_FILLRECT is not set
# CONFIG_FB_CFB_COPYAREA is not set
# CONFIG_FB_CFB_IMAGEBLIT is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
Expand All @@ -3370,7 +3354,7 @@ CONFIG_FB_MODE_HELPERS=y
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_VESA is not set
# CONFIG_FB_EFI is not set
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
Expand Down Expand Up @@ -4003,7 +3987,6 @@ CONFIG_USB_SERIAL_OPTION=m
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
Expand Down Expand Up @@ -4316,6 +4299,7 @@ CONFIG_DW_DMAC=y
#
CONFIG_SYNC_FILE=y
CONFIG_SW_SYNC=y
# CONFIG_UDMABUF is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
CONFIG_IRQ_BYPASS_MANAGER=y
Expand Down Expand Up @@ -4562,7 +4546,6 @@ CONFIG_IOMMU_SUPPORT=y
#
# Generic IOMMU Pagetable Support
#
CONFIG_IOMMU_IOVA=m
# CONFIG_AMD_IOMMU is not set
# CONFIG_INTEL_IOMMU is not set
# CONFIG_IRQ_REMAP is not set
Expand Down Expand Up @@ -4863,7 +4846,7 @@ CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# CONFIG_ISCSI_IBFT_FIND is not set
# CONFIG_ISCSI_IBFT is not set
CONFIG_GOOGLE_FIRMWARE=y
CONFIG_GOOGLE_SMI=y
CONFIG_GOOGLE_COREBOOT_TABLE=y
Expand Down Expand Up @@ -5287,6 +5270,7 @@ CONFIG_LKDTM=y
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_PRINTF is not set
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_TEST_HASH is not set
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_TEST_LKM is not set
Expand Down Expand Up @@ -5342,7 +5326,6 @@ CONFIG_KEYS=y
CONFIG_KEYS_COMPAT=y
# CONFIG_PERSISTENT_KEYRINGS is not set
# CONFIG_BIG_KEYS is not set
# CONFIG_TRUSTED_KEYS is not set
CONFIG_ENCRYPTED_KEYS=y
# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y
Expand Down Expand Up @@ -5372,9 +5355,9 @@ CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_APPARMOR is not set
CONFIG_SECURITY_YAMA=y
# CONFIG_SECURITY_CHROMIUMOS is not set
# CONFIG_SECURITY_CHROMIUMOS_DEVICE_JAIL is not set
CONFIG_ALT_SYSCALL_CHROMIUMOS=y
# CONFIG_SECURITY_CHROMIUMOS_READONLY_PROC_SELF_MEM is not set
# CONFIG_INIT_STACK_ALL is not set
# CONFIG_INTEGRITY is not set
CONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_DAC is not set
Expand Down
Loading