Bifrost is an internal module/tools repository for managing internal development workspaces needing translation between Bitbucket and GitHub.
This is the environment setup for internal developers to create and adjust the west workspace internal development
This design makes it possible the downstream Bitbucket repos to have a one-to-one alignment with the NXP Github downstream repos without rewriting the commit history to change the URL. Developers need to follow the rule as below:
Need to run the set up script init_env.py(or west custom command
west sdk_init
) only once in the initial workspace using this repo and the instructions below.Add a new entry for the URL map in .gitconfig once a new internal Bitbucket repo is created/added for zephyr downstream support.
insteadOf and includeIf
The init_env.py setup script(or west custom command west sdk_init
) will configure the new workspace appropriately for this URL translation. The translation is accomplished leveraging Git’s insteadOf
configuration to rewrite URLs when Git is performing network operations. It allows replacing part of the URL with another string, making it transparent to work with repositories that have different URLs for different contexts (e.g. internal Bitbucket vs external Github). These translations are found in the .gitconfig configuration file.
The script will add a global configuration in Git using the includeIf
configuration to cause conditional inclusion of the .gitconfig in the newly initialized workspace. Use the following to see your workspace configuration:
git config -l
There’s also another extension command west sdk_deinit
to remove the URL translation config from Git global configuration. After run this command, developers are able to to add a new remote tracking the Github URL which previously was translated to Bitbucket URL by Git.
NOTE
Please be aware that run west update
command after west sdk_deinit
will still update existing repos from Bitbucket repo because their default Git remote was set as Bitbucket URL.
The following repos are converted to Bitbucket URL, which previously use default remote url-base point to Github:
nxp-zephyr
zsdk-int-manifest
zephyr_mbedtls
zephyr_tf-m
zephyr_psa_arch_test
There’s no record for the primary west manifest repo because this repository is the starting repository for west and does not have any URL tracking problems.
When a new NXP repo is added to the development, add a new entry in this .gitconfig file.
Steps to try
Due to west limitations, the steps to try are different for zephyr downstream and next SDK.
West requires all imported projects be checked out before it can execute west custom commands(west issue). So, zephyr downstream cannot use
west sdk_init
command for URL translation because zsdk imported the zephyr project.
Below describes the detailed steps for zephyr downstream and next SDK.
Firstly please follow below instruction to establish a global git setting for URL translation of the bifrost repository:
$ git config --global url.ssh://git@bitbucket.sw.nxp.com/mcucore/bifrost.git.insteadOf https://github.com/nxp-zephyr/bifrost
NOTE: The above instruction only needs to be done once when configuring a workstation for next SDK or Zephyr Downstream development. If you already have the map established previously, you can skip this step.
Zephyr downstream
Initialize development workspace with zsdk manifest repo on Bitbucket
$ west init -m ssh://git@bitbucket.sw.nxp.com/mcucore/nxp-zsdk.git zephyr_downstream --mr main
$ cd zephyr_downstream
Checkout bifrost repo which has the internal tools/scripts to convert the Bitbucket URL to Github URL.
$ west update bifrost
Run set up script init_env.py(python3 needed) to activate the includeif specified git configuration and enable bifrost group.
$ python bifrost/scripts/init_env.py
Update your workspace:
$ west update
Next SDK
If you are creating new develop workspace, follow below instructions:
Initialize development workspace with your manifest repo on Bitbucket
$ west init -m ssh://git@bitbucket.sw.nxp.com/mcucore/mcuxsdk-manifests.git sdk-next --mr main
$ cd sdk-next
Checkout bifrost repo which has the internal tools/scripts to convert the Bitbucket URL to Github URL.
$ west update bifrost
Enable west custom command, run
west sdk_int
to activate the includeif specified git configuration and enable bifrost group.
$ west config commands.allow_extensions true
$ west sdk_init
Update your workspace:
$ west update
Next SDK Migration from mcu-sdk-3.0 to mcux-manifests
Previously SDK Ng is using mcu-sdk-3.0 as manifest entry, for ease of external customer, we will migrate to use the mcux-manifests repo as the manifest repo
Before 24.12.00 RC1, the mcu-sdk-3.0 manifest repository is still used to give time for CICV system to switch and to reduce the potential risk for the 24.12.00 prepartion. At same time, the mcuxsdk-manifests repo is created and periodically synced the cotnent from mcu-sdk-3.0
Once 24.12.00 RC1 is created, the mcu-sdk-3.0 will be locked and deprecated and all user is suppose to use the mcuxsdk-manifests as manifest entry