15 Jan, 2020
6 commits
-
This script sets the -e option, so it exits on any error, in which
case it exits without cleaning up the intermediate cpio_list.Make sure to delete it on exit.
Signed-off-by: Masahiro Yamada
-
Currently, usr/gen_initramfs.sh takes care of all the use-cases:
[1] generates a cpio file unless CONFIG_INITRAMFS_SOURCE points to
a single cpio archive[2] If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive,
use it as-is.[3] Compress the cpio file according to CONFIG_INITRAMFS_COMPRESSION_*
unless it is passed a compressed archive.To simplify the script, move [2] and [3] to usr/Makefile.
If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, there is
no need to run this shell script.For the cpio archive compression, you can re-use the rules from
scripts/Makefile.lib .Signed-off-by: Masahiro Yamada
-
Currently, this script outputs a cpio file when -o option is
given, but otherwise a text file in the format recognized by
gen_init_cpio.This behavior is unclear. Make it always output a cpio file.
Signed-off-by: Masahiro Yamada
-
When CONFIG_INITRAMFS_SOURCE is empty, the Makefile passes the -d
option to gen_initramfs.sh to create the default initramfs, which
contains /dev, /dev/console, and /root.This commit simplifies the default behavior; remove the -d option,
and add the default cpio list.Signed-off-by: Masahiro Yamada
-
Currently, this script is run twice, for the dependency list, and then
for the cpio archive.The first one is re-run every time although its build log is suppressed
so nobody notices it.Make it work more efficiently by generating the cpio and the dependency
list at the same time.Signed-off-by: Masahiro Yamada
-
Specify the dependency directly in the Makefile.
Signed-off-by: Masahiro Yamada
Reviewed-by: Greg Thelen
14 Jan, 2020
1 commit
-
The comments in usr/Makefile wrongly refer to the script name (twice).
Line 37:
# The dependency list is generated by gen_initramfs.sh -lLine 54:
# 4) Arguments to gen_initramfs.sh changesThere does not exist such a script.
I was going to fix the comments, but after some consideration, I thought
"gen_initramfs.sh" would be more suitable than "gen_initramfs_list.sh"
because it generates an initramfs image in the common usage.The script generates a list that can be fed to gen_init_cpio only when
it is directly run without -o or -l option.Signed-off-by: Masahiro Yamada