Skip to content
Snippets Groups Projects

Add support for Sipeed M1s DOCK (BL808)

Merged Imported Administrator requested to merge m1sdock into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator
  • Administrator
  • Administrator added 2 commits · Imported

    added 2 commits

    • 01d6ec0c - linux-postmarketos-bflb: new kernel package
    • 34e424b9 - device-sipeed-m1sdock: new device package

    Compare with previous version

    By Danct12 on 2023-04-23T18:04:59

  • Administrator resolved all threads · Imported

    resolved all threads

    By Danct12 on 2023-04-23T18:05:14

  • Administrator added 9 commits · Imported

    added 9 commits

    Compare with previous version

    By Danct12 on 2023-04-23T18:06:23

  • Administrator
  • Author Owner
    • 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.

    It would be preferable to add execution of these commands to u-boot source

    By jenneron on 2023-04-23T19:08:08

  • Author Owner

    Also, move installation instructions to the wiki page https://wiki.postmarketos.org/wiki/Sipeed_M1s_DOCK_(sipeed-m1sdock)

    By jenneron on 2023-04-23T19:14:26

    Edited by Administrator
  • Administrator added 1 commit · Imported

    added 1 commit

    Compare with previous version

    By Danct12 on 2023-04-23T19:44:35

  • Administrator resolved all threads · Imported

    resolved all threads

    By Danct12 on 2023-04-23T19:44:57

  • Administrator approved this merge request · Imported

    approved this merge request

    By jenneron on 2023-04-23T19:45:28

  • Administrator approved this merge request · Imported

    approved this merge request

    By Oliver Smith on 2023-04-24T05:52:23

  • Administrator added 2 commits · Imported

    added 2 commits

    • 560e8b56 - 1 commit from branch postmarketOS:master
    • 2d6be776 - sipeed-m1sdock: new device (MR 4025)

    Compare with previous version

    By Oliver Smith on 2023-04-24T05:53:28

  • Administrator enabled an automatic merge when the pipeline for 2d6be776 succeeds · Imported

    enabled an automatic merge when the pipeline for 2d6be776 succeeds

    By Oliver Smith on 2023-04-24T05:54:18

  • Administrator merged · Imported

    merged

  • Author Owner

    Replace bl808-firmware.bin with this customized version if you don't want to enter commands on each boot.

    bl808-firmware.bin

    *** bl808.h	2023-04-24 19:51:35.721628882 +0000
    --- bl808.h	2023-04-24 19:31:45.084793630 +0000
    ***************
    *** 49,54 ****
    --- 49,57 ----
              "kernel_addr_r=0x50200000\0" \
              "fdt_addr_r=0x51ff8000\0" \
              "fdtoverlay_addr_r=0x52008000\0" \
    +         "ramdisk_addr_r=0x52200000\0" \
    +         "kernel_comp_addr_r=0x53200000\0" \
    +         "kernel_comp_size=0x2000000\0" \
       	BOOTENV
      #endif
    

    By Danct12 on 2023-04-24T12:53:14

  • Please register or sign in to reply
    Loading