customize-quick-guide.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. === Quick guide to storing your project-specific customizations
  4. Earlier in this chapter, the different methods for making
  5. project-specific customizations have been described. This section will
  6. now summarize all this by providing step-by-step instructions to storing your
  7. project-specific customizations. Clearly, the steps that are not relevant to
  8. your project can be skipped.
  9. 1. +make menuconfig+ to configure toolchain, packages and kernel.
  10. 1. +make linux-menuconfig+ to update the kernel config, similar for
  11. other configuration like busybox, uclibc, ...
  12. 1. +mkdir -p board/<manufacturer>/<boardname>+
  13. 1. Set the following options to +board/<manufacturer>/<boardname>/<package>.config+
  14. (as far as they are relevant):
  15. * +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+
  16. * +BR2_PACKAGE_BUSYBOX_CONFIG+
  17. * +BR2_UCLIBC_CONFIG+
  18. * +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+
  19. * +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+
  20. * +BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE+
  21. 1. Write the configuration files:
  22. * +make linux-update-defconfig+
  23. * +make busybox-update-config+
  24. * +make uclibc-update-config+
  25. * +cp <output>/build/at91bootstrap3-*/.config
  26. board/<manufacturer>/<boardname>/at91bootstrap3.config+
  27. * +make barebox-update-defconfig+
  28. * +make uboot-update-defconfig+
  29. 1. Create +board/<manufacturer>/<boardname>/rootfs-overlay/+ and fill it
  30. with additional files you need on your rootfs, e.g.
  31. +board/<manufacturer>/<boardname>/rootfs-overlay/etc/inittab+.
  32. Set +BR2_ROOTFS_OVERLAY+
  33. to +board/<manufacturer>/<boardname>/rootfs-overlay+.
  34. 1. Create a post-build script
  35. +board/<manufacturer>/<boardname>/post_build.sh+. Set
  36. +BR2_ROOTFS_POST_BUILD_SCRIPT+ to
  37. +board/<manufacturer>/<boardname>/post_build.sh+
  38. 1. If additional setuid permissions have to be set or device nodes have
  39. to be created, create +board/<manufacturer>/<boardname>/device_table.txt+
  40. and add that path to +BR2_ROOTFS_DEVICE_TABLE+.
  41. 1. If additional user accounts have to be created, create
  42. +board/<manufacturer>/<boardname>/users_table.txt+ and add that path
  43. to +BR2_ROOTFS_USERS_TABLES+.
  44. 1. To add custom patches to certain packages, set +BR2_GLOBAL_PATCH_DIR+
  45. to +board/<manufacturer>/<boardname>/patches/+ and add your patches
  46. for each package in a subdirectory named after the package. Each
  47. patch should be called +<packagename>-<num>-<description>.patch+.
  48. 1. Specifically for the Linux kernel, there also exists the option
  49. +BR2_LINUX_KERNEL_PATCH+ with as main advantage that it can also
  50. download patches from a URL. If you do not need this,
  51. +BR2_GLOBAL_PATCH_DIR+ is preferred. U-Boot, Barebox, at91bootstrap
  52. and at91bootstrap3 also have separate options, but these do not
  53. provide any advantage over +BR2_GLOBAL_PATCH_DIR+ and will likely be
  54. removed in the future.
  55. 1. If you need to add project-specific packages, create
  56. +package/<manufacturer>/+ and place your packages in that
  57. directory. Create an overall +<manufacturer>.mk+ file that
  58. includes the +.mk+ files of all your packages. Create an overall
  59. +Config.in+ file that sources the +Config.in+ files of all your
  60. packages. Include this +Config.in+ file from Buildroot's
  61. +package/Config.in+ file.
  62. 1. +make savedefconfig+ to save the buildroot configuration.
  63. 1. +cp defconfig configs/<boardname>_defconfig+