xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/8] xen/arm: very initial cubieboard2 support.
@ 2013-09-10 14:18 Ian Campbell
  2013-09-10 14:18 ` [PATCH RFC 1/8] xen/arm: Implement ioremap Ian Campbell
                   ` (8 more replies)
  0 siblings, 9 replies; 34+ messages in thread
From: Ian Campbell @ 2013-09-10 14:18 UTC (permalink / raw)
  To: xen-devel
  Cc: keir, Ian Campbell, stefano.stabellini, julien.grall, tim,
	jbuelich, Josh Zhao

The following patches are a very early set of cubieboard patches, based
on latest staging, eb786f709249666e1f7364706f94be1a6c4e04da

Several are not to be applied because they can be done better using
infrastructure from Julien's "Allow Xen to boot with a raw Device Tree"
patch. They are included for completeness.

With this I can boot up until dom0 panics due to lack of a root
filesystem. This is because upstream Linux currently lacks any useful
storage drivers (SATA, USB host, MMC). Hopefully this will resolve
itself soon!

The bulk of this is the hacking around of the ns16550 driver to support
ARM platforms and DTB.

It's currently a bit of a faff to get going. Hopefully the following is
helpful:

u-boot
======

https://github.com/linux-sunxi/u-boot-sunxi.git linux-sunxi/sunxi
commit e94cff93c273b0825bea135e0f559f5580156fa6

Plus git://git.linaro.org/people/aprzywara/u-boot.git hypmode_v4
commit 5068b337518617586f2e51b6d616c54dbec4fa62 

Plus patches for hypmode on sunxi and to initialise CNTFRQ.

All of which can be found in
     git://xenbits.xen.org/people/ianc/u-boot.git devel/cubieboard2

Built with:
     make Cubieboard2_FEL CROSS_COMPILE=arm-linux-gnueabihf-

Linux
=====

Linux tree:
https://github.com/mripard/linux.git sunxi/dt-for-3.12
commit 82abe5294aeadc42508c7944f3a9aec0eece214c

Using in tree DTS arch/arm/boot/dts/sun7i-a20-cubieboard2.dts with the
following patch.

Build Image and dtbs in the usual way

Xen
===

Build in the usual way.

Xen can use CONFIG_EARLY_PRINTK=sun7i.

Booting
=======

I am using FEL boot per http://linux-sunxi.org/FEL/USBBoot and
http://linux-sunxi.org/FEL using the fel-sdboot.sunxi on MMC
mechanism.

linux-sunxi tools from git://github.com/linux-sunxi/sunxi-tools.git
commit b398456630b310dbf31c7515e8d6af37903c4975 and:

./usb-boot ~/devel/u-boot.git/spl/u-boot-spl.bin ~/devel/u-boot.git/u-boot.bin \
           bootxen.scr ~/devel/xen.git/xen/xen \
	   ~/devel/linux.git/arch/arm/boot/dts/sun7i-a20-cubieboard2.dtb
	   ~/devel/linux.git/arch/arm/boot/zImage

bootxen.scr is:
$ cat bootxen
setenv bootargs dtuart=serial0 earlyprint loglvl=all conswitch=x
bootz 0x44000000 - 0x43000000
$ mkimage -T script -A arm -d bootxen bootxen.scr 

DTS patch
=========


diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
 31b76f0..6c0c387 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -18,6 +18,21 @@
 	model = "Cubietech Cubieboard2";
 	compatible = "cubietech,cubieboard2", "allwinner,sun7i-a20";
 
+	chosen {
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		module@0 {
+			compatible = "xen,linux-zimage", "xen,multiboot-module";
+			bootargs = "console=hvc0 earlyprintk ";
+			reg = <0x50000000 0x800000>;
+		};
+	};
+
+	aliases {
+		serial0 = &uart0;
+	};
+
 	soc@01c00000 {
 		pinctrl@01c20800 {
 			led_pins_cubieboard2: led_pins@0 {
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index f4e4524..bfc5dc2 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -26,11 +26,6 @@
 			reg = <0>;
 		};
 
-		cpu@1 {
-			compatible = "arm,cortex-a7";
-			device_type = "cpu";
-			reg = <1>;
-		};
 	};
 
 	memory {
@@ -55,6 +55,14 @@
 		};
 	};
 
+        timer {
+                compatible = "arm,armv7-timer";
+                interrupts = <1 13 0xf08>,
+                             <1 14 0xf08>,
+                             <1 11 0xf08>,
+                             <1 10 0xf08>;
+        };
+
 	soc@01c00000 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -94,17 +102,6 @@
 			};
 		};
 
-		timer@01c20c00 {
-			compatible = "allwinner,sun4i-timer";
-			reg = <0x01c20c00 0x90>;
-			interrupts = <0 22 1>,
-				     <0 23 1>,
-				     <0 24 1>,
-				     <0 25 1>,
-				     <0 67 1>,
-				     <0 68 1>;
-			clocks = <&osc24M>;
-		};
 
 		wdt: watchdog@01c20c90 {
 			compatible = "allwinner,sun4i-wdt";

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2013-09-13 13:44 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 14:18 [PATCH RFC 0/8] xen/arm: very initial cubieboard2 support Ian Campbell
2013-09-10 14:18 ` [PATCH RFC 1/8] xen/arm: Implement ioremap Ian Campbell
2013-09-10 15:03   ` Julien Grall
2013-09-10 15:14     ` Ian Campbell
2013-09-10 15:20       ` Julien Grall
2013-09-10 14:18 ` [PATCH RFC 2/8] xen/arm: implement read[bl] and write[bl] Ian Campbell
2013-09-10 15:00   ` Julien Grall
2013-09-10 15:09     ` Ian Campbell
2013-09-10 15:12       ` Julien Grall
2013-09-10 15:15         ` Ian Campbell
2013-09-10 14:18 ` [PATCH RFC 3/8] ns16550: make usable on ARM Ian Campbell
2013-09-10 14:36   ` Keir Fraser
2013-09-10 14:45     ` Ian Campbell
2013-09-10 15:00   ` Jan Beulich
2013-09-10 15:11     ` Ian Campbell
2013-09-10 15:18       ` Jan Beulich
2013-09-10 15:21         ` Ian Campbell
2013-09-10 14:18 ` [PATCH RFC 4/8] ns16550: support DesignWare 8250 Ian Campbell
2013-09-10 14:36   ` Keir Fraser
2013-09-10 15:02   ` Jan Beulich
2013-09-10 15:12     ` Ian Campbell
2013-09-10 15:19       ` Jan Beulich
2013-09-10 15:21         ` Ian Campbell
2013-09-10 15:28           ` Jan Beulich
2013-09-10 15:30             ` Ian Campbell
2013-09-10 14:18 ` [PATCH RFC 5/8] xen/arm: Support Cortex-A7 GIC Ian Campbell
2013-09-10 14:18 ` [PATCH RFC 6/8] xen/arm: Basic support for sunxi/sun7i platform Ian Campbell
2013-09-10 14:18 ` [PATCH RFC 7/8] xen/arm: Blacklist some sun7i UARTs Ian Campbell
2013-09-10 14:18 ` [PATCH RFC 8/8] xen/arm: Some early trap logging Ian Campbell
2013-09-13 13:26   ` Julien Grall
2013-09-13 13:35     ` Ian Campbell
2013-09-13 13:44       ` Julien Grall
2013-09-11  2:05 ` [PATCH RFC 0/8] xen/arm: very initial cubieboard2 support Josh Zhao
2013-09-11 10:15   ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).