oasislinux / oasis

a small statically-linked linux system
Other
2.75k stars 84 forks source link

Wiki improvement: Kernel clone #50

Open Eloitor opened 1 year ago

Eloitor commented 1 year ago

I had the same issue as https://github.com/oasislinux/oasis/issues/26.

I tried some tags: v5.19.1, v5.18.17 (and some previous ones), v.5.17.15 (and some previous ones), etc. But I didn't succeed with any of them.

Then I tried to run git pull --no-edit https://github.com/oasislinux/linux on the branch linux-5.18.y instead. I didn't know how to do it, so I forked the repo and changed the default branch on my fork to linux-5.18.y.

Finally this worked:

git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git /src/linux
cd /src/linux
git checkout v5.18.17
git pull --no-edit https://github.com/Eloitor/linux --rebase

Is there a way to do this without creating a fork? If so, it would be nice to include more detailed instructions in the wiki.

michaelforney commented 1 year ago

The linux-5.18.y branch was there only because they merged some conflicting changes to objtool in a 5.18 point release that was resulting in merge conflicts with the latest stable release. 5.19 is now released, so I've merged v5.19 into the main oasis branch, and linux-5.18.y is no longer necessary.

Is there a way to do this without creating a fork?

Take a look at the manual of git-pull. It takes a refspec as an optional refspec after the respository where you can specify the branch to pull.

You could also add the oasis repo as a new remote, fetch from that, then merge oasis/linux-5.18.y.

If so, it would be nice to include more detailed instructions in the wiki.

I actually think it might be better to be less specific. People get caught up trying to follow the exact commands in the wiki, when it just a case of doing some simple git operations (which can be accomplished in many ways).

Maybe something like "Fetch the linux kernel sources from git, checkout the tag for the release you want to build. If you are building from oasis, merge the oasis branch at https://github.com/oasislinux/linux.git".