Skip to contentSkip to conversation

Makefile: Add size check for u-boot-with-spl.bin

PATCH Superseded Philip Oberfichtner 1 participant 2 messages Jun 3, 2025

Subsystems (3)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 Makefile: Add size check for u-boot-with-spl.bin

Like other images, u-boot-with-spl.bin may be subject to size restrictions. Extend CONFIG_SPL_SIZE_LIMIT to handle this case.

---

Notes:
Changes in v2: none

Changes in v3:
Reuse existing SPL_SIZE_LIMIT instead of implementing a new option

 Makefile           | 1 +
 common/spl/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
Makefile +1 -0
index f88684947ee..9f3b09a60a3 100644
@@ -1535,6 +1535,7 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
 				   --pad-to=$(CONFIG_SPL_PAD_TO)
 u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
 	$(call if_changed,pad_cat)
+	$(SPL_SIZE_CHECK)
 
 ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
 MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
common/spl/Kconfig +1 -1
index 77cf04d38ed..ff61ee91a10 100644
@@ -43,7 +43,7 @@ config SPL_SIZE_LIMIT
 	default 0x30000 if ARCH_MVEBU && ARMADA_32BIT
 	default 0x0
 	help
-	  Specifies the maximum length of the U-Boot SPL image.
+	  Specifies the maximum length of U-Boot SPL images.
 	  If this value is zero, it is ignored.
 
 config SPL_SIZE_LIMIT_SUBTRACT_GD
Signature · 1 line
2.39.5
#1 lore raw

PATCH v3 2/2 mips: mt7628: Add Onion Omega2/2+ board support

The Omega2 / Omega2+ are based on the MediaTek MT7688 SoC with the following features:
- 64 / 128MB of DDR2 memory
- 16 / 32MB of SPI NOR flash
- USB, WiFi and many more peripherals

---

Notes:
Changes in v2:
- Fix style issues as reported by checkpatch
- Add MAINTAINERS file

Changes in v3:
- Adapt defconfig to [PATCH 1/2] (SPL_SIZE_LIMIT)

 arch/mips/dts/Makefile               |   1 +
 arch/mips/dts/onion-omega2p.dts      |  58 ++++++++++++
 arch/mips/mach-mtmips/mt7628/Kconfig |   7 ++
 board/onion/omega2p/Kconfig          |  12 +++
 board/onion/omega2p/MAINTAINERS      |  10 ++
 board/onion/omega2p/Makefile         |   3 +
 board/onion/omega2p/board.c          | 134 +++++++++++++++++++++++++++
 board/onion/omega2p/omega2p.env      |  18 ++++
 configs/onion-omega2p_defconfig      |  81 ++++++++++++++++
 include/configs/onion-omega2p.h      |  15 +++
 10 files changed, 339 insertions(+)
 create mode 100644 arch/mips/dts/onion-omega2p.dts
 create mode 100644 board/onion/omega2p/Kconfig
 create mode 100644 board/onion/omega2p/MAINTAINERS
 create mode 100644 board/onion/omega2p/Makefile
 create mode 100644 board/onion/omega2p/board.c
 create mode 100644 board/onion/omega2p/omega2p.env
 create mode 100644 configs/onion-omega2p_defconfig
 create mode 100644 include/configs/onion-omega2p.h
arch/mips/dts/Makefile +1 -0
index 7c4ee8b668b..cb33f96edee 100644
@@ -21,6 +21,7 @@ dtb-$(CONFIG_BOARD_MT7621_NAND_RFB) += mediatek,mt7621-nand-rfb.dtb
 dtb-$(CONFIG_BOARD_MT7628_RFB) += mediatek,mt7628-rfb.dtb
 dtb-$(CONFIG_BOARD_GARDENA_SMART_GATEWAY_MT7688) += gardena-smart-gateway-mt7688.dtb
 dtb-$(CONFIG_BOARD_LINKIT_SMART_7688) += linkit-smart-7688.dtb
+dtb-$(CONFIG_BOARD_ONION_OMEGA2) += onion-omega2p.dtb
 dtb-$(CONFIG_TARGET_OCTEON_EBB7304) += mrvl,octeon-ebb7304.dtb
 dtb-$(CONFIG_TARGET_OCTEON_NIC23) += mrvl,octeon-nic23.dtb
 dtb-$(CONFIG_BOARD_NETGEAR_CG3100D) += netgear,cg3100d.dtb
arch/mips/dts/onion-omega2p.dts new file +58 -0

58 lines not on this page · raw message

arch/mips/mach-mtmips/mt7628/Kconfig +7 -0
index 79b2ddc6692..a75196eaefd 100644
@@ -27,6 +27,12 @@ config BOARD_MT7628_RFB
 	  SPI-NOR flash, 1 built-in switch with 5 ports, 1 UART, 1 USB host,
 	  1 SDXC, 1 PCIe socket and JTAG pins.
 
+config BOARD_ONION_OMEGA2
+	bool "Onion Omega2/2+"
+	help
+	  Onion Omega2/2+ IoT computer. Has a MT7688 SoC with 64/128 MiB of DDR2
+	  RAM and 16/32 MiB of SPI flash.
+
 config BOARD_VOCORE2
 	bool "VoCore2"
 	select SPL_SERIAL
@@ -52,6 +58,7 @@ config SYS_CONFIG_NAME
 	default "mt7628" if BOARD_MT7628_RFB
 
 source "board/gardena/smart-gateway-mt7688/Kconfig"
+source "board/onion/omega2p/Kconfig"
 source "board/seeed/linkit-smart-7688/Kconfig"
 source "board/vocore/vocore2/Kconfig"
 
board/onion/omega2p/Kconfig new file +12 -0
new file mode 100644
index 00000000000..45c18ee27ef
@@ -0,0 +1,12 @@
+if BOARD_ONION_OMEGA2
+
+config SYS_BOARD
+	default "omega2p"
+
+config SYS_VENDOR
+	default "onion"
+
+config SYS_CONFIG_NAME
+	default "onion-omega2p"
+
+endif
board/onion/omega2p/MAINTAINERS new file +10 -0
new file mode 100644
index 00000000000..4532c1c6d3e
@@ -0,0 +1,10 @@
+ONION OMEGA2/2+
+M:	Philip Oberfichtner <[email protected]>
+S:	Maintained
+F:	arch/mips/dts/onion-omega2p.dts
+F:	board/onion/omega2p/Kconfig
+F:	board/onion/omega2p/Makefile
+F:	board/onion/omega2p/board.c
+F:	board/onion/omega2p/omega2p.env
+F:	configs/onion-omega2p_defconfig
+F:	include/configs/onion-omega2p.h
board/onion/omega2p/Makefile new file +3 -0
new file mode 100644
index 00000000000..70cd7a8e568
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+obj-y += board.o
board/onion/omega2p/board.c new file +134 -0

134 lines not on this page · raw message

board/onion/omega2p/omega2p.env new file +18 -0
new file mode 100644
index 00000000000..ff3fdcadf90
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2025 DENX Software Engineering GmbH, Philip Oberfichtner <[email protected]>
+
+# Boot options
+bootargs=console=ttyS0,115200 rootfstype=squashfs,jffs2
+bootfile=firmware.bin
+boot_linux=sf probe && mtd read firmware 81800000 0 400000 && bootm 81800000
+enter_shell=env set reset_pressed # unset variable
+bootcmd= if test -z "${reset_pressed}"; then run boot_linux; else run enter_shell; fi
+
+# Network configuration
+serverip=192.168.8.100
+ipaddr=192.168.8.8
+loadaddr=0x81800000
+
+# MTD settings
+mtdids=nor0=spi0.0
+# mtdparts will be set at runtime, according to the specific board variant.
configs/onion-omega2p_defconfig new file +81 -0

81 lines not on this page · raw message

include/configs/onion-omega2p.h new file +15 -0
new file mode 100644
index 00000000000..ca170b22a40
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2024 Zheng Han <[email protected]>, Lazar Demin <[email protected]>
+ */
+#ifndef __CONFIG_ONION_OMEGA2P_H
+#define __CONFIG_ONION_OMEGA2P_H
+
+/* RAM */
+#define CFG_SYS_SDRAM_BASE      0x80000000
+#define CFG_SYS_INIT_SP_OFFSET  0x400000
+
+/* Dummy value */
+#define CFG_SYS_UBOOT_BASE      0
+
+#endif /* __CONFIG_ONION_OMEGA2P_H */
Signature · 1 line
2.39.5