mirage / xen-arm-builder

Archived - the Xen and ARM support in MirageOS has been superseeded by our PVH support - Build an SDcard image for Xen/ARM, for a Cubieboard
ISC License
57 stars 36 forks source link

[Xen on Cubietruck] Not able to boot linux on virtual CPU #64

Closed samsunghoteltv closed 8 years ago

samsunghoteltv commented 8 years ago

I have the Cubietruck board. I followed all the instructions given at ..... I even tried with SD image given at that website. Xen linux boot up on the board. I create the config file for 2 vcpu by using make_linux_guest.....sh. But when I launch xen to boot linux on those vcpus; the boot-up screen hangs at the end of below log. Please let me know what I need to do to see the login screen on linux on vcpu. Thanks.

talex5 commented 8 years ago

I don't see a log here. Is it similar to the one in #63?

samsunghoteltv commented 8 years ago

Below is my boot log and I could not see the login command line.

mirage@cubietruck:~$ sudo xl create -c linux-guest-1.conf Parsing config from linux-guest-1.conf [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 3.16.0-00124-g6b6dcc2-dirty (arm-builder@blobs.openmirage.org-ubuntu) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #1782 SMP Tue Jun 16 00:47:09 UTC 2015 [ 0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine model: XENVM-4.4 [ 0.000000] cma: CMA: reserved 64 MiB at 8c000000 [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: Using PSCI v0.1 Function IDs from DT [ 0.000000] PERCPU: Embedded 8 pages/cpu @cbdce000 s8832 r8192 d15744 u32768 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024 [ 0.000000] Kernel command line: console=hvc0 xencons=tty root=/dev/xvda [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Memory: 182684K/262144K available (7009K kernel code, 843K rwdata, 2696K rodata, 588K init, 317K bss, 79460K reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xffe00000 (2048 kB) [ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB) [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0208000 - 0xc0b82934 (9707 kB) [ 0.000000] .init : 0xc0b83000 - 0xc0c16280 ( 589 kB) [ 0.000000] .data : 0xc0c18000 - 0xc0ceace0 ( 844 kB) [ 0.000000] .bss : 0xc0ceace8 - 0xc0d3a490 ( 318 kB) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] Architected cp15 timer(s) running at 24.00MHz (virt). [ 0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 2863311519744ns [ 0.000016] Switching to timer-based delay loop [ 0.000169] Console: colour dummy device 80x30 [ 0.000201] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.000218] pid_max: default: 32768 minimum: 301 [ 0.000355] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000367] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000939] CPU: Testing write buffer coherency: ok [ 0.001272] /cpus/cpu@0 missing clock-frequency property [ 0.001296] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.001372] Xen 4.4 support found, events_irq=31 gnttab_frame=0xb0000000 [ 0.001410] Please upgrade your Xen. [ 0.001410] If your platform has any non-coherent DMA devices, they won't work properly. [ 0.001498] xen:grant_table: Grant tables using version 1 layout [ 0.001551] Grant table initialized [ 0.001654] xen:events: Using FIFO-based ABI [ 0.001690] Xen: initializing cpu0 [ 0.001871] Setting up static identity map for 0x808a59f8 - 0x808a5a90 [ 0.003041] Brought up 1 CPUs [ 0.003058] SMP: Total of 1 processors activated. [ 0.003065] CPU: All CPU(s) started in SVC mode. [ 0.003629] devtmpfs: initialized [ 0.004511] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4 [ 0.004993] pinctrl core: initialized pinctrl subsystem [ 0.005510] regulator-dummy: no parameters [ 0.008689] NET: Registered protocol family 16 [ 0.010610] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.015932] No ATAGs? [ 0.016761] Serial: AMBA PL011 UART driver [ 0.032677] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot [ 0.032715] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5 [ 0.032870] xen:balloon: Initialising balloon driver [ 0.039948] xen_balloon: Initialising balloon driver [ 0.041760] vgaarb: loaded [ 0.042677] SCSI subsystem initialized [ 0.043664] usbcore: registered new interface driver usbfs [ 0.043749] usbcore: registered new interface driver hub [ 0.044061] usbcore: registered new device driver usb [ 0.044725] Linux video capture interface: v2.00 [ 0.044793] pps_core: LinuxPPS API ver. 1 registered [ 0.044801] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 0.044831] PTP clock support registered [ 0.044926] EDAC MC: Ver: 3.0.0 [ 0.046615] Advanced Linux Sound Architecture Driver Initialized. [ 0.048241] Switched to clocksource arch_sys_counter [ 0.064402] NET: Registered protocol family 2 [ 0.065222] TCP established hash table entries: 2048 (order: 1, 8192 bytes) [ 0.065272] TCP bind hash table entries: 2048 (order: 2, 16384 bytes) [ 0.065310] TCP: Hash tables configured (established 2048 bind 2048) [ 0.065375] TCP: reno registered [ 0.065392] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.065431] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.065663] NET: Registered protocol family 1 [ 0.066093] RPC: Registered named UNIX socket transport module. [ 0.066111] RPC: Registered udp transport module. [ 0.066118] RPC: Registered tcp transport module. [ 0.066125] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.067977] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.080415] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.081353] NFS: Registering the id_resolver key type [ 0.081427] Key type id_resolver registered [ 0.081436] Key type id_legacy registered [ 0.081519] msgmni has been set to 484 [ 0.082446] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249) [ 0.082475] io scheduler noop registered [ 0.082490] io scheduler deadline registered [ 0.082701] io scheduler cfq registered (default) [ 0.086069] xen:xen_evtchn: Event-channel device installed [ 0.162721] console [hvc0] enabled [ 0.162846] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.165138] Serial: IMX driver [ 0.165377] msm_serial: driver initialized [ 0.165582] STMicroelectronics ASC driver initialized [ 0.166052] serial: Freescale lpuart driver [ 0.166252] [drm] Initialized drm 1.1.0 20060810 [ 0.171823] loop: module loaded [ 0.190594] blktap_device_init: blktap device major 254 [ 0.190642] blktap_ring_init: blktap ring major: 240 [ 0.208637] tun: Universal TUN/TAP device driver, 1.6 [ 0.208678] tun: (C) 1999-2004 Max Krasnyansky maxk@qualcomm.com [ 0.210685] xen_netfront: Initialising Xen virtual ethernet driver [ 0.215158] blkfront: xvda: barrier or flush: disabled; persistent grants: enabled; indirect descriptors: enabled; [ 0.222765] xvda: unknown partition table [ 0.225949] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver [ 0.226091] usbcore: registered new interface driver pegasus [ 0.226224] usbcore: registered new interface driver asix [ 0.226343] usbcore: registered new interface driver ax88179_178a [ 0.226451] usbcore: registered new interface driver cdc_ether [ 0.226560] usbcore: registered new interface driver smsc75xx [ 0.226663] usbcore: registered new interface driver smsc95xx [ 0.226819] usbcore: registered new interface driver net1080 [ 0.226925] usbcore: registered new interface driver cdc_subset [ 0.227000] usbcore: registered new interface driver zaurus [ 0.227133] usbcore: registered new interface driver cdc_ncm [ 0.227193] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.227221] ehci-pci: EHCI PCI platform driver [ 0.227331] ehci-platform: EHCI generic platform driver [ 0.227516] ehci-omap: OMAP-EHCI Host Controller driver [ 0.227627] ehci-orion: EHCI orion driver [ 0.227714] SPEAr-ehci: EHCI SPEAr driver [ 0.227804] tegra-ehci: Tegra EHCI driver [ 0.228407] usbcore: registered new interface driver usb-storage [ 0.363895] mousedev: PS/2 mouse device common for all mice [ 0.366158] i2c /dev entries driver [ 0.366784] usbcore: registered new interface driver uvcvideo [ 0.366837] USB Video Class driver (1.1.1) [ 0.366868] gspca_main: v2.14.0 registered [ 0.369913] device-mapper: uevent: version 1.0.3 [ 0.371181] Setting capacity to 8388608 [ 0.371278] xvda: detected capacity change from 0 to 4294967296 [ 0.371551] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: dm-devel@redhat.com [ 0.373538] sdhci: Secure Digital Host Controller Interface driver [ 0.373618] sdhci: Copyright(c) Pierre Ossman [ 0.374128] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.374683] usbcore: registered new interface driver usbhid [ 0.374733] usbhid: USB HID core driver [ 0.374842] usbcore: registered new interface driver r8188eu [ 0.379124] nf_conntrack version 0.5.0 (3878 buckets, 15512 max) [ 0.380163] ip_tables: (C) 2000-2006 Netfilter Core Team [ 0.380378] TCP: cubic registered [ 0.380426] NET: Registered protocol family 17 [ 0.380777] Key type dns_resolver registered [ 0.380962] ThumbEE CPU extension supported. [ 0.381013] Registering SWP/SWPB emulation handler [ 0.479075] drivers/rtc/hctosys.c: unable to open rtc device (rtc0) [ 0.479323] ALSA device list: [ 0.479360] No soundcards found. [ 0.482200] EXT4-fs (xvda): couldn't mount as ext3 due to feature incompatibilities [ 0.484018] EXT4-fs (xvda): couldn't mount as ext2 due to feature incompatibilities [ 0.519219] EXT4-fs (xvda): mounted filesystem with ordered data mode. Opts: (null) [ 0.519351] VFS: Mounted root (ext4 filesystem) readonly on device 202:0. [ 0.531254] devtmpfs: mounted [ 0.531962] Freeing unused kernel memory: 588K (c0b83000 - c0c16000) Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory [ 1.157544] random: init urandom read with 18 bits of entropy available [ 1.556890] init: plymouth-upstart-bridge main process (41) terminated with status 1 [ 1.557111] init: plymouth-upstart-bridge main process ended, respawning [ 1.599467] init: plymouth-upstart-bridge main process (54) terminated with status 1 [ 1.599642] init: plymouth-upstart-bridge main process ended, respawning [ 1.622858] init: plymouth-upstart-bridge main process (57) terminated with status 1 [ 1.623053] init: plymouth-upstart-bridge main process ended, respawning [ 1.712897] init: ureadahead main process (44) terminated with status 5

talex5 commented 8 years ago

Try editing the linux-guest-1.conf file to change the kernel args to give you a shell (e.g. add init=/bin/sh) then debug from there...

samsunghoteltv commented 8 years ago

@talex5 After adding init = "/bin/sh" or "/bin/bash" in linux-guest-1.conf, I can find the domainU kernel message using dmesg command;

[ 0.427635] blkfront: xvda: barrier or flush: disabled; persistent grants: enabled; indirect descriptors: enabled; [ 0.435774] xvda: unknown partition table [ 0.516882] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

My testing step is below :

  1. Download http://blobs.openmirage.org/cubietruck.tar (CubieTruck)
  2. Run dd if=cubietruck.img of=/dev/sdb
  3. Power on the cubietruck board
  4. Run/root/scripts/install_libvirst.sh
  5. Run /root/scripts/make_linux_guest.sh
  6. Run xl create -c linux-guest-1.conf

If your curbietruck board is working, then could share the full fs and boot image?

talex5 commented 8 years ago

It sounds like it's working. You have a shell and the root filesystem is mounted, right? Try bringing up networking next (as for any normal Linux system).

samsunghoteltv commented 8 years ago

@talex5 Great!, I though that I could see login command line directly in same terminal, but I`s wrong. And now, I can access domU using ssh. Thanks~

I have some questions more. How to know the guest OS `s IP address with setting the DHCP? I could not know it without setting the static IP address (e.g. vif = [ "ip= xxx.xxx.xxx.xxx"]

Regards, John

mor1 commented 8 years ago

Hi @samsunghoteltv

http://wiki.xen.org/wiki/Xen_FAQ_Networking#I_want_to_know_the_IP_of_a_running_VM_in_XEN._Is_there_any_way_to_have_this_without_login_to_that_VM.3F looks like it might be relevant.

(Or, if you can login to the guest OS, just run ifconfig I guess.)