Skip to content
Snippets Groups Projects
  • Quang Luong's avatar
    4f11280e
    uml: initial revision · 4f11280e
    Quang Luong authored
    
    Added AndroidProducts.mk, which tells the build system to find the uml
    makefile at uml.mk.
    
    BoardConfig.mk specifies system.img to consist only of the /system
    partition instead of the root. With CONFIG_BLK_DEV_INITRD=y in the
    kernel, it is possible to boot from ramdisk.img and mount /data and
    /system during init. TARGET_USER_MODE_LINUX enables uml-specific cflags.
    TARGET_USES_64_BIT_BINDER is set to true due to UML not supporting
    running 32-bit binaries in 64-bit mode.
    
    Added fstab.uml to mount /data, /system, and the host filesystem
    as a partition named /host. Since adb does not work with uml yet, an
    already mounted hostfs makes it convenient to transfer files to the
    uml system.
    
    Added init.uml.rc, which tells init to mount the contents of fstab.uml
    during the fs stage.
    
    Added basic uml.mk to inherit minimal packages from embedded.mk and
    copy init.uml.rc, fstab.uml, and surfaceflinger.rc into the system.img.
    
    Failing service surfaceflinger has been disabled by the inclusion of a
    custom surfaceflinger.rc file, which simply has `disabled' appended to
    it.
    
    Added vendorsetup.sh to add lunch combo uml-userdebug
    
    In order to run UML for Android, you must have built the um kernel
    with Android configs. To do this, run these commands from the kernel
    repository:
    
    $ 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
    
    The output is an executable vmlinux binary.
    
    The command to run UML is:
    $ ./vmlinux initrd=ramdisk.img ubda=system.img ubdb=userdata.img
    androidboot.hardware=uml mem=256M umid=<umid>
    
    To halt the uml process, in another terminal, run `uml_mconsole <umid>'
    and supply the command `halt'.
    
    Test: manual
    
    Bug: 32523022
    Change-Id: I4a1cd6ceb42831a995bbefd3dd8a6ca3596d65ea
    Signed-off-by: default avatarQuang Luong <qal@google.com>
    4f11280e
    History
    uml: initial revision
    Quang Luong authored
    
    Added AndroidProducts.mk, which tells the build system to find the uml
    makefile at uml.mk.
    
    BoardConfig.mk specifies system.img to consist only of the /system
    partition instead of the root. With CONFIG_BLK_DEV_INITRD=y in the
    kernel, it is possible to boot from ramdisk.img and mount /data and
    /system during init. TARGET_USER_MODE_LINUX enables uml-specific cflags.
    TARGET_USES_64_BIT_BINDER is set to true due to UML not supporting
    running 32-bit binaries in 64-bit mode.
    
    Added fstab.uml to mount /data, /system, and the host filesystem
    as a partition named /host. Since adb does not work with uml yet, an
    already mounted hostfs makes it convenient to transfer files to the
    uml system.
    
    Added init.uml.rc, which tells init to mount the contents of fstab.uml
    during the fs stage.
    
    Added basic uml.mk to inherit minimal packages from embedded.mk and
    copy init.uml.rc, fstab.uml, and surfaceflinger.rc into the system.img.
    
    Failing service surfaceflinger has been disabled by the inclusion of a
    custom surfaceflinger.rc file, which simply has `disabled' appended to
    it.
    
    Added vendorsetup.sh to add lunch combo uml-userdebug
    
    In order to run UML for Android, you must have built the um kernel
    with Android configs. To do this, run these commands from the kernel
    repository:
    
    $ 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
    
    The output is an executable vmlinux binary.
    
    The command to run UML is:
    $ ./vmlinux initrd=ramdisk.img ubda=system.img ubdb=userdata.img
    androidboot.hardware=uml mem=256M umid=<umid>
    
    To halt the uml process, in another terminal, run `uml_mconsole <umid>'
    and supply the command `halt'.
    
    Test: manual
    
    Bug: 32523022
    Change-Id: I4a1cd6ceb42831a995bbefd3dd8a6ca3596d65ea
    Signed-off-by: default avatarQuang Luong <qal@google.com>