Posts: 9
Joined: Mon Aug 17, 2020 8:24 pm

installing from github

Thu Jul 29, 2021 4:20 am

Bear with me, obviously I don't know what I am doing. :?:
When I go thru all the incantations to build something for raspberripi from github I can usually dutifully follow the instructions.
However, I wonder what is happening behind the curtain. When I download and build some kind do I actually get the C code into my environment to compile/build or am I just using it in my build sequence? ie my compiler pulls it in from the gitbhub when I need it?. I never have the actual C code source?.

Reason I ask, If I want to make some minor change in the bowels of the I have to have the source right? that would be a different work flow in that scenario right?

Maybe this question really belongs in the newbie section of github but I see similar questions to this here.

Posts: 3491
Joined: Tue Jun 30, 2015 1:35 pm

Re: installing from github

Thu Jul 29, 2021 5:10 am

How do you 'download' your code?

Let's take the Linux kernel as an example:

Code: Select all

git clone depth=1 --branch <branch>
The current branch is rpi-5.10.y, so if you want to work from that kernel sources

Code: Select all

git clone depth=1 --branch rpi-5.10.y
will give you a local copy of the files from in a folder call 'linux'.

Posts: 50
Joined: Mon May 24, 2021 8:03 am

Re: installing from github

Thu Jul 29, 2021 7:58 am

Yes, you download a copy of the source tree to your local machine in order to develop and test your change.

The main benefit of using git rather than simply downloading a snapshot of the source tree is that it's easy to download incremental updates that other people have contributed, and merge them into your local tree (at times that are convenient for you).

You don't really want the build system automatically downloading the latest code each time you build, while you are in the middle of making changes - makes it very hard to keep track of what's going on.

Posts: 9
Joined: Mon Aug 17, 2020 8:24 pm

Re: installing from github

Sun Aug 01, 2021 2:20 am

Thanks for all the replies. I kinda thought it downloaded everything or at least what I needed to build but confused myself. Makes sense that you wouldn't want to pull something from a new area later after you have tinkered with some aspects of it in your own sandbox.
I need to take the github tutorial. :D

User avatar
Posts: 872
Joined: Thu Mar 05, 2020 6:34 pm
Location: ~/

Re: installing from github

Mon Aug 02, 2021 1:28 am

*Software you want is on Github and you want to build from source*

You use git to clone the repo

you probably use the makefile or a guide in the README to build from source, check for dependencies as well
Running with a Raspberry Pi 4B 4GB with Raspberry Pi OS with MATE Desktop
Why not overclock, push some more performance out of your computer!
Think before you delete something a stranger on the internet told you to.

Return to “Beginners”