From a056ce26c62c1424ec684c3ce15afac48f48a0ed Mon Sep 17 00:00:00 2001 From: Barry Flanagan Date: Sat, 25 May 2019 13:36:06 +0100 Subject: [PATCH 01/25] Update eve-recovery-files loop dev regex Change mapper device regex so that it recognises loop devices loop9+. If re-running the script on an already used system which has snaps etc. installed taking up loop devices, the device number might be higher than 9, causing the script to fail. --- ansible/roles/eve-recovery-files/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/eve-recovery-files/tasks/main.yml b/ansible/roles/eve-recovery-files/tasks/main.yml index eb8f863..8debc75 100644 --- a/ansible/roles/eve-recovery-files/tasks/main.yml +++ b/ansible/roles/eve-recovery-files/tasks/main.yml @@ -35,7 +35,7 @@ set_fact: mapper_device: "{{ kpartx_output.stdout | regex_search(regexp, '\\1') | first }}" vars: - regexp: '(loop[0-9]p3)' + regexp: '(loop[0-9]+p3)' - debug: msg: "mapper device: {{ mapper_device }}" From 89e5996ad39068ed34bf8a2a115c48758604d670 Mon Sep 17 00:00:00 2001 From: Barry Flanagan Date: Wed, 26 Jun 2019 17:59:51 +0100 Subject: [PATCH 02/25] Disable Touchpad while typing Added extra options to disable touchpad while typing --- .../roles/eve-touchpad/files/conf/50-touchpad-cmt-eve.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/roles/eve-touchpad/files/conf/50-touchpad-cmt-eve.conf b/ansible/roles/eve-touchpad/files/conf/50-touchpad-cmt-eve.conf index 8d09116..559cd2e 100644 --- a/ansible/roles/eve-touchpad/files/conf/50-touchpad-cmt-eve.conf +++ b/ansible/roles/eve-touchpad/files/conf/50-touchpad-cmt-eve.conf @@ -37,4 +37,10 @@ Section "InputClass" Option "Palm Edge Zone Width" "7.0" Option "Smooth Accel" "1" Option "Tap Minimum Pressure" "15.0" + + # Disable touchpad while typing + Option "Keyboard Touched Timeval High" "0.05" + Option "Keyboard Touched Timeval Low" "0.1" + Option "Keyboard Palm Prevent Timeout" "1.500000" + EndSection From 0e001cc648cf0119381c32c3e5291279864ad664 Mon Sep 17 00:00:00 2001 From: Barry flanagan Date: Tue, 3 Dec 2019 15:13:11 +0000 Subject: [PATCH 03/25] Support (optional) remapping of keyboard to use Chromebook top key mappings instead of F1 - F10 --- ansible/playbook.yml | 5 +++++ .../eve-tweaks/templates/61-eve-keyboard.hwdb.j2 | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ansible/playbook.yml b/ansible/playbook.yml index e8abf13..07d8258 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -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: diff --git a/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 b/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 index ce97409..bc4171a 100644 --- a/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 +++ b/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 @@ -8,3 +8,18 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGoogle:pnEve:pvr* # KEYBOARD_KEY_5d=controlpanel KEYBOARD_KEY_db={{ eve_keyboard_search_keycode }} KEYBOARD_KEY_d8={{ eve_keyboard_assistant_keycode }} +{% if eve_keyboard_emulate_chromebook == "yes" %} + KEYBOARD_KEY_d8=rightmeta + KEYBOARD_KEY_db=leftmeta + KEYBOARD_KEY_3b=back + KEYBOARD_KEY_3c=f5 + KEYBOARD_KEY_3d=f11 + KEYBOARD_KEY_3e=print + KEYBOARD_KEY_3f=brightnessdown + KEYBOARD_KEY_40=brightnessup + KEYBOARD_KEY_41=playpause + KEYBOARD_KEY_42=mute + KEYBOARD_KEY_43=volumedown + KEYBOARD_KEY_44=volumeup +{% endif %} + From 6d963f18b15dcb38e598b4e538fbee71cd7365fb Mon Sep 17 00:00:00 2001 From: Barry flanagan Date: Tue, 3 Dec 2019 15:31:56 +0000 Subject: [PATCH 04/25] Ensure /etc/libinput directory exists. Fixes issue #17 --- ansible/roles/eve-tweaks/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/roles/eve-tweaks/tasks/main.yml b/ansible/roles/eve-tweaks/tasks/main.yml index 3f195a0..1f46d51 100644 --- a/ansible/roles/eve-tweaks/tasks/main.yml +++ b/ansible/roles/eve-tweaks/tasks/main.yml @@ -33,6 +33,13 @@ ### tweak touchpad pressure for libinput +- name: Ensure /etc/libinput exists + file: + path: /etc/libinput + state: directory + owner: root + mode: 0755 + - name: Copy libinput touchpad pressure tweak file become: true copy: From 8a00d2a39c73eda4b97baaabdc55a5a1fb90e366 Mon Sep 17 00:00:00 2001 From: damon Date: Wed, 18 Dec 2019 21:49:53 +0000 Subject: [PATCH 05/25] update to the latest chromeos release kernel --- ...config => R80-12739.B-chromeos-4.4.config} | 47 ++++++------------- 1 file changed, 15 insertions(+), 32 deletions(-) rename ansible/roles/eve-kernel/files/{eve-R75-12105.B-4.4.178.config => R80-12739.B-chromeos-4.4.config} (99%) diff --git a/ansible/roles/eve-kernel/files/eve-R75-12105.B-4.4.178.config b/ansible/roles/eve-kernel/files/R80-12739.B-chromeos-4.4.config similarity index 99% rename from ansible/roles/eve-kernel/files/eve-R75-12105.B-4.4.178.config rename to ansible/roles/eve-kernel/files/R80-12739.B-chromeos-4.4.config index bd7feab..63f2c79 100644 --- a/ansible/roles/eve-kernel/files/eve-R75-12105.B-4.4.178.config +++ b/ansible/roles/eve-kernel/files/R80-12739.B-chromeos-4.4.config @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 # @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 From 9585049893d8eb2632353fcf374072f4493e20c2 Mon Sep 17 00:00:00 2001 From: damon Date: Wed, 18 Dec 2019 21:58:41 +0000 Subject: [PATCH 06/25] update readme to include kernel build instructions --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 88beade..eba7786 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,13 @@ cd pixelbook-linux ./run-ansible.sh ``` +Alternative to build the kernel from source: + +```bash +cd pixelbook-linux +./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. From 362dd4e5e049bffe1b0122e28d243c45814d0a0a Mon Sep 17 00:00:00 2001 From: damon Date: Wed, 18 Dec 2019 22:00:22 +0000 Subject: [PATCH 07/25] switch to chromeos release-R75-12105.B-chromeos-4.4 kernel branch providing 4.4.205 --- ansible/roles/eve-kernel/defaults/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/eve-kernel/defaults/main.yml b/ansible/roles/eve-kernel/defaults/main.yml index 20ffcc2..6ec5e6b 100644 --- a/ansible/roles/eve-kernel/defaults/main.yml +++ b/ansible/roles/eve-kernel/defaults/main.yml @@ -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 From 5835c30ac80471d462df9faed0ac172e1d815489 Mon Sep 17 00:00:00 2001 From: damon Date: Thu, 19 Dec 2019 07:35:22 +0000 Subject: [PATCH 08/25] fix filename --- ....B-chromeos-4.4.config => eve-R80-12739.B-chromeos-4.4.config} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ansible/roles/eve-kernel/files/{R80-12739.B-chromeos-4.4.config => eve-R80-12739.B-chromeos-4.4.config} (100%) diff --git a/ansible/roles/eve-kernel/files/R80-12739.B-chromeos-4.4.config b/ansible/roles/eve-kernel/files/eve-R80-12739.B-chromeos-4.4.config similarity index 100% rename from ansible/roles/eve-kernel/files/R80-12739.B-chromeos-4.4.config rename to ansible/roles/eve-kernel/files/eve-R80-12739.B-chromeos-4.4.config From a6c80e35db4919b24d9602eaad5fc0eaab4dee55 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:29:41 +0300 Subject: [PATCH 09/25] Use Ubuntu 19.10 19.04 comes with gone-repositories, so even apt update is painful --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eba7786..076446b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -236,7 +236,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 @@ -257,6 +257,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. @@ -426,4 +430,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 From 4556f9c81ba97baf00ad382a5ba0d0bc435763f9 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:30:44 +0300 Subject: [PATCH 10/25] Add 'ccd reset factory' while removing write protect from https://wiki.mrchromebox.tech/Firmware_Write_Protect#Hardware_Write_Protection --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 076446b..0ca46c9 100644 --- a/README.md +++ b/README.md @@ -189,6 +189,7 @@ 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 @@ -197,10 +198,10 @@ recover if anything goes wrong during flashing and makes it easier to restore th firmawre. 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! From b71fe25291c69766de0dcbec625c869343bc1251 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:32:52 +0300 Subject: [PATCH 11/25] Remount two folders for MrChromebox script as exec See: https://github.com/yusefnapora/pixelbook-linux/issues/48 - https://chromium.googlesource.com/chromiumos/docs/+/master/security/noexec_shell_scripts.md - https://support.google.com/chromebook/thread/21245837?hl=en --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 0ca46c9..d65df00 100644 --- a/README.md +++ b/README.md @@ -212,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) From 213fb6c5a6032eab89fdd9aeacba26a572fca607 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:34:20 +0300 Subject: [PATCH 12/25] Add a quick note about firmware-util backup --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d65df00..624126e 100644 --- a/README.md +++ b/README.md @@ -236,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-.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. From 1a8f6509584529a01daa9833889cef3a5713a823 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:34:42 +0300 Subject: [PATCH 13/25] Get the most updated repo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 624126e..c609575 100644 --- a/README.md +++ b/README.md @@ -299,7 +299,7 @@ git config --global user.email "your@email.com" Now clone this repository: ```bash -git clone https://github.com/yusefnapora/pixelbook-linux +git clone https://github.com/flantel/pixelbook-linux ``` Enter the `pixelbook-linux` directory and run the install script: From 693cd2310f7d539f69999b03bacbbe4214e1310a Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:58:51 +0300 Subject: [PATCH 14/25] Make sure to use the 'alternative' way as that one seems to work. --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index c609575..95864ce 100644 --- a/README.md +++ b/README.md @@ -302,14 +302,7 @@ Now clone this repository: git clone https://github.com/flantel/pixelbook-linux ``` -Enter the `pixelbook-linux` directory and run the install script: - -```bash -cd pixelbook-linux -./run-ansible.sh -``` - -Alternative to build the kernel from source: +Enter the `pixelbook-linux` directory and run following: ```bash cd pixelbook-linux From ded8fda4deedac34d72960675e6c83b5aecd7fda Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:36:08 +0300 Subject: [PATCH 15/25] Install gcc-8 to get around gcc/cras issues See: https://github.com/yusefnapora/pixelbook-linux/issues/32 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 95864ce..6479596 100644 --- a/README.md +++ b/README.md @@ -305,6 +305,8 @@ git clone https://github.com/flantel/pixelbook-linux 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 cd pixelbook-linux ./run-ansible.sh -e "kernel_install_type=src" ``` From 56f3ce067005210e1371af3be1d8f7a012297e58 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:38:07 +0300 Subject: [PATCH 16/25] Create /etc/libinput by hand before starting script See: https://github.com/yusefnapora/pixelbook-linux/issues/17 and https://github.com/yusefnapora/pixelbook-linux/pull/18 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6479596..e17a6c3 100644 --- a/README.md +++ b/README.md @@ -307,6 +307,7 @@ 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 -e "kernel_install_type=src" ``` From 5b24d5b49dd872ce84b97edb82c244d118662b2c Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:40:07 +0300 Subject: [PATCH 17/25] Add an optional note about seeing boot menu --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e17a6c3..3379344 100644 --- a/README.md +++ b/README.md @@ -316,8 +316,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 From 32e700f9d09cf1b40b47234a8df50789513c31e2 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:40:36 +0300 Subject: [PATCH 18/25] A quick note about checking kernel running and removing old kernel --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 3379344..b313130 100644 --- a/README.md +++ b/README.md @@ -348,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 From b044276c85dfd6fc0bf4a3de93d1715a761e90c4 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sat, 9 May 2020 15:45:22 +0300 Subject: [PATCH 19/25] Minor typos and leading spaces --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b313130..5bea279 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. @@ -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. @@ -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`: @@ -195,7 +195,7 @@ 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 everything listed there have "Always". Some of them are changed from "IfOpened" (in parentheses). From e2195b3e7c0f2a8d2ea7ac544b4b9b0245644382 Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sun, 19 Jul 2020 14:19:12 +0300 Subject: [PATCH 20/25] Default to src installation, drop deb install --- README.md | 2 +- ansible/roles/eve-kernel/defaults/main.yml | 17 +--------------- .../eve-kernel/tasks/kernel-tasks-deb.yml | 20 ------------------- ansible/roles/eve-kernel/tasks/main.yml | 2 +- 4 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 ansible/roles/eve-kernel/tasks/kernel-tasks-deb.yml diff --git a/README.md b/README.md index 5bea279..9750f16 100644 --- a/README.md +++ b/README.md @@ -309,7 +309,7 @@ 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 -e "kernel_install_type=src" +./run-ansible.sh ``` The script will ask you a couple of questions, after which it will spend ~20 minutes diff --git a/ansible/roles/eve-kernel/defaults/main.yml b/ansible/roles/eve-kernel/defaults/main.yml index 6ec5e6b..49c2cab 100644 --- a/ansible/roles/eve-kernel/defaults/main.yml +++ b/ansible/roles/eve-kernel/defaults/main.yml @@ -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" -# vars for source build 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 -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" - diff --git a/ansible/roles/eve-kernel/tasks/kernel-tasks-deb.yml b/ansible/roles/eve-kernel/tasks/kernel-tasks-deb.yml deleted file mode 100644 index 1d4e6b0..0000000 --- a/ansible/roles/eve-kernel/tasks/kernel-tasks-deb.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: Install kernel image package - become: true - apt: - deb: "{{ kernel_image_deb }}" - -- name: Install debug kernel image package - become: true - apt: - deb: "{{ kernel_debug_deb }}" - -- name: Install kernel headers package - become: true - apt: - deb: "{{ kernel_headers_deb }}" - -- name: Install kernel firmware image package - become: true - apt: - deb: "{{ kernel_firmware_deb }}" diff --git a/ansible/roles/eve-kernel/tasks/main.yml b/ansible/roles/eve-kernel/tasks/main.yml index 6596b69..fb0403a 100644 --- a/ansible/roles/eve-kernel/tasks/main.yml +++ b/ansible/roles/eve-kernel/tasks/main.yml @@ -14,7 +14,7 @@ - name: Install chromium fork of linux kernel when: kernel_pre_installed is failed or force_kernel_install - include_tasks: "kernel-tasks-{{ kernel_install_type }}.yml" + include_tasks: "kernel-tasks-src.yml" - name: Check if we've set the default kernel already become: true From 18843274b4e65207b1e4016ad3dc54dfd43ef7fc Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Sun, 19 Jul 2020 15:25:01 +0300 Subject: [PATCH 21/25] Fix broken see details link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9750f16..1c863f2 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,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) | From 855328f59622fd0bb76d78e0a978954f130b6028 Mon Sep 17 00:00:00 2001 From: Barry Flanagan Date: Mon, 20 Jul 2020 11:02:54 +0100 Subject: [PATCH 22/25] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5bea279..044a11c 100644 --- a/README.md +++ b/README.md @@ -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] From 6140dbd28246fa0cc4a24b119ec5ee3ece4df6fc Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Mon, 20 Jul 2020 15:03:33 +0300 Subject: [PATCH 23/25] Fix kernel name --- ansible/roles/eve-kernel/defaults/.main.yml.swo | Bin 0 -> 12288 bytes ansible/roles/eve-kernel/defaults/main.yml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 ansible/roles/eve-kernel/defaults/.main.yml.swo diff --git a/ansible/roles/eve-kernel/defaults/.main.yml.swo b/ansible/roles/eve-kernel/defaults/.main.yml.swo new file mode 100644 index 0000000000000000000000000000000000000000..dc45ed9b65ee57c93ea5fa978d4b3c2dbf110dac GIT binary patch literal 12288 zcmeI&KabNe6aa7^65{~^orDC#qg`0sw7s6_WdI4W91;r>td*O*v{s!sik;k*a6v<*pD5 z-KZi7FD`E-mgVyDA?vsA+6kj)=oa3VQK`?+Os!o=ql@}1Qian~gHdG-x(FMT3# zQHq(WjdxM5bkSSp<{uX0AuPZG7Xr1<E0Ty5Z7GMDuU;!3j0Ty5Z7GMDu_zwkC zD#W*aA)bVbKYjn--v7Vf6yh_*CyKWeD~gQbImHRZeTsV&Un$`ug{25{Jf`5r0xZA+ zEWiRRzyd750xZA+EO2E6aN8Q3v_;yJQ(G-kUB%E@tsoR?Z+qbUJZi^u1Qm5}$0xSP z^lXx8gE53+@0a7g91I^F9`~NgWM0`Et&^kPsMn7CH8(FQFP#)Br|c#V1>|qmgNOa2 zb+WE=IZKm4c05Xtc5|l{6}8V}sL-Hte_vMYCbjEy!fyV!K!DW}Xw>9j>&Pb_tNNA0k(Y`!%!8TY`Iz><(5}W6$NP&)raH{Co3DtsQ2u1$YazB`A$rhN62Xq?F0` literal 0 HcmV?d00001 diff --git a/ansible/roles/eve-kernel/defaults/main.yml b/ansible/roles/eve-kernel/defaults/main.yml index 49c2cab..2e903d1 100644 --- a/ansible/roles/eve-kernel/defaults/main.yml +++ b/ansible/roles/eve-kernel/defaults/main.yml @@ -6,9 +6,9 @@ login_user: vagrant # override at command line with local username # install-kernel.yml force_kernel_install: false -eve_kernel_name: "4.4.178chromium-g4245c5e1" +eve_kernel_name: "4.4.205chromium-gdc1f94d5" eve_kernel_branch: release-R80-12739.B-chromeos-4.4 -eve_kernel_compiled_name: vmlinuz-4.4.205chromium-g3c27733e +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" From 6188171e86aaa7235149c9083c522b48ecc2625f Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Tue, 21 Jul 2020 09:06:09 +0300 Subject: [PATCH 24/25] Don't add KEYBOARD_KEY_d8 twice This causes eve_keyboard_assistant_keycode to not work --- ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 b/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 index bc4171a..34f7b93 100644 --- a/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 +++ b/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 @@ -9,7 +9,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGoogle:pnEve:pvr* KEYBOARD_KEY_db={{ eve_keyboard_search_keycode }} KEYBOARD_KEY_d8={{ eve_keyboard_assistant_keycode }} {% if eve_keyboard_emulate_chromebook == "yes" %} - KEYBOARD_KEY_d8=rightmeta KEYBOARD_KEY_db=leftmeta KEYBOARD_KEY_3b=back KEYBOARD_KEY_3c=f5 From f4776e6cee106fda6f52f901c98cfbcf97f0916f Mon Sep 17 00:00:00 2001 From: Kivanc Yazan Date: Wed, 19 Aug 2020 15:29:59 +0300 Subject: [PATCH 25/25] Don't add KEYBOARD_KEY_db twice This causes eve_keyboard_assistant_keycode to not work --- ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 b/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 index 34f7b93..86f76dc 100644 --- a/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 +++ b/ansible/roles/eve-tweaks/templates/61-eve-keyboard.hwdb.j2 @@ -9,7 +9,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGoogle:pnEve:pvr* KEYBOARD_KEY_db={{ eve_keyboard_search_keycode }} KEYBOARD_KEY_d8={{ eve_keyboard_assistant_keycode }} {% if eve_keyboard_emulate_chromebook == "yes" %} - KEYBOARD_KEY_db=leftmeta KEYBOARD_KEY_3b=back KEYBOARD_KEY_3c=f5 KEYBOARD_KEY_3d=f11