diff options
author | Quang Luong <qal@google.com> | 2017-07-31 17:09:42 -0700 |
---|---|---|
committer | Quang Luong <qal@google.com> | 2017-08-03 13:31:35 -0700 |
commit | b04b7944381228cd1c661438cd5ffd174fe80c89 (patch) | |
tree | 8168eef7bc443350a2c510da94bd1cd393cbbb61 /uml.mk | |
parent | 4f11280e3d70728fba24e572428e559b7b6f8093 (diff) | |
download | device_generic_uml-b04b7944381228cd1c661438cd5ffd174fe80c89.tar.gz device_generic_uml-b04b7944381228cd1c661438cd5ffd174fe80c89.tar.bz2 device_generic_uml-b04b7944381228cd1c661438cd5ffd174fe80c89.zip |
uml: add adb support, add eth0 script sepolicies
After running UML, it is now possible to connect with adb using
$ adb connect 192.168.0.253
Added init.eth0.sh script to configure tuntap connection to host.
Modified init.uml.rc to run init.eth0.sh on boot.
Added SELinux rules for init.eth0.sh to run during init.
=== To run ===
Install UML utilities
$ sudo apt-get install uml-utilities
$ sudo mv /usr/lib/uml/uml_net /usr/bin/uml_net
$ sudo chmod +x /usr/bin/uml_net
Compile UML userspace
$ . build/envsetup.sh
$ lunch uml-userdebug
$ make -j40
Compile UML Kernel on Android-4.9 branch
$ ARCH=um SUBARCH=x86_64 scripts/kconfig/merge_config.sh
arch/um/configs/x86_64_defconfig kernel/configs/android-base.config
kernel/configs/android-recommended.config
$ make ARCH=um SUBARCH=x86_64 CROSS_COMPILE= -j40
Run UML:
$ ./vmlinux initrd=ramdisk.img ubda=system.img ubdb=userdata.img \
androidboot.hardware=uml mem=256M umid=uml eth0=tuntap,,,192.168.0.254
Connect with adb:
$ adb connect 192.168.0.253
Test: manual
Bug: 32523022
Change-Id: Iaafc0aa701ff7d777226168a078c0a3712a3e6b8
Signed-off-by: Quang Luong <qal@google.com>
Diffstat (limited to 'uml.mk')
-rw-r--r-- | uml.mk | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -27,3 +27,4 @@ PRODUCT_CHARACTERISTICS := nosdcard PRODUCT_COPY_FILES += $(LOCAL_PATH)/fstab.uml:root/fstab.uml PRODUCT_COPY_FILES += $(LOCAL_PATH)/init.uml.rc:root/init.uml.rc PRODUCT_COPY_FILES += $(LOCAL_PATH)/surfaceflinger.rc:system/etc/init/surfaceflinger.rc +PRODUCT_COPY_FILES += $(LOCAL_PATH)/init.eth0.sh:system/bin/init.eth0.sh |