Raspberry Pi zero w

Enable serial console

sudo su
mount /dev/sdx1 /mnt
cd /mnt
sed -ie 's/BOOT_UART=0/BOOT_UART=1/' bootcode.bin
echo 'enable_uart=1' >> config.txt
echo 'core_freq=250' >> config.txt

# this is only needed for the wireless zero
# see https://www.raspberrypi.org/documentation/configuration/uart.md
echo 'dtoverlay=pi3-miniuart-bt' >> config.txt