GitTheSource

Differences between revisions 6 and 7
Revision 6 as of 2010-06-21 08:34:44
Size: 1121
Editor: apw
Comment:
Revision 7 as of 2010-06-21 09:01:48
Size: 2251
Editor: apw
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
All of the Ubuntu Kernel source is maintained under {{{git}}}. The source for each release is maintained in its own git repository on {{{kernel.ubuntu.com}}}. These can be browsed in [[http://kernel.ubuntu.com/git|gitweb]], the official Ubuntu trees are in the {{{ubuntu/}}} directory.  To obtain a local copy you can simply git clone the repository for the release you are interested in as below. The {{{git}}} command is part of the {{{git-core}}} package: All of the Ubuntu Kernel source is maintained under {{{git}}}. The source for each release is maintained in its own git repository on {{{kernel.ubuntu.com}}}. These can be browsed in [[http://kernel.ubuntu.com/git|gitweb]], the official Ubuntu trees are in the {{{ubuntu/}}} directory. The Ubuntu Linux kernel git repository is located at git://kernel.ubuntu.com/ubuntu/ubuntu-<release>.git or http://kernel.ubuntu.com/git-repos/ubuntu-<release>.git. To obtain a local copy you can simply git clone the repository for the release you are interested in as below. The {{{git}}} command is part of the {{{git-core}}} package:
Line 15: Line 15:
This will download some 300MB of data.  If you have a virgin Linus tree locally you can significantly reduce the size of this download through object sharing. Note that once these two trees are tied together you cannot remove the virgin Linus tree without damage to the Ubuntu tree: This will download several hundred megabytes of data. If you plan on working on more than one kernel release you can save space and time by downloading the upstream kernel tree. Note that once these two trees are tied together you cannot remove the virgin Linus tree without damage to the Ubuntu tree:
Line 18: Line 18:
git clone git://kernel.ubuntu.com/ubuntu/linux-2.6
git clone --reference linux-2.6 git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
Line 20: Line 22:

In each case you will end up with a new directory {{{ubuntu-<release>}}} containing the source and the full history which can be manipulated using the {{{git}}} command from within each directory.

By default you will have the latest version of the kernel tree, the master tree. You can switch to any previously released kernel version using the release tags. To obtain a full list of the tagged versions in the release as below:

    {{{
$ git tag -l Ubuntu-*
Ubuntu-2.6.27-7.10
Ubuntu-2.6.27-7.11
Ubuntu-2.6.27-7.12
Ubuntu-2.6.27-7.13
Ubuntu-2.6.27-7.14
$}}}

To look at the {{{2.6.27-7.13}}} version you can simply checkout a new branch pointing to that version:

    {{{
git checkout -b temp Ubuntu-2.6.27-7.13
}}}

You may then manipulate the release for example adding new commits.

Obtaining the kernel sources for an Ubuntu release using git

All of the Ubuntu Kernel source is maintained under git. The source for each release is maintained in its own git repository on kernel.ubuntu.com. These can be browsed in gitweb, the official Ubuntu trees are in the ubuntu/ directory. The Ubuntu Linux kernel git repository is located at git://kernel.ubuntu.com/ubuntu/ubuntu-<release>.git or http://kernel.ubuntu.com/git-repos/ubuntu-<release>.git. To obtain a local copy you can simply git clone the repository for the release you are interested in as below. The git command is part of the git-core package:

  • git clone git://kernel.ubuntu.com/ubuntu/ubuntu-<release>.git

For example to obtain the maverick tree:

  • git clone git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git

This will download several hundred megabytes of data. If you plan on working on more than one kernel release you can save space and time by downloading the upstream kernel tree. Note that once these two trees are tied together you cannot remove the virgin Linus tree without damage to the Ubuntu tree:

  • git clone git://kernel.ubuntu.com/ubuntu/linux-2.6
    git clone --reference linux-2.6 git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
    git clone --reference linux-2.6 git://kernel.ubuntu.com/ubuntu/ubuntu-maverick.git

In each case you will end up with a new directory ubuntu-<release> containing the source and the full history which can be manipulated using the git command from within each directory.

By default you will have the latest version of the kernel tree, the master tree. You can switch to any previously released kernel version using the release tags. To obtain a full list of the tagged versions in the release as below:

  • $ git tag -l Ubuntu-*
    Ubuntu-2.6.27-7.10
    Ubuntu-2.6.27-7.11
    Ubuntu-2.6.27-7.12
    Ubuntu-2.6.27-7.13
    Ubuntu-2.6.27-7.14
    $

To look at the 2.6.27-7.13 version you can simply checkout a new branch pointing to that version:

  • git checkout -b temp Ubuntu-2.6.27-7.13

You may then manipulate the release for example adding new commits.

Kernel/Action/GitTheSource (last edited 2020-10-26 15:44:27 by setuid)