1. Introduction
Since the CodeAurora shutdown, in order to facilitate the build for older BSPs(versions prior to 34.0), the method with necessary patches/scripts is provided by NXP to adapt the changes, for details, it could be accessed via the following link:
https://community.nxp.com/t5/S32G-Knowledge-Base/How-to-build-older-Auto-Linux-BSPs/ta-p/1637516
(Note that the operation steps provided by this document could be used solely without referencing the document from previous link.
This document could be treated as a supplement of the above link, since the operations would only workable upon the scripts provided from the original document, for diving into the internals, it is strongly suggested reading the document above)
However, recently the following errors may be found during the old BSP builds:
./migrate.sh --full --work_path ./BSP34 --release_branch release/bsp34.0
=====================================================================
WARNING: THIS SCRIPT WILL CHANGE MANIFEST AND YOCTO RECIPE FILES!
SINCE CODE AURORA HAS BEEN SHUT DOWN, THIS SCRIPT IS NEEDED IN ORDER
TO CHANGE THE CAF LINKS TO NXP/GITHUB CORRESPONDING LINKS.
IT IS STRONGLY RECOMMENDED THAT USERS PROPERLY SAVE ALL THEIR LOCAL
CHANGES IN REPOSITORES CLONED BY THE 'repo' TOOL BEFORE ATTEMPTING
TO RUN THIS SCRIPT (VIA 'git commit' OR OTHER MEANS)!!!
PROCEEDING FURTHER MEANS ACKNOWLEDGING THE RISKS INVOLVED AND
PROPERLY SAVING ALL YOUR CHANGES!
=====================================================================
Proceed further?(y/n) y
[INFO] Preparing working directory ./BSP34/auto-bsp ...
[INFO] Finished preparing working directory!
[INFO] Performing repo init...
[INFO] Using manifest " default.xml "...
Downloading Repo source from https://gerrit.googlesource.com/git-repo
remote: Counting objects: 162, done
remote: Finding sources: 100% (27/27)
remote: Total 27 (delta 4), reused 14 (delta 4)
Unpacking objects: 100% (27/27), 64.67 KiB | 4.62 MiB/s, done.
......................
If you want to change this, please re-run 'repo init' with --config-name
........................
[INFO] Finished repo init!
[INFO] Starting presync migration!
[INFO] Done presync migration!
[INFO] Performing repo sync...
Fetching: 11% (1/9) 0:21 | 2 jobs | 0:21 meta-freescale @ sources/meta-freescale
fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
meta-linaro:
fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
meta-linaro: sleeping 4.0 seconds before retrying
fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
error: Cannot fetch meta-linaro from https://git.linaro.org/openembedded/meta-linaro
Fetching: 100% (9/9), done in 9m50.034s
Fetching: 0% (0/1) 0:07 | 1 job | 0:07 meta-linaro @ sources/meta-linaro
fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
meta-linaro:
fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
meta-linaro: sleeping 4.0 seconds before retrying
fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
error: Cannot fetch meta-linaro from https://git.linaro.org/openembedded/meta-linaro
Fetching: 100% (1/1), done in 7.664s
fatal: failed to unpack tree object HEAD
error.GitError: Cannot checkout meta-linaro: Cannot initialize work tree for meta-linaro
error: Cannot checkout meta-linaro
Checking out: 88% (8/9), done in 0.680s
Checking out: 11% (1/9), done in 0.031s
error: Unable to fully sync the tree
error: Downloading network changes failed.
error: Checking out local projects failed.
Failing repos:
sources/meta-linaro
Try re-running with "-j1 --fail-fast" to exit at the first error.
================================================================================
Repo command failed due to the following `SyncError` errors:
GitCommandError: 'fetch --quiet --progress linaro --prune --recurse-submodules=no --tags +refs/heads/*:refs/remotes/linaro/* +refs/tags/*:refs/tags/*' on meta-linaro failed
stdout: fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
GitCommandError: 'fetch --quiet --progress linaro --prune --recurse-submodules=no --tags +refs/heads/*:refs/remotes/linaro/* +refs/tags/*:refs/tags/*' on meta-linaro failed
stdout: fatal: unable to access 'https://git.linaro.org/openembedded/meta-linaro/': The requested URL returned error: 403
Cannot initialize work tree for meta-linaro
..........................
By investigating the issue, it is caused by the service changes from Linaro.
2. Additional Operations
For fixing the issue met, the following new steps are suggested for the users who still want to utilize the older BSPs, taking BSP34.0 builds as an example below:
git clone https://github.com/nxp-auto-linux/linux-bsp-utils.git
cd linux-bsp-utils/codeaurora_migration/
mkdir BSP34/auto-bsp
cd BSP34/auto-bsp
repo init -u https://github.com/nxp-auto-linux/auto_yocto_bsp -b release/bsp34.0
cd BSP34/auto-bsp/.repo/manifests
patch -p1 < OldBSPs.patch
cd ../../../..
./migrate.sh -s -p ./BSP34
cd BSP34/auto-bsp
source nxp-setup-alb.sh -m <target_machine>
bitbake <target-image>