mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
gen_initramfs.sh: use gen_init_cpio -o parameter
gen_init_cpio can now write to a file directly, so use it when gen_initramfs.sh is called with -o (e.g. usr/Makefile invocation). Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Nicolas Schier <nsc@kernel.org> Link: https://lore.kernel.org/r/20250819032607.28727-6-ddiss@suse.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
committed by
Nathan Chancellor
parent
348ff9e3c1
commit
9135564db4
@@ -193,7 +193,8 @@ root_gid=0
|
||||
dep_list=
|
||||
timestamp=
|
||||
cpio_list=$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)
|
||||
output="/dev/stdout"
|
||||
# gen_init_cpio writes to stdout by default
|
||||
output=""
|
||||
|
||||
trap "rm -f $cpio_list" EXIT
|
||||
|
||||
@@ -207,7 +208,7 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
"-o") # generate cpio image named $1
|
||||
output="$1"
|
||||
output="-o $1"
|
||||
shift
|
||||
;;
|
||||
"-u") # map $1 to uid=0 (root)
|
||||
@@ -246,4 +247,4 @@ done
|
||||
|
||||
# If output_file is set we will generate cpio archive
|
||||
# we are careful to delete tmp files
|
||||
usr/gen_init_cpio $timestamp $cpio_list > $output
|
||||
usr/gen_init_cpio $output $timestamp $cpio_list
|
||||
|
||||
Reference in New Issue
Block a user