Jump to content

armbian devel compilation howto


xenpac

Recommended Posts

Hi,

my name is Tom and i am an embedded developer.

 

I am aiming to dig into the CSI0 camera interface for the bananapi.

 

Admittedly, i am new to the linux way of coding and compilation.

 

Thus far for armbian, i realized,...

....compilation by script "compile.sh"...which checks all needed tools, code, updates...downloads everything...runs a config screen to select target, platform, ...and yeah..it works.

 

When i run the script two times ...it keeps compiling again. hmm+

 

My experience is, that i do have the sourcecode, a compiler script/makefile....and it will just update the changes i did on the source. (old scool:-)

 

so if i have the source in a directory local on the computer (after a one time compile with compile.sh), .. then modifying the code..if i run compile.sh again, will it overwrite my changes by downloading again?

 

Also i do see "patches". So patches (diff files to the original source files) are ?? uploaded to the git...and ?? will be applied during the compilation??

 

As you can tell, linux devel-newbi:-)

 

So..how do i work on the sourcecode locally on my computer...ie. run the compiler, and finally supply "patches" then when i found a solution?

 

Please give me a little guideline on local development the armbian source.

(quick and easy...not long)

 

regards Tom

 

 

 

 

Link to comment
Share on other sites

The tool helps you a lot in compassion to classic way. You just need a little playing around to get used to.

 

Default cache settings are:

- make ccache, root filesystem cache

- delete debs, make clean on sources

 

So each time you run, kernel is recompiled, but you have ccache which makes this recompilation way way faster.

 

so if i have the source in a directory local on the computer (after a one time compile with compile.sh), .. then modifying the code..if i run compile.sh again, will it overwrite my changes by downloading again?

 

Yes, it drop your changes unless you start compilation with:

CREATE_PATCHES="no"

which will create a patch out of changes you made to: u-boot and/or kernel source code.

 

Then proceed for example this way: when you are satisfied with the patch and patch is beneficiary to community, you prepare a pull request with a patch placed in a proper directory of the main script eg. lib/patches/kernel/sunxi-next (allwinner mainline), not the userpatches where it's created and where you can add your local patches ... 

Link to comment
Share on other sites

happy new year :-) almost

 

actually i just want to work on a driver code and just compile that to get a .ko file.

 

Using the script "compile.sh" AND

CREATE_PATCHES="no"

 

will create a patch from my changes....and will apply it?

but i already changed the source code?

 

sounds complicated.

Link to comment
Share on other sites

will create a patch from my changes....and will apply it?

but i already changed the source code?

 

Changes to sources are dropped when you start compilation. If you want to create and use patch, you need to alter your code when you are prompted. This is possible in "developer mode" -> running the script with CREATE_PATCHES="yes". When this is enabled, patch to your changes is created (in userpatches/patch/) and those changes are included.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines