Embedded module TQMa8xx - YOCTO Linux BSP documentation

Install additional Packages

The tools cppcheck and srec_cat must be installed on the development host to build the System Controller Firmware, on a Ubuntu host they can be installed with the following command:

sudo apt-get install srecord cppcheck

Download and Install GNU ARM Toolchain

Download the GNU Arm Embedded Toolchain gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2

 
cd ~/Downloads
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2
sudo tar xvjf gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2 -C /opt

SCFW Patch Series

In this guide the SCFW patch series provided from TQ is stored in the current users Download folder. One can choose any other location in the home directory.

The SCFW porting kit download requires the registration on the NXP website, afterwards it can be downloaded from the link below:

https://www.nxp.com/webapp/Download?colCode=L6.1.22_2.0.0_SCFWKIT-1.15.0&appType=license&location=null

Create a new folder for the SCFW porting kit e.g. in the home directory

mkdir -p ~/workspace/scfw

Extract the SCFW porting kit archive to the folder created above.

cd ~/Downloads
tar xvzf IMX-SCFW-PORTING-KIT-1.15.0.tar.gz -C ~/workspace/scfw/ 

Navigate to folder “packages” in the scfw directory and make the SCFW proting kit binary executable. Start the SCFW Porting Kit afterwards and read/accept the NXP EULA.

cd ~/workspace/scfw/packages
chmod +x imx-scfw-porting-kit-1.15.0.bin
./imx-scfw-porting-kit-1.15.0.bin

Navigate to subfolder src/ in the new created folder imx-scfw-porting-kit-1.15.0 and extract the source archives

cd imx-scfw-porting-kit-1.15.0/src/
for FILE in *.tar.gz ; do tar xvzf $FILE; done

Move back to root folder imx-scfw-porting-kit-1.15.0 and initialize the SCFW porting kit as git repository.

cd ..
git init

Add all files to the git repository created before and create an inital commit

git add .
git commit -m "initial commit"

Check the git repository status:

git status 

An output on the shell that the working tree is clean should appear and look like something below:

On branch master
nothing to commit, working tree clean

Extract porting-kit patch archive into your scfw root directory:

e.g.

tar xvzf ~/Downloads/imx-sc-firmware-tq-TQMa8.NXP-v1.15.0.B5624.0037.patch.tar.gz -C ~/workspace/scfw/

Create patches variable for current shell session, e.g.:

patches=$(cat ~/workspace/scfw/imx-sc-firmware-tq-TQMa8.NXP-v1.15.0.B5624.0037.patch/series)

Patch scfw firmware repository:

for p in ${patches}; do git am ~/workspace/scfw/imx-sc-firmware-tq-TQMa8.NXP-v1.15.0.B5624.0037.patch/${p}; done

Create a new git tag with reference to the tq revision of the scu firmware, e.g.:

git tag -a TQMa8.NXP-v1.15.0.B5624.0037-local

Build the scfw firmware using one of the following commands:

Build Command Description
make -f Makefile.release
Disables monitor, debug and sets TEST=NONE
make -f Makefile.debug
Enables monitor, debug and sets DEBUG_LEVEL=3, TEST=all
make -f Makefile.monitor
Enables monitor, debug and sets DEBUG_LEVEL=1, TEST=NONE
make -f Makefile.test
Disables monitor, enables debug and sets DEBUG_LEVEL=3, allows overwrite TEST from environment

Copy the SCU firmware archive into the following folder in the build directory …/ci-meta-tq/sources/meta-tq/meta-tq/recipes-bsp/imx-sc-firmware/imx-sc-firmware-tq e.g.

cp ~/workspace/scfw/packages/imx-scfw-porting-kit-1.15.0/TQMa8.NXP-v1.15.0.B5624.0037-local.tar.gz ~/workspace/kirkstone.TQMa8.BSP.SW.0092.0092/ci-meta-tq/sources/meta-tq/meta-tq/recipes-bsp/imx-sc-firmware/imx-sc-firmware-tq 

Customize the SC_FIRMWARE_VERSION_TQ variable in the recipe file …/ci-meta-tq/sources/meta-tq/meta-tq/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.3.1.bbappend to match the SCU firmware archive naming:

SC_FIRMWARE_VERSION_TQ ?= "TQMa8.NXP-v1.15.0.B5624.0037-local"

  • Last modified: 2023/09/08 14:13