Difference between revisions of "Tim's Tips and Tricks"

From eLinux.org
Jump to: navigation, search
(Created page with "== Sources == == Ideas for individual tips == === Git tips === * git describe <commit> * git describe --contains <commit> * git log <file> # narrow scope of log ** git log <di...")
 
Line 1: Line 1:
 
== Sources ==
 
== Sources ==
 +
* Hugh Bleming - Learning Kernel Hacking from clever people - [[File:elc-us-2008-slides-final.pdf]
  
 
== Ideas for individual tips ==
 
== Ideas for individual tips ==

Revision as of 19:15, 12 October 2012

Sources

  • Hugh Bleming - Learning Kernel Hacking from clever people - [[File:elc-us-2008-slides-final.pdf]

Ideas for individual tips

Git tips

  • git describe <commit>
  • git describe --contains <commit>
  • git log <file> # narrow scope of log
    • git log <dir>
  • git annotate <file> | grep <regex of interest> = who did this?
    • git show <commit_of_interest> = why is it here?
  • git bisect

patch management

  • quilt - patches as first class objects
    • git for development work, then convert to quilt patches
    • git rebase --interactive
  • precommit - quilt pop -a, basediff, quilt push -a, scripts/fix-filemodes.sh
  • diffinfo - my own tool for managing patches
    • splitting a patch: splitpatch - tool to break patches apart

board handling

  • consistent board setup (including remote access)
    • connections: serial, network, power (web-based control) [images]
      • power port controller [image]
    • Usually use tftp boot kernel, with NFS rootfs
      • but can do other setups: feed kernel through serial line, put kernel on SD card using known-good kernel, etc.


  • ttc - command line tool for board control
    • abstracts differences between boards
    • allows for board sharing (ttc reserve)
    • everything is scritable, and remotable
    • object-oriented: inheritance to quickly modify attributes of a board "class"
    • items abstracted:
      • kernel source, toolchain, architecture, defconfig, kernel image name, tool paths
      • kernel build, install
      • board console access, reboot, run arbitrary commands, reset
      • filesystem access (copy from/to)