From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Denis Orlov <denorl2009@gmail.com>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/8] MIPS: make use of merged defconfigs
Date: Fri, 17 May 2024 15:26:52 +0200 [thread overview]
Message-ID: <20240517132656.3151273-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240517132656.3151273-1-a.fatoum@pengutronix.de>
QEmu's Malta emulation can be used in four flavors depending on
endianness and CPU register width. So far we only had two defconfigs and
expected users to adjust the config to arrive at the other two flavors
to cut down on duplication in the config files. Let's use the new merged
defconfigs mechanism instead to merge the configs on the fly.
Cc: Denis Orlov <denorl2009@gmail.com>
Cc: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Documentation/boards/mips/qemu-malta.rst | 11 +++
arch/mips/Makefile | 8 ++
arch/mips/configs/le.config | 1 +
arch/mips/configs/mips64.config | 2 +
arch/mips/configs/qemu-malta64el_defconfig | 97 ----------------------
5 files changed, 22 insertions(+), 97 deletions(-)
create mode 100644 arch/mips/configs/le.config
create mode 100644 arch/mips/configs/mips64.config
delete mode 100644 arch/mips/configs/qemu-malta64el_defconfig
diff --git a/Documentation/boards/mips/qemu-malta.rst b/Documentation/boards/mips/qemu-malta.rst
index 44f671638d9d..b10a3965998c 100644
--- a/Documentation/boards/mips/qemu-malta.rst
+++ b/Documentation/boards/mips/qemu-malta.rst
@@ -1,6 +1,17 @@
QEMU Malta
==========
+Building barebox for Qemu Malta:
+
+.. code-block:: sh
+
+ export ARCH=mips
+ make ARCH=mips qemu-malta_defconfig # 32-bit, big-endian
+ make ARCH=mips qemu-maltael_defconfig # 32-bit, little-endian
+ make ARCH=mips qemu-malta64_defconfig # 64-bit, big-endian
+ make ARCH=mips qemu-malta64el_defconfig # 64-bit, little-endian
+
+
Big-endian mode
---------------
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 65a00379ab6e..be360c48a359 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -2,6 +2,14 @@
KBUILD_DEFCONFIG := qemu-malta_defconfig
+generated_configs += $(patsubst %, qemu-malta%_defconfig, el 64 64el)
+qemu-maltael_defconfigs:
+ $(call merge_into_defconfig,qemu-malta_defconfig,le)
+qemu-malta64_defconfig:
+ $(call merge_into_defconfig,qemu-malta_defconfig,mips64)
+qemu-malta64el_defconfig:
+ $(call merge_into_defconfig,qemu-malta_defconfig,mips64 le)
+
#
# Select the object file format to substitute into the linker script.
#
diff --git a/arch/mips/configs/le.config b/arch/mips/configs/le.config
new file mode 100644
index 000000000000..ee43fdb3b8f4
--- /dev/null
+++ b/arch/mips/configs/le.config
@@ -0,0 +1 @@
+CONFIG_CPU_LITTLE_ENDIAN=y
diff --git a/arch/mips/configs/mips64.config b/arch/mips/configs/mips64.config
new file mode 100644
index 000000000000..0e80be76cbc6
--- /dev/null
+++ b/arch/mips/configs/mips64.config
@@ -0,0 +1,2 @@
+CONFIG_CPU_MIPS64_R2=y
+CONFIG_64BIT=y
diff --git a/arch/mips/configs/qemu-malta64el_defconfig b/arch/mips/configs/qemu-malta64el_defconfig
deleted file mode 100644
index c1f7366d76d3..000000000000
--- a/arch/mips/configs/qemu-malta64el_defconfig
+++ /dev/null
@@ -1,97 +0,0 @@
-CONFIG_BOARD_QEMU_MALTA=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_MIPS64_R2=y
-CONFIG_64BIT=y
-CONFIG_IMAGE_COMPRESSION_XZKERN=y
-CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x400000
-CONFIG_STACK_SIZE=0x7000
-CONFIG_EXPERIMENTAL=y
-CONFIG_BAUDRATE=38400
-CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_CMDLINE_EDITING=y
-CONFIG_AUTO_COMPLETE=y
-CONFIG_MENU=y
-CONFIG_BOOTM_SHOW_TYPE=y
-CONFIG_CONSOLE_ALLOW_COLOR=y
-CONFIG_PARTITION_DISK_EFI=y
-CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
-CONFIG_CMD_DMESG=y
-CONFIG_LONGHELP=y
-CONFIG_CMD_IOMEM=y
-CONFIG_CMD_IMD=y
-CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_GO=y
-CONFIG_CMD_LOADB=y
-CONFIG_CMD_LOADY=y
-CONFIG_CMD_RESET=y
-CONFIG_CMD_PARTITION=y
-CONFIG_CMD_EXPORT=y
-CONFIG_CMD_DEFAULTENV=y
-CONFIG_CMD_LOADENV=y
-CONFIG_CMD_PRINTENV=y
-CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_MD5SUM=y
-CONFIG_CMD_SHA1SUM=y
-CONFIG_CMD_SHA256SUM=y
-CONFIG_CMD_UNCOMPRESS=y
-CONFIG_CMD_SLEEP=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_MIITOOL=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TFTP=y
-CONFIG_CMD_ECHO_E=y
-CONFIG_CMD_EDIT=y
-CONFIG_CMD_LOGIN=y
-CONFIG_CMD_MENU=y
-CONFIG_CMD_MENU_MANAGEMENT=y
-CONFIG_CMD_PASSWD=y
-CONFIG_CMD_FBTEST=y
-CONFIG_CMD_READLINE=y
-CONFIG_CMD_TIMEOUT=y
-CONFIG_CMD_CRC=y
-CONFIG_CMD_CRC_CMP=y
-CONFIG_CMD_FLASH=y
-CONFIG_CMD_GPIO=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_OF_NODE=y
-CONFIG_CMD_OF_PROPERTY=y
-CONFIG_CMD_OFTREE=y
-CONFIG_CMD_TIME=y
-CONFIG_NET=y
-CONFIG_NET_NFS=y
-CONFIG_NET_NETCONSOLE=y
-CONFIG_OFDEVICE=y
-CONFIG_OF_BAREBOX_DRIVERS=y
-CONFIG_VIRTIO_CONSOLE=y
-CONFIG_DRIVER_NET_E1000=y
-CONFIG_DRIVER_NET_RTL8139=y
-CONFIG_DRIVER_NET_VIRTIO=y
-# CONFIG_SPI is not set
-CONFIG_I2C=y
-CONFIG_I2C_GPIO=y
-CONFIG_MTD=y
-CONFIG_DRIVER_CFI=y
-# CONFIG_DRIVER_CFI_AMD is not set
-# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set
-# CONFIG_DRIVER_CFI_BANK_WIDTH_2 is not set
-CONFIG_CFI_BUFFER_WRITE=y
-CONFIG_DISK=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIDEO=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_DRIVER_VIDEO_BOCHS_PCI=y
-CONFIG_VIRTIO_INPUT=y
-CONFIG_HWRNG=y
-CONFIG_HW_RANDOM_VIRTIO=y
-CONFIG_GPIO_MALTA_FPGA_I2C=y
-CONFIG_PCI=y
-CONFIG_PCI_DEBUG=y
-CONFIG_SYSCON_REBOOT_MODE=y
-CONFIG_POWER_RESET_SYSCON=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_FS_CRAMFS=y
-CONFIG_FS_EXT4=y
-CONFIG_FS_TFTP=y
-CONFIG_FS_FAT=y
-CONFIG_FS_FAT_WRITE=y
-CONFIG_FS_FAT_LFN=y
--
2.39.2
next prev parent reply other threads:[~2024-05-17 13:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 13:26 [PATCH 0/8] kconfig: cut down on duplication with " Ahmad Fatoum
2024-05-17 13:26 ` [PATCH 1/8] test: move common config fragments into common/boards/configs Ahmad Fatoum
2024-05-17 13:26 ` [PATCH 2/8] kconfig: merge_config.sh: sync with Linux v6.9 Ahmad Fatoum
2024-05-17 13:26 ` [PATCH 3/8] kbuild: add support for merged defconfigs Ahmad Fatoum
2024-05-17 13:26 ` Ahmad Fatoum [this message]
2024-05-20 10:23 ` [PATCH] fixup! MIPS: make use of " Ahmad Fatoum
2024-05-17 13:26 ` [PATCH 5/8] sandbox: stdio: fix ctrlc link error when CONFIG_CONSOLE_NONE=y Ahmad Fatoum
2024-05-17 13:26 ` [PATCH 6/8] net: fix build with CONFIG_SHELL_NONE Ahmad Fatoum
2024-05-17 13:26 ` [PATCH 7/8] power: reset: reboot-mode: fix link error without globalvar Ahmad Fatoum
2024-05-17 13:26 ` [PATCH 8/8] sandbox: add headless_defconfig Ahmad Fatoum
2024-05-21 6:20 ` [PATCH 0/8] kconfig: cut down on duplication with merged defconfigs Sascha Hauer
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=20240517132656.3151273-5-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=denorl2009@gmail.com \
/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