LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-07-2007, 10:24 AM   #1
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Rep: Reputation: 15
Exclamation Linux git repository help needed


I am currently trying to get a slightly older copy of the linux kernel from the git repository at http://git.kernel.org/ (official link: http://git.kernel.org/?p=linux/kerne....git;a=summary).

The most current version is 2.6.23-r2 in the git repository, but I'm looking for a way to get (git?) the 2.6.22 release. I'm currently using cogito instead of the normal git commands, but I have no problem using git if it'll get me the kernel branch I need.

Does anyone have any git/cogito experience and know how to get the older kernel?

The reason I want it as a git repository is because I have some changes that use the git repository format and I want to apply those. Any ideas?


-TheDirtyScreech-

Last edited by TheDirtyScreech; 08-07-2007 at 10:26 AM.
 
Old 08-07-2007, 11:22 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
To my knowledge, you cant grab a specific branch using git, or at least i dont know the command. Why not just use the clone command then checkout the version you want?
 
Old 08-07-2007, 11:43 AM   #3
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
Well, I've been using the clone command, but AFAIK, it only grabs the newest one. Here's my cg-clone command:

Code:
cg-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Notice that the git file is simply linux-2.6.git. I don't know how I'd cg-clone the linux-2.6.22 version and not the 2.6.23-r2 version. Any ideas?

Last edited by TheDirtyScreech; 08-07-2007 at 02:00 PM.
 
Old 08-07-2007, 02:36 PM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
Code:
git-checkout v2.6.22-rc2
just to be sure, i got the kernel and tested the command myself, you seem to have accidentally forgotten that git-clone checks out the current HEAD, but previous versions are still in there, you just have to do the checkout manually. Be prepared to wait a bit.... ok, maybe longer.

edit: oops, im kinda sleepy, i saw the -rc2 and thought you wanted 2.6.22-rc2, in anycase, just drop the -rc2.

Last edited by SciYro; 08-07-2007 at 02:37 PM.
 
Old 08-07-2007, 02:57 PM   #5
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks! I'm starting a new cg-clone right now (I've been tinkering with this one a lot and would rather have a pristine base). If you don't hear a response, it most likely worked. Thanks a million! I didn't know that previous versions were still in the git repository!

-TheDirtyScreech-
 
Old 08-07-2007, 04:38 PM   #6
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
Hmm....I'm still having a few errors. I run the following commands:

Code:
cg-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
cd linux-2.6/
cg-switch v2.6.22
I get the following output:

Code:
cg-switch: branch v2.6.22 does not exist - you must pass -r if you want to create a new branch
So, naturally, I thought I'd switch to git instead of cogito since SciYro tested it with git. My two commands are as follows:

Code:
git-clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
cd linux-2.6/
git-checkout v2.6.22
Which outputs the following:

Code:
Note: moving to "v2.6.22" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
  git checkout -b <new_branch_name>
HEAD is now at 7dcca30... Linux 2.6.22
It looks like it sort of forced it to do what I wanted, though it doesn't think the 2.6.22 branch is local (I don't know if it's supposed to or not). Since I don't know 'git' but I at least have a basic knowledge of cogito, I figured I could switch to cogito here since it just uses git commands (as far as I know). So, I run the command:

Code:
cg-branch-add aic94xx git://git.kernel.org/pub/scm/linux/kernel/git/jejb/aic94xx-sas-2.6.git
but I get
Code:
fatal: ref HEAD is not a symbolic ref
One thing I've noticed while doing the cg-clone (but it isn't outputted in git-clone) is that during the "Fetching tags..." portion of the cg-clone, it reports "Missing tag <version>" for every kernel version where <version> is replaced by whatever kernel version it is (example: Missing tag v2.6.22). This seems important to me, but I could be wrong.

-TheDirtyScreech-
 
Old 08-07-2007, 05:39 PM   #7
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
The git output is normal i think (im about to go to bed, so i may be wrong), i believe its saying its not local because its not a official branch, Linux uses tags to reference kernel versions, "v2.6.22" is not a branch, but a tag. In any event, it gives you the files from that version. Like the output said, if you want to make it a official branch, just issue the command.

edit: on second thought, cogito (i never used it, nor know how it works) might be having a problem with the current HEAD not being a official branch, so if you make it a branch, it might work.

Last edited by SciYro; 08-07-2007 at 05:41 PM.
 
Old 08-08-2007, 09:57 AM   #8
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks for the help so far. I think I'll stick with the normal "git" commands, but I'll need some information on how add a branch to this repository clone. You may have noticed from my previous post that I'm trying to add the aic94xx kernel patches (git://git.kernel.org/pub/scm/linux/kernel/git/jejb/aic94xx-sas-2.6.git). With cogito, I'd do:
Code:
cg-branch-add aic94xx git://git.kernel.org/pub/scm/linux/kernel/git/jejb/aic94xx-sas-2.6.git
cg-update aic94xx
What would my equivalent for git be? How do I add/fetch/apply this branch? my guess is I'll need a "git-add" and a "git-commit" somewhere in there, but I don't actually have a clue.


-TheDirtyScreech-

Last edited by TheDirtyScreech; 08-08-2007 at 10:00 AM.
 
Old 08-08-2007, 12:14 PM   #9
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
My knowledge of git is mostly from simple programing projects of mine, so im not sure about how to apply patches from remote branchs.

To add a new branch, just issue
Code:
git-branch newbranch
, or, as already said
Code:
git-checekout -b newbrnach
The second form will create and checkout a the branch (use the second form, its easier then issuing two commands).

Not sure about how to get that remote stuff. I think git-fetch is probably worth a look at.

You might want to read some tutorials.
 
Old 08-08-2007, 12:34 PM   #10
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
Ok, so if I try with cogito, I'll do:

Code:
cg-switch -r "HEAD" v2.6.22
which seems to work. After I make my changes, is there anything I need to do to make sure when I copy this directory to another machine to actually build the kernel? I'm worried that it'll still build as 2.6.23-r2 if I just copy it over. Do I need to do anything to make my kernel selection the version used?
 
Old 08-08-2007, 01:14 PM   #11
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
No, if you are just copying the kernel from the filesystem, then all files will be fine (they will be whatever was checked out). Just remember to exclude any ".git" directory, or else you will end up moving the entire repository (and it is rather big).
 
Old 08-08-2007, 02:55 PM   #12
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
Hmm...I do the git-checkout to the 2.6.22 branch, and then I copy over the directory to the test machine. It's /usr/src/linux-2.6 and I have a symlink from /usr/src/linux to /usr/src/linux-2.6. When I run a "make menuconfig" to configure the kernel, the window has ".config - Linux Kernel v2.6.23-rc2 Configuration" at the very top. I must have done something incorrectly. Any ideas?

Also, I'm switching between bot "git" and "cogito" commands throughout the process. Since cogito is supposed to just be a nicer front-end to git, I don't anticipate this to be the issue. However, to isolate this whole thing, can you give me the commands to add that remote aic94xx branch, merge it, apply it, whatever I need to do to get it into the branch I'm using? That way we can be sure it's not my git/cogito command switching that's the issue.

-MRE-
 
Old 08-08-2007, 04:55 PM   #13
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
here is the command sequence i used not sure how to test if the branch you wanted was successfully installed, but menuconfig still works, so ill just assume all is well. Assume you start from a already cloned repository.

Code:
git-checkout -b test v2.6.22
git-fetch git://git.kernel.org/pub/scm/linux/kernel/git/jejb/aic94xx-sas-2.6.git
mkdir ../newLinux
cp -R ./[A-Z,a-z]* ../newLinux/
seems to work fine, says 2.6.22 as expected.
 
Old 08-09-2007, 10:56 AM   #14
TheDirtyScreech
Member
 
Registered: Jul 2007
Distribution: Gentoo, LFS
Posts: 42

Original Poster
Rep: Reputation: 15
Thanks for your help. I ended up re-reading a bunch of documentation yesterday and solved my issues. You've been a huge help during this cogito/git learning curve.

-TheDirtyScreech-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access a git repository from behind a proxy (which requires authentication) anupamsr Linux - Software 6 01-16-2012 09:45 AM
Cogito / Git errors--Help needed TheDirtyScreech Linux - Software 1 07-18-2007 12:28 PM
getting git repository for Wine-0.9.39 in tgz or using windows machine ErV Programming 0 06-25-2007 05:05 AM
LXer: Linux: Using Git With the -mm Kernel LXer Syndicated Linux News 0 01-12-2006 01:31 AM
LXer: Linux: Git Milestone, 1.0 Release LXer Syndicated Linux News 0 12-21-2005 03:31 PM


All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration