From: Joshua Watt <jpewhacker@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH] qemu-x86: Use config_distro_bootcmd
Date: Fri, 21 Jun 2019 10:16:38 -0500 [thread overview]
Message-ID: <20190621151650.18350-1-JPEWhacker@gmail.com> (raw)
Converts qemu x86 machines to boot using distro_config. The intent is to
allow u-boot in qemu to be maximally compatible with many boot methods
without having to change the config. Currently, u-boot will only boot in
a very limited set of circumstances where there is a /boot/vmlinuz on
scsi 0:3 with no ramdisk.
If distro_bootcmd fails, u-boot will fall back to the original method.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
include/configs/qemu-x86.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/include/configs/qemu-x86.h b/include/configs/qemu-x86.h
index 64e7a60b8a..d9c96e295d 100644
--- a/include/configs/qemu-x86.h
+++ b/include/configs/qemu-x86.h
@@ -10,8 +10,38 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/sizes.h>
+
+#define CONFIG_BOOTCOMMAND \
+ "run distro_bootcmd; " \
+ "ext2load scsi 0:3 01000000 /boot/vmlinuz; " \
+ "zboot 01000000"
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(USB, usb, 0) \
+ func(SCSI, scsi, 0) \
+ func(VIRTIO, virtio, 0) \
+ func(IDE, ide, 0) \
+ func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>
#include <configs/x86-common.h>
+#undef CONFIG_ENV_SIZE
+#define CONFIG_ENV_SIZE SZ_256K
+
+#define CONFIG_PREBOOT "pci enum"
+
+#undef CONFIG_EXTRA_ENV_SETTINGS
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ CONFIG_STD_DEVICES_SETTINGS \
+ "scriptaddr=0x8000000\0" \
+ "kernel_addr_r=0x1000000\0" \
+ "ramdisk_addr_r=0x4000000\0" \
+ "consoledev=ttyS0\0" \
+ CONFIG_OTHBOOTARGS \
+ BOOTENV
+
#define CONFIG_SYS_MONITOR_LEN (1 << 20)
#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \
--
2.21.0
next reply other threads:[~2019-06-21 15:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 15:16 Joshua Watt [this message]
2019-06-22 14:51 ` [U-Boot] [RFC PATCH] qemu-x86: Use config_distro_bootcmd Bin Meng
2019-06-22 14:52 ` Bin Meng
2019-07-02 13:24 ` [U-Boot] [PATCH v2] " Joshua Watt
2019-07-02 14:24 ` Bin Meng
2019-07-02 15:31 ` Joshua Watt
2019-07-03 17:45 ` [U-Boot] [PATCH v3] " Joshua Watt
2019-07-16 14:19 ` Joshua Watt
2019-07-17 5:43 ` Bin Meng
2019-07-19 9:46 ` Bin Meng
2019-08-14 4:14 ` Heinrich Schuchardt
2019-08-14 7:19 ` Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190621151650.18350-1-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox