• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Linux » Linux forum » How to rebuilt the arago souce code (for u-boot package.).
Share
Linux
  • Forum
Options
  • Subscribe via RSS

How to rebuilt the arago souce code (for u-boot package.).

How to rebuilt the arago souce code (for u-boot package.).

This question is answered
Surendra Dhobale92789
Posted by Surendra Dhobale92789
on Apr 03 2012 08:09 AM
Intellectual640 points

Hi,

I  had set the build enviornment  for the arago project. Also i built the  base root file system  using the bitbake. In Temp folder temp/deploy/glibs/images/  the base file system and MLO, u-boot.img is created.

In workinh directory S all souce code is generated. Now i have to make some changes in the same code and it will my base code for further modifications. After making the changes how i can built the package one again.

Is any procedure for that?

IS modified binary images created under same (temp/deploy/glibs/images) folder.

and one another basic question is under the arago , the u-boot , kernel and filesystem is depends each other? or they are independant entities?.

means any file system dependancy on kernel?.

If i make the built separatly for the u-boot , kernel , file system separatly  what will happens....

Every commnets welcome....thxs in advance :)

Surendra Dhobale

u-boot arago file system Kernel AM335x
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Chase Maupin
    Posted by Chase Maupin
    on Apr 03 2012 09:20 AM
    Verified Answer
    Verified by Surendra Dhobale92789
    Expert4890 points

    Surendra,

    1. If you make changes in the S directory then they would be overwritten in the next build.  The reason is that in order to force a new build you would generally need to do a clean operation which would delete your sources.  A couple ways to work around this are:

    1. Go into the S directory and run the compile yourself
    2. Go into the S directory and run the compile script that OE uses.  i.e. ../temp/run.do_compile.  This will rebuild the existing sources
    3. Make a patch of your changes and apply the patch in the recipe.  That way you can do clean and rebuild operations and not lose your changes
    4. I believe there is a way to modify the recipe to pull from a local set of sources on your machine outside of the OE downloads.  i don't remember how to do this though but google will probably help.

    Either way I would be careful about making changes in the S directory so that you don't accidentally lose them.

    2. Modified binary images are created in the same directory and will overwrite old images

    3. You can build the bootloaders, kernel, and file system separately.  Any depends will be handled for you.  The main caution is that if you are building kernel modules to go in the file system then you should match the kernel and file system.  By default our file system places the bootloader and kernel in the /boot directory so these are dependencies for our file system.

    Chase

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 05 2012 08:11 AM
    Intellectual640 points

    Initially  thanks alot Chase for cleared answers.:),

    Your answers are very helpful for us.

    1)  I am able to rebuilt the sources in the S directory.  In S directory i have the source code for the u-boot and kernel.  I have to change the source code in multiple files , by add/remove some lines . So need have i to make patches and add in respective bitbake for all files?

    Can u please tell us How to make the patches for that? or Is any different way for the modifications?.

    2) How  general procedure of custom development in software(u-boot /kernel) using the arago?

    Surendra.

     

    Surendra Dhobale

    u-boot arago Kernel AM335x
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Chase Maupin
    Posted by Chase Maupin
    on Apr 05 2012 09:03 AM
    Verified Answer
    Verified by Surendra Dhobale92789
    Expert4890 points

    Surendra,

    1. You can make patches using the diff tool or if you create a git tree that will also help.  You can then add those patches to the recipe.

    2. If you want to customize your u-boot then you either need to apply patches in your recipe or point your recipe to you own git tree where you keep your modified sources.  Those are the easiest methods for customizing.

    Chase

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 10 2012 01:40 AM
    Intellectual640 points

    Hi Chase,

    As per your suggestion , i created the patch , but using the git  work flow :) . Means git init, git add, commit. then make local changes and create the patch.

    (http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#Using%20a%20Quilt%20Workflow).

    The patch is created successfully after that  i apply the patch , means add in the oe/arago/receipe/u-boot  corresponding bitbake receipe.

    and then started built the package as  MACHINE=am335x-evm bitbake virtual/bootloader  or  MACHINE=am335x-evm bitbake u-boot 

    then its throwing error while do_patch and some related quilt.

    Error logs as follows:-

    utc-arago@utc-arago-desktop:~/oe$ MACHINE=am335x-evm bitbake u-boot

    NOTE: Handling BitBake files: | (7691/7691) [100 %]

    Parsing of 7691 .bb files complete (7228 cached, 463 parsed). 7887 targets, 451 skipped, 585 masked, 0 errors.

    Build Configuration:

    BB_VERSION = "1.10.2"

    METADATA_BRANCH = "master"

    METADATA_REVISION = "da378da"

    TARGET_ARCH = "arm"

    TARGET_OS = "linux-gnueabi"

    MACHINE = "am335x-evm"

    DISTRO = "angstrom"

    DISTRO_VERSION = "2011.09"

    TARGET_FPU = "hard"

    NOTE: Resolving any missing task queue dependencies

    NOTE: Preparing runqueue

    NOTE: Executing runqueue

    NOTE: Running task 396 of 649 (ID: 11, /home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb, do_setscene)

    NOTE: package u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60: task do_setscene: Started

    NOTE: package u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60: task do_setscene: Succeeded

    NOTE: Running task 397 of 649 (ID: 9, /home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb, do_fetch)

    NOTE: package u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60: task do_fetch: Started

    NOTE: package u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60: task do_fetch: Succeeded

    NOTE: Running task 398 of 649 (ID: 0, /home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb, do_unpack)

    NOTE: package u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60: task do_unpack: Started

    NOTE: Unpacking downloads/git_arago-project.org.git.projects.u-boot-am33x.git_1695466ccf32c19d0453f94724987cf063024b60.tar.gz to arago-tmp/work/am335x-evm-arago-linux-gnueabi/u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60/

    FATAL: Execution of 'quilt --quiltrc=/home/utc-arago/oe/arago-tmp/sysroots/i686-linux/usr/bin/quiltrc push' failed with exit code 1:

    Applying patch 0001-Surendra-after-change.patch

    patching file board/ti/am335x/evm.c

    Hunk #2 FAILED at 704.

    1 out of 2 hunks FAILED -- rejects in file board/ti/am335x/evm.c

    patching file board/ti/am335x/mux.c

    Hunk #1 FAILED at 675.

    1 out of 1 hunk FAILED -- rejects in file board/ti/am335x/mux.c

    Patch 0001-Surendra-after-change.patch does not apply (enforce with -f)

    ERROR: Function patch_do_patch failed

    ERROR: TaskFailed event exception, aborting

    ERROR: Build of /home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb do_patch failed

    NOTE: package u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60: task do_unpack: Succeeded

    ERROR: Task 1 (/home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb, do_patch) failed with exit code 1

    ERROR: '/home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb' failed

    NOTE: Running task 405 of 649 (ID: 1, /home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb, do_patch)

    NOTE: package u-boot-2011.09-psp04.06.00.06-r11.0+gitr0+1695466ccf32c19d0453f94724987cf063024b60: task do_patch: Started

    NOTE: Applying patch '0001-Surendra-after-change.patch' (arago/recipes/u-boot/u-boot-2011.09-psp04.06.00.06/0001-Surendra-after-change.patch)

    FATAL: Execution of 'quilt --quiltrc=/home/utc-arago/oe/arago-tmp/sysroots/i686-linux/usr/bin/quiltrc push' failed with exit code 1:

    Applying patch 0001-Surendra-after-change.patch

    patching file board/ti/am335x/evm.c

    Hunk #2 FAILED at 704.

    1 out of 2 hunks FAILED -- rejects in file board/ti/am335x/evm.c

    patching file board/ti/am335x/mux.c

    Hunk #1 FAILED at 675.

    1 out of 1 hunk FAILED -- rejects in file board/ti/am335x/mux.c

    Patch 0001-Surendra-after-change.patch does not apply (enforce with -f)

    ERROR: '/home/utc-arago/oe/arago/recipes/u-boot/u-boot_2011.09-psp04.06.00.06.bb' failed

    utc-arago@utc-arago-desktop:~/oe$

    // Surendra


    Surendra Dhobale

    u-boot arago Kernel AM335x
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Chase Maupin
    Posted by Chase Maupin
    on Apr 10 2012 07:21 AM
    Verified Answer
    Verified by Surendra Dhobale92789
    Expert4890 points

    Surendra,

    The above error indicates that your patch is not correct and does not apply to the clones sources.  It may mean that you had changes that were not part of your patch set, which your new patch is based on.  The way to do this correctly is to:

    1. Get a fresh checkout of the sources (i.e. move your copy out of the way and then do a bitbake -c clean virtual/bootloader and bitbake -c patch virtual/bootloader)  Be sure to save a copy of your work because the clean step will DELETE the sources in the work directory.

    2. Take the fresh sources and create a git repository.  git init; git add -f *; git commit

    3. Now make your changes and commit them.

    4. Then make the patch.

    If you don't do it this way you could end up with a patch that does not apply which is what you are seeing.

    Chase

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 10 2012 08:54 AM
    Intellectual640 points

    Chase,

    I will go thr same steps as you given. But i need some more clarifiaction of the stage 1:

    # Get a fresh checkout , means  i have to take the checkout from the arago repo?. or make copy of the working source (S) folder which is created under arago-tmp/work directory in other location.?  then make clean .

    Surendra.

    Surendra Dhobale

    u-boot arago Kernel AM335x
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Chase Maupin
    Posted by Chase Maupin
    on Apr 10 2012 09:07 AM
    Expert4890 points

    You want to take the sources from the arago-tmp/work directory.  So.

    bitbake -c clean virtual/bootloader

    This cleans the work directory

    bitbake -c patch virtual/bootloader

    This extracts a new copy of the sources and would apply any patches already in the recipe (a good rule of thumb is to use this)

    Then make your git tree based on the sources in the arago-tmp/work directory. 

    Remember that before doing the -c clean to backup your sources if you make changes in the arago-tmp/work directory because they will be deleted.

    Chase

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 12 2012 02:07 AM
    Verified Answer
    Verified by Surendra Dhobale92789
    Intellectual640 points

    Chase,

    Thanks alot :)

    a) Initilally i had taken the source code from the working directory to the new palce(Desktop).

    b) Then i  made

    bitbake -c clean virtual/bootloader    which cleans the all the working directory source code.

    c) Then  i used the command

    bitbake -c patch virtual/bootloader  , due to which the new source code is fetched.

    d) Then  i make the changes in the back-up code (which is in Desktop) and made the patch using the git workflow.

    e) Added the patch in the receipe folder of arago (arago/receipe/u-boot/) , added in the perticular bitbake and increment the PR.

    f) then build the package one again.

    g) patch applied successfully.

            So , its working according to your steps. Thanks for your great help and great illustartion!!!

    Surendra

    Surendra Dhobale

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 12 2012 02:22 AM
    Intellectual640 points

    Chase,

    Actually , i want to know more about the arago projects repository details. We are mostly concerned with u-boot and kernel for am335x.

    In arago project , for u-boot  git://arago-project.org/git/projects/u-boot-am33x.git  and for kernel  git://arago-project.org/git/projects/linux-am33x.git  repo.are available. which branches are available for both. Which is stable and which is unstable. Generally for development ,or check the patches , which branch should prefer? Master or other?. accordingly i will change in the bitbake receipe. 

    Then what is differance between the PSP release and the SDK release?

    Please Can you give me more details about that , so our understanding more clear.

    Surendra Dhobale

    u-boot arago Kernel AM335x
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Chase Maupin
    Posted by Chase Maupin
    on Apr 12 2012 07:12 AM
    Expert4890 points

    Surendra,

    The way these trees are managed is that topic branches are used for the releases.  I would recommend looking at the recipes to see the branch being used for a particular release.

    The difference between SDK and PSP release usually has to do with a couple of patches to change default behavior, or to pull in patches that were not available in time for the PSP release.  Since the PSP release is made before the SDK release there are times when a feature for the SDK is not available by PSP release time.

    Still, general rule of thumb is:

    1. Look at the recipes to see what branch is used

    2. The PSP release notes will identify the branch used

    3. Look at what has been updated most recently in git

    Chase

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 12 2012 23:58 PM
    Intellectual640 points

    Chase,

              I am not able to understand , what is meant by topic branches.? 

    I had gone thr the arago repositories for u-boot .

    It shows sections of the Shortlog , Tags, Heads. Is it the souce taken from the Tags is better or from the Heads?which is better?.

     

    Surendra.

    Surendra Dhobale

    u-boot arago Kernel AM335x
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 13 2012 00:15 AM
    Intellectual640 points

    Chase,

    Firstly , sorry but am not able to understand  topic branches.whats meant by the topic branches?

    I had gone through the  u-boot repo. from arago link.

    There are sectuions like the shortlogs, tags, heads.

    From which repo. we have to taken the sources. I mean which is better ?

     

     Surendra.

    Surendra Dhobale

    u-boot arago Kernel AM335x
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Chase Maupin
    Posted by Chase Maupin
    on Apr 13 2012 06:48 AM
    Expert4890 points

    Topic branches are just git branches.  They are called topic branches by developers because they contain changes related to a single topic (like a PSP release)

    You should take the u-boot sources from the uboot-am33x git repostiory.  You should look at the u-boot recipe or the PSP release notes to find the branch used for the SDK.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Surendra Dhobale92789
    Posted by Surendra Dhobale92789
    on Apr 13 2012 07:26 AM
    Intellectual640 points

    Ok....thanks.

    Surendra Dhobale

    u-boot arago Kernel AM335x
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use