Kernelnotes/mike

Материал из ALT Linux Wiki

kernel-image.git

Наброски mike@ по части сборки kernel-image из git-репозитория (точнее, gear-).

Локально в /pub/git/linux-2.6.27.y автоматически синхронизируется master с git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.27.y.git и рядом поддерживаются бранчи с приложенными базовыми патчами. На git.alt не выкладывал в силу нежелания расходовать ещё полгига места -- надо бы договориться, где у нас там живут разделяемые репозитории для клонирования хардлинками.

t-hard:~/git> mkdir kernel-image-tmc
t-hard:~/git> cd kernel-image-tmc
t-hard:~/git/kernel-image-tmc> git init
Initialized empty Git repository in /home/mike/git/kernel-image-tmc/.git/
t-hard:~/git/kernel-image-tmc> git fetch /pub/git/linux-2.6.27.y master:kernel-source
[...]
t-hard:~/git/kernel-image-tmc> git fetch /pub/git/linux-2.6.27.y fix-core-syslog:fix-core-syslog
[...]
t-hard:~/git/kernel-image-tmc> git fetch /pub/git/linux-2.6.27.y fix-core--init:fix-core--init
[...]
# NB: в 2.6.27.26 исправление getline уже включено
t-hard:~/git/kernel-image-tmc> git fetch /pub/git/linux-2.6.27.y fix-core-getline:fix-core-getline
t-hard:~/git/kernel-image-tmc> git branch 
  fix-core--init
  fix-core-getline
  fix-core-syslog
  kernel-source
t-hard:~/git/kernel-image-tmc> mkdir .gear
t-hard:~/git/kernel-image-tmc> cp -a ~/git/_kernel-image-tmc/.gear/rules .gear/rules
t-hard:~/git/kernel-image-tmc> cat .gear/rules
copy: config-*
diff: v2.6.27:. v2.6.27.25:. name=linux-2.6.27.25.patch
diff: v2.6.27.25:. fix-vm_deadlock:. name=fix-vm_deadlock.patch
diff: v2.6.27.25:. fix-core-getline:. name=fix-core-getline.patch
t-hard:~/git/kernel-image-tmc> cp -a ~/git/_kernel-image-tmc/kernel-image.spec .    
t-hard:~/git/kernel-image-tmc> cp -a ~/git/_kernel-image-tmc/config-i586 .      
t-hard:~/git/kernel-image-tmc> git add kernel-image.spec config-i586 .gear/
t-hard:~/git/kernel-image-tmc> git commit -m 'initial gear rules' .gear/rules                     
t-hard:~/git/kernel-image-tmc> git commit -m 'initial kernel config' config-i586                  
t-hard:~/git/kernel-image-tmc> git commit -m 'initial specfile' kernel-image.spec                 
t-hard:~/git/kernel-image-tmc> git fetch ~/git/_kernel-image-tmc fix-vm_deadlock:fix-vm_deadlock
t-hard:~/git/kernel-image-tmc> for i in fix-vm_deadlock fix-core-syslog fix-core--init fix-core-getline; do git merge -s ours $i; done                                                                                                  
Merge made by ours.
Merge made by ours.
Merge made by ours.
Merge made by ours.
t-hard:~/git/kernel-image-tmc> git status
# On branch master
nothing to commit (working directory clean)
t-hard:~/git/kernel-image-tmc> gear-update-tag -avc
gear-update-tag: Added tag "v2.6.27"
gear-update-tag:   for 4b5127df968616dee2f4775d795198878ef1638b
gear-update-tag: Added tag "v2.6.27.25"
gear-update-tag:   for 53ddfb015122de4e0bbb9aae8b41cec07d3dd631
gear-update-tag: Added tag "fix-vm_deadlock"
gear-update-tag:   for 575def1e5ba41a910a8271c6b285f8c10b33dc6c
gear-update-tag: Added tag "fix-core-getline"
gear-update-tag:   for d0add4b4d130c07690d22422de0790623116b8cf
gear-update-tag: Added .gear/tags/4b5127df968616dee2f4775d795198878ef1638b
gear-update-tag: Added .gear/tags/53ddfb015122de4e0bbb9aae8b41cec07d3dd631
gear-update-tag: Updated .gear/tags/list
t-hard:~/git/kernel-image-tmc> git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       new file:   .gear/tags/26163318ff75a2dc3c3cdfdb1656a6bac7bfd59d
#       new file:   .gear/tags/4b5127df968616dee2f4775d795198878ef1638b
#       new file:   .gear/tags/list
#
t-hard:~/git/kernel-image-tmc> git commit -am 'gear-update-tag'                  
[master 50c518d] gear-update-tag                              
 3 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 .gear/tags/26163318ff75a2dc3c3cdfdb1656a6bac7bfd59d
 create mode 100644 .gear/tags/4b5127df968616dee2f4775d795198878ef1638b
 create mode 100644 .gear/tags/list
t-hard:~/git/kernel-image-tmc> nice time gear --hasher -- hsh --target=i586 --apt-conf=/etc/apt/apt.conf-i586 ~/hasher/tmpfs
Wrote: /usr/src/RPM/SRPMS/kernel-image-tmc-tc-2.6.27-alt1.src.rpm
Wrote: /usr/src/RPM/RPMS/i586/kernel-image-tmc-tc-2.6.27-alt1.i586.rpm
Wrote: /usr/src/RPM/RPMS/i586/kernel-modules-alsa-tmc-tc-2.6.27-alt1.i586.rpm
Wrote: /usr/src/RPM/RPMS/i586/kernel-modules-drm-tmc-tc-2.6.27-alt1.i586.rpm
Wrote: /usr/src/RPM/RPMS/i586/kernel-modules-v4l-tmc-tc-2.6.27-alt1.i586.rpm
Wrote: /usr/src/RPM/RPMS/i586/kernel-headers-tmc-tc-2.6.27-alt1.i586.rpm
Wrote: /usr/src/RPM/RPMS/i586/kernel-headers-modules-tmc-tc-2.6.27-alt1.i586.rpm
1176.36user 213.42system 8:53.89elapsed 260%CPU (0avgtext+0avgdata 0maxresident)k
11544inputs+0outputs (16major+36433044minor)pagefaults 0swaps

PS: config-i586 прямщас можно взять в kernel-image-tmc-tc-*.src.rpm в сизифе, надеюсь выложить и kernel-image-tmc на git.alt по мере понимания принятой (или исправления ad hoc) ситуации с гитами исходников ядер.