Solved --- Trying to build adopted kernel --- what do i wrong?

user@starfive:~$ mkdir newkrnl
user@starfive:~$ cd newkrnl/
user@starfive:~/newkrnl$ git clone GitHub - starfive-tech/linux
Cloning into ‘linux’…
remote: Enumerating objects: 9947137, done.
remote: Counting objects: 100% (517368/517368), done.
remote: Compressing objects: 100% (109550/109550), done.
remote: Total 9947137 (delta 412268), reused 500451 (delta 406437), pack-reused 9429769
Receiving objects: 100% (9947137/9947137), 2.33 GiB | 7.47 MiB/s, done.
Resolving deltas: 100% (8426220/8426220), done.
Checking objects: 100% (33554432/33554432), done.
Updating files: 100% (81804/81804), done.
user@starfive:~/newkrnl$
user@starfive:~/newkrnl$ git checkout 5.15.0
fatal: not a git repository (or any of the parent directories): .git
user@starfive:~/newkrnl$ git checkout v3.6.1
fatal: not a git repository (or any of the parent directories): .git
user@starfive:~/newkrnl$ ls
linux
user@starfive:~/newkrnl$ cd linux/
user@starfive:~/newkrnl/linux$ git checkout v3.6.1
error: pathspec ‘v3.6.1’ did not match any file(s) known to git
user@starfive:~/newkrnl/linux$ git checkout 5.15.0
error: pathspec ‘5.15.0’ did not match any file(s) known to git

although no pattern in the docs, i needed to look into git and found: VF2_v3.6.1

user@starfive:~/newkrnl/linux$ git checkout VF2_v3.6.1
Updating files: 100% (61762/61762), done.
Note: switching to ‘VF2_v3.6.1’.

You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 05533e9c31d6 Merge branch ‘CR_7073_vf2_515_newrd10_shengyang.chen’ into ‘vf2-515-devel’

1 Like

Hello,

this arent a branch 3.6.1 and 5.15.0.

You can do for 5.15 Kernel
git checkout -b JH7110_VisionFive2_devel origin/JH7110_VisionFive2_devel

For upstream kernel:
git checkout -b JH7110_VisionFive2_6.1.y_devel origin/JH7110_VisionFive2_6.1.y_devel