Template:Yocto Build Release TI: Difference between revisions
From Variscite Wiki
No edit summary |
|||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#vardefine:UBUNTU_COMPAT|18.04/20.04}}<!-- | <includeonly> | ||
{{#ifexpr: {{#var:YOCTO_VERSION}} >= 4.1 | | |||
{{#vardefine:UBUNTU_COMPAT|22.04}} | |||
| | |||
{{#vardefine:UBUNTU_COMPAT|18.04/20.04}} | |||
}}<!-- | |||
--> | --> | ||
{{PageHeader|{{#var:HARDWARE_NAME}} - Yocto {{#var:YOCTO_NAME}} {{#var:YOCTO_VERSION}}}} | {{PageHeader|{{#var:HARDWARE_NAME}} - Yocto {{#var:YOCTO_NAME}} {{#var:YOCTO_VERSION}}}} | ||
Line 51: | Line 56: | ||
'''Download the latest source code (recommended):''' | '''Download the latest source code (recommended):''' | ||
$ git clone {{#var:OE_LAYERSETUP_GIT}} ~/var-ti-yocto | |||
$ git clone {{#var:OE_LAYERSETUP_GIT}} | |||
or | or | ||
Line 58: | Line 62: | ||
'''Download a release tag:''' | '''Download a release tag:''' | ||
$ git clone {{#var:OE_LAYERSETUP_GIT}} ~/var-ti-yocto -b {{#var:RELEASE_NAME}} | |||
$ git clone {{#var:OE_LAYERSETUP_GIT}} | |||
{{Note|'''Optional:''' Variscite provides Docker containers that can be used for a development environment as an alternative to using a virtual machine or a dedicated computer. | {{Note|'''Optional:''' Variscite provides Docker containers that can be used for a development environment as an alternative to using a virtual machine or a dedicated computer. | ||
Line 66: | Line 69: | ||
If you choose to use docker, launch a new container with the host build directory mounted to /workdir/build and the toolchains mounted to the home directory: | If you choose to use docker, launch a new container with the host build directory mounted to /workdir/build and the toolchains mounted to the home directory: | ||
$ cd ~/var-ti-yocto/ | {{#ifexpr: {{#var:YOCTO_VERSION}} >= 4.1 | | ||
$ ~/var-host-docker-containers/run.sh -u 20.04 -w $(pwd) $(for dir in ~/gcc-arm*; do echo -n "-v $dir:/home/vari/$(basename $dir) "; done) | $ cd ~/var-ti-yocto | ||
$ ~/var-host-docker-containers/run.sh -u 22.04 -w $(pwd) {{#ifexpr: {{#var:YOCTO_VERSION}} < 4.1 | $(for dir in ~/gcc-arm*; do echo -n "-v $dir:/home/vari/$(basename $dir) "; done)}} | |||
| | |||
$ cd ~/var-ti-yocto | |||
$ ~/var-host-docker-containers/run.sh -u 20.04 -w $(pwd) {{#ifexpr: {{#var:YOCTO_VERSION}} < 4.1 | $(for dir in ~/gcc-arm*; do echo -n "-v $dir:/home/vari/$(basename $dir) "; done)}} | |||
}} | |||
Follow the remaining steps to build an image, replacing the path ~/var-ti-yocto | Follow the remaining steps to build an image, replacing the path ~/var-ti-yocto/build with /workdir/build. | ||
}} | }} | ||
* Download the source code dependencies'''<br> | * Download the source code dependencies'''<br> | ||
$ cd | $ cd ~/var-ti-yocto | ||
$ ./oe-layertool-setup.sh -f {{#var:OE_LAYERSETUP_MANIFEST_PATH}} | $ ./oe-layertool-setup.sh -f {{#var:OE_LAYERSETUP_MANIFEST_PATH}} | ||
<!-- | <!-- | ||
* '''Download a release tag'''<br> | * '''Download a release tag'''<br> | ||
$ cd | $ cd ~/var-ti-yocto | ||
$ git checkout {{#var:RELEASE_NAME}} | $ git checkout {{#var:RELEASE_NAME}} | ||
$ ./oe-layertool-setup.sh -f {{#var:OE_LAYERSETUP_MANIFEST_PATH}} | $ ./oe-layertool-setup.sh -f {{#var:OE_LAYERSETUP_MANIFEST_PATH}} | ||
Line 83: | Line 91: | ||
{{#varexists:CORE_SECDEV_K3_GIT | | {{#varexists:CORE_SECDEV_K3_GIT | | ||
Fetch the core-secdev-k3 Security Dev Tool: | Fetch the core-secdev-k3 Security Dev Tool: | ||
{{GIT_FETCH|NAME=CORE_SECDEV_K3|WORKDIR=~/var-ti-yocto | {{GIT_FETCH|NAME=CORE_SECDEV_K3|WORKDIR=~/var-ti-yocto/build|USE_COMMIT=y}} | ||
| }} | | }} | ||
Line 106: | Line 114: | ||
= Create a bootable SD card = | = Create a bootable SD card = | ||
The wic image fully supports booting from an SD | The wic image fully supports booting from an SD card. Use the command below to write it to an SD card: | ||
$ {{#var:UNZIP}} {{#var:DEPLOY_DIR}}/images/{{#var:MACHINE_NAME}}/{{#var:DEFAULT_IMAGE_BB_NAME}}-{{#var:MACHINE_NAME}}.wic.zst | sudo dd of=/dev/sdX bs=1M && sync | $ {{#var:UNZIP}} {{#var:DEPLOY_DIR}}/images/{{#var:MACHINE_NAME}}/{{#var:DEFAULT_IMAGE_BB_NAME}}-{{#var:MACHINE_NAME}}.wic.zst | sudo dd of=/dev/sdX bs=1M && sync | ||
{{note|'''NOTE''': The wic image does not support all features booting from eMMC. For example, /etc/fw_env.config is configured for the SD | {{note|'''NOTE''': The wic image does not support all features booting from eMMC. For example, /etc/fw_env.config is configured for the SD card (/dev/mmcblk1) |info}} | ||
= Create a Recovery SD card = | = Create a Recovery SD card = |