Fedora 23 on Tegra K1 Chromebook
Last year during Flock I got myself an Acer CB5 311 Chromebook with Nvidia Tegra K1 ARM board, and 2 GB ram. It is a very nice machine to run ChromeOS, but my goal behind getting the hardware was all about running Fedora on it. With the great help from Jon Disnard (IRC: masta) on #fedora-arm channel, I finally managed to do that this morning.
We started doing this yesterday, following the excellent guide at Fedora wiki. Though I had few changes, the major one was about having only two kernel partitions in the partition table. So the command to create the partition table using the sgdisk command becomes something like:
$ sgdisk -a 8192 -n 1:0:+30M -t 1:7F00 -c 1:"KERN-A" -A 1:=:0x011F000000000000 \ -n 2:0:+30M -t 2:7F00 -c 2:"KERN-B" -A 2:=:0x011A000000000000 \ -n 3:0:+600M -t 3:8300 -c 3:"BOOT" \ -n 4:0:+600M -t 4:8200 -c 4:"SWAP" \ -n 5:0:0 -t 5:8300 -c 5:"ROOTFS" chromebook-xfce.raw
This change makes the partition number change in all the following commands given in the wiki. Remember to double check that you have right /etc/fstab file in the image so that it can mount /boot. You can get the UUID by using blkid command. Btw, the SD card came in as a different device on my laptop. So a few corresponding changes are given below.
$ sudo sgdisk -a8192 -e -d5 -n5:0:0 -t5:8300 -c5:'ROOTFS' -p /dev/mmcblk0 $ sudo e2fsck -f /dev/mmcblk0p5 $ sudo resize2fs /dev/mmcblk0p5
During my first boot on the Chromebook with the Fedora SD card, it got into the emergency shell, I had to manually mount /boot, and then pressed Ctrl+d to continue the default flow. I made the change to the /etc/fstab file to make sure that I don't have to mount /boot every time manually. I got XFCE working out of the box. glxgears showing a frame rate of 230+. But I could not get the wireless work. I decided to take a break, slept for 4 hours, and was in front of the computer at 6AM again.
So to fix the wireless issue I had to build the mainline kernel on that system. I had to mount the card on a banana pi running F23, and then chrooted into it. I installed the following packages.
# mkdir /tmp/t2 # mount /dev/sdb5 /tmp/t2 # mount -o bind /dev dev # mount -o bind /proc proc # mount -o bind /sys sys # mount -t tmpfs tmpfs tmp # chroot /tmp/t2 # dnf install @development-tools vboot-utils htop pss vim # exit # umount --recursive /tmp/t2
After I copied the mainline kernel to the SD card, I first added the .config file (I got this from masta), and then execute the following command to build
# make -j8
It takes a lot of time, so you can take a break, drink coffee, or even finish parts of a big book :). After the build was finished, I used the following script to install the newly built kernel, remember to change the PARTUUID as required. After a reboot, I have the system ready with wireless. Tested with a few of my Python applications, it seems to be a perfect box for development while travelling, or at conferences, as it has long battery life :). There are still a few glitches, like the touchpad does not work, but we will get those fixed in the coming days. This whole experiment made me the second person to run Fedora on a Tegra K1 Chromebook :D. In case you want to join in this exclusive club, come down to #fedora-arm channel on freenode, we will help you to setup Fedora on your Chromebook.
I am also looking forward to work with ARM64 boards in future, may be a Mustang board. If someone has a spare one, feel free to send one my way :)