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

Re: [Xen-devel] Trying to boot on Arndale Board.



Hi,

I managed to boot Xen on the arndale board using the instructions provided on the wiki page. However, dom0 does not boot yet and i am also very interested in Anthony's patches for the dom0 kernel.
Besides applying Anthony's patch i did the following:

First of all xen needs to be compiled with a dtb file.
XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabi- CONFIG_DTB_FILE=/home/xxxx/xen-arndale/linux_stable/arch/arm/boot/exynos5250-arndale.dtb make dist-xen Providing one via uboot bootm gives me a panic("Not not enough space for xenheap\n"); during setup_mm.

Second Xen expects a cortex-a15 GIC, you need to patch the device tree for this: diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 6e6c7d1..afc5c3c 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -33,11 +33,16 @@
                gsc3 = &gsc_3;
        };

-       gic:interrupt-controller@10481000 {
-               compatible = "arm,cortex-a9-gic";
+       gic: interrupt-controller@10481000 {
+               compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
                #interrupt-cells = <3>;
+               #address-cells = <0>;
                interrupt-controller;
-               reg = <0x10481000 0x1000>, <0x10482000 0x2000>;
+               reg = <0x10481000 0x1000>,
+                       <0x10482000 0x1000>,
+                       <0x10484000 0x2000>,
+                       <0x10486000 0x2000>;
+               interrupts = <1 9 0xf04>;
        };

        combiner:interrupt-controller@10440000 {


Third i disabled CONFIG_ARM_APPENDED_DTB in the dom0. I am unsure if this is necessary. I also applied this little hack to make the kernel accept my device tree, but the kernel still panics further in the boot process. I'm sure there is a better solution but i will include it here anyway.

diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index bee7f9d..8e1c6f8 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -94,6 +94,11 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
                        mdesc_best = mdesc;
                        mdesc_score = score;
                }
+
+               //Hack
+               mdesc_best = mdesc;
+ early_print("Selected the following mdisc: %s\n",mdesc_best->name);
+
        }
        if (!mdesc_best) {
                const char *prop;



I hope this helps someone.

Best regards,
Jeroen


On 02/14/2013 06:03 PM, Anthony PERARD wrote:
On 14/02/13 15:09, Sander Bogaert wrote:
Hi,

I'm trying to get Xen working on the Arndale Board
Hi, thanks for trying :).

using these
instructions:
http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions/Arndale
Sorry, this wiki page is probably not complete yet.

When trying to build the Linux kernel from Linaro,
http://git.linaro.org/gitweb?p=people/ronynandy/linux_stable.git;a=shortlog;h=refs/heads/lue_arndale_3.7
(
configured as specified on the Xen wiki page ) I run into the following
error while compiling:

*drivers/xen/xenbus/xenbus_client.c: In function
'xenbus_map_ring_valloc_hvm':*
*drivers/xen/xenbus/xenbus_client.c:532:9: error: implicit declaration of
function 'page_to_section' [-Werror=implicit-function-declaration]*
*cc1: some warnings being treated as errors*
*make[3]: *** [drivers/xen/xenbus/xenbus_client.o] Error 1*

I was wondering if anyone else ran into this and if so how best to solve it.
Yes, I've got a patch for it:
diff --git a/drivers/xen/xenbus/xenbus_client.c
b/drivers/xen/xenbus/xenbus_client.c
index bcf3ba4..686142d 100644
--- a/drivers/xen/xenbus/xenbus_client.c
+++ b/drivers/xen/xenbus/xenbus_client.c
@@ -35,6 +35,7 @@
  #include <linux/spinlock.h>
  #include <linux/vmalloc.h>
  #include <linux/export.h>
+#include <linux/mm.h>
  #include <asm/xen/hypervisor.h>
  #include <asm/xen/page.h>
  #include <xen/interface/xen.h>


Booting Xen on the board hangs on "Turning on paging", is this related to
not having a dom0?
Should not be, there is many things printed by Xen before it is trying
to boot dom0, and it would say that it can not find a dom0.

*...*
*Startinrrrrrrrrrrrrrrrr- UART enabled -*
*- CPU 00000000 booting -*
*- Started in Hyp mode -*
*- Zero BSS -*
*- Setting up control registers -*
*- Turning on paging -*
All right, I've been able to reproduce the behaviour. Are you starting
Xen using the u-boot command "go"? Because this does not work with me.
It gave me some headache sometime ago. The command that works is "bootm
$xen_addr -"
So, I'm curious, how do you start Xen on the board?

Here is what env I have on u-boot:
ipaddr=10.y.y.y
ipconfig=10.y.y.y
kernel_addr_r=0x40007000
serverip=10.x.x.x
tftp_path=10.x.x.x:pxelinux.cfg
usbethaddr=00:40:5c:26:0a:5b
ethaddr=00:40:5c:26:0a:5b
xen_addr_r=0x50000000
bootcmd_load_linux=tftpboot 0x40007000 10.80.3.61:pxelinux.cfg/linux-zImage
boot_xen=run bootcmd_load_linux; tftpboot $xen_addr_r
$tftp_path/xen-uImage; bootm $xen_addr_r -
bootcmd=run boot_xen

with 10.y.y.y the ip addr of the board and 10.x.x.x the ip of a tftp
server (or PXE server).

By the way, I've pushed a new branch: arndale-2013-02-13 which fix few
things.

This should make you pass the "turning on paging" step.

After that, you will probably need few patches for Linux. I'll push them
later.

Have fun,



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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