forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lkl: Android ARM (arm/arm64) support
Initial attempt to run an application with hijack library on Android platform. Tested mostly on Android 6.x and 7.x. The build process assumes that the android ndk toolchain is installed in a host system as circle.yml does in its test. arm32 build uses alternate linker, stored in tools/lkl/bin directory, in order to avoid the link issue (issue torvalds#59). The CircleCI test infrastructure requires to use ubuntu 14.04 for this test. * Limitations - aarch64 isn't tested on circleci due to difficulties on aarch64 emulator. - bionic libc on android-24 emulator (arm32) doesn't call destructor, so some of tests in hijack-test.sh fail. - net.sh doesn't properly test network related issue. Fixes torvalds#59. Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
- Loading branch information
Showing
17 changed files
with
114 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef _ASM_LKL_SWAB_H | ||
#define _ASM_LKL_SWAB_H | ||
|
||
#ifndef __arch_swab32 | ||
#define __arch_swab32(x) ___constant_swab32(x) | ||
#endif | ||
|
||
#include <asm-generic/swab.h> | ||
|
||
#endif /* _ASM_LKL_SWAB_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
arm-linux-androideabi-ld.gold |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/system/bin/sh | ||
|
||
set -e | ||
|
||
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) | ||
export PATH=${script_dir}:${PATH} | ||
export LKL_ANDROID_TEST=1 | ||
export TMPDIR=/data/local/tmp | ||
export CONFIG_AUTO_LKL_POSIX_HOST=y | ||
|
||
sed -i "s/\/bin\/bash/\/system\/bin\/sh /" ${script_dir}/../bin/lkl-hijack.sh | ||
|
||
cd ${script_dir} | ||
boot -d ${script_dir}/disk.img -t ext4 | ||
sh -x ${script_dir}/hijack-test.sh | ||
sh ${script_dir}/net.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters