LG G Watch R (lg-lenok)

Contributors

 * Bloo
 * drebrez
 * ollieparanoid
 * ata2001
 * opendata
 * z3ntu

Entering Fastboot mode
Turn on your watch and swipe from the top left corner (so thatd be where 11 would be on the watch) as soon as you see the LG logo.

Preperation

 * Add  the deviceinfo file
 * Replace sshd with dropbear as seen in the USB_Network page

Installation
First build the image:

Then in order to flash it put your device in fastboot mode, and plug it in USB. Then do:

We flash to the `userdata` partition as the system partition is not big enough for postmarketOS.

You can then either reboot or run  to boot into postmarketOS.

UART
UART is multiplexed on the USB port. The watch has five pads that are directly connected to the docking station's USB connector. This makes it possible to build a custom cable that just plugs into the dock to read the UART output, no resistor needed. Neat!

Pin order is the following, when looking at the docking station from the top, USB cable on the left:

According to the kernel code, there seems to be some code checking if v(USB id) is about 900 mV before muxing UART to the USB connector, and an extra command line parameter,  might have to be enabled to output the kernel messages. Still according to that code, adding  seems force muxing without applying a voltage on the id pin. Despite this, logging seems to always be enabled, and none of the above is necessary when connected to a test circuit with just GND and TX.

The following is the complete early boot sequence captured at 115200 bauds. UART output seems to be enabled by default during early boot, so applying a specific voltage to the ID pin is not needed. Note that you will need to keep the power button pushed until "welcome to lenok bootloader" appears, otherwise the boot process is interrupted.

Internal storage
Note, that the system partition is a squashfs image and needs to be mounted differently compared to ext4 or f2fs.

Links

 * initial PR
 * kernel source backup
 * AsteroidOS device page
 * Initial mainline support
 * Initial mainline support