...
To fetch the development branch of an SDK, the script fetchDevSdk is provided in /afs/slac/g/cci/bin/sdktools/fetchDevSdk
. Here is the usage statement when invoked without arguments:
Code Block |
---|
Usage: fetchDevSdk <architecture> [<architecture> ...]
fetchDevSdk all
Fetches one or more SDKs from the development tree.
Valid architectures: arm-linux-rceCA9 arm-rtems-rceCA9 i86-linux-32 i86-linux-64
|
Your SDKs will end up in your current directory with the architecture name. Once you wish to start developing, you should create a new branch and then merge back to development. For branching and merging info see the Git - Book.
Modifying the SDK
Once you have a development SDK, you can start modifying files. If you're updating libraries and include files from the workspace, see the next section.
Create your own branch with git branch
. Change the scripts/examples/host tools as you wish. git status
will tell you what you have modified, then use git add
, git commit
, and finally git merge
and git push
to propagate your changes back to the origin development repositories.
Updating the SDK from the workspace
If you are updating the SDKs with code compiled in a workspace (the core development environment, not the SDK environment), a python script in the workspace provides hooks for copying the relevant files to the SDK:
Code Block |
---|
$ workspace/make/tools/updateSDK.py --help
Usage: updateSDK.py [options]
Options:
-h, --help show this help message and exit
--sdk=SDK Location of SDK git directory
--work=WORK Location of workspace (for RTEMS template code)
--build=BUILD Location of build directory
--arch=ARCH Target Architecture (e.g. arm-rtems-rceCA9-opt)
--exclude=EXCLUDE File of items to exclude
--rtemsInclude=RTEMSINCLUDE
Location of RTEMS Include files
--fpgaSrc=FPGASRC Location of FPGA bit files
|
...
Typically in SLAC DAT's development model, the core code is being tagged from the current trunk, not from a set of branches. A script is available in the core system to do a snapshot of the core trunk, collecting the workspace and the other projects together into a single chunk that's easy to deal with:
Code Block |
---|
$ workspace/make/tools/snapshot.sh "commit message"
|
After running, this script prints out the location of your new snapshot in the DAT SVN repository. The location is relative to $SVNROOT, and is of the format "core_tags/snapshot/YYYYMMDD_HHmm". From here, you can do the "final" tag by copying the snapshot (using svn cp) to core_tags/prod/VX.Y.Z, like in this example:
Code Block |
---|
$ svn cp $SVNROOT/core_tags/snapshot/20140813_1225 $SVNROOT/core_tags/prod/V0.4.0 -m "Official tag for V0.4.0"
|
...
cd
to the development master repositories in /afs/slac/www/projects/CTK/SDK/dev/<arch>
. For each SDK repository subdir (include, lib, tgt,...):
Code Block |
---|
/afs/slac/www/projects/CTK/SDK/dev/sdk_scripts/tag_repo.sh <os> <tag>
|
...
The final step is to make these changes visible to the user outside SLAC.
Code Block |
---|
cd /afs/slac/www/projects/CTK/SDK/
dev/sdk_scripts/pull-user-from-dev
|
...
A copy of the user SDK is kept on AFS in order to build SD cards.
Code Block |
---|
cd /afs/slac/g/cci/sdimages/sdk
mkdir VX.Y.Z
cd VX.Y.Z
../fetchAllUser VX.Y.Z
|
...