构建和安装自定义系统映像

Note注意

To build a new image you need a host device as described here
要构建新映像, 您需要一台 这里 所述的主机设备。

To build a image run the following commands:
请运行以下命令构建映像:

  1. Start a build environment container:启动构建环境容器:

    $ docker run --rm -it -v $(pwd):$(pwd) ghcr.io/synaptics-astra/crops:0.9.0 --workdir=$(pwd)
    
  2. Clone the sources from GitHub
    GitHub 克隆源代码

    pokyuser@xyz:/path/to/workspace $ git clone -b v0.9.0 --recurse-submodules \
                                                https://github.com/synaptics-astra/sdk
    
  3. Setup the build tree:设置构建树:

    pokyuser@xyz:/path/to/workspace $ cd sdk
    
    pokyuser@xyz:/path/to/workspace/sdk $ source meta-synaptics/setup/setup-environment
    
    Select the MACHINE you want to build:
    
    1) sl1620
    2) sl1640
    3) sl1680
    
    You selection: 1
    
  4. Modify the image configuration metadata as desired (e.g. by adding more packages to the image by tweaking the conf/local.conf file). For more information on how to configure the image refer to Astra Yocto Linux Developer Guide
    根据需要来修改映像配置元数据(例如, 通过调整conf/local.conf文件,将更多包添加到映像中)。有关如何配置映像的详细信息,请参阅 Astra Yocto Linux开发人员指南

  5. Build the image:构建映像:

    pokyuser@xyz:/path/to/workspace/sdk/build-slXYZ $ bitbake astra-media
    

The image will be available in build-${MACHINE}/tmp/deploy/images/${MACHINE}/SYNAIMG/ and can be flashed with the procedure described in Updating the Firmware.
该映像在 build-${MACHINE}/tmp/deploy/images/${MACHINE}/SYNAIMG/ 中提供, 并可参照 更新固件 中描述的步骤来烧录。

For more details, troubleshooting and information check the Synaptics Astra Yocto Guide.
更多细节、故障排除和信息,请参阅 Synaptics Astra Yocto指南