Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Skip full install if only kernel header install needed
Browse files Browse the repository at this point in the history
Signed-off-by: Joel Fernandes (Google) <[email protected]>
  • Loading branch information
joelagnel committed May 31, 2018
1 parent 1722704 commit 1171d2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ androdeb prepare --download --kernelsrc /path/to/kernel-source

If you need to put kernel sources for an existing install, run:
```
androdeb prepare --kernelsrc /path/to/kernel-source
androdeb prepare --kernelsrc /path/to/kernel-source --skip-install
```
Note: The kernel sources should have been built (atleast build should have started).

Expand Down
7 changes: 5 additions & 2 deletions androdeb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ case $key in
--download) DOWNLOAD=1; shift || true; ;;
--bcc) source $spath/packages/bcc; shift || true; ;;
--kernelsrc) KERNELSRC="$2"; shift || true; shift || true; ;;
--skip-install) SKIP_INSTALL=1; shift || true; ;;
--kernel-headers-targz) KERNELHDRS=$2; shift || true; shift || true; ;;
--tempdir) TDIR="$2"; shift || true; shift || true; ;;
--buildtar) TARDIR="$2"; shift || true; shift || true; ;;
Expand Down Expand Up @@ -158,7 +159,8 @@ if [ ! -z "$KERNELHDRS" ]; then
echo "Building updating kernel headers from supplied tar.gz ($KERNELHDRS)"

# Is header tar gz update the only thing left to do?
if [[ -z "$PACKAGES" ]] && [[ -z "$TARF" ]] && [[ -z "$BUILD_IMAGE" ]] && [[ -z "$KERNELSRC" ]] ; then
if [[ ! -z "$SKIP_INSTALL" ]]; then
echo "Skipping install"
push_unpack_tarred_headers $KERNELHDRS; do_cleanup; all_done_banner; exit 0; fi

tar -xvf $KERNELHDRS -C $OUT_TMP/ > /dev/null
Expand All @@ -170,7 +172,8 @@ if [ ! -z "$KERNELSRC" ]; then
$spath/bcc/build-kheaders-targz.sh ${KERNELSRC} $TDIR_ABS/kh.tgz > /dev/null

# Is header update the only thing left to do?
if [[ -z "$PACKAGES" ]] && [[ -z "$BUILD_IMAGE" ]] && [[ -z "$TARF" ]]; then
if [[ ! -z "$SKIP_INSTALL" ]]; then
echo "Skipping install"
push_unpack_headers; do_cleanup; all_done_banner; exit 0; fi

mkdir $OUT_TMP/kernel-headers
Expand Down
2 changes: 1 addition & 1 deletion utils/banners
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ usage() {
echo ""
echo " --bcc Build and install BCC from source"
echo " --kernelsrc Extract kernel headers for BCC from here"
echo " (use if BCC couldn't find headers on device)"
echo " --skip-install Pass this along if only header install is needed"
echo ""
echo " --tempdir Use a specific temporary directory for build operation"
echo " --buildtar Local directory to store tarball of androdeb env from device"
Expand Down

0 comments on commit 1171d2d

Please sign in to comment.