summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2018-08-17 15:03:19 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-08-22 17:21:43 +0300
commitf55f2328bb28a8517620518c5d124f5194673309 (patch)
treeb0cd5e82002d5e0f2ee524b036f8f9b1dca594ad /scripts
parentdd5806ede3d71b7577d1d9ec853755709b6b40fa (diff)
downloadlinux-f55f2328bb28a8517620518c5d124f5194673309.tar.xz
kbuild: make sorting initramfs contents independent of locale
Some LANG values (e.g. pl_PL.UTF-8) cause the sort command to output files before their parent directories, which makes them inaccessible for the kernel. In other words, when the kernel populates the rootfs, it is unable to create files whose parent directories have not been yet created. This patch makes sorting use the default (LANG=C) locale, which results in correctly laid out initramfs images (parent directories before files). Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_initramfs_list.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 10e528b3a08f..0aad760fcd8c 100755
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -174,7 +174,7 @@ dir_filelist() {
${dep_list}header "$1"
srcdir=$(echo "$1" | sed -e 's://*:/:g')
- dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | sort)
+ dirlist=$(find "${srcdir}" -printf "%p %m %U %G\n" | LANG=C sort)
# If $dirlist is only one line, then the directory is empty
if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then