configs: add new configuration for qemu-system-xtensa

Tested with Qemu 2.0.0.
Overlay is from
https://github.com/jcmvbkbc/xtensa-toolchain-build/tree/master/overlays

Many thanks to Max Filippov <jcmvbkbc@gmail.com> for his extended help
and kernel config examples.

A small kernel patch is required, because mkimage does not contain
support for Xtensa and the uImage target is failing. Redboot is unused
so disable it, too.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Waldemar Brodkorb 2014-07-11 14:50:22 +02:00 committed by Thomas Petazzoni
parent c78d57637c
commit a570dea84f
5 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# CONFIG_SWAP is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_XTENSA_VARIANT_DC232B=y
# CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX is not set
CONFIG_XTENSA_PLATFORM_XTFPGA=y
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=ttyS0,38400"
# CONFIG_COMPACTION is not set
# CONFIG_BOUNCE is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
# CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_NETDEVICES=y
# CONFIG_WLAN is not set
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_HW_RANDOM is not set
# CONFIG_HWMON is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_S32C1I_SELFTEST is not set
CONFIG_LD_NO_RELAX=y

View File

@ -0,0 +1,16 @@
disable boot-uboot and boot-redboot, requires a patched u-boot and mkimage
Signed-off-by:Waldemar Brodkorb <wbx@openadk.org>
diff -Nur linux-3.15.orig/arch/xtensa/boot/Makefile linux-3.15/arch/xtensa/boot/Makefile
--- linux-3.15.orig/arch/xtensa/boot/Makefile 2014-06-08 20:19:54.000000000 +0200
+++ linux-3.15/arch/xtensa/boot/Makefile 2014-06-14 20:07:15.206091165 +0200
@@ -23,7 +23,7 @@
bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot
-bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
+bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-elf
zImage Image: $(bootdir-y)

View File

@ -0,0 +1,7 @@
Run the emulation with:
qemu-system-xtensa -M lx60 -cpu dc232b -monitor null -nographic -kernel output/images/Image.elf
The login prompt will appear in the terminal that started Qemu.
Tested with QEMU 2.0.0

Binary file not shown.

View File

@ -0,0 +1,30 @@
# Architecture
BR2_xtensa=y
BR2_XTENSA_CUSTOM=y
BR2_XTENSA_CUSTOM_NAME="dc232b"
BR2_XTENSA_CORE_NAME="lx60"
BR2_XTENSA_OVERLAY_DIR="board/qemu/xtensa-lx60"
BR2_GLOBAL_PATCH_DIR="board/qemu/xtensa-lx60"
# System
BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
# Filesystem
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_ROOTFS_INITRAMFS=y
# Lock to 3.15 headers to avoid breaking with newer kernels
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.15.5"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_15=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.15.5"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/xtensa-lx60/linux-3.15.config"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_IMAGE_NAME="Image.elf"
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"