using-openadk-development.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. Using OpenADK during development
  4. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. The normal operation of OpenADK is to download a tarball, extract it,
  6. configure, compile and install the software component found inside this
  7. tarball. The source code is extracted in
  8. +build_<system>_<arch>_<libc>/w-<package>-<version>+, which is a
  9. temporary directory: whenever +make clean+ or one of the other clean
  10. targets are used, this directory is entirely removed, and recreated at
  11. the next +make+ invocation.
  12. This behavior is well-suited when OpenADK is used mainly as an
  13. integration tool, to build and integrate all the components of an
  14. embedded Linux system. However, if one uses OpenADK during the
  15. development of certain components of the system, this behavior is not
  16. very convenient: one would instead like to make a small change to the
  17. source code of one package, and be able to quickly rebuild the system
  18. with OpenADK.
  19. Following workflow might help to integrate your own changes, while
  20. developing a new package or board support.
  21. Make changes directly in +build_<system>_<arch>_<libc>/w-<package>-<version>+
  22. and recompile the package with:
  23. ------------
  24. $ make package=<package> package
  25. ------------
  26. When you are happy with the change, generate a patch:
  27. ------------
  28. $ make package=<package> update-patches
  29. ------------
  30. For the linux kernel just change the code in
  31. +build_<system>_<arch>_<libc>/linux, remove the .config
  32. and call make again:
  33. ------------
  34. $ rm build_<system>_<arch>_<libc>/linux/.config
  35. $ make
  36. ------------
  37. There is no update-patches target for the kernel, you need
  38. to extract the kernel source from your download dir, make
  39. a copy of the source tree, add your changes and create a
  40. patch manually:
  41. ------------
  42. $ tar xvf dl/linux-x.y.z.tar.xz
  43. $ cp -a linux-x.y.z linux-x.y.z.orig
  44. $ diff -Nur linux-x.y.z.orig linux-x.y.z > target/linux/patches/x.y.z/mykernel.patch
  45. $ make cleankernel
  46. $ make
  47. ------------
  48. The same method can be used for toolchain components and _must_
  49. be used for busybox, because it contains patches, which are not
  50. generated via +make update-patches+.