This is a quick abstract on how to build a kernel from Pierre Bossart's (or the linux-next) kernel tree.
Pierre's tree (and to a slightly lesser degree linux-next) is an experimental kernel tree, be prepared to run into some problems along the way...
Code:
# 1. install prerequisites
sudo apt-get update && sudo apt-get install -y git build-essential kernel-package fakeroot libncurses5-dev libssl-dev ccache dialog ### ubuntu/mint/debian/etc.
#or
sudo pacman -Sy --noconfirm base-devel ncurses bc git dialog ### arch/manjaro/antergos
#or
sudo dnf -y groupinstall "C Development Tools and Libraries" && sudo dnf -y install git ncurses-devel elfutils-libelf-devel dialog openssl-devel ### fedora,etc.
# 2. retrieve the source tree:
git clone https://github.com/plbossart/sound.git -b experimental/codecs
# 3. go to the source tree and select the the right modules (at least CONFIG_PINCTRL_BAYTRAIL and CONFIG_SND_SOC_RT5645 if your starting from scratch):
cd sound
make localmodconfig ### if you're not using your own .config (or mine)
make menuconfig ### save afterwards
# (I am using a .config file with the right modules selected that is bare bones, so the build time and size dont get out of hand)
# 4. patch and build the kernel
# reverse patch the commit that causes the keyboard to malfunction
git diff 3ae02c1^ 3ae02c1 | patch -Rp1
# Next patch is thanks to jazmatjaz, who found a somehow not yet upstreamed patch from may2016 that attempts to fix non-functioning FN-keys
# touchpad toggle (fn-f9) needs a keybinding configuration in the desktop environment
wget raw.githubusercontent.com/harryharryharry/x205ta-patches/master/x205ta-special-keys.patch
patch -p1 < x205ta-special-keys.patch
# 5ghz wifi speeds are terrible without this patch
wget raw.githubusercontent.com/harryharryharry/x205ta-patches/master/brcmfmac-fix-incorrect-event-channel-deduction.patch
patch -p1 < brcmfmac-fix-incorrect-event-channel-deduction.patch
# build - this will take a while
make -j6
# 5. install the modules
sudo make modules_install
# 6. copy the kernel to the boot dir
export KERNELRELEASE=$(<include/config/kernel.release)
cp -va arch/x86/boot/bzImage /boot/vmlinuz-$KERNELRELEASE
# 7. build initramfs
sudo update-initramfs -c -k $KERNELRELEASE ### ubuntu/mint/debian/etc.
#or
sudo mkinitcpio -k $KERNELRELEASE -c /etc/mkinitcpio.conf -g /boot/initramfs-$KERNELRELEASE.img ### arch/manjaro/antergos
#or
sudo dracut -fv /boot/initramfs-$KERNELRELEASE.img $KERNELRELEASE ### fedora,etc.
# 8. rebuild /boot/grub/grub.cfg
sudo update-grub ### ubuntu/mint/debian/etc.
#or
sudo grub-mkconfig -o /boot/grub/grub.cfg ### arch/manjaro/antergos
#or
sudo grub2-mkconfig -o /boot/grub2/grub.cfg ### fedora,etc.
# 9. download HiFi.conf from Pierre's github page and place it in /usr/share/alsa/ucm/chtrt5645/
sudo mkdir -p /usr/share/alsa/ucm/chtrt5645
sudo wget raw.githubusercontent.com/plbossart/UCM/master/chtrt5645/HiFi.conf -O /usr/share/alsa/ucm/chtrt5645/HiFi.conf
sudo wget raw.githubusercontent.com/plbossart/UCM/master/chtrt5645/chtrt5645.conf -O /usr/share/alsa/ucm/chtrt5645/chtrt5645.conf
# 10. download required packages; something along the lines of:
sudo apt-get install -y pulseaudio alsa-base alsa-utils pavucontrol ### ubuntu/mint/debian/etc. (debian also needs the package firmware-intel-sound which is in the non-free repository)
#or
sudo pacman -Sy --noconfirm pulseaudio pulseaudio-alsa alsa-utils alsa-plugins pavucontrol ### arch/manjaro/antergos
#or
sudo dnf -y install pulseaudio alsa-plugins-pulseaudio alsa-utils alsa-tools pavucontrol ### fedora,etc.
# 11. reboot into the new kernel and use a GUI utility (for example pavucontrol) to select the default output
# optional:
#
#
# some people have reported the headphone only works when it is inserted halfway. ederlezi2 reportedly solved this issue by reverse patching the following commit:
git diff 320c60f^ 320c60f | patch -Rp1
#then run make -j6 and step 5, 6 & 7 again
For the people that aren't up for the challenge, here is my prebuilt kernel
Bookmarks