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