Tim's Tips and Tricks

From eLinux.org
Revision as of 11:40, 12 October 2012 by Tim Bird (Talk | contribs)

Jump to: navigation, search


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)

personal productivity

  • attend conferences, talk to smart people
  • today script
  • multiple todo's, NOTES all over the place
    • must do a context save in each directory, before moving on
    • git branch is essential - commit changes (even if flaky) before moving on