Skip to contentSkip to conversation

ppc64 e5500 arch: new qemu target

PATCH New Matt Weber 2 participants 6 messages Apr 1, 2018

lore
Share & tools
lore

Matt Weber

author
#0 lore raw

PATCH 1/1 ppc64 e5500 arch: new qemu target

Adding basic support modeled after the Freescale/NXP T1040RDBD4 board.

This target is used to support testing of the bootlin e5500 toolchain.

---
 DEVELOPERS                            |  1 +
 board/qemu/ppc64-e5500/linux.fragment |  2 ++
 board/qemu/ppc64-e5500/readme.txt     |  7 +++++++
 configs/qemu_ppc64_e5500_defconfig    | 18 ++++++++++++++++++
 4 files changed, 28 insertions(+)
 create mode 100644 board/qemu/ppc64-e5500/linux.fragment
 create mode 100644 board/qemu/ppc64-e5500/readme.txt
 create mode 100644 configs/qemu_ppc64_e5500_defconfig
DEVELOPERS +1 -0
index ac7a47f..dd7e389 100644
@@ -1165,6 +1165,7 @@ F:	package/ts4900-fpga/
 N:	Matt Weber <[email protected]>
 F:	board/freescale/p*
 F:	board/freescale/t*
+F:	board/qemu/ppc64-e5500/
 F:	configs/freescale_p*
 F:	configs/freescale_t*
 F:	package/argp-standalone/
board/qemu/ppc64-e5500/linux.fragment new file +2 -0
new file mode 100644
index 0000000..81993d2
@@ -0,0 +1,2 @@
+# Enables generic e500 arch support for QEMU
+CONFIG_PPC_QEMU_E500=y
board/qemu/ppc64-e5500/readme.txt new file +7 -0
new file mode 100644
index 0000000..8da23f9
@@ -0,0 +1,7 @@
+Run the emulation with:
+
+ qemu-system-ppc64 -M ppce500 -cpu e5500 -m 256 -kernel output/images/uImage -append 'console=ttyS0 root=/dev/ram' -initrd output/images/rootfs.cpio.gz -serial mon:stdio -nographic
+
+The login prompt will appear in the terminal that started Qemu.
+
+Tested with QEMU 2.0.0
configs/qemu_ppc64_e5500_defconfig new file +18 -0
new file mode 100644
index 0000000..55c5644
@@ -0,0 +1,18 @@
+# Architecture
+BR2_powerpc64=y
+BR2_powerpc_e5500=y
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.7"
+BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+
+# Filesystem
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y
+# BR2_TARGET_ROOTFS_TAR is not set
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ppc64 e5500 arch: new qemu target

All,

Quoted 22 lines · Matt Weber

Adding basic support modeled after the Freescale/NXP T1040RDBD4 board.

This target is used to support testing of the bootlin e5500 toolchain.

---
 DEVELOPERS                            |  1 +
 board/qemu/ppc64-e5500/linux.fragment |  2 ++
 board/qemu/ppc64-e5500/readme.txt     |  7 +++++++
 configs/qemu_ppc64_e5500_defconfig    | 18 ++++++++++++++++++
 4 files changed, 28 insertions(+)
 create mode 100644 board/qemu/ppc64-e5500/linux.fragment
 create mode 100644 board/qemu/ppc64-e5500/readme.txt
 create mode 100644 configs/qemu_ppc64_e5500_defconfig
DEVELOPERS +0 -0
index ac7a47f..dd7e389 100644

DEVELOPERS F: package/ts4900-fpga/ · line 1170

Quoted 6 lines
DEVELOPERS +1 -0
@@ -1165,6 +1165,7 @@ F:        package/ts4900-fpga/
 N:     Matt Weber <[email protected]>
 F:     board/freescale/p*
 F:     board/freescale/t*
+F:     board/qemu/ppc64-e5500/
 F:     configs/freescale_p*
 F:     configs/freescale_t*

Just noticed I should have added myself to configs/qemu_ppc64_e5500_defconfig

Quoted 15 lines
DEVELOPERS +0 -0
 F:     package/argp-standalone/
board/qemu/ppc64-e5500/linux.fragment new file +2 -0
new file mode 100644
index 0000000..81993d2
@@ -0,0 +1,2 @@
+# Enables generic e500 arch support for QEMU
+CONFIG_PPC_QEMU_E500=y
board/qemu/ppc64-e5500/readme.txt new file +0 -0
new file mode 100644
index 0000000..8da23f9

board/qemu/ppc64-e5500/readme.txt line 4

Quoted 4 lines
board/qemu/ppc64-e5500/readme.txt new file +4 -0
@@ -0,0 +1,7 @@
+Run the emulation with:
+
+ qemu-system-ppc64 -M ppce500 -cpu e5500 -m 256 -kernel output/images/uImage -append 'console=ttyS0 root=/dev/ram' -initrd output/images/rootfs.cpio.gz -serial mon:stdio -nographic
+

This arch seems like it had good support back to QEMU 2.0.0. However, I'll be submitting a bootlin e6500 arch variant toolchain but I'm still working out what version of QEMU can even boot that arch. As of 2.11.x support hasn't been merged.

(Working on pull request for e5500 testing in the toolchain-builder repo now)

Matt

#2 lore raw

PATCH 1/1 ppc64 e5500 arch: new qemu target

Hello,

Quoted 15 lines · Matthew Weber
Quoted 15 lines
board/qemu/ppc64-e5500/linux.fragment new file +2 -0
new file mode 100644
index 0000000..81993d2
@@ -0,0 +1,2 @@
+# Enables generic e500 arch support for QEMU
+CONFIG_PPC_QEMU_E500=y
board/qemu/ppc64-e5500/readme.txt new file +1 -0
new file mode 100644
index 0000000..8da23f9
@@ -0,0 +1,7 @@
+Run the emulation with:
Quoted 8 lines

board/qemu/ppc64-e5500/readme.txt line 4

Quoted 3 lines
board/qemu/ppc64-e5500/readme.txt new file +3 -0
+
+ qemu-system-ppc64 -M ppce500 -cpu e5500 -m 256 -kernel output/images/uImage -append 'console=ttyS0 root=/dev/ram' -initrd output/images/rootfs.cpio.gz -serial mon:stdio -nographic
+  

This arch seems like it had good support back to QEMU 2.0.0. However, I'll be submitting a bootlin e6500 arch variant toolchain but I'm still working out what version of QEMU can even boot that arch. As of 2.11.x support hasn't been merged.

I don't get it. In the same paragraph you say "it had good support back to Qemu 2.0.0" and "as of 2.11.x support hasn't been merged".

Could you clarify ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 ppc64 e5500 arch: new qemu target

Thomas,

Quoted 28 lines · Thomas Petazzoni

Hello,

Quoted 15 lines · Matthew Weber
Quoted 15 lines
board/qemu/ppc64-e5500/linux.fragment new file +2 -0
new file mode 100644
index 0000000..81993d2
@@ -0,0 +1,2 @@
+# Enables generic e500 arch support for QEMU
+CONFIG_PPC_QEMU_E500=y
board/qemu/ppc64-e5500/readme.txt new file +1 -0
new file mode 100644
index 0000000..8da23f9
@@ -0,0 +1,7 @@
+Run the emulation with:
Quoted 8 lines

board/qemu/ppc64-e5500/readme.txt line 4

Quoted 3 lines
board/qemu/ppc64-e5500/readme.txt new file +3 -0
+
+ qemu-system-ppc64 -M ppce500 -cpu e5500 -m 256 -kernel output/images/uImage -append 'console=ttyS0 root=/dev/ram' -initrd output/images/rootfs.cpio.gz -serial mon:stdio -nographic
+

This arch seems like it had good support back to QEMU 2.0.0. However, I'll be submitting a bootlin e6500 arch variant toolchain but I'm still working out what version of QEMU can even boot that arch. As of 2.11.x support hasn't been merged.

Quoted 3 lines

I don't get it. In the same paragraph you say "it had good support back to Qemu 2.0.0" and "as of 2.11.x support hasn't been merged".

The e5500 has good support in 2.0.0 but I've been looking at adding a new e6500 which does not.

Matt

#4 lore raw

PATCH 1/1 ppc64 e5500 arch: new qemu target

In reply to Matt Weber

Hello,

Commit title should be:

	configs/qemu_ppc64_e5500: new defconfig

DEVELOPERS F: package/ts4900-fpga/ · line 1170

Quoted 11 lines · Matt Weber
DEVELOPERS +1 -0
index ac7a47f..dd7e389 100644
@@ -1165,6 +1165,7 @@ F:	package/ts4900-fpga/
 N:	Matt Weber <[email protected]>
 F:	board/freescale/p*
 F:	board/freescale/t*
+F:	board/qemu/ppc64-e5500/
 F:	configs/freescale_p*
 F:	configs/freescale_t*

As you mentioned, missing entry for the defconfig file itself.

board/qemu/ppc64-e5500/linux.fragment line 2

Quoted 9 lines
DEVELOPERS +0 -0
 F:	package/argp-standalone/
board/qemu/ppc64-e5500/linux.fragment new file +2 -0
new file mode 100644
index 0000000..81993d2
@@ -0,0 +1,2 @@
+# Enables generic e500 arch support for QEMU
+CONFIG_PPC_QEMU_E500=y

E500, while it's E5500 ?

configs/qemu_ppc64_e5500_defconfig line 3

Quoted 9 lines
configs/qemu_ppc64_e5500_defconfig new file +3 -0
new file mode 100644
index 0000000..55c5644
@@ -0,0 +1,18 @@
+# Architecture
+BR2_powerpc64=y
+BR2_powerpc_e5500=y

You need an option here to specify the version of the kernel headers being used.

Quoted 4 lines
configs/qemu_ppc64_e5500_defconfig new file +4 -0
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+

configs/qemu_ppc64_e5500_defconfig line 17

Quoted 10 lines
configs/qemu_ppc64_e5500_defconfig new file +10 -0
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.7"
+BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+
+# Filesystem
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y

The Qemu emulation doesn't support emulating some hard drive, to use a more regular ext4 setup ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 1/1 ppc64 e5500 arch: new qemu target

Thomas,

Quoted 8 lines · Thomas Petazzoni

Hello,

Commit title should be:

        configs/qemu_ppc64_e5500: new defconfig

On Sun, 1 Apr 2018 09:15:30 -0500, Matt Weber wrote:

Quoted 13 lines

DEVELOPERS F: package/ts4900-fpga/ · line 1170

Quoted 11 lines
DEVELOPERS +1 -0
index ac7a47f..dd7e389 100644
@@ -1165,6 +1165,7 @@ F:      package/ts4900-fpga/
 N:   Matt Weber <[email protected]>
 F:   board/freescale/p*
 F:   board/freescale/t*
+F:   board/qemu/ppc64-e5500/
 F:   configs/freescale_p*
 F:   configs/freescale_t*

As you mentioned, missing entry for the defconfig file itself.

Yep.

Quoted 12 lines

board/qemu/ppc64-e5500/linux.fragment line 2

Quoted 10 lines
DEVELOPERS +0 -0
 F:   package/argp-standalone/
board/qemu/ppc64-e5500/linux.fragment new file +2 -0
new file mode 100644
index 0000000..81993d2
@@ -0,0 +1,2 @@
+# Enables generic e500 arch support for QEMU
+CONFIG_PPC_QEMU_E500=y

E500, while it's E5500 ?

e5500 is a variant of e500 base architecture. I can add to my comment to express that.

Quoted 13 lines

configs/qemu_ppc64_e5500_defconfig line 3

Quoted 10 lines
configs/qemu_ppc64_e5500_defconfig new file +3 -0
new file mode 100644
index 0000000..55c5644
@@ -0,0 +1,18 @@
+# Architecture
+BR2_powerpc64=y
+BR2_powerpc_e5500=y

You need an option here to specify the version of the kernel headers being used.

Ok.

Quoted 10 lines
Quoted 10 lines
configs/qemu_ppc64_e5500_defconfig new file +9 -0
+
+# Serial port config
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15.7"
+BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
Quoted 8 lines

configs/qemu_ppc64_e5500_defconfig line 17

Quoted 5 lines
configs/qemu_ppc64_e5500_defconfig new file +5 -0
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+
+# Filesystem
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_CPIO_GZIP=y

The Qemu emulation doesn't support emulating some hard drive, to use a more regular ext4 setup ?

I debated on this. I'll have to add more support to the kernel fragment to enable the options so I can mount it. I'm good either way.

Matt