linux - How to make a script run in buildroot as a boot script after init -
i building custom initramfs buildroot busybox used automated fdisk partitioning. how/where put script file busybox boots , executes automatically.
how make script run in buildroot boot script after init
you cannot use 1 script file both purposes. you'll need 1 script execution on target, , method on host modify target's prototype filesystem.
the typical method of installing scripts , files target's filesystem generated buildroot specify "post-build script". script executed before root filesystem tar
ed or ubinize
d.
from section 4.1 customizing generated target filesystem of buildroot user manual:
in buildroot configuration, can specify path post-build script, gets called after buildroot builds selected software, before rootfs packages assembled. destination root filesystem folder given first argument script, , script can used copy programs, static data or other needed file target filesystem.
a subdirectory board under buildroot board directory (e.g. board/beaglebone) typical location store post-build.sh file original files copying.
an example of post-build.sh file here. 2 script files target created line-by-line using echo
commands. binary file copied.
also take @ pages 24-25 of this presentation.
Comments
Post a Comment