Skip to contentSkip to conversation

using git with linux-omap

DISCUSSION green 2 participants 6 messages Dec 24, 2008 – Jan 24, 2009

lore
Share & tools
lore

green

author
#0 lore raw

Hey, I am trying to figure out git and am having trouble with something that ought to be simple.

I have cloned linux-omap-2.6 and created a local branch. In the local branch I have made one very simple commit with a single line change to Makefile for use when cross-compiling (arm-linux-gnueabi-). I would like to be able to rebase that branch (just the 1 commit) onto any commit in the master branch so that I can test N810 builds using git-bisect without modifying the Makefile every time. I can easily move the branch forward to the latest commit with 'git rebase master' (with the local branch active) but something like 'git rebase v2.6.27-omap1' returns merge errors. Of course that 1 commit will apply easily to that specific tree.

Is this possible? What am I missing? Thanks lots!

#1 lore raw
Quoted 13 lines · green

Hey, I am trying to figure out git and am having trouble with something that ought to be simple.

I have cloned linux-omap-2.6 and created a local branch. In the local branch I have made one very simple commit with a single line change to Makefile for use when cross-compiling (arm-linux-gnueabi-). I would like to be able to rebase that branch (just the 1 commit) onto any commit in the master branch so that I can test N810 builds using git-bisect without modifying the Makefile every time. I can easily move the branch forward to the latest commit with 'git rebase master' (with the local branch active) but something like 'git rebase v2.6.27-omap1' returns merge errors. Of course that 1 commit will apply easily to that specific tree.

Quoted 1 line

Is this possible? What am I missing? Thanks lots!

hmmm, something like git rebase --onto HEAD v2.6.27-omap1 <your_branch> should work.

Try that.

Signature · 1 line
balbi
author
#2 lore raw
Quoted 11 lines · Felipe Balbi
Quoted 9 lines · green

I have cloned linux-omap-2.6 and created a local branch. In the local branch I have made one very simple commit with a single line change to Makefile for use when cross-compiling (arm-linux-gnueabi-). I would like to be able to rebase that branch (just the 1 commit) onto any commit in the master branch so that I can test N810 builds using git-bisect without modifying the Makefile every time. I can easily move the branch forward to the latest commit with 'git rebase master' (with the local branch active) but something like 'git rebase v2.6.27-omap1' returns merge errors. Of course that 1 commit will apply easily to that specific tree.

Quoted 2 lines

hmmm, something like git rebase --onto HEAD v2.6.27-omap1 <your_branch> should work.

I got a bunch of merge conflicts this way.

$ git rebase --onto HEAD v2.6.27-omap1 custom
First, rewinding head to replay your work on top of it...
Applying x86, ptrace: PEBS support
error: patch failed: arch/x86/Kconfig.cpu:415
error: arch/x86/Kconfig.cpu: patch does not apply
error: patch failed: arch/x86/kernel/cpu/intel.c:222
error: arch/x86/kernel/cpu/intel.c: patch does not apply
error: patch failed: arch/x86/kernel/ds.c:2
error: arch/x86/kernel/ds.c: patch does not apply
error: patch failed: arch/x86/kernel/process_32.c:316
error: arch/x86/kernel/process_32.c: patch does not apply
error: patch failed: arch/x86/kernel/process_64.c:267
error: arch/x86/kernel/process_64.c: patch does not apply
error: patch failed: arch/x86/kernel/ptrace.c:554
error: arch/x86/kernel/ptrace.c: patch does not apply
error: arch/x86/kernel/setup_64.c: does not exist in index
error: include/asm-x86/ds.h: does not exist in index
error: include/asm-x86/processor.h: does not exist in index
error: include/asm-x86/ptrace-abi.h: does not exist in index
error: include/asm-x86/ptrace.h: does not exist in index
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merged arch/x86/Kconfig.cpu
CONFLICT (content): Merge conflict in arch/x86/Kconfig.cpu
Auto-merged arch/x86/kernel/cpu/intel.c
CONFLICT (content): Merge conflict in arch/x86/kernel/cpu/intel.c
Auto-merged arch/x86/kernel/ds.c
CONFLICT (content): Merge conflict in arch/x86/kernel/ds.c
Auto-merged arch/x86/kernel/process_32.c
CONFLICT (content): Merge conflict in arch/x86/kernel/process_32.c
Auto-merged arch/x86/kernel/process_64.c
CONFLICT (content): Merge conflict in arch/x86/kernel/process_64.c
Auto-merged arch/x86/kernel/ptrace.c
CONFLICT (content): Merge conflict in arch/x86/kernel/ptrace.c
CONFLICT (delete/modify): arch/x86/kernel/setup_64.c deleted in HEAD and 
modified in x86, ptrace: PEBS support. Version x86, ptrace: PEBS support of 
arch/x86/kernel/setup_64.c left in tree.
CONFLICT (delete/modify): include/asm-x86/ds.h deleted in HEAD and modified in 
x86, ptrace: PEBS support. Version x86, ptrace: PEBS support of 
include/asm-x86/ds.h left in tree.
Failed to merge in the changes.
Patch failed at 0001.

When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort".

Thanks.

#3 lore raw
Quoted 12 lines · green
Quoted 11 lines · Felipe Balbi
Quoted 9 lines · green

I have cloned linux-omap-2.6 and created a local branch. In the local branch I have made one very simple commit with a single line change to Makefile for use when cross-compiling (arm-linux-gnueabi-). I would like to be able to rebase that branch (just the 1 commit) onto any commit in the master branch so that I can test N810 builds using git-bisect without modifying the Makefile every time. I can easily move the branch forward to the latest commit with 'git rebase master' (with the local branch active) but something like 'git rebase v2.6.27-omap1' returns merge errors. Of course that 1 commit will apply easily to that specific tree.

Quoted 4 lines
Quoted 2 lines

hmmm, something like git rebase --onto HEAD v2.6.27-omap1 <your_branch> should work.

I got a bunch of merge conflicts this way.

maybe I got the parameters wrong. git help rebase will have the correct answer. But there are two other easier ways to do it:

a. with git cherry-pick:

$ git checkout -b newbranch v2.6.27-omap1
$ git cherry-pick <commit id for your Makefile change>

b. symlink: just create a symbolic link from arm-none-linux-gnueabi-* to arm-linux-*, something like:

$ cd /path/to/compiler
$ for i in `ls`; do ln -s $i ${i/none-linux-gnueabi/linux}; done

this might help. To be sure the command is right before really executing it, change ln -s to echo and see if the paths are ok.

Signature · 1 line
balbi
author
#4 lore raw
Quoted 16 lines · Felipe Balbi
Quoted 15 lines · green
Quoted 13 lines · Felipe Balbi
Quoted 9 lines · green

I have cloned linux-omap-2.6 and created a local branch. In the local branch I have made one very simple commit with a single line change to Makefile for use when cross-compiling (arm-linux-gnueabi-). I would like to be able to rebase that branch (just the 1 commit) onto any commit in the master branch so that I can test N810 builds using git-bisect without modifying the Makefile every time. I can easily move the branch forward to the latest commit with 'git rebase master' (with the local branch active) but something like 'git rebase v2.6.27-omap1' returns merge errors. Of course that 1 commit will apply easily to that specific tree.

hmmm, something like git rebase --onto HEAD v2.6.27-omap1 <your_branch> should work.

Quoted 8 lines
Quoted 1 line

I got a bunch of merge conflicts this way.

maybe I got the parameters wrong. git help rebase will have the correct answer. But there are two other easier ways to do it:

a. with git cherry-pick:

$ git checkout -b newbranch v2.6.27-omap1
$ git cherry-pick <commit id for your Makefile change>

This works.

Quoted 8 lines

b. symlink: just create a symbolic link from arm-none-linux-gnueabi-* to arm-linux-*, something like:

$ cd /path/to/compiler
$ for i in `ls`; do ln -s $i ${i/none-linux-gnueabi/linux}; done

this might help. To be sure the command is right before really executing it, change ln -s to echo and see if the paths are ok.

And yes, this would work too.

Thanks!

author
#5 lore raw
In reply to Felipe Balbi
Quoted 13 lines · Felipe Balbi
Quoted 12 lines · green
Quoted 11 lines · Felipe Balbi
Quoted 9 lines · green

I have cloned linux-omap-2.6 and created a local branch. In the local branch I have made one very simple commit with a single line change to Makefile for use when cross-compiling (arm-linux-gnueabi-). I would like to be able to rebase that branch (just the 1 commit) onto any commit in the master branch so that I can test N810 builds using git-bisect without modifying the Makefile every time. I can easily move the branch forward to the latest commit with 'git rebase master' (with the local branch active) but something like 'git rebase v2.6.27-omap1' returns merge errors. Of course that 1 commit will apply easily to that specific tree.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

hmmm, something like git rebase --onto HEAD v2.6.27-omap1 <your_branch> should work.

I got a bunch of merge conflicts this way.

maybe I got the parameters wrong. git help rebase will have the correct answer.

Hey, I got it to work:
git rebase --onto v2.6.27-omap1 master <my_branch>