Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8999139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:08:25+00:00 2026-06-16T00:08:25+00:00

I have some raw open-source code for a modified version of the linux kernel.

  • 0

I have some raw open-source code for a modified version of the linux kernel. Ideally I would have a patch so that I could apply it to a newer version of the kernel, but instead I just have the source code, so I’m trying to create that patch myself.

What I’m finding is that when I create a patch and apply it to the newer kernel, I end up reverting a lot of changes. Is there a feature in git that can tell if local changes are reverting previous commits? Or is there some other tool that can find the commit with the least amount of changes (even if it’s time consuming and has to be run on my own machine)?

I’ve been manually narrowing down what commit the source branched from, but it’s very time consuming. I found a branch that fairly closely matched and now am trying to figure out what the latest commit was before changes were made to it.

I’ll check out a commit A, copy the changed files, do a log on any file that has a lot of stuff taken out to find out if those exact changes were added from commit B, then checkout the commit before commit B, etc, etc…

EDIT: Since this is all pertaining to open source code, I don’t see any reason why I can’t share links to it here.

The source code released by LGE can be found here. Search for LS970 under Mobile.

The different branches of the MSM kernel can be found here. So far the ics_strawberry head seems to be the closest. It’s one of the few that has a chromeos folder, which seems like it would be an odd thing to add specifically for a cell phone that wouldn’t be running Chrome OS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:08:26+00:00Added an answer on June 16, 2026 at 12:08 am

    Unfortunately, you cannot use git bisect here because you cannot tell at any commit whether it was bad or good.

    Your goal is to find commit that matches best to your target source. I think that best metric of what is “matching best” is the size (in lines) of unified diff/patch.

    With this in mind, you can write a script according to following pseudo-code (sorry, weird mix of shell, Perl and C):

    min_diff_size = 10000000000
    best_commit = none
    git branch tmp original_branch  # branch to scan
    git checkout tmp
    for (;;) {
        diff_size = `diff -burN -x.git my_git_subtree my_src_subtree | wc -l`;
        if (diff_size < min_diff_size) {
             min_diff_size = diff_size;
             best_commit = `git log --oneline -1`;
        }
        git reset --hard HEAD~; # rewind back by 1 commit
        if (git reset did not work) break;
    }
    git checkout original_branch
    git branch -d tmp
    
    print "best commit $best_commit, diff size $min_diff_size"
    

    You may also want to cycle through kernel branches as well to find best matching branch.

    This probably will work slow and take a lot of time (could be hours), but it will find best matching commit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some existing C code that uses ICMP raw sockets to do Ping
I have some code on two systems running kernel 2.4.20 and kernel 2.4.38 .
I have some code that will change the background color of a specific label
I have some existing code that is querying a SQL database repeatedly with different
I have a sheet full of some raw data, about 20,000 rows and 50
I have a page successfully asking for and parsing some raw SVG from a
I have some arbitrary pixel data that I want to save as a PNG.
I have some text lines like that : vt_wildshade2^508^508 vt_ailleurs2^1188^1188 ... vt_high2^13652^13652 Is it
i have some problems with a Query seem IN dosen't work with Group_concat, that
We have 10 Linux boxes that must run 100 different tasks each week. These

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.