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
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:
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
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.
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.
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)
utc-arago@utc-arago-desktop:~/oe$
// 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,
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 .
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.
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
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.
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
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?.
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 ?
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.
Ok....thanks.