Project:Sandbox

= Working With AirTies Software Build Profiles = For Questions or Comments, Please Contact: '''               Lance Bledsoe Senior Software Engineer AirTies, Austin TX USA Lance.Bledsoe@AirTies.com''

Introduction
What are AirTies Profiles? '''          For all practical purposes, an AirTies profile is simply a collection of all the necessary code, config files, and toolchains necessary to        build the image in a pristine Linux Bash Shell environment. An AirTies profile is not really like other "profiles" you may have have used in the past, with other build systems like cmake, qmake, etc. Essentially, an AirTies profile is just a directory, with a known structure, and known files, which completely describes what tools are needed and how to build the image in question. The heart of the profile is the "profile" file, which contains many lines of configuration information. Profiles are designed to be copied and modified for new hardware targets. You can think of an AirTies profile as a portable container containing the recipe to completely build the image, similar to a "super-makefile". AirTies Scripts, Commands and Files Used in this Wiki Page: airgitclone.sh - bla bla bla bla bla bla bla bla bla bla bla bla environment - bla bla bla bla bla bla bla bla bla bla bla bla airgitclone.sh - bla bla bla bla bla bla bla bla bla bla bla bla - bla bla bla bla bla bla bla bla bla bla bla bla bake - bla bla bla bla bla bla bla bla bla bla bla bla '''

Creating Your Workspace Build Directory Structure
bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla '''       The most widely used directory structure for working with various AirTies Software Build Profiles is as follows:       ~/test/target/buildsys/ ...    The exact name of the test and target''' directories is up to you. However, the convention would be to use test and then various subdirectory names which are meaningful to you. '''   Some people choose to use subdirectory names like:       a, b, c, etc. ''' Or, a descriptive product name such as:       BGW210, NVG599, etc.   Certainly, it is never a problem to use additional subdirectories as you wish, such as:       ~/test/YourName/2.4G/buildsys/, ~/test/YourName/5G/buildsys/, etc. 

Building and Image for a Specific Product
In the following examples, we will use the variants of YourName profiles for our example.        IMPORTANT NOTICE:'''       IMO: This is a finicky process, and MUST be followed precisely for best results. Any deviation may result in failure, and should be restarted again in a new shell.       Because we will be modifying your environment, it is HIGHLY RECOMMENDED that you open a NEW, FRESH Terminal on your local Linux Machine. '''Using a Terminal in which you have previously used the following process, will very likely result in failure, and wasted time.       In the event that you encounter any problems in this process, I suggest you make SURE you begin again with a NEW, FRESH Terminal.'''    WARNING:'''       For software developers, I have found it is VERY easy to type make instead of bake. 'Entering make' instead of ''bake' may appear to work correctly, but eventually you will soon encounter errors and failures. '''   First, we will want to create our overall working directory:       ~/test# mkdir YourName''' ~/test# cd YourName '''   You may wish to create a more specific subdirectory (you can easily change the name later if you wish):       ~/test/YourName# mkdir 5G''' ~/test/YourName# cd 5G    Now, you need to clone part of the AirTies git repository...    This can be easily accomplished, by using the airgitclone.sh script (a fairly quick process... note the spelling is not "air get clone.sh"'!''):       ~/test/YourName/5G# airgitclone.sh''' '''   You should see something like this (or, perhaps exactly like this):       ---       '''airgitclone version 1.1 ---             Cloning into 'buildsys'...       Checking connectivity... done. '''   After the airgitclone.sh script finishes, you will see a new buildsys directory:       ~/test/YourName/5G# ls -sail'''       buildsys '''   Navigate to the new buildsys directory and setup your environment:       ~/test/YourName/5G# cd buildsys''' ~/test/YourName/5G/buildsys# source environment    We are now ready to download the various AirTies Profile Directories, using the AirTies bake script with the co option (this is fairly fast):       ~/test/YourName/5G/buildsys# bake co'''       Starting container: ''' environments: '''   HOSTNAME = YourHostName ''' command: '''   /bin/bash -c  "source environment; make co" '''Enabling ccache Initializing profiles...      remote: Counting objects: 58, done. '''remote: Compressing objects: 100% (58/58), done. '''remote: Total 58 (delta 38), reused 7 (delta 0) '''Unpacking objects: 100% (58/58), done. '''From git://git.corp.airties.com/profiles ''' * [new ref]        refs/changes/08/15908/1 -> refs/changes/08/15908/1 ''' * [new ref]        refs/changes/79/15879/1 -> refs/changes/79/15879/1 ''' * [new ref]        refs/changes/82/15882/1 -> refs/changes/82/15882/1 ''' * [new ref]        refs/changes/83/15883/1 -> refs/changes/83/15883/1 ''' * [new ref]        refs/changes/86/15886/1 -> refs/changes/86/15886/1 ''' * [new ref]        refs/changes/91/15891/1 -> refs/changes/91/15891/1 '''  e3d2329..3004322  master     -> master '''  9a18b1e..d9ffc97  refs/notes/review -> refs/notes/review Cloning into 'profiles'...      Checking connectivity... done. '''profiles DONE '''   You will probably see the following error message. Please just ignore the error message:       Makefile:294: *** You must first run make menuconfig. Stop. '''   We now have all of the available profiles. Let's look at the ./profiles directory:       ~/test/YourName/5G/buildsys# ls -d --group-directories-first profiles/*'''       Air3510                Air4920-Bison-lm           Air4920NO-EN_AT33      Air4920US-FA       BGW210-QTN_1.5        Pace5268-QTN_10.6 '''Air4400NOCD_DOWN      Air4920CH-SW               Air4920NO-GT           Air4920US-FR       BGW210-QTN-Release    Pace5268-QTN_11.1 '''Air4400NOCD_UP        Air4920CH-SW_AT33          Air4920-P1905          Air4920US-MC       BGW220                Pace5268-QTN-Release '''Air4400SNZ            Air4920-CMF                Air4920PL-OR           Air4920VF          BGW220-BCM            QSR10G '''Air4641SW             Air4920DK-TD               Air4920PL-OR_AT25      Air4920VF-Release  BRCMAP-REF            SB601 '''<kbd style='color:turquoise'>Air4820               Air4920DK-WA               Air4920PT-PT           Air4920ZA-NO       BRCMGW-REF            SC201DE '''<kbd style='color:turquoise'>Air4820-bsp2.7-meshng Air4920DK-WA_AT33          Air4920SE-SE           Air4930            BRCMGW-REF_4.16L.05   SC201SKIT '''<kbd style='color:turquoise'>Air4820QA-OR          Air4920ES-VF               Air4920SE-SE-Release   Air4930SG          GEN7US                SKY-Booster-4-REF '''<kbd style='color:turquoise'>Air4820SW             Air4920EU-ST               Air4920SG              Air4930-SKY        GEN7US-Release        SKY-HUB-4-REF '''<kbd style='color:turquoise'>Air4820SW_AT22        Air4920EU-ST_AT36          Air4920SG_AT33         Air6372SO          NVG599-2.4G           VV5820 '''<kbd style='color:turquoise'>Air4820TR-SO          Air4920FR-OR               Air4920TR              BCM63138-REF       NVG599-2.4G_HEAD      VV5820-Release '''<kbd style='color:turquoise'>Air4820US-AS          Air4920FR-OR_200           Air4920US-AC           BGW210-700-BCM     NVG599-5G             WVB2 '''<kbd style='color:turquoise'>Air4820VFDE           Air4920FR-OR_AT25_interim  Air4920US-AC-Release   BGW210-BCM_1.3     NVG599-5G_HEAD        YourName-5G '''<kbd style='color:turquoise'>Air4830               Air4920IL-CC               Air4920US-AL           BGW210-BCM_1.4     Pace5268-BCM 		 YourName-5G '''<kbd style='color:turquoise'>Air4830-128MB         Air4920JO-OR               Air4920US-AL-Anatolia  BGW210-BCM_1.5     Pace5268-BCM_10.6     YourName-5G '''<kbd style='color:turquoise'>Air4830-acR4.8        Air4920-lm                 Air4920US-AL-Release   BGW210-QTN         Pace5268-BCM_11.1     YourName-5G '''<kbd style='color:turquoise'>Air4830DE-LO          Air4920-next               Air4920US-AL-Smyrna    BGW210-QTN_1.3     Pace5268-BCM-Release '''<kbd style='color:turquoise'>Air4920               Air4920NO-EN               Air4920US-AS           BGW210-QTN_1.4     Pace5268-QTN '''   We now see the specific profile we are interested in. Make note of the directory name:       YourName-5G '   At this point, we are ready to git the image configuration code from the AirTies repository...     We will again use the AirTies bake script to download and configure our local environment to do the build (a quick process''):       <kbd style='color:green'>~/test/YourName/5G/buildsys# bake YourName-5G'''    This will generate a LOT''' of output... The begining should look something like this:       Starting container: '''   environments: '''      HOSTNAME = yourHostname '''   command: '''      /bin/bash -c  "source environment; make YourName-5G" '''Enabling ccache '''echo > .config '''cat profiles/YourName-5G/profile.config >> .config [ -n "`grep CONFIG_ADD_BUILDNUMBER_TO_VERSION=y .config`" ] && sed -ie 's/^CONFIG_RELEASE_VERSION="\([0-9A-Z]*\)\.\([0-9]*\)\.\([0-9]*.*\)\.\([0-9]*.*\)\ (.*\)"/CONFIG_RELEASE_VERSION="\1.\2.\3.\4.'${BUILD_NUMBER:-0}'\5"/' .config '''timeout 20 conf -D .config Config '''   Great! We are almost done... Now we are finally ready to build everything. Once again we use the AirTies bake script:       <kbd style='color:green'>~/test/YourName/5G/buildsys# bake modem''' '   If we have done everything correctly, the output from the bake script should again, begin like this (this is a great time to take a break as this process will take some time''):       Starting container: '''   environments: '''      HOSTNAME = yourHostname '''   command: '''      /bin/bash -c  "source environment; make YourName-5G" '''Enabling ccache '''   Once the build process is complete, let's go check on the image for the device:       <kbd style='color:green'>~/test/YourName/5G/buildsys# cd release/image''' '''   If everything was successful, in the image directory, you should find files similar to these:       <kbd style='color:green'>~/test/YourName/5G/buildsys/release/image# ls'''       brcm-gw-mips-linux--YourName-5G-AT.1.1.15.0-filesystem/ airties-bsp-patches.tar.gz      AirTies_YourName-5G_Release_AT.1.1.15.0.tar.gz       airties-rootfs-overlay.tar.gz       api-brcm-gw-mips-linux--YourName-5G-air-rm-devel.tar.bz2 '''brcm-gw-mips-linux--YourName-5G-AT.1.1.15.0.config

Loading the Image on the Target Device
Coming Soon... '''