![]() ![]() You should not use this source tree for development because the kernel version against which your C library is compiled is often linked to this tree. ![]() ![]() The kernel source is typically installed in /usr/src/linux. ![]() Just run the git clone command as described and git downloads and unpacks the latest source. If you use git to obtain and manage the kernel source, you do not need to download the tarball. This uncompresses and untars the source to the directory linux-x.y.z. If it is compressed with GNU zip, run $ tar xvzf linux-x.y.z.tar.gz If your tarball is compressed with bzip2, run $ tar xvjf linux-x.y.z.tar.bz2 After downloading the source, uncompressing and untarring it is simple. tar.bz2, where x.y.z is the version of that particular release of the kernel source. The Linux kernel tarball in bzip2 format is named linux- x. Bzip2 is the default and preferred format because it generally compresses quite a bit better than gzip. The kernel tarball is distributed in both GNU zip (gzip) and bzip2 format. To commit and manage your own changes, see Chapter 20, "Patches, Hacking, and the Community." A complete discussion of Git is outside the scope of this book many online resources provide excellent guides. With these two commands, you can obtain and subsequently keep up to date with the official kernel tree. When checked out, you can update your tree to Linus's latest: $ git pull You can use Git to obtain a copy of the latest "pushed" version of Linus's tree: $ git clone git:///pub/scm/linux/kernel/git/torvalds/linux-2.6.git I strongly recommend using Git to download and manage the Linux kernel source. Unlike traditional systems such as CVS, Git is distributed, and its usage and workflow is consequently unfamiliar to many developers. Linus created this system, called Git, with speed in mind. Over the last couple of years, the kernel hackers, led by Linus himself, have begun using a new version control system to manage the Linux kernel source. The repository at is the place to get it, along with additional patches from a number of leading kernel developers. Unless you have a specific reason to work with an older version of the Linux source, you always want the latest code. The current Linux source code is always available in both a complete tarball (an archive created with the tar command) and an incremental patch from the official home of the Linux kernel. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.Although the kernel certainly is unique in many ways, at the end of the day it is little different from any other large software project. RHEL and derivatives typically ship older versions of git. Gentoo # emerge -ask -verbose dev-vcs/git Arch Linux # pacman -S git openSUSE # zypper install git Mageia # urpmi git Nix/NixOS # nix-env -i git FreeBSD # pkg install git Solaris 9/10/11 ( OpenCSW) # pkgutil -i git Solaris 11 Express # pkg install developer/versioning/git OpenBSD # pkg_add git Alpine $ apk add git Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al. If you prefer to build fromįor the latest stable version for your release of Debian/Ubuntu # apt-get install gitįor Ubuntu, this PPA provides the latest stable upstream Git version # add-apt-repository ppa:git-core/ppa # apt update apt install git Fedora # yum install git (up to Fedora 21) It is easiest to install Git on Linux using the preferred package ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |