[OE-core] [PATCH] psplash: create psplash tmpfs mount directory in psplash-init

richard.purdie at linuxfoundation.org richard.purdie at linuxfoundation.org
Fri Jul 19 22:30:19 UTC 2019


On Fri, 2019-07-19 at 21:44 +0200, Stefan Agner wrote:
> From: Stefan Agner <stefan.agner at toradex.com>
> 
> The psplash binary uses TMPDIR as directory to store the FIFO to
> communicate with the psplash tools. This directory can be in any
> location an init system determines to be suitable, psplash-init
> uses /mnt/ for it. Rather than creating the mount directory in
> the recipe, just create it in the init script itself. This allows
> other init scripts to use a different location without having
> an unnecessary .psplash directory in /mnt.
> 
> Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
> ---
>  meta/recipes-core/psplash/files/psplash-init | 1 +
>  meta/recipes-core/psplash/psplash_git.bb     | 3 ---
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-core/psplash/files/psplash-init
> b/meta/recipes-core/psplash/files/psplash-init
> index 0bce1de536..7a3902a7e0 100755
> --- a/meta/recipes-core/psplash/files/psplash-init
> +++ b/meta/recipes-core/psplash/files/psplash-init
> @@ -24,6 +24,7 @@ for x in $CMDLINE; do
>  done
>  
>  export TMPDIR=/mnt/.psplash
> +mkdir -p $TMPDIR
>  mount tmpfs -t tmpfs $TMPDIR -o,size=40k
>  
>  rotation=0

The main reason for avoiding this is probably the extra fork overhead
of mkdir. It sounds trivial but the fork/exec calls add up over a boot
process.

Testing whether that directory exists before the mkdir might help with
that.

Cheers,

Richard



More information about the Openembedded-core mailing list