Skip to content

Instantly share code, notes, and snippets.

@nmaupu
Last active October 14, 2023 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmaupu/8a3ea8cfdcd2bfec2070b5ed917bc774 to your computer and use it in GitHub Desktop.
Save nmaupu/8a3ea8cfdcd2bfec2070b5ed917bc774 to your computer and use it in GitHub Desktop.
Neon AI - make it work under Raspberry Pi 4 with respeaker 4-mics hat

SD Card creation

  • Download the "recommended mark ii" image

  • Uncompress it

unxz /path/to/img
  • Burn it to your sdcard (replace of param with the correct device):
dd if=/path/to/img of=/dev/mmcblk0 bs=20M

Not quite there yet

Once done, we need to make some adjustements...

  • mount sdcard partitions
sudo mount /dev/mmcblk0p1 /mnt/usb1
sudo mount /dev/mmcblk0p2 /mnt/usb2
  • To make it boot, change the root partition. To do so, edit /mnt/usb1/boot/cmdline.txt and change the root parameter to root=/dev/mmcblk0p2.

  • Next, we need to disable a service that makes everything crash (boot loop when on the logo):

# Copy the squashfs and decompress it
cp /mnt/usb2/neon.squashfs /some/working/dir
cd /some/working/dir && sudo unsquashfs neon.squashfs

# Delete sj201 driver loading
sudo rm -f ./etc/systemd/system/multi-user.target.wants/sj201-reset.service ./etc/systemd/system/multi-user.target.wants/sj201-shutdown.service ./etc/systemd/system/multi-user.target.wants/sj201.service ./etc/systemd/system/pulseaudio.service.wants/sj201.service

# Recreate squashfs and replace the file on the SD card
sudo mksquashfs squashfs-root neon.squashfs
sudo cp neon.squashfs /mnt/usb2
  • Now unmount partitions and try to boot !
sudo umount /mnt/usb{1,2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment