Yocto Build SCFW: Difference between revisions

From Variscite Wiki
No edit summary
(Add Debian Platform Customization)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<!-- Set release according to "release" parameter in URL and use RELEASE_MORTY_V1.0_VAR-SOM-MX6 as default
<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX8X as default
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!--
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release|RELEASE_SUMO_V1.0_VAR-SOM-MX8X}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_SUMO_V1.0_VAR-SOM-MX8X}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{#lst:Debian_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|Yocto Build SCFW from source code}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__
--> {{PageHeader|Yocto Build SCFW from source code}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__
= Install SCFW Toolchain =
= Install the SCFW toolchain =


  $ wget {{#var:SCFW_TOOLCHAIN_URL}}/{{#var:SCFW_TOOLCHAIN}}
  $ wget {{#var:SCFW_TOOLCHAIN_URL}}/{{#var:SCFW_TOOLCHAIN}}
  $ sudo tar xf {{#var:SCFW_TOOLCHAIN}} -C /opt
  $ sudo tar xf {{#var:SCFW_TOOLCHAIN}} -C /opt


= Download SWCF sources =
= Download the SCFW source code =


Download SWFW source package {{#var:SCFW_PACKAGE}}.tar.gz from {{#var:SCFW_URL}} 
  $ git clone {{#var:SCFW_GIT}} -b {{#var:SCFW_BRANCH}}
 
= Unpack SWCF sources =
 
$ mkdir imx-scfw-porting-kit
  $ tar xf {{#var:SCFW_PACKAGE}}.tar.gz -C imx-scfw-porting-kit
$ cd imx-scfw-porting-kit/packages/
$ chmod +x {{#var:SCFW_PACKAGE}}.bin
$ ./{{#var:SCFW_PACKAGE}}.bin
$ cd {{#var:SCFW_PACKAGE}}/src
$ tar xf scfw_export_{{#var:SCFW_SOC}}.tar.gz
 
= Apply Variscite patch =
$ wget {{#var:SCFW_PATCH_URL}}/{{#var:SCFW_PATCH}}
$ cd scfw_export_{{#var:SCFW_SOC}}
$ cat ../{{#var:SCFW_PATCH}} | patch -p1
 
= Build SCFW image =


= Build the SCFW image =
$ cd imx-sc-firmware/src/scfw_export_{{#var:SCFW_SOC}}
  $ export TOOLS=/opt
  $ export TOOLS=/opt
{{#ifeq: {{#var:SCFW_SOC}} | mx8qx_b0 |
{{#ifeq: {{#var:SCFW_SOC}} | mx8qx_b0 |
Line 43: Line 29:
}}
}}


The SWCF image scfw_tcm.bin is located under build_{{#var:SCFW_SOC}}
The SCFW image, scfw_tcm.bin, is located under build_{{#var:SCFW_SOC}}

Latest revision as of 14:08, 4 May 2023

Yocto Build SCFW from source code

Install the SCFW toolchain

$ wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz
$ sudo tar xf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz -C /opt

Download the SCFW source code

$ git clone https://github.com/varigit/imx-sc-firmware.git -b 1.2.2

Build the SCFW image

$ cd imx-sc-firmware/src/scfw_export_mx8qx_b0
$ export TOOLS=/opt
$ make clean-qx
$ make qx R=B0 B=var_som V=1

The SCFW image, scfw_tcm.bin, is located under build_mx8qx_b0