Skip to content

Add support for Sipeed M1s DOCK (BL808)

Danct12 requested to merge Danct12/pmaports:m1sdock into master

This is the weirdest device I've seen running Linux.

Sipeed M1s DOCK is a development board based on the Sipeed M1s module, it has two USB-C ports, a microphone, a white LED, an SD card slot and support for Wi-Fi 4, Bluetooth 5 (with LE). It runs FreeRTOS as the operating system.

The M1s module contains the BL808 SoC, this is the same SoC used on the Pine64 0x64 development board. Porting this to the 0x64 should be dead easy, however I have not tested it.

Mainline Linux support is actively being developed by the OpenBouffalo community.

How to test this merge request

Install U-Boot

  • Download Buildroot images for BL808
  • Open BLDevCube, select BL808 as platform and go to the MFG tab
  • Set the following:
    • M0 Group [Group0] Image Addr [0x58000000] [PATH to m0_lowload_bl808_m0.bin]
    • D0 Group [Group0] Image Addr [0x58100000] [PATH to d0_lowload_bl808_d0.bin]
  • Set port to /dev/ttyACM1 and hit 'Create & Download'
  • Once finished, switch to IOT tab
  • Enable 'Single Download', set Address with 0x800000, choose [bl808-firmware.bin]
  • Click 'Create & Download' again and wait until it's done
  • Connect to /dev/ttyACM0 on 2000000 8n1 and hit RESET button, you should now see U-Boot.

Install postmarketOS to SD Card

  • Get an SD card (32GB recommended, there might be incompatibilities with lower)
  • pmbootstrap init
  • pmbootstrap install --sdcard=/dev/SDCARD_DEVICE
  • After done, insert the SD card to the M1s DOCK, plug to power and hit RESET button.
  • Connect to /dev/ttyACM0 on 2000000 8n1.
  • Unfortunately, U-Boot for BL808 currently does not support compressed kernel and ramdisk so interrupt autoboot and run these commands:
setenv ramdisk_addr_r 0x52200000
setenv kernel_comp_addr_r 0x53200000
setenv kernel_comp_size 0x2000000
  • Run boot and you should now be booting postmarketOS.

The U-Boot setenv part might be obsolete in the future as the current U-Boot does not have these setup.

Merge request reports