1、CM3计算板简介
把树莓派搬到自己的产品中,一种和树莓派基础功能一模一样的板卡,并对相关管脚扩展,完成产品级的功能设计和硬件设计。板卡如下图所示,运行的是Linux操作系统。
2、下载镜像
CM3有多种内存搭配,常见的SD卡+EMMC板载存储设备。运行的Linux镜像应该不超过CM3的存储容量,并预留一定的空间,我这块CM3是常规的4GB EMMC,因此下载镜像选择为Lite版本。
下载镜像地址:https://www.raspberrypi.org/downloads/raspbian/
选择最新的Raspbian Buster Lite。
3、烧写镜像
网上购买一个CM3底板,用于烧写镜像。例如,微雪的底板:
烧录镜像步骤:
3.1、把CM3识别成存储设备
3.1.1 CM3 boot方式配置
The 4GB eMMC Flash device on CM3 is directly connected to the primary BCM2837 SD/eMMC interface. These connections are not accessible on the module pins. On CM3L this SD interface is available on the SDX pins. When initially powered on, or after the RUN pin has been held low and then released, the BCM2837 will try to access the primary SD/eMMC interface. It will then look for a file called bootcode.bin on the primary partition (which must be FAT) to start booting the system. If it cannot access the SD/eMMC device or the boot code cannot be found, it will fall back to waiting for boot code to be written to it over USB; in other words, its USB port is in slave mode waiting to accept boot code from a suitable host.
A USB boot tool is available on Github which allows a host PC running Linux to write the BCM2837 boot code over USB to the module. That boot code then runs and provides access to the SD/eMMC as a USB mass storage device, which can then be read and written using the host PC. Note that a Raspberry Pi can be used as the host machine. For those using Windows a precompiled and packeged tool is available. For more information see here.
The Compute Module has a pin called EMMC_DISABLE_N which when shorted to GND will disable the SD/eMMC interface (by physically disconnecting the SD_CMD pin), forcing BCM2837 to boot from USB. Note that when the eMMC is disabled in this way, it takes a couple of seconds from powering up for the processor to stop attempting to talk to the SD/eMMC device and fall back to booting from USB.
意思很明显了,CM3启动的时候要去FAT文件系统找bootcode.bin,找不到就等待USB接口接收该文件。当前EMMC没有系统,所以不使能EMMC。具体需要将EMMC_DISABLE_N管脚接地。对应下图则将J4的跳线帽接到GND。
3.1.2 安装驱动识别CM3
(1)安装rpiboot_setup.exe 驱动。
(2)用USB连接CM3底板SLAVE接口。
(3)安装之后,双击打开软件,自动识别CM3并下发bootcode.bin。电脑出现外部存储设备,此时CM3已经被抽象成存储设备。
3.2、SDFormatter格式化CM3
同树莓派格式步骤。
3.3、Win32DiskImager制作Linux镜像
同树莓派格式步骤。