1*4882a593Smuzhiyun// -*- mode:doc; -*- 2*4882a593Smuzhiyun// vim: set syntax=asciidoc: 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun[[customize]] 5*4882a593Smuzhiyun== Project-specific customization 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunTypical actions you may need to perform for a given project are: 8*4882a593Smuzhiyun 9*4882a593Smuzhiyun* configuring Buildroot (including build options and toolchain, 10*4882a593Smuzhiyun bootloader, kernel, package and filesystem image type selection) 11*4882a593Smuzhiyun* configuring other components, like the Linux kernel and BusyBox 12*4882a593Smuzhiyun* customizing the generated target filesystem 13*4882a593Smuzhiyun ** adding or overwriting files on the target filesystem (using 14*4882a593Smuzhiyun +BR2_ROOTFS_OVERLAY+) 15*4882a593Smuzhiyun ** modifying or deleting files on the target filesystem (using 16*4882a593Smuzhiyun +BR2_ROOTFS_POST_BUILD_SCRIPT+) 17*4882a593Smuzhiyun ** running arbitrary commands prior to generating the filesystem image 18*4882a593Smuzhiyun (using +BR2_ROOTFS_POST_BUILD_SCRIPT+) 19*4882a593Smuzhiyun ** setting file permissions and ownership (using 20*4882a593Smuzhiyun +BR2_ROOTFS_DEVICE_TABLE+) 21*4882a593Smuzhiyun ** adding custom devices nodes (using 22*4882a593Smuzhiyun +BR2_ROOTFS_STATIC_DEVICE_TABLE+) 23*4882a593Smuzhiyun* adding custom user accounts (using +BR2_ROOTFS_USERS_TABLES+) 24*4882a593Smuzhiyun* running arbitrary commands after generating the filesystem image 25*4882a593Smuzhiyun (using +BR2_ROOTFS_POST_IMAGE_SCRIPT+) 26*4882a593Smuzhiyun* adding project-specific patches to some packages (using 27*4882a593Smuzhiyun +BR2_GLOBAL_PATCH_DIR+) 28*4882a593Smuzhiyun* adding project-specific packages 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunAn important note regarding such 'project-specific' customizations: 31*4882a593Smuzhiyunplease carefully consider which changes are indeed project-specific and 32*4882a593Smuzhiyunwhich changes are also useful to developers outside your project. The 33*4882a593SmuzhiyunBuildroot community highly recommends and encourages the upstreaming of 34*4882a593Smuzhiyunimprovements, packages and board support to the official Buildroot 35*4882a593Smuzhiyunproject. Of course, it is sometimes not possible or desirable to 36*4882a593Smuzhiyunupstream because the changes are highly specific or proprietary. 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunThis chapter describes how to make such project-specific customizations 39*4882a593Smuzhiyunin Buildroot and how to store them in a way that you can build the same 40*4882a593Smuzhiyunimage in a reproducible way, even after running 'make clean'. By 41*4882a593Smuzhiyunfollowing the recommended strategy, you can even use the same Buildroot 42*4882a593Smuzhiyuntree to build multiple distinct projects! 43*4882a593Smuzhiyun 44*4882a593Smuzhiyuninclude::customize-directory-structure.txt[] 45*4882a593Smuzhiyun 46*4882a593Smuzhiyuninclude::customize-outside-br.txt[] 47*4882a593Smuzhiyun 48*4882a593Smuzhiyuninclude::customize-configuration.txt[] 49*4882a593Smuzhiyun 50*4882a593Smuzhiyuninclude::customize-rootfs.txt[] 51*4882a593Smuzhiyun 52*4882a593Smuzhiyuninclude::customize-users-tables.txt[] 53*4882a593Smuzhiyun 54*4882a593Smuzhiyuninclude::customize-post-image.txt[] 55*4882a593Smuzhiyun 56*4882a593Smuzhiyuninclude::customize-patches.txt[] 57*4882a593Smuzhiyun 58*4882a593Smuzhiyuninclude::customize-packages.txt[] 59*4882a593Smuzhiyun 60*4882a593Smuzhiyuninclude::customize-quick-guide.txt[] 61