Google Nexus 5 (lg-hammerhead)

From postmarketOS
Revision as of 23:25, 25 August 2017 by Ollieparanoid (talk | contribs) (Migrate from
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


  • MartijnBraam
  • dzervas
  • lawl

What works

  • Compiling the LineageOS kernel
  • SSH
  • Booting
  • Flash light
  • Battery
  • Weston + Touchscreen (with ugly hacks and the red screen bug)
fastboot boot /mnt/rootfs_lg-hammerhead/boot/vmlinuz-lg-hammerhead /mnt/rootfs_lg-hammerhead/boot/initramfs-lg-hammerhead

What does not work

  • Proprietary video driver (#29)
  • Flashing the compiled LineageOS kernel via pmbootstrap (#35)
  • WiFi (firmware needed)
  • Front led
[00:33:38] (native) flash kernel 'lg-hammerhead'
creating boot image...
creating boot image - 3600384 bytes
sending 'SHLVL=1' (3516 KB)...
OKAY [  0.331s]
writing 'SHLVL=1'...
FAILED (remote: partition table doesn't exist)
finished. total time: 0.511s
[00:33:38] ERROR: Command failed: (native) % fastboot --base 0 --kernel-offset 0x00008000 --ramdisk-offset 0x02900000 --tags-offset 0x02700000 --page-size 2048 flash:raw /mnt/rootfs_lg-hammerhead/boot/vmlinuz-lg-hammerhead /mnt/rootfs_lg-hammerhead/boot/initramfs-lg-hammerhead

Workaround (on host, not inside chroot):

mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x2900000 --second_offset 0x00f00000 --tags_offset 0x02700000 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1' --kernel ~/.local/var/pmbootstrap/chroot_native/mnt/rootfs_lg-hammerhead/boot/vmlinuz-lg-hammerhead --ramdisk ~/.local/var/pmbootstrap/chroot_native/mnt/rootfs_lg-hammerhead/boot/initramfs-lg-hammerhead -o pmos.img
fastboot boot pmos.img

There is also a bug and the screen is not updated. Workaround: login using ssh and run the following command:

ssh user@
sudo su
while [ ! ]; do cat /sys/class/graphics/fb0/modes > /sys/class/graphics/fb0/mode; done



Component support table

Component Module LineageOS Kernel Mainline kernel
Storage sdhci Working Working
WiFi bcmdhd Missing firmware No
USB Networking Yes No
2D Video mdss_fb Screen not refreshing automatically No
3D Video Not in kernel No
Debug serial Yes, /dev/ttyHSL0 Yes, /dev/ttyMSM0