Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 31 additions & 26 deletions tools/devtool
Original file line number Diff line number Diff line change
Expand Up @@ -536,20 +536,34 @@ cmd_help() {
echo " (in this particular order) required for the git authentication."
echo " It is mandatory that both keys are specified."
echo ""
echo " strip [--target-libc musl|gnu]"
echo " Strip debug symbols from the Firecracker release binaries."
echo " build_devctr [--no-python-package-update]"
echo " Builds the development container from its Dockerfile."
echo " -n, --no-python-package-update Do not update python packages."
echo ""
echo " --target-libc musl|gnu Choose the target libc flavor which determines the"
echo " toolchain used to build Firecracker release binaries."
echo " Stripping will occur only for the Firecracker release"
echo " binaries corresponding to the inferred toolchain. Default"
echo " is musl."
echo " checkenv"
echo " Performs prerequisites checks needed to execute firecracker."
echo ""
echo " ci"
echo " Run a continuous integration test run that executes the integration tests and"
echo " checks that the release process works."
echo ""
echo " distclean"
echo " Clean up the build tree and remove the docker container."
echo ""
echo " fix_perms"
echo " Fixes permissions when devtool dies in the middle of a privileged session."
echo ""
echo " fmt"
echo " Auto-format all Rust source files, to match the Firecracker requirements."
echo " This should be used as the last step in every commit, to ensure that the"
echo " Rust style tests pass."
echo ""
echo " generate_syscall_tables <version>"
echo " Generates the syscall tables for seccompiler, according to a given kernel version."
echo " Release candidate (rc) linux versions are not allowed."
echo " Outputs a rust file for each supported arch: src/seccompiler/src/syscall_table/{arch}.rs"
echo " Supported architectures: x86_64 and aarch64."
echo ""
echo " help"
echo " Display this help message."
echo ""
Expand Down Expand Up @@ -580,23 +594,14 @@ cmd_help() {
binaries, logs/metrics FIFOs
and test created device files)."
echo ""
echo " checkenv"
echo " Performs prerequisites checks needed to execute firecracker."
echo ""
echo " fix_perms"
echo " Fixes permissions when devtool dies in the middle of a privileged session."
echo " build_devctr [--no-python-package-update]"
echo " Builds the development container from its Dockerfile."
echo " -n, --no-python-package-update Do not update python packages."
echo ""
echo " generate_syscall_tables <version>"
echo " Generates the syscall tables for seccompiler, according to a given kernel version."
echo " Release candidate (rc) linux versions are not allowed."
echo " Outputs a rust file for each supported arch: src/seccompiler/src/syscall_table/{arch}.rs"
echo " Supported architectures: x86_64 and aarch64."
echo " strip [--target-libc musl|gnu]"
echo " Strip debug symbols from the Firecracker release binaries."
echo ""
echo " distclean"
echo " Clean up the build tree and remove the docker container."
echo " --target-libc musl|gnu Choose the target libc flavor which determines the"
echo " toolchain used to build Firecracker release binaries."
echo " Stripping will occur only for the Firecracker release"
echo " binaries corresponding to the inferred toolchain. Default"
echo " is musl."
}

# `$0 build` - build Firecracker
Expand Down Expand Up @@ -795,13 +800,13 @@ cmd_strip() {
strip $strip_flags\
"$CTR_CARGO_TARGET_DIR/$target/$profile/firecracker" \
"$CTR_CARGO_TARGET_DIR/$target/$profile/jailer" \
"$CTR_CARGO_TARGET_DIR/$target/$profile/seccompiler/seccompiler"
"$CTR_CARGO_SECCOMPILER_TARGET_DIR/$target/$profile/seccompiler"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

ret=$?

[ $ret -eq 0 ] && {
cargo_bin_dir="$CARGO_TARGET_DIR/$target/$profile"
say "Stripping was successful."
say "Stripped binaries placed under $cargo_bin_dir."
say "Stripped Firecracker and Jailer binaries placed under $CARGO_TARGET_DIR/$target/$profile."
say "Stripped seccompiler binary placed under $CARGO_SECCOMPILER_TARGET_DIR/$target/$profile."
}

return $ret
Expand Down