From 8de96bba65901f541109240086298a57860b138b Mon Sep 17 00:00:00 2001 From: Caoruihong Date: Tue, 3 Aug 2021 00:10:37 +0800 Subject: [PATCH] chore: also copy unstripped version of mksh and toybox stripped version used to pack rootfs image, unstripped used for debug. Signed-off-by: Caoruihong Change-Id: I07673238772d6995426ec8b1cff43f1abfea7049 --- apps/mksh/BUILD.gn | 14 ++++++++++---- apps/toybox/BUILD.gn | 7 +++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/apps/mksh/BUILD.gn b/apps/mksh/BUILD.gn index 12e6691e..77d28471 100644 --- a/apps/mksh/BUILD.gn +++ b/apps/mksh/BUILD.gn @@ -80,10 +80,16 @@ build_ext_component("build_mksh") { # copy mksh and .mkshrc to out dir command += " && mkdir -p " command += rebase_path("$root_out_dir/bin", exec_path) - command += " " - command += rebase_path("$root_out_dir/etc", exec_path) + command += " && install -D mksh " + command += rebase_path("$root_out_dir/unstripped/bin/mksh", exec_path) command += " && $ohos_current_strip_command mksh -o " command += rebase_path("$root_out_dir/bin/mksh", exec_path) - command += " && cp -f .mkshrc " - command += rebase_path("$root_out_dir/etc", exec_path) + command += " && install -D .mkshrc " + command += rebase_path("$root_out_dir/etc/.mkshrc", exec_path) + + outputs = [ + "$root_out_dir/unstripped/bin/mksh", + "$root_out_dir/bin/mksh", + "$root_out_dir/etc/.mkshrc", + ] } diff --git a/apps/toybox/BUILD.gn b/apps/toybox/BUILD.gn index 1edb7d05..f1d25054 100644 --- a/apps/toybox/BUILD.gn +++ b/apps/toybox/BUILD.gn @@ -70,4 +70,11 @@ build_ext_component("build_toybox") { command += " make toybox" command += " && install -D toybox " command += rebase_path("$root_out_dir/bin/toybox", exec_path) + command += " && install -D generated/unstripped/toybox " + command += rebase_path("$root_out_dir/unstripped/bin/toybox", exec_path) + + outputs = [ + "$root_out_dir/unstripped/bin/toybox", + "$root_out_dir/bin/toybox", + ] }