customize-store.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. === Step-by-step instructions for storing configuration
  4. To store the configuration for a specific product, device or
  5. application, it is advisable to use the same conventions as for the
  6. board support: put the buildroot defconfig in the +configs+ directory,
  7. and any other files in a subdirectory of the +boards+ directory. This
  8. section gives step-by-step instructions about how to do that. Of course,
  9. you can skip the steps that are not relevant for your use case.
  10. 1. +make menuconfig+ to configure toolchain, packages and kernel.
  11. 1. +make linux-menuconfig+ to update the kernel config, similar for
  12. other configuration.
  13. 1. +mkdir -p board/<manufacturer>/<boardname>+
  14. 1. Set the following options to +board/<manufacturer>/<boardname>/<package>.config+
  15. (as far as they are relevant):
  16. * +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+
  17. * +BR2_PACKAGE_BUSYBOX_CONFIG+
  18. * +BR2_UCLIBC_CONFIG+
  19. * +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+
  20. * +BR2_TARGET_BAREBOX_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 board/<manufacturer>/<boardname>/at91bootstrap3.config+
  26. * +make barebox-update-defconfig+
  27. 1. Create +board/<manufacturer>/<boardname>/fs-overlay/+ and fill it
  28. with additional files you need on your rootfs, e.g.
  29. +board/<manufacturer>/<boardname>/fs-overlay/etc/inittab+.
  30. Set +BR2_ROOTFS_OVERLAY+
  31. to +board/<manufacturer>/<boardname>/fs-overlay+.
  32. 1. Create a post-build script
  33. +board/<manufacturer>/<boardname>/post-build.sh+. Set
  34. +BR2_ROOTFS_POST_BUILD_SCRIPT+ to
  35. +board/<manufacturer>/<boardname>/post-build.sh+
  36. 1. If additional setuid permissions have to be set or device nodes have
  37. to be created, create +board/<manufacturer>/<boardname>/device_table.txt+
  38. and add that path to +BR2_ROOTFS_DEVICE_TABLE+.
  39. 1. +make savedefconfig+ to save the buildroot configuration.
  40. 1. +cp defconfig configs/<boardname>_defconfig+
  41. 1. To add patches to the linux build, set +BR2_LINUX_KERNEL_PATCH+ to
  42. +board/<manufacturer>/<boardname>/patches/linux/+ and add your
  43. patches in that directory. Each patch should be called
  44. +linux-<num>-<description>.patch+. Similar for U-Boot, barebox,
  45. at91bootstrap and at91bootstrap3.
  46. 1. If you need modifications to other packages, or if you need to add
  47. packages, do that directly in the +packages/+ directory, following the
  48. instructions in xref:adding-packages[].