Google Nexus 5 (lg-hammerhead)

From postmarketOS
Jump to: navigation, search
LG Nexus 5
Nexus 5 running the weston demo
Nexus 5 running the weston demo
Manufacturer LG
Name Nexus 5
Codename hammerhead
Released 2013
Original software Android 4.4-6 on Linux 3.4
Chipset Qualcomm MSM8974 Snapdragon 800
CPU Quad-core 2.3 GHz Krait 400
GPU Adreno 330
Display 1080x1920 IPS
Storage 16/32 GB
Memory 2 GB


  • 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



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