]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - docs/manual/customize-quick-guide.txt
lrzsz: install symlinks for XMODEM and YMODEM
[coffee/buildroot.git] / docs / manual / customize-quick-guide.txt
1 // -*- mode:doc; -*-
2 // vim: set syntax=asciidoc:
3
4 === Quick guide to storing your project-specific customizations
5
6 Earlier in this chapter, the different methods for making
7 project-specific customizations have been described. This section will
8 now summarize all this by providing step-by-step instructions to storing your
9 project-specific customizations. Clearly, the steps that are not relevant to
10 your project can be skipped.
11
12 1. +make menuconfig+ to configure toolchain, packages and kernel.
13 1. +make linux-menuconfig+ to update the kernel config, similar for
14    other configuration like busybox, uclibc, ...
15 1. +mkdir -p board/<manufacturer>/<boardname>+
16 1. 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+
24 1. 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+
32 1. 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+.
37 1. 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+
41 1. 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+.
44 1. 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+.
47 1. 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+.
51 1. 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.
58 1. 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.
65 1. +make savedefconfig+ to save the buildroot configuration.
66 1. +cp defconfig configs/<boardname>_defconfig+