[KVM-ARM] Question of installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jui-hao,

Please see my ideas below. As Chris pointed out, I am trying to run the
current ARMv6 code based on qemu. Once I finished I will post them on the
project wiki. Stay tuned ...

(I CCed this to the project mailing list for others who are experiencing the
similar problems and also for those who want to add more to the explanation
...)

-Yifan


On Tue, Oct 26, 2010 at 11:49 PM, Jui-Hao Chiang <juihaochiang at gmail.com>wrote:

> Hi, Yifan:
>
> This is Jui-Hao Chiang, student from Stony Brook University, USA.
> As for the kvm-arm installation, I have read your article on the forum
> list.
> But I still have some problem about booting the emulator.
> The following is my installation step, and question is inlined in step 8
> and 10
>
> Hope you can share the difference between your steps and mine.
> Many Thanks,
> Jui-Hao
>
>
> InstallationBased on
> https://wiki.ncl.cs.columbia.edu/wiki/AndroidVirt:Guides:Development_Environment#Repositories
>
>    1. Get Android SDK Release 1.0 r2 from
>    http://developer.android.com/sdk/older_releases.html
>    2. Install Sourcery G++ (Installer but not TAR package) from
>    http://www.codesourcery.com/sgpp/lite/arm/portal/package6490/public/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi.bin
>    3. Clone all sources (under ~/kvmarm/) with ?git clone git://
>    git.ncl.cs.columbia.edu/pub/git/? including
>       1. linux-kvm-arm: A standard Linux kernel tree with a KVM branch
>       from v2.6.27
>       2. linux-android-common: The common Android kernel tree with a KVM
>       branch based on linux-kvm-arm
>       3. linux-android-msm: The MSM processer version of the Android
>       kernel tree with a KVM branch based on linux-kvm-arm
>       4. linux-guest: A standard Linux kernel tree with
>       lightweight-paravirtualization patches on the v2.6.17-lpv branch
>       5. qemu: A standard QEMU tree with KVM for ARM patches
>       6. android-extra: Other scripts, tools and binaries useful for
>       developers on this project
>    4. cd linux-android-common; git checkout -b
>    android-goldfish-2.6.27-kvm-upstream_qemu --track
>    origin/android-goldfish-2.6.27-kvm-upstream_qemu (instead of
>    android-goldfish-2.6.27-kvm)
>       1. follow the recommandation from
>       https://lists.cs.columbia.edu/pipermail/android-virt/2010-September/000151.html
>    5. ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make
>    goldfish_defconfig
>    6. ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make menuconfig
>    7. ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make zImage
>    8. Now compile the complete Android system (cd android; make) (does
>    this refer to Android SDK 1.0 r2? the android SDK does not contain Makefile)
>
> Just grab the prebuit android sdk package from android site and use the
emulator and disk images there. The version I used is 1.5 cupcake.

>
>    1.
>    2. Add the android-extra/scripts (see #Repositories) directory to your
>    path and edit a few of the files:
>       1. Modify the android-extra/scripts/configure-qemu.sh to match with
>       your paths for the kernel and the zlib. (You can find the zlib in
>       android-extra/bin).
>       2. Modify the android-extra/scripts/android-emulator.sh and
>       android-emulator-monitor.sh scripts to point to the right locations. Note
>       the the paths beginning with ~/src/android is the android directory from
>       above and the paths beginning with ~/sdk must point to a downloaded version
>       of the Android 1.0 SDK (not a newer version).
>    3. run emulator (android-emulator.sh) full_log
>
>
>    - ### WARNING: Another emulator is running with our data file
>
> You were probably running another android emulator when you tried to run
this one.

>
>    - ### WARNING: User data changes will NOT be saved!
>       - Uncompressing
>       Linux.........................................................................................
>       done, booting the kernel.
>       - Linux version 2.6.27-00113-g85b5289 (windtracekimo at Wine-desktop)
>       (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #1 Tue Oct 26 19:35:21
>       CST 2010
>       - CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00003137
>       - Machine: Goldfish
>       - Memory policy: ECC disabled, Data cache writeback
>       - CPU0: D VIVT write-through cache
>       - CPU0: I cache: 4096 bytes, associativity 4, 32 byte lines, 32 sets
>       - CPU0: D cache: 65536 bytes, associativity 4, 32 byte lines, 512
>       sets
>       - Built 1 zonelists in Zone order, mobility grouping on.  Total
>       pages: 24384
>       - Kernel command line: qemu=1 console=ttyS0 android.checkjni=1
>       android.qemud=ttyS1 android.ndns=2
>       - Unknown boot option `android.checkjni=1': ignoring
>       - Unknown boot option `android.qemud=ttyS1': ignoring
>       - Unknown boot option `android.ndns=2': ignoring
>       - PID hash table entries: 512 (order: 9, 2048 bytes)
>       - Console: colour dummy device 80x30
>       - Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
>       - Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
>       - Memory: 96MB = 96MB total
>       - Memory: 93924KB available (2528K code, 642K data, 100K init)
>       - Calibrating delay loop... 1045.29 BogoMIPS (lpj=5226496)
>       - Mount-cache hash table entries: 512
>       - CPU: Testing write buffer coherency: ok
>       - net_namespace: 288 bytes
>       - NET: Registered protocol family 16
>       - NET: Registered protocol family 2
>       - IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
>       - TCP established hash table entries: 4096 (order: 3, 32768 bytes)
>       - TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
>       - TCP: Hash tables configured (established 4096 bind 4096)
>       - TCP reno registered
>       - NET: Registered protocol family 1
>       - checking if image is initramfs... it is
>       - Freeing initrd memory: 133K
>       - goldfish_new_pdev goldfish_interrupt_controller at ff000000 irq -1
>       - goldfish_new_pdev goldfish_device_bus at ff001000 irq 1
>       - goldfish_new_pdev goldfish_timer at ff003000 irq 3
>       - goldfish_new_pdev goldfish_rtc at ff010000 irq 10
>       - goldfish_new_pdev goldfish_tty at ff002000 irq 4
>       - goldfish_new_pdev goldfish_tty at ff011000 irq 11
>       - goldfish_new_pdev smc91x at ff012000 irq 12
>       - goldfish_new_pdev goldfish_fb at ff013000 irq 13
>       - goldfish_new_pdev goldfish_audio at ff004000 irq 14
>       - goldfish_new_pdev goldfish_memlog at ff006000 irq -1
>       - goldfish_new_pdev goldfish-battery at ff014000 irq 15
>       - goldfish_new_pdev goldfish_events at ff015000 irq 16
>       - goldfish_new_pdev goldfish_nand at ff016000 irq -1
>       - goldfish_new_pdev goldfish-switch at ff017000 irq 17
>       - goldfish_new_pdev goldfish-switch at ff018000 irq 18
>       - ashmem: initialized
>       - Installing knfsd (copyright (C) 1996 okir at monad.swb.de).
>       - yaffs Oct 26 2010 19:33:45 Installing.
>       - msgmni has been set to 183
>       - io scheduler noop registered
>       - io scheduler anticipatory registered (default)
>       - io scheduler deadline registered
>       - io scheduler cfq registered
>       - goldfish_pdev_worker registered goldfish-switch
>       - goldfish_pdev_worker registered goldfish-switch
>       - goldfish_pdev_worker registered goldfish_nand
>       - goldfish_pdev_worker registered goldfish_events
>       - goldfish_pdev_worker registered goldfish-battery
>       - goldfish_pdev_worker registered goldfish_memlog
>       - goldfish_audio_probe
>       - goldfish_pdev_worker registered goldfish_audio
>       - goldfish_pdev_worker registered goldfish_fb
>       - goldfish_pdev_worker registered smc91x
>       - goldfish_pdev_worker registered goldfish_tty
>       - goldfish_pdev_worker registered goldfish_tty
>       - goldfish_pdev_worker registered goldfish_rtc
>       - goldfish_pdev_worker registered goldfish_timer
>       - goldfish_pdev_worker registered goldfish_device_bus
>       - goldfish_pdev_worker registered goldfish_interrupt_controller
>       - allocating frame buffer 320 * 480, got ffc10000
>       - Console: switching to colour frame buffer device 40x30
>       - console [ttyS0] enabled
>       - brd: module loaded
>       - loop: module loaded
>       - nbd: registered device at major 43
>       - logger: created 64K log 'log_main'
>       - logger: created 256K log 'log_events'
>       - logger: created 64K log 'log_radio'
>       - smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico at cam.org>
>       - No set_type function for IRQ 12 (goldfish)
>       - eth0: SMC91C11xFD (rev 1) at c6800000 IRQ 12 [nowait]
>       - eth0: Ethernet addr: 52:54:00:12:34:56
>       - goldfish nand dev0: size 4000000, page 2048, extra 64, erase
>       131072
>       - goldfish nand dev1: size 4000000, page 2048, extra 64, erase
>       131072
>       - goldfish nand dev2: size 4000000, page 2048, extra 64, erase
>       131072
>       - mice: PS/2 mouse device common for all mice
>       - *** events probe ***
>       - events_probe() addr=0xc6804000 irq=16
>       - events_probe() keymap=qwerty2
>       - input: qwerty2 as /devices/virtual/input/input0
>       - goldfish_rtc goldfish_rtc: rtc core: registered goldfish_rtc as
>       rtc0
>       - IPv4 over IPv4 tunneling driver
>       - GRE over IPv4 tunneling driver
>       - TCP cubic registered
>       - NET: Registered protocol family 17
>       - RPC: Registered udp transport module.
>       - RPC: Registered tcp transport module.
>       - 802.1Q VLAN Support v1.8 Ben Greear <greearb at candelatech.com>
>       - All bugs added by David S. Miller <davem at redhat.com>
>       - VFP support v0.3: implementor 41 architecture 1 part 10 variant 9
>       rev 0
>       - goldfish_rtc goldfish_rtc: setting system clock to 2010-10-27
>       02:45:53 UTC (1288147553)
>       - Freeing init memory: 100K
>       - init: cannot open '/initlogo.rle'
>       - init: Unable to open persistent property directory /data/property
>       errno: 2
>       - init: cannot find '/system/bin/sh', disabling 'console'
>       - init: cannot find '/system/bin/servicemanager', disabling
>       'servicemanager'
>       - init: cannot find '/system/bin/mountd', disabling 'mountd'
>       - init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
>       - init: cannot find '/system/bin/rild', disabling 'ril-daemon'
>       - init: cannot find '/system/bin/app_process', disabling 'zygote'
>       - init: cannot find '/system/bin/mediaserver', disabling 'media'
>       - init: cannot find '/system/bin/playmp3', disabling 'bootsound'
>       - init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
>       - init: cannot find '/system/bin/installd', disabling 'installd'
>       - init: cannot find '/system/bin/flash_image', disabling
>       'flash_recovery'
>       - init: cannot find '/system/etc/init.goldfish.sh', disabling
>       'goldfish-setup'
>       - init: cannot find '/system/bin/qemud', disabling 'qemud'
>       - init: cannot find '/system/bin/logcat', disabling
>       'goldfish-logcat'
>
> I am not sure what's going on here, since I don't know how android emulator
is implemented and what are put in the root file system. Maybe the "error"
messages you saw do not matter. Anyway, you do not bother to build the whole
android system or sdk if you only want to try the androidVirt code. Just use
the prebuilt emulator and disk images. Here are the branches I tried:

host kernel (directory "linux-android-common") - branch
"android-goldfish-2.6.27-kvm-upstream_qemu"
qemu on the emulated target (directory "qemu") - branch "armkvm-upstream"
guest kernel (directory "linux-guest") - branch "v2.6.17-lpv"
You may also need to modify the file "configure-qemu.sh" in
android-extra/scripts before compiling the target qemu:
1. add "--disable-werror" to "OPT_FLAGS"
2. add "-I$KERNEL_DIR/include -I$KERNEL_DIR/arch/arm/include" to "CFLAGS"


>
>    -
>
>
>    1. export
>    PATH=$PATH:~/CodeSourcery/Sourcery_G++_Lite/bin/:~/kvmarm/android-extra/scripts/:~/android-sdk-linux_x86-1.0_r2/tools/
>
>    2. Once the Android build is complete, run the emulator on our own
>    custom kernel (I recommend using the -no-window option to see all of the
>    debug output from the android kernel): run android-emulator.sh
>    3. Configure and compile the QEMU/KVM userspace that will run inside
>    the simulator:
>
>
> $ cd qemu # (see #Repositories)
>
> $ git checkout -b armkvm --track origin/armkvm
>
> $ configure-qemu.sh # should be in your path from android-extra
>
> $ make
>
>    1. After qemu is built, we have to put qemu ?inside? the emulator's
>    filesystem:
>       1. $ adb push arm-softmmu/qemu-system-arm /data/. (adb fork-server
>       server will be run automatically, but got an error ==> error: device
>       not found)
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.cs.columbia.edu/pipermail/android-virt/attachments/20101027/6b216636/attachment-0001.html


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux