Currently, the docker-run script starts a container based on the reference image, in which the user has UID:GID set to 1000:1000, which may or may not be the same as local user uses, which may prevent the commands in the container from creating files, which foils the plan of using the container to run a build... Additionally, the paths in the container differ from the paths the user expects, as the current Buildroot tree is mounted over the in-container user home directory. This is a bit confusing... Finally, the container is left hanging around after the command finishes, and thus there are as many lingering containers as the user runs docker-run. This is not very nice... We fix all of that (yeah, should be different patches, but meh): - we use --mount instead of -v, which allows us to bind-mount the Buildroot tree at the same place in the container, as Docker will create the destination if it does not exist, while -v seems to expect it to exist [0]. - as a consequence, we can also set the working directory as the Buildroot top-directory; - use --user to force the same UID:GID in the container as the local user, so that files created in the container belong to the local user, and so that files from the local user are accessible from the container; - use --rm to remove the container once it terminates; starting a new container is very quick anyway, so it is as good as re-using a previous container. [0] the documentation is not clear about that. It clearly states that the host directory (i.e. the origin, the source) is created if missing, but it says nothing of the destination: https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Giulio Benetti <giulio.benetti@benettiengineering.com> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.clang-format | ||
.defconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches