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

Re: [Xen-devel] Question about running Xen 4.4 on Arndale board



On Mon, Apr 14, 2014 at 9:31 AM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> On 04/14/2014 04:33 PM, HyonYoung Choi wrote:
>> Hello Julien,
>
>> I'm Hyonyoung Choi, working on Xen into Arndale-Octa board with Meng.
>>
>> I tried to recompiled xen with CONFIG_EARLY_PRINTK=exynos5250 as your
>> advice.
>>
>> The command line is like this:
>>
>> make distclean
>> export CONFIG_EARLY_PRINTK=exynos5250
>> make dist-xen XEN_TARGET_ARCH=arm32
>>
>> The result is nothing happened at all.
>> No additional message is printed.
>
> Sorry I misread the documentation, the UART port is not the same on the
> exynos5420. Can you try to apply the patch below and recompile xen (make
> clean make) with CONFIG_EARLY_PRINTK=exynos5420.
>
> Regards,
>
Hello HyonYoung,
Also, please note the typo for EARLY_PRINTK_BAUD. I guess Julien
missed a 0 at the end.

For the exynos5410, this is what I did with some expert guidance from
Julien and Ian Campbell. I shall document it here, as it might help
you too.

Changes in XEN (xen 4.4 stable) (first lets get XEN to boot and show
some output)
1. change: xen/arch/arm/platforms/exynos5.c structure:
exynos5_dt_compat[], and add âsamsung,exynos5410â in that list
   For you it might be "samsung,exynos5420" -> check your dtsi file.
2. Linux kernel exynos5410.dtsi (for you possibly exynos5420.dtsi)to
have the ARCH generic timer information. You might already have it.
timer {
 compatible = "arm,cortexÂa15Âtimer","arm,armv7Âtimer";
 interrupts = <1 13 0xf08>,
          <1 14 0xf08>,
          <1 11 0xf08>,
          <1 10 0xf08>;
          clockÂfrequency = <24000000>;
};
Above works for 5250 and 5410.
3. Comment out all CPUs but the first cpu to start with (done in your
exynos5420.dtsi file)
4. As Tod mentioned, you are missing the dtb file that you need to
pass as 3rd parameter to the bootm command. -> bootm $kernel_addr_t -
$dtb_addr_t
5. The bootargs that you have set for xen, need to have the
console=dtuart dtuart=/serial@12C20000.
   For you as Julien pointed out it might be @12C30000
I am not sure if just settign bootargs will help. I wonder if it has
to be fdt set to /chosen etc. I have pasted a working env file which
you can modify and convert to scr to run it if need be.

For building XEN (make dist-xen), I am not sure if you have to add
debug=y as well for the CONFIG_EARLY_PRINTK=exynos5420 to be pulled in
- but, please do check on that.

The below script, please change the names of files and the serial location.
---- Working script for xen boot from mmc ---- 8< -----
# Generic script to load and boot Xen from mmc
#
# For any questions/bug report please send an email to:
#   xenÂdevel@xxxxxxxxxxxxx
#
# Requirements:
#   UÂboot variable environment:
#     Â kernel_addr_r: kernel load address
#     Â xen_addr_r: xen load address
#     Â dtb_addr_r: fdt load address
#     Â serverip: IP of the tftp server
#     Â xen_bootargs: xen command line
#     Â dom0_bootargs: dom0 command line
#     Â kernel_path: kernel path
#     Â xen_path: xen path
#     Â dtb_path: device tree path
#
#   Tftp server file:
#     You need to provide the files that you have specified in
#     $xen_path, $dtb_path and $kernel_path

## Load the different components

# Load Linux in memory
fatload mmc 0:1 $kernel_addr_r $kernel_path
# Load Xen in memory
fatload mmc 0:1 $xen_addr_r $xen_path
# Load the device tree in memory
fatload mmc 0:1 $dtb_addr_r $dtb_path

## Fixup the device tree

# Be sure UÂboot is using our FDT
fdt addr $dtb_addr_r
# Resize the FDT just in case
fdt resize
# Set Xen arguments based on $xen_bootargs
fdt set /chosen xen,xenÂbootargs \"$xen_bootargs\"
#setenv bootargs $xen_bootargs # On Xen unstable, xen cmdline is in bootargs
# Set Dom0 arguments based on $dom0_bootargs
fdt set /chosen xen,dom0Âbootargs \"$dom0_bootargs\"
# Create modules node fdt mknode /chosen modules
fdt set /chosen/modules '#addressÂcells' <1>
fdt set /chosen/modules '#sizeÂcells' <1>
# Create node for the linux located at $kernel_addr_r
# It seems UÂboot doesn't have command to retrieve the size, so the size is
# set to a big value (10Mb)
fdt mknode /chosen/modules module@0
fdt set /chosen/modules/module@0 compatible xen,linuxÂzimage
xen,multibootÂmodule
fdt set /chosen/modules/module@0 reg <$kernel_addr_r 0x00a00000>

## Boot Xen
bootm $xen_addr_r  $dtb_addr_r
--------------------------- 8< --------------------------
2. Set the following uÂboot variables:
 setenv xen_addr_r 0x50000000
 setenv kernel_addr_r 0x60000000
 setenv dtb_addr_r 0x42000000
 setenv xen_path /xenÂuImage
 setenv kernel_path /linuxÂzImage
 setenv dtb_path /exynos5410odroidxu.dtb
 setenv xen_bootargs 'sync_console console=dtuart dtuart=/serial@12C20000'
 setenv dom0_bootargs 'console=hvc0 ignore_loglevel psci=enable
clk_ignore_unused
root=/dev/mmcblk0p2'
saveenv
With the saveenv we do not have to do it again and again

> commit 9595eedd366145b5b3e91b2b7cfa076cc2fc4174
> Author: Julien Grall <julien.grall@xxxxxxxxxx>
> Date:   Mon Apr 14 17:24:54 2014 +0100
>
>     xen/arm: Add early printk for Arndale Octa (exynos5420)
>
>     Enable early printk for exynos5420.
>
>     Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
>
> diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
> index c551afb..ddc2e28 100644
> --- a/xen/arch/arm/Rules.mk
> +++ b/xen/arch/arm/Rules.mk
> @@ -57,6 +57,12 @@ EARLY_PRINTK_INIT_UART := y
>  EARLY_PRINTK_BAUD := 115200
>  EARLY_UART_BASE_ADDRESS := 0x12c20000
>  endif
> +ifeq ($(CONFIG_EARLY_PRINTK), exynos5420)
> +EARLY_PRINTK_INC := exynos4210
> +EARLY_PRINTK_INIT_UART := y
> +EARLY_PRINTK_BAUD := 11520
> +EARLY_UART_BASE_ADDRESS := 0x12c30000
> +endif
>  ifeq ($(CONFIG_EARLY_PRINTK), midway)
>  EARLY_PRINTK_INC := pl011
>  EARLY_PRINTK_BAUD := 115200
>
>
>
> --
> Julien Grall

_______________________________________________
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®.