diff options
| author | Changming Liu <charley.ashbringer@gmail.com> | 2020-10-30 19:27:06 -0400 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-10-31 10:07:41 +0100 |
| commit | 7928dd20b88207a7365cc2807b12f4ec891cddfe (patch) | |
| tree | db45e029d89247b73042e244eeacd8bfd2d2f4ca /tools | |
| parent | a72ed5b74114ecd508d31548ced7b2f829eb55cc (diff) | |
tools/create-image.sh: use the basename instead of hard-coded linux to point to the $KERNEL src
current script hard-coded the basename for the path of kernel source
if the basename of the path for the kernel source code is not "linux",
this script will just abort.
Fix this by using the basename obtained by the basename utility.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/create-image.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/create-image.sh b/tools/create-image.sh index 54c9685d9..5b92fd8f5 100755 --- a/tools/create-image.sh +++ b/tools/create-image.sh @@ -181,10 +181,11 @@ cat $RELEASE.id_rsa.pub | sudo tee $DIR/root/.ssh/authorized_keys # Add perf support if [ $PERF = "true" ]; then cp -r $KERNEL $DIR/tmp/ + BASENAME=$(basename $KERNEL) sudo chroot $DIR /bin/bash -c "apt-get update; apt-get install -y flex bison python-dev libelf-dev libunwind8-dev libaudit-dev libslang2-dev libperl-dev binutils-dev liblzma-dev libnuma-dev" - sudo chroot $DIR /bin/bash -c "cd /tmp/linux/tools/perf/; make" - sudo chroot $DIR /bin/bash -c "cp /tmp/linux/tools/perf/perf /usr/bin/" - rm -r $DIR/tmp/linux + sudo chroot $DIR /bin/bash -c "cd /tmp/$BASENAME/tools/perf/; make" + sudo chroot $DIR /bin/bash -c "cp /tmp/$BASENAME/tools/perf/perf /usr/bin/" + rm -r $DIR/tmp/$BASENAME fi # Add udev rules for custom drivers. |
