Skip to contentSkip to conversation

qemu/x86: add defconfig for serial console usage

PATCH New Waldemar Brodkorb 2 participants 3 messages Jul 30, 2014 – Jul 31, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 qemu/x86: add defconfig for serial console usage

Developers sometimes work remotely and want to test stuff in Qemu without having X11 running. For this case an extra defconfig is useful and does not break existing defconfig.

A config which can be used for both cases might be used instead, but I see no option to add more gettys via the existing buildroot variables.

---
 board/qemu/x86/readme.txt         |  6 ++++++
 configs/qemu_x86_serial_defconfig | 23 +++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 configs/qemu_x86_serial_defconfig
board/qemu/x86/readme.txt +6 -0
index 9ee2e37..f907770 100644
@@ -4,4 +4,10 @@ Run the emulation with:
 
 The login prompt will appear in the graphical window.
 
+Or for serial config:
+
+  qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide -append "root=/dev/sda console=ttyS0" -net nic,model=rtl8139 -net user -nographic 
+
+The login prompt will appear in the console window.
+
 Tested with QEMU 2.0.0
configs/qemu_x86_serial_defconfig new file +23 -0
new file mode 100644
index 0000000..2b58dec
@@ -0,0 +1,23 @@
+# Architecture
+BR2_i386=y
+BR2_x86_pentiumpro=y
+
+# system
+BR2_TARGET_GENERIC_GETTY=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
+
+# filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
+
+# Lock to 3.15 headers to avoid breaking with newer kernels
+BR2_KERNEL_HEADERS_VERSION=y
+BR2_DEFAULT_KERNEL_VERSION="3.15.7"
+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.7"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux-3.15.config"
Signature · 1 line
2.0.1
#1 lore raw

PATCH 2/2 qemu/x86: add defconfig for serial console usage

Dear Waldemar Brodkorb,

Quoted 3 lines · Waldemar Brodkorb

A config which can be used for both cases might be used instead, but I see no option to add more gettys via the existing buildroot variables.

A rootfs overlay that overrides inittab, or a post-build script that tunes the inittab.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 2/2 qemu/x86: add defconfig for serial console usage

In reply to Waldemar Brodkorb

Dear Waldemar Brodkorb,

Quoted 8 lines · Waldemar Brodkorb

Developers sometimes work remotely and want to test stuff in Qemu without having X11 running. For this case an extra defconfig is useful and does not break existing defconfig.

A config which can be used for both cases might be used instead, but I see no option to add more gettys via the existing buildroot variables.

Quoted 6 lines
---
 board/qemu/x86/readme.txt         |  6 ++++++
 configs/qemu_x86_serial_defconfig | 23 +++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 configs/qemu_x86_serial_defconfig

Since there are still comments about this approach, and a suggestion to do it differently, I've marked this patch as "Changes Requested" in our patch tracking system.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com