Re: [PATCH] Ensure build works when KBUILD_OUTPUT is set, closes 11511

2018-11-18 Thread Denys Vlasenko
Applied, thanks! On Sun, Nov 18, 2018 at 8:40 AM Ron Yorston wrote: > > The build process for embedded scripts didn't have consistent > support for saving output to a different directory. > > Signed-off-by: Ron Yorston > --- > Makefile | 4 ++-- > scripts/embedded_scripts | 2 +-

Re: [PATCH] Tweaks to build process for embedded scripts

2018-11-18 Thread Denys Vlasenko
On Sun, Nov 18, 2018 at 10:06 AM Ron Yorston wrote: > - Force a rebuild if a script in applets_sh is changed. > > - Move the dummy usage messages for custom applets to usage.h and > change the name from 'dummy' to 'scripted'. > > - Hide an error from gen_build_files.sh if an embed directory

Re: [PATCH 2/2] busybox: add '--show name' option to display script content

2018-11-18 Thread Denys Vlasenko
Applied with some edits, thanks! On Sun, Nov 18, 2018 at 4:03 PM Ron Yorston wrote: > > Add an option to allow the content of embedded scripts to be > displayed. This includes applet scripts, custom scripts and the > .profile script. > > function old

Re: [PATCH] ash: allow a profile script to be embedded in the binary

2018-11-18 Thread Denys Vlasenko
On Sun, Nov 18, 2018 at 4:04 PM Ron Yorston wrote: > If the file embed/.profile exists at build time it is placed at the > start of the block of compressed scripts. Its name isn't included > in the list of scripts so it can't be run directly by the user. > Instead it is executed when a login

Re: [PATCH 1/2] busybox: list applets and custom scripts separately

2018-11-18 Thread Denys Vlasenko
On Sun, Nov 18, 2018 at 4:02 PM Ron Yorston wrote: > Make 'busybox --help' distinguish between applets (including > scripted applets) and custom scripts. Why? ___ busybox mailing list busybox@busybox.net

[PATCH] ash: allow a profile script to be embedded in the binary

2018-11-18 Thread Ron Yorston
If the file embed/.profile exists at build time it is placed at the start of the block of compressed scripts. Its name isn't included in the list of scripts so it can't be run directly by the user. Instead it is executed when a login shell is started, before /etc/profile. With no embed/.profile

[PATCH 2/2] busybox: add '--show name' option to display script content

2018-11-18 Thread Ron Yorston
Add an option to allow the content of embedded scripts to be displayed. This includes applet scripts, custom scripts and the .profile script. function old new delta run_applet_and_exit 728 820 +92 .rodata

[PATCH 1/2] busybox: list applets and custom scripts separately

2018-11-18 Thread Ron Yorston
Make 'busybox --help' distinguish between applets (including scripted applets) and custom scripts. If no custom scripts are present the size of the binary is unchanged. Otherwise: function old new delta run_applet_and_exit

[PATCH 0/2] Optional extras

2018-11-18 Thread Ron Yorston
Here are another two patches for embedded script support. They assume that 'ash: allow a profile script to be embedded in the binary' has been applied. The first makes 'busybox --help' list custom scripts separately from applets: Currently defined functions: [, [[, acpid,

[PATCH] ash: allow a profile script to be embedded in the binary

2018-11-18 Thread Ron Yorston
If the file embed/.profile exists at build time it is placed at the start of the block of compressed scripts. Its name isn't included in the list of scripts so it can't be run directly by the user. Instead it is executed when a login shell is started, before /etc/profile. With no embed/.profile

[PATCH] Tweaks to build process for embedded scripts

2018-11-18 Thread Ron Yorston
- Force a rebuild if a script in applets_sh is changed. - Move the dummy usage messages for custom applets to usage.h and change the name from 'dummy' to 'scripted'. - Hide an error from gen_build_files.sh if an embed directory exists but is empty. - Strip leading comments and blank lines