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

[Xen-devel] [cubieboard2] Bringing up dom0



Hi All.

We have brought up the cubieboard2 from almost scratch, following are the steps done :


== u-boot ==

u-boot has been compiled using bleeding-edge mainline (ec5c4a8fd64a178a4d159917cda0aa176e5a9be5), via :

* make Cubieboard2_defconfig
* make ARCH=arm CROSS_COMPILE=/home/ajay/arm-toolchain-6.2/arm-linux-gnueabihf-

This gives us u-boot-sunxi-with-spl.bin



== kernel ==

kernel also has been compiled using bleeding-edge mainline (6d08b06e67cd117f6992c46611dfb4ce267cd71e) via :

* make clean
* make ARCH=arm sunxi_defconfig menuconfig

  In the menu, enabled following additional features :

  * General setup => System V IPC
  * General setup => POSIX Message Queues
  * Kernel features => Xen guest support on ARM


* make -j$(nproc) ARCH=arm CROSS_COMPILE=/home/ajay/arm-toolchain-6.2/arm-linux-gnueabihf- zImage
* make -j$(nproc) ARCH=arm CROSS_COMPILE=/home/ajay/arm-toolchain-6.2/arm-linux-gnueabihf- sun7i-a20-cubieboard2.dtb

This gives us zImage and sun7i-a20-cubieboard2.dtb.



== integration, and starting up ==

Followed the steps as per https://github.com/maronai/cubieboard/wiki/3.1.-Compiling-mainline-kernel-for-CubieBoard2-and-CubieTruck, but with following differences :

a)
Used u-boot-sunxi-with-spl.bin, zImage, sun7i-a20-cubieboard2.dtb from above steps.

b)
Used (and compiled to boot.scr) the following boot.cmd :

fatload mmc 0 0x46000000 zImage
fatload mmc 0 0x49000000 sun7i-a20-cubieboard2.dtb
setenv bootargs console=ttyS0,115200 rw root=/dev/mmcblk0p2
bootz 0x46000000 - 0x49000000

c)
Extracted debian-wheezy-7.5-armhf.com-20140603.tar to the rootfs partition on the sd-card.

d)
Finally, inserted the sdcard in cubieboard2, following are the brief bootup logs :

##################################################################
U-Boot SPL 2018.05-rc2-00118-gec5c4a8 (Apr 28 2018 - 08:40:48 +0530)           
DRAM: 1024 MiB                                                                 
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2                                           
Trying to boot from MMC1                                                       
                                                                               
                                                                               
U-Boot 2018.05-rc2-00118-gec5c4a8 (Apr 28 2018 - 08:40:48 +0530) Allwinner Techy
                                                                               
CPU:   Allwinner A20 (SUN7I)                                                   
Model: Cubietech Cubieboard2                                                   
I2C:   ready                                                                   
DRAM:  1 GiB                                                                   
MMC:   SUNXI SD/MMC: 0                                                         
Loading Environment from FAT... *** Warning - bad CRC, using default environment
                                                                               
Failed (-5)                                                                    
In:    serial                                                                  
Out:   serial                                                                  
Err:   serial                                                                  
SCSI:  SATA link 0 timeout.                                                    
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode                      
flags: ncq stag pm led clo only pmp pio slum part ccc apst                     
Net:   eth0: ethernet@01c50000                                                 
starting USB...                                                                
USB0:   USB EHCI 1.00                                                          
USB1:   USB OHCI 1.0                                                           
USB2:   USB EHCI 1.00                                                          
USB3:   USB OHCI 1.0                                                           
scanning bus 0 for devices... 1 USB Device(s) found                            
scanning bus 2 for devices... 1 USB Device(s) found                            
       scanning usb for storage devices... 0 Storage Device(s) found           
Hit any key to stop autoboot:  0                                               
switch to partitions #0, OK                                                    
mmc0 is current device                                                         
Scanning mmc 0:1...                                                            
Found U-Boot script /boot.scr                                                  
245 bytes read in 12 ms (19.5 KiB/s)                                           
## Executing script at 43100000                                                
4076736 bytes read in 247 ms (15.7 MiB/s)                                      
26147 bytes read in 24 ms (1 MiB/s)                                            
## Flattened Device Tree blob at 49000000                                      
   Booting using the fdt blob at 0x49000000                                    
   Loading Device Tree to 49ff6000, end 49fff622 ... OK                        
                                                                               
Starting kernel ...                                                            
                                                                               
[    0.000000] Booting Linux on physical CPU 0x0                               
[    0.000000] Linux version 4.17.0-rc2 (ajay@latitude-3480) (gcc version 6.2.18
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d 
[    0.000000] CPU: div instructions available: patching division code         
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructie
[    0.000000] OF: fdt: Machine model: Cubietech Cubieboard2                   
[    0.000000] Memory policy: Data cache writealloc                            
[    0.000000] cma: Reserved 16 MiB at 0x7f000000                              
[    0.000000] psci: probing for conduit method from DT.                       
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT                      
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x3fc wit0
[    0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s34764 r8192 d22580 u6556
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260608   
[    0.000000] Kernel command line: console=ttyS0,115200 rw root=/dev/mmcblk0p2
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)  
[    0.000000] Memory: 1013064K/1048576K available (6144K kernel code, 427K rwd)
[    0.000000] Virtual kernel memory layout:                                   
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)               
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)               
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)               
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)               
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)               
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)               
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (7136 kB)               
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)               
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 428 kB)               
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 250 kB)               
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1      
[    0.000000] Hierarchical RCU implementation. 
##################################################################

Board came up, and we then sshed onto the board.



== getting xen ready ==

i)
Compiled xen on cubieboard itself, via :

   * git clone git://xenbits.xen.org/xen.git
   * cd xen
.  * ./configure --libdir=/usr/lib
   * make debball CONFIG_EARLY_PRINTK=sun7i -j4
   * sudo dpkg -i dist/xen-upstream-4.11-unstable.deb
   * sudo reboot

ii)
Upon reboot, "sudo xl list" gives following :

##################################################################
debian@debian-armhf:~$ sudo  xl list
[sudo] password for debian:
xencall: error: Could not obtain handle on privileged command interface: No such file or directory
libxl: error: libxl.c:102:libxl_ctx_alloc: cannot open libxc handle: No such file or directory
cannot init xl context
##################################################################
  


Now, we want to bring up the dom0 for xen.
I have gone through https://xenbits.xen.org/docs/unstable/misc/arm/device-tree/booting.txt, but am not sure what exact changes are needed.

As mentioned somewhere at the last in the link, we would prefer if no changes in uboot are required, and the dom0-bootup can be achieved by only changing the dt(s/b) file at https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts

Will be grateful for help.


Thanks and Regards,
Ajay
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.