On Thu, 2012-09-06 at 22:34 +0800, Lei Wen wrote:
> I have several questions related how to run the mp over fastmodel.
> For the kernel config file, I see there are many for VE:
> android_vexpress_defconfig
> ubuntu_vexpress_defconfig
> vexpress_defconfig
> vexpress_tc2_defconfig
> Which one is suitable for the kernel run over fastmodel?
> 
> Also the dts and bootwrapper, should I use below link?
> git://linux-arm.org/arm-dts.git
> git://git.linaro.org/arm/models/boot-wrapper.git or git://
> linux-arm.org/boot-wrapper.git


Linaro's standard vexpress kernel will work on Fast Models.

The kernel source is in the linux-linaro branch of
git://git.linaro.org/kernel/linux-linaro-tracking.git

The config used is generated by the command:

        ARCH=arm scripts/kconfig/merge_config.sh \
          linaro/configs/linaro-base.conf \
          linaro/configs/ubuntu-minimal.conf \
          linaro/configs/vexpress.conf
        
If you want to run a full Ubuntu desktop system its probably best to
replace 'ubuntu-minimal.conf' with 'ubuntu.conf'. And for Android
kernels use 'android.conf' instead.

This kernel tree also contains device-trees for the Fast Models as
arch/arm/boot/dts/rtsm_ve*

The boot-wrapper we are trying to standardise on is at
git://git.linaro.org/arm/models/boot-wrapper.git

Currently this requires a patch (attached) to work on big.LITTLE models.
Note, this patch will break non bit.LITTLE models but people are working
on a way of a single boot-wrapper to work on all models.

This boot-wrapper supports semi-hosting so it can be used as a
stand-alone bootloader and does not need to be merged with the kernel
binary. To build it:

        make CROSS_COMPILE=arm-linux-gnueabi- linux-system-semi.axf

To run the big.LITTLE models you can then use a command like:

        RTSM_VE_Cortex-A15x4-A7x4 \
          -a coretile.cluster0.*=/path/linux-system-semi.axf \
          -a coretile.cluster1.*=/path/linux-system-semi.axf \
          -C coretile.dualclustersystemconfigurationblock.CFG_ACTIVECLUSTER=0x3 
\
          -C motherboard.mmc.p_mmc_file=/path/mmc.bin \
          -C coretile.cluster0.cpu0.semihosting-cmd_line="--kernel /path/uImage 
--initrd /path/uInitrd --dtb /path/rtsm_ve-v2p-ca15x4-ca7x4 -- 
console=ttyAMA0,115200n8 root=/dev/mmcblk0p2 rootwait ro debug"
        
replacing names and paths as appropriate; and making sure the dtb file
you use matches the model you are running. I.e. it has the same type and
number of CPUS.

For running non bit.LITTLE models use something like:

        RTSM_VE_Cortex-A15x4 \
          /path/linux-system-semi.axf \
          -C motherboard.mmc.p_mmc_file=/path/mmc.bin \
          -C cluster.cpu0.semihosting-cmd_line="--kernel /path/uImage --initrd 
/path/uInitrd --dtb /path/rtsm_ve-cortex_a15x4 -- console=ttyAMA0,115200n8 
root=/dev/mmcblk0p2 rootwait ro debug"

The MMC image to use for the root filesystem can be any Linaro vexpress
image created by linaro-media-create, or linaro-android-media-create,
but it needs to be limited to <2GB, e.g. for Android

        linaro-android-media-create \ 
          --image-file mmc.bin --image-size 2000M --dev vexpress \ 
          --boot boot.tar.bz2 --system system.tar.bz2 --userdata 
userdata.tar.bz2

or an Ubuntu image

        linaro-media-create \
          --image-file mmc.bin --image-size 2000M --dev vexpress \
          --binary linaro-precise-XXXX.tar.gz \
          --hwpack hwpack_linaro-vexpress_XXXX.tar.gz
        
To get a uInitrd to pass to the models then you can find this in
Android's boot.tar.bz2. However, for Ubuntu images I'm not sure of a
good way, only to create a second image on an SD card and then get a
uInitrd from the boot partition of that.

-- 
Tixy
>From 93c088c486f2cf7b3fd260684aa714ccce3dfbd4 Mon Sep 17 00:00:00 2001
From: Jon Medhurst <t...@linaro.org>
Date: Fri, 7 Sep 2012 09:28:49 +0100
Subject: [PATCH] bootwrapper: Get it working for big.LITTLE models

Note, this breaks other models.

Signed-off-by: Jon Medhurst <t...@linaro.org>
---
 boot.S |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/boot.S b/boot.S
index 61cd93f..60b59a6 100644
--- a/boot.S
+++ b/boot.S
@@ -67,6 +67,19 @@ start:
 	mov	r0, #0xf0000000
 	mcr	p15, 0, r0, c12, c0, 1		@ Monitor vector base address
 
+	@
+	@ Turn on CCI snoops
+	@
+	mov	r3, #3
+	ldr	r4, =0x2c090000
+	mov	r5, #0x4000		@ A15
+	str	r3, [r4, r5]
+	mov	r5, #0x5000		@ A7
+	str	r3, [r4, r5]
+0:	ldr	r3, [r4, #0xc]		@ status reg
+	tst	r3, #1
+	bne	0b
+
 	@ Set up hvbar so hvc comes back here.
 	ldr	r0, =vectors
 	mov	r7, #0xfffffff0
@@ -93,7 +106,7 @@ vectors:
 into_hyp_mode:
 	@ Check CPU nr again
 	mrc	p15, 0, r0, c0, c0, 5		@ MPIDR (ARMv7 only)
-	and	r0, r0, #15			@ CPU number
+	bfc	r0, #24, #8                     @ CPU number, taking multicluster into account
 	cmp	r0, #0				@ primary CPU?
 	beq	2f
 
-- 
1.7.10.4

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to