Skip to contentSkip to conversation

vexpress: Add vexpress qemu variant

PATCH New Ian Campbell 3 participants 6 messages Nov 17, 2013 – Dec 23, 2013 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 vexpress: Add vexpress qemu variant

The main purpose of this is to disable the use of the virtualisation extensions which Qemu does not emulate.

Also enable a few additional commands and the u-boot API.

This works for me with:

$ dd if=/dev/zero of=pflash0.img bs=1M count=64
$ dd if=/dev/zero of=pflash1.img bs=1M count=64
$ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel u-boot -m 1024m -sd mmc.img -nographic -pflash pflash0.img -pflash pflash1.img

(for some reason both pflash images are needed for saveenv to work)

Cc albert.u.boot at aribaud.net
---
 boards.cfg                          | 1 +
 include/configs/vexpress_ca15_tc2.h | 2 ++
 include/configs/vexpress_common.h   | 4 ++++
 3 files changed, 7 insertions(+)
boards.cfg +1 -0
index caba64e..6e2fccc 100644
@@ -245,6 +245,7 @@ Active  arm         arm926ejs      versatile   armltd          versatile
 Active  arm         arm946es       -           armltd          integrator          integratorap_cm946es                 integratorap:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         arm946es       -           armltd          integrator          integratorcp_cm946es                 integratorcp:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2                    -                                                                                                                                 -
+Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2_qemu               vexpress_ca15_tc2:ARCH_VEXPRESS_QEMU                                                                                              -
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca5x2                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca9x4                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          am33xx      isee            igep0033            am335x_igep0033                      -                                                                                                                                 Enric Balletbo i Serra <[email protected]>
include/configs/vexpress_ca15_tc2.h +2 -0
index 982f4a7..ccdb3c5 100644
@@ -18,6 +18,8 @@
 #define CONFIG_SYSFLAGS_ADDR	0x1c010030
 #define CONFIG_SMP_PEN_ADDR	CONFIG_SYSFLAGS_ADDR
 
+#ifndef CONFIG_ARCH_VEXPRESS_QEMU
 #define CONFIG_ARMV7_VIRT
+#endif
 
 #endif
include/configs/vexpress_common.h +4 -0
index 7e78f8a..fbb9993 100644
@@ -157,6 +157,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PXE
 #define CONFIG_MENU
+#define CONFIG_CMD_ECHO
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_FLASH
@@ -164,6 +165,7 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_EXT2
 #define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_RUN
 #define CONFIG_CMD_BOOTZ
@@ -176,6 +178,7 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_ARM_PL180_MMCI
 #define CONFIG_ARM_PL180_MMCI_BASE	V2M_MMCI
+#define CONFIG_SYS_MMC_MAX_DEVICE	2
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT	127
 #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000
 
@@ -253,6 +256,7 @@
 #define CONFIG_SYS_FLASH_BASE0		V2M_NOR0
 #define CONFIG_SYS_FLASH_BASE1		V2M_NOR1
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE0
+#define CONFIG_API
 
 /* Timeout values in ticks */
 #define CONFIG_SYS_FLASH_ERASE_TOUT	(2 * CONFIG_SYS_HZ) /* Erase Timeout */
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 2/2 vexpress: Add vexpress qemu variant

Ping?

Quoted 81 lines · Ian Campbell

The main purpose of this is to disable the use of the virtualisation extensions which Qemu does not emulate.

Also enable a few additional commands and the u-boot API.

This works for me with:

$ dd if=/dev/zero of=pflash0.img bs=1M count=64
$ dd if=/dev/zero of=pflash1.img bs=1M count=64
$ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel u-boot -m 1024m -sd mmc.img -nographic -pflash pflash0.img -pflash pflash1.img

(for some reason both pflash images are needed for saveenv to work)

Cc albert.u.boot at aribaud.net
---
 boards.cfg                          | 1 +
 include/configs/vexpress_ca15_tc2.h | 2 ++
 include/configs/vexpress_common.h   | 4 ++++
 3 files changed, 7 insertions(+)
boards.cfg +1 -0
index caba64e..6e2fccc 100644
@@ -245,6 +245,7 @@ Active  arm         arm926ejs      versatile   armltd          versatile
 Active  arm         arm946es       -           armltd          integrator          integratorap_cm946es                 integratorap:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         arm946es       -           armltd          integrator          integratorcp_cm946es                 integratorcp:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2                    -                                                                                                                                 -
+Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2_qemu               vexpress_ca15_tc2:ARCH_VEXPRESS_QEMU                                                                                              -
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca5x2                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca9x4                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          am33xx      isee            igep0033            am335x_igep0033                      -                                                                                                                                 Enric Balletbo i Serra <[email protected]>
include/configs/vexpress_ca15_tc2.h +2 -0
index 982f4a7..ccdb3c5 100644
@@ -18,6 +18,8 @@
 #define CONFIG_SYSFLAGS_ADDR	0x1c010030
 #define CONFIG_SMP_PEN_ADDR	CONFIG_SYSFLAGS_ADDR
 
+#ifndef CONFIG_ARCH_VEXPRESS_QEMU
 #define CONFIG_ARMV7_VIRT
+#endif
 
 #endif
include/configs/vexpress_common.h +4 -0
index 7e78f8a..fbb9993 100644
@@ -157,6 +157,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PXE
 #define CONFIG_MENU
+#define CONFIG_CMD_ECHO
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_FLASH
@@ -164,6 +165,7 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_EXT2
 #define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_RUN
 #define CONFIG_CMD_BOOTZ
@@ -176,6 +178,7 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_ARM_PL180_MMCI
 #define CONFIG_ARM_PL180_MMCI_BASE	V2M_MMCI
+#define CONFIG_SYS_MMC_MAX_DEVICE	2
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT	127
 #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000
 
@@ -253,6 +256,7 @@
 #define CONFIG_SYS_FLASH_BASE0		V2M_NOR0
 #define CONFIG_SYS_FLASH_BASE1		V2M_NOR1
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE0
+#define CONFIG_API
 
 /* Timeout values in ticks */
 #define CONFIG_SYS_FLASH_ERASE_TOUT	(2 * CONFIG_SYS_HZ) /* Erase Timeout */
#2 lore raw

PATCH 2/2 vexpress: Add vexpress qemu variant

In reply to Ian Campbell

Ping?

Quoted 81 lines · Ian Campbell

The main purpose of this is to disable the use of the virtualisation extensions which Qemu does not emulate.

Also enable a few additional commands and the u-boot API.

This works for me with:

$ dd if=/dev/zero of=pflash0.img bs=1M count=64
$ dd if=/dev/zero of=pflash1.img bs=1M count=64
$ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel u-boot -m 1024m -sd mmc.img -nographic -pflash pflash0.img -pflash pflash1.img

(for some reason both pflash images are needed for saveenv to work)

Cc albert.u.boot at aribaud.net
---
 boards.cfg                          | 1 +
 include/configs/vexpress_ca15_tc2.h | 2 ++
 include/configs/vexpress_common.h   | 4 ++++
 3 files changed, 7 insertions(+)
boards.cfg +1 -0
index caba64e..6e2fccc 100644
@@ -245,6 +245,7 @@ Active  arm         arm926ejs      versatile   armltd          versatile
 Active  arm         arm946es       -           armltd          integrator          integratorap_cm946es                 integratorap:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         arm946es       -           armltd          integrator          integratorcp_cm946es                 integratorcp:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2                    -                                                                                                                                 -
+Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2_qemu               vexpress_ca15_tc2:ARCH_VEXPRESS_QEMU                                                                                              -
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca5x2                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca9x4                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          am33xx      isee            igep0033            am335x_igep0033                      -                                                                                                                                 Enric Balletbo i Serra <[email protected]>
include/configs/vexpress_ca15_tc2.h +2 -0
index 982f4a7..ccdb3c5 100644
@@ -18,6 +18,8 @@
 #define CONFIG_SYSFLAGS_ADDR	0x1c010030
 #define CONFIG_SMP_PEN_ADDR	CONFIG_SYSFLAGS_ADDR
 
+#ifndef CONFIG_ARCH_VEXPRESS_QEMU
 #define CONFIG_ARMV7_VIRT
+#endif
 
 #endif
include/configs/vexpress_common.h +4 -0
index 7e78f8a..fbb9993 100644
@@ -157,6 +157,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PXE
 #define CONFIG_MENU
+#define CONFIG_CMD_ECHO
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_FLASH
@@ -164,6 +165,7 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_EXT2
 #define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_RUN
 #define CONFIG_CMD_BOOTZ
@@ -176,6 +178,7 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_ARM_PL180_MMCI
 #define CONFIG_ARM_PL180_MMCI_BASE	V2M_MMCI
+#define CONFIG_SYS_MMC_MAX_DEVICE	2
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT	127
 #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000
 
@@ -253,6 +256,7 @@
 #define CONFIG_SYS_FLASH_BASE0		V2M_NOR0
 #define CONFIG_SYS_FLASH_BASE1		V2M_NOR1
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE0
+#define CONFIG_API
 
 /* Timeout values in ticks */
 #define CONFIG_SYS_FLASH_ERASE_TOUT	(2 * CONFIG_SYS_HZ) /* Erase Timeout */
#3 lore raw

PATCH 2/2 vexpress: Add vexpress qemu variant

Hi Ian

Quoted 8 lines · Ian Campbell

Ping?

Quoted 5 lines · Ian Campbell

The main purpose of this is to disable the use of the virtualisation extensions which Qemu does not emulate.

Also enable a few additional commands and the u-boot API.

This is my cent ;)

My suggestion is to split the patch even if it is simple

Michael

Quoted 82 lines
Quoted 69 lines

This works for me with:

$ dd if=/dev/zero of=pflash0.img bs=1M count=64
$ dd if=/dev/zero of=pflash1.img bs=1M count=64
$ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel u-boot -m 1024m -sd mmc.img -nographic -pflash pflash0.img -pflash pflash1.img

(for some reason both pflash images are needed for saveenv to work)

Cc albert.u.boot at aribaud.net
---
 boards.cfg                          | 1 +
 include/configs/vexpress_ca15_tc2.h | 2 ++
 include/configs/vexpress_common.h   | 4 ++++
 3 files changed, 7 insertions(+)
boards.cfg +1 -0
index caba64e..6e2fccc 100644
@@ -245,6 +245,7 @@ Active  arm         arm926ejs      versatile   armltd          versatile
 Active  arm         arm946es       -           armltd          integrator          integratorap_cm946es                 integratorap:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         arm946es       -           armltd          integrator          integratorcp_cm946es                 integratorcp:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2                    -                                                                                                                                 -
+Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2_qemu               vexpress_ca15_tc2:ARCH_VEXPRESS_QEMU                                                                                              -
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca5x2                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca9x4                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          am33xx      isee            igep0033            am335x_igep0033                      -                                                                                                                                 Enric Balletbo i Serra <[email protected]>
include/configs/vexpress_ca15_tc2.h +2 -0
index 982f4a7..ccdb3c5 100644
@@ -18,6 +18,8 @@
 #define CONFIG_SYSFLAGS_ADDR 0x1c010030
 #define CONFIG_SMP_PEN_ADDR  CONFIG_SYSFLAGS_ADDR
 
+#ifndef CONFIG_ARCH_VEXPRESS_QEMU
 #define CONFIG_ARMV7_VIRT
+#endif
 
 #endif
include/configs/vexpress_common.h +3 -0
index 7e78f8a..fbb9993 100644
@@ -157,6 +157,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PXE
 #define CONFIG_MENU
+#define CONFIG_CMD_ECHO
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_FLASH
@@ -164,6 +165,7 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_EXT2
 #define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_RUN
 #define CONFIG_CMD_BOOTZ
@@ -176,6 +178,7 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_ARM_PL180_MMCI
 #define CONFIG_ARM_PL180_MMCI_BASE   V2M_MMCI
+#define CONFIG_SYS_MMC_MAX_DEVICE    2
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
 #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000
 

include/configs/vexpress_common.h line 262

Quoted 7 lines
include/configs/vexpress_common.h +1 -0
@@ -253,6 +256,7 @@
 #define CONFIG_SYS_FLASH_BASE0               V2M_NOR0
 #define CONFIG_SYS_FLASH_BASE1               V2M_NOR1
 #define CONFIG_SYS_MONITOR_BASE              CONFIG_SYS_FLASH_BASE0
+#define CONFIG_API
 
 /* Timeout values in ticks */
 #define CONFIG_SYS_FLASH_ERASE_TOUT  (2 * CONFIG_SYS_HZ) /* Erase Timeout */

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw

PATCH 2/2 vexpress: Add vexpress qemu variant

In reply to Ian Campbell

Hi Ian,

Quoted 11 lines · Ian Campbell

The main purpose of this is to disable the use of the virtualisation extensions which Qemu does not emulate.

Also enable a few additional commands and the u-boot API.

This works for me with:

$ dd if=/dev/zero of=pflash0.img bs=1M count=64
$ dd if=/dev/zero of=pflash1.img bs=1M count=64
$ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel u-boot -m 1024m -sd mmc.img -nographic -pflash pflash0.img -pflash pflash1.img

(for some reason both pflash images are needed for saveenv to work)

Please split the above as follows:

- a short problem and solution description in the commit message, above the commit message delimiter '---';

- anything else (examples, comments, etc) below the commit delimiter.

Quoted 38 lines
Cc albert.u.boot at aribaud.net
---
 boards.cfg                          | 1 +
 include/configs/vexpress_ca15_tc2.h | 2 ++
 include/configs/vexpress_common.h   | 4 ++++
 3 files changed, 7 insertions(+)
boards.cfg +1 -0
index caba64e..6e2fccc 100644
@@ -245,6 +245,7 @@ Active  arm         arm926ejs      versatile   armltd          versatile
 Active  arm         arm946es       -           armltd          integrator          integratorap_cm946es                 integratorap:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         arm946es       -           armltd          integrator          integratorcp_cm946es                 integratorcp:CM946ES                                                                                                              Linus Walleij <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2                    -                                                                                                                                 -
+Active  arm         armv7          -           armltd          vexpress            vexpress_ca15_tc2_qemu               vexpress_ca15_tc2:ARCH_VEXPRESS_QEMU                                                                                              -
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca5x2                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          -           armltd          vexpress            vexpress_ca9x4                       -                                                                                                                                 Matt Waddel <[email protected]>
 Active  arm         armv7          am33xx      isee            igep0033            am335x_igep0033                      -                                                                                                                                 Enric Balletbo i Serra <[email protected]>
include/configs/vexpress_ca15_tc2.h +2 -0
index 982f4a7..ccdb3c5 100644
@@ -18,6 +18,8 @@
 #define CONFIG_SYSFLAGS_ADDR	0x1c010030
 #define CONFIG_SMP_PEN_ADDR	CONFIG_SYSFLAGS_ADDR
 
+#ifndef CONFIG_ARCH_VEXPRESS_QEMU
 #define CONFIG_ARMV7_VIRT
+#endif
 
 #endif
include/configs/vexpress_common.h +0 -0
index 7e78f8a..fbb9993 100644

include/configs/vexpress_common.h line 160

Quoted 4 lines
include/configs/vexpress_common.h +1 -0
@@ -157,6 +157,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_PXE
 #define CONFIG_MENU
+#define CONFIG_CMD_ECHO

Here and below, you are adding commands generally, i.e. not specifically for the new boards you're creating. I'd rather have this in a separate patch.

Quoted 20 lines
include/configs/vexpress_common.h +2 -0
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_ENV
 #define CONFIG_CMD_FLASH
@@ -164,6 +165,7 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_PING
+#define CONFIG_CMD_EXT2
 #define CONFIG_CMD_SAVEENV
 #define CONFIG_CMD_RUN
 #define CONFIG_CMD_BOOTZ
@@ -176,6 +178,7 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_ARM_PL180_MMCI
 #define CONFIG_ARM_PL180_MMCI_BASE	V2M_MMCI
+#define CONFIG_SYS_MMC_MAX_DEVICE	2
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT	127
 #define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 6250000
 

include/configs/vexpress_common.h line 262

Quoted 7 lines
include/configs/vexpress_common.h +1 -0
@@ -253,6 +256,7 @@
 #define CONFIG_SYS_FLASH_BASE0		V2M_NOR0
 #define CONFIG_SYS_FLASH_BASE1		V2M_NOR1
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE0
+#define CONFIG_API
 
 /* Timeout values in ticks */
 #define CONFIG_SYS_FLASH_ERASE_TOUT	(2 * CONFIG_SYS_HZ) /* Erase Timeout */

Amicalement,

Signature · 1 line
Albert.
#5 lore raw

PATCH 2/2 vexpress: Add vexpress qemu variant

Quoted 15 lines · Albert ARIBAUD

Hi Ian,

Quoted 10 lines · Ian Campbell

The main purpose of this is to disable the use of the virtualisation extensions which Qemu does not emulate.

Also enable a few additional commands and the u-boot API.

This works for me with:

$ dd if=/dev/zero of=pflash0.img bs=1M count=64
$ dd if=/dev/zero of=pflash1.img bs=1M count=64
$ qemu-system-arm -M vexpress-a15 -cpu cortex-a15 -kernel u-boot -m 1024m -sd mmc.img -nographic -pflash pflash0.img -pflash pflash1.img
Quoted 8 lines
Quoted 1 line

(for some reason both pflash images are needed for saveenv to work)

Please split the above as follows:

- a short problem and solution description in the commit message, above the commit message delimiter '---';

- anything else (examples, comments, etc) below the commit delimiter.

I was intentionally including the qemu command line in the main body of the commit message since I was adding a target specifically for use with qemu. But this has now become a bit moot (see below).

Quoted 5 lines
Quoted 1 line

+#define CONFIG_CMD_ECHO

Here and below, you are adding commands generally, i.e. not specifically for the new boards you're creating. I'd rather have this in a separate patch.

Sorry, I should have split this out in the first place.

But actually in the meantime I've discovered that the vexpress-a9 version of uboot works just fine on qemu -M vexpress-a9 (I guess I'm just used to working with a15's so it didn't initially occur to me!)

With that in mind here is the patch which just adds the extra commands.

8<--------------