{"id":14110692,"url":"https://github.com/denysvitali/linux-on-pixel-c","last_synced_at":"2025-03-18T19:30:38.110Z","repository":{"id":148090548,"uuid":"99784494","full_name":"denysvitali/linux-on-pixel-c","owner":"denysvitali","description":"Documentation on how to run a Linux Distro on the Google Pixel C (2015)","archived":false,"fork":false,"pushed_at":"2018-05-14T21:05:59.000Z","size":47776,"stargazers_count":61,"open_issues_count":5,"forks_count":5,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-10-11T00:51:26.564Z","etag":null,"topics":["arch","archlinux","c","google","kernel","linux","pixel","pixel-c","tegra","tegra210"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denysvitali.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-09T08:35:07.000Z","updated_at":"2024-03-12T18:21:08.000Z","dependencies_parsed_at":"2023-06-12T09:45:51.225Z","dependency_job_id":null,"html_url":"https://github.com/denysvitali/linux-on-pixel-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Flinux-on-pixel-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Flinux-on-pixel-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Flinux-on-pixel-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denysvitali%2Flinux-on-pixel-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denysvitali","download_url":"https://codeload.github.com/denysvitali/linux-on-pixel-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221716026,"owners_count":16868652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arch","archlinux","c","google","kernel","linux","pixel","pixel-c","tegra","tegra210"],"created_at":"2024-08-14T10:02:57.455Z","updated_at":"2024-10-27T18:16:38.552Z","avatar_url":"https://github.com/denysvitali.png","language":"Shell","funding_links":["https://paypal.me/MathieuTournier","https://paypal.me/denvit","https://paypal.me/vartom"],"categories":["Shell"],"sub_categories":[],"readme":"# Linux on Pixel C\nThis repo aims at documenting how to run GNU/Linux on a [Google Pixel C](https://en.wikipedia.org/wiki/Pixel_C) (2015) device.\n\n![Pixel C running Arch Linux ARM](/images/intro.jpg)\n\n---\n\n# !!! WARNING !!! : The repo is now moved [here](https://github.com/pixelc-linux/documentation)\n\n\n---\n\n## Introduction\n### What is the Google Pixel C?\nThe Pixel C is a 10.2 inch Android tablet, made by Google, which was released on December 8, 2015.\nIt didn't had much success apparently, but its hardware is definitively still a flagship killer.\n\nUnfortunately it runs Android, which doesn't seem to be really a productive / development oriented operating system, therefore we decided to port a Linux distro to it, to make it more productive and fast.\n\n### What distro are currently supported / planned?\n\n#### Arch Linux ARM\nRight now we've got [Arch Linux Arm](http://archlinuxarm.org/) to work on the device. We haven't tried other distros yet, but PR are always welcome.  \n\n#### Void Linux\n[@q66](https://github.com/q66) is planning a port of [Void Linux](https://www.voidlinux.eu/).\n\n### What's the development status?\nWe are still in an alpha stage, the device boots with the latest kernel (4.17-rc2 as of 2018-05-04) but has still ~~many~~ a couple of issues that makes it hard to use as a daily driver.\n\n### What are the issues right now?\n\n - ~~Wi-Fi / Bluetooth chip doesn't work (Broadcom 4354 / bcm4354)~~\n - ~~Pixel C Keyboard doesn't work (need BT LE, which is provided by bcm4354)~~\n - [Graphics Acceleration doesn't work](https://github.com/denysvitali/linux-on-pixel-c/issues/2), everything is rendered by the CPU apparently\n - [Sound doesn't work](https://github.com/denysvitali/linux-on-pixel-c/issues/4)\n - Lightbar (works on some kernel versions, a commit need to be cherry-picked. Quick fix is incoming.)\n\nYou can follow the issues [here](https://github.com/denysvitali/linux-on-pixel-c/issues): if you happen to know how to solve one of these problems, please help us! Even the smallest comment may bring us one step forward.\n\n### What works?\n - Boots!\n - Display\n - Touch (hid-over-i2c)\n - SSH\n - Network (Ethernet) via an USB dongle (Pretty much USB-Ethernet dongle)\n - Network (Wi-Fi) via an USB dongle (Mediatek 7601u)\n - Lightbar (with 4.12-rc2)\n - Wi-Fi ~~(BT still doesn't work, [check this issue](https://github.com/denysvitali/linux-on-pixel-c/issues/10))~~\n - Wi-Fi via BCM4354 (Wi-Fi + BT Chip)\n - [Bluetooth](https://github.com/denysvitali/linux-on-pixel-c/issues/10)\n (and the Pixel C BT keyboard) via BCM4354 (Wi-Fi + BT Chip)\n\n### How can I get in touch with the team?\nWe have a [Telegram Group](https://t.me/pixelclinux) and an IRC channel on freenode (`#linux-on-pixel-c`). Joining on the group or the channel is the same - the chats are linked together.\n\n\n## Prerequisites\n\n - Google Pixel C (2015)\n \n ### Nice to have\n - USB Type-C HUB (I'm personally using [this](https://www.amazon.com/HooToo-Adapter-Charging-MacBook-Chromebook/dp/B01K7C53K2))\n - USB Wi-Fi Adapter (only a few are supported, I personally use [this](http://www.ebay.com/itm/150Mbps-Mini-USB-WiFi-Wireless-Adapter-Dongle-Network-LAN-Card-802-11n-g-b-PC-/252404008603) one)\n - USB Ethernet Adapter (any model should work)\n\n### Using an USB Ethernet adapter\nPlug the ethernet cable, then plug the USB Ethernet adapter to your Pixel C. As soon as the adapter is detected, the Pixel C (if it booted correctly) will get an IP address via DHCP.\nUse the IP to log-in\n\n## Running Linux on your Pixel C\n\n**WARNING:** You may void your warranty. I am not responsible for bricked devices, dead SD cards, or thermonuclear wars. Seriously though, if after a kernel modification you've made, the device gets too hot: you probably messed up with the thermal sensor and you may need to consider a force shutdown (by pressing Power + Vol- until the device powers itself off) before any damage may appear. Whilst I played around with my Pixel C on my own and never had any problem whatsoever, you may not be as lucky as I was.\nIf you are not sure about a modification you've made, keep the device monitored.\nDon't put yourself in danger, we still need you.\n\n**WARNING:** If you're going to put your rootfs in `/data/` you need dm-verity and encryption OFF, or a newly formatted `/data` partion. Otherwise the system won't be able to boot into Linux. You can still put the rootfs in `/system` to avoid formatting the `/data` partition.\n\n\n### Prepare the filesystem\n\nChoose one of the following (the first one is strongly recommended):\n1. [Latest version of the RootFS](https://github.com/denysvitali/tegra-nouveau-rootfs/releases)\n2. My (OLD!) [custom made FS with xfce + lightdm](https://ded1.denv.it/pixel-c/arch-xfce-lightdm.tar.gz)\n3. The [Official ALARM rootfs](http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz)\n\n*Be aware that the official ALARM rootfs requires an USB Ethernet adapter since the Wireless connection to a \"PixelC\" hotspot isn't preconfigured. You will also need to configure your Desktop Manager and your Sessions, all without seeing anything on the screen.*\n\n#### Default login for the project's rootfs:\n  | Username | Password   |\n  |----------| ---------- |\n  | alarm    | alarm |\n  | root     | root |\n\n#### Default login for my custom-made FS (2):\n\n  | Username | Password   |\n  |----------| ---------- |\n  | alarm    | pixelcalarm |\n\n#### Default login for the original ALARM rootfs (3):\n  | Username | Password   |\n  |----------| ---------- |\n  | alarm    | alarm |\n\n### Extract the filesystem\n\n*NOTE: You may need this [busybox binary](https://busybox.net/downloads/binaries/1.26.2-defconfig-multiarch/busybox-armv6l), personally I had some troubles when extracting `tar.gz` files with TWRP included busybox (returns \"Killed\" after some files extracted / has many segfaults). Therefore you may need to `adb push busybox-armv6l /cache; chmod u+x /cache/busybox-armv6l` and then call `/cache/busybox-armv6l tar -xvf ...` instead*\n\n#### Using /data partition\n*This is the default setup, all the [kernel releases](https://github.com/denysvitali/linux-smaug/releases) (boot images) are created assuming you want to boot from /data/Arch*\n\n1. Boot in TWRP\n2. `adb push arch-xfce-lightdm.tar.gz /data/`\n3. `adb shell` (gets a shell into the device)\n4. `cd /data`\n5. `tar -xvf arch-xfce-lightdm.tar.gz`\n\n#### Using /system partition\n*This is a different approach, it is useful because saves you the `/data` partition (in case you don't want to wipe it), but **the filesystem will be limited to 3.76GB** and you'll need a different initramfs (therefore you'll need a different prebuilt boot.img).*\n1. Boot in TWRP\n2. `adb push arch-xfce-lightdm.tar.gz /cache/`\n3. `adb shell` (gets a shell into the device)\n3. `mount -o rw /dev/block/mmcblk0p4 /system` (mounts `/system` in r/w)\n4. `rm -rf /system/*` (deletes the content of `/system`)\n5. `tar -xvf /cache/arch-xfce-lightdm.tar.gz -C /system` (extracts the FS to /system)\n\nUse [this](https://github.com/denysvitali/linux-smaug/releases/tag/be7289aa-system) boot.img. Be aware, it is unsigned, therefore you can only use it with `fastboot boot boot.img.unsigned`.\n\n### From prebuilt images\n~~Prebuilt boot.img images aren't available yet, but you can still boot the system by putting the Pixel C in fastboot mode and doing~~\n\nPrebuilt images are available [here](https://github.com/denysvitali/linux-smaug/releases), just flash the latest boot.img with the following command.\n\n***Note:** The images that use `/system` instead of `/data/Arch` are marked as `Pre-Release` and are labelled as such.* \n```\nfastboot flash boot boot.img\nfastboot boot boot.img\n```\n\n### From sources\n\n#### Requirements\n - Docker\n\n#### Preparation\nPull the [dvitali/android-build-tools](https://hub.docker.com/r/dvitali/android-build-tools/) image with `docker pull dvitali/android-build-tools` or build it yourself from [this repository](https://github.com/denysvitali/docker-android-build-tools).\n\nRun the container with:\n`docker run -v kernel:/kernel -it dvitali/android-build-tools:latest`\n\nThis will give you a shell (zsh) from where you can compile the kernel - all the necessary tools are there.\n\nIf you need another shell, just do `docker exec -it containerName zsh` (where `containerName` is the name of the container, which can be found with `docker ps`)\n\n#### Compilation\n\nRun the following commands in the docker container:\n```\ncd /kernel\ngit clone https://github.com/denysvitali/linux-smaug/ -b linux-4.13-rc4 linux-smaug\ncd linux-smaug/\nmake -j$(nproc)\n./build-image.sh\nwget https://ded1.denv.it/pixel-c/ramdisk.gz -O /kernel/ramdisk.gz\n```\n\nFor the last command, you can use your own ramdisk, or compile it from my [source](https://github.com/denysvitali/smaug-custom-initram).\n\n### Mounting the kernel dir\nMount the `kernel` dir in your home:\n```\nmkdir ~/kernel\nsudo mount -o bind /var/lib/docker/volumes/kernel/_data ~/kernel\n```\n\n### Flashing the image\n```\nsudo fastboot boot ~/kernel/linux-smaug/Image.fit ~/kernel/ramdisk.gz\n```\n\n## Boot\nIf your screen looks like this after booting the image, wonderful! It means that it is booting (don't be scared about the static).\n\n*I honestly was really scared at first, but don't worry, if my Pixel C didn't die after all I did, this won't be harmful*\n\n![Static showing on Pixel C](/images/static.jpg)\n\n# Resources\n[Arch Linux Forums: How to compile the Pixel C Kernel](https://bbs.archlinux.org/viewtopic.php?pid=1594095#p1594095)  \n[Thierry's Blog: Booting a Pixel C tablet with a custom kernel](http://tescande.blogspot.ch/2016/12/booting-pixel-c-tablet-with-custom.html)  \n[Git at Google: Kernel for Tegra](https://android.googlesource.com/kernel/tegra/+/android-o-preview-4_r0.1)  \n[GitHub: Mathieu's Kernel for Smaug (4.11-RC1)](https://github.com/Samt43/linux/tree/Smaug_kernel_RC1)  \n[GitHub: Mathieu's Ramdisk](https://github.com/Samt43/Smaug)  \n[GitHub: My Kernel for Smaug (4.13-RC4)](https://github.com/denysvitali/linux-smaug)  \n[GitHub: My initramfs](https://github.com/denysvitali/smaug-custom-initram)   \n[Pixel C partitions](https://docs.google.com/spreadsheets/d/1uxdTSz23kFRDXrezeAclMY9yy8ih9cbi6UFVOFrVXJ8/edit?usp=sharing)\n\n# Contributors\n - [Samt43](https://github.com/Samt43), original author of the project\n - [Vartom](https://github.com/vartom)\n\n# Support the project\n## Donate to the major contributors of this project\n - [Donate to Mathieu Tournier, aka Samt434](https://paypal.me/MathieuTournier)\n - [Donate to Denys Vitali, aka denvit](https://paypal.me/denvit)\n - [Donate to Dmitry Vartom, aka vartom](https://paypal.me/vartom)\n\n## Don't like to donate money to strangers?\nDonate some money to the [Linux Foundation](https://www.linuxfoundation.org/about/linux-donate) or the [EFF](https://supporters.eff.org/donate).\n\n## Don't have money to spend?\nGive us some help by solving [some of the issues](https://github.com/denysvitali/linux-on-pixel-c/issues)! The more we are working on this project, the faster we could all enjoy the Linux experience on our tablets!\n\n### Don't have a Pixel C?\nYou can still help us! We've got you covered: in the [dmesg](/dmesg/) folder we've put some dmesg outputs to help us find / spot some errors and fix some bugs. Take a look!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenysvitali%2Flinux-on-pixel-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenysvitali%2Flinux-on-pixel-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenysvitali%2Flinux-on-pixel-c/lists"}