I got my BPI-CM4 yesterday, so I manage to light it today . Bootloader and kernel are compiled from BSP, installed to microSD with preinstalled M2S system image. Because cpu of M2S is Amlogic A311D, the same as CM4, and wiki of CM4 is also linked to M2S.
Running CM4:
Preparation
Write Bananapi M2S system image to microSD,my version:
2022-06-20-ubuntu-20.04-mate-desktop-bpi-m2s-aarch64-sd-emmc.img
Besides, my compiling computer is Ubuntu 18.04
Compilation
Enviroment setup
-
Download BSP from github
$ git clone https://github.com/BPI-SINOVOIP/BPI-M2S-BSP
$ git submodule update --init --recursive -
Compile CM4 BSP as follow
$ ./build.sh bpi-cm4
Enter 1 to start building -
when finished, compiled files are in ./SD
Here, bpi-tools.gz is generated by following steps.
Install to SD card
-
Edit ./scripts/mk_install_sd.sh (Optional)
Alter: copy shells in bpi-tools to /usr/bin -
Edit bpi-update in bpi-tools
- Line 32: comment UBOOTIMGGZ
- Line 33: BOOTFILES=BPI-BOOT-bpi-cm4.tgz
- Line 37:comment useless options, add 4.9.241-BPI-CM4-Kernel.tgz, bpi-tools.tgz
- Around Line 70 ~ Line 80:F_UPDATE = YES; F_GOOGLE = NO
- Execute build.sh again to install bootloader and kernels to mircroSD
$ ./build.sh bpi-cm4
- type 6 to install to SD
- choose 2,CM4
- enter SD device, mine is /dev/sdc
- done
Startup
Lighting
WiFi Driver
Go to /usr/lib/modules/4.9.241-BPI-CM4/kernel/drivers/net/wireless/realtek/rtl8822cs in CM4 filesystem, then
$ sudo insmod 88x2cs.ko
Furthermore,WiFi driver of this system cannot be loaded from overlay,which can result in failed booting. But uart and i2c are ok, I may take more tests few days later.