Add Onion Omega2/2+ board support
Subsystems (3)
v2 cover Add Onion Omega2/2+ board support
Add support for the MediaTek based boards by Onion. Whereas the second commit adds the actual board support, the first commit handles a tight flash size constraint for the u-boot-with-spl.bin image.
Changes in v2:
--------------
I forgot to run checkpatch in v1. Fix some style issues in v2.
Philip Oberfichtner (2):
spl: Add size check for u-boot-with-spl.bin
mips: mt7628: Add Onion Omega2/2+ board support
Makefile | 7 ++ 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 ++++ common/spl/Kconfig | 7 ++ configs/onion-omega2p_defconfig | 81 ++++++++++++++++ include/configs/onion-omega2p.h | 15 +++ 12 files changed, 353 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
Signature · 1 line
2.39.5
PATCH v2 1/2 spl: Add size check for u-boot-with-spl.bin
Introduce another SIZE_CHECK macro for u-boot-with-spl.bin.
---
Notes:
Changes in v2: none
Makefile | 7 +++++++ common/spl/Kconfig | 7 +++++++ 2 files changed, 14 insertions(+)
Makefile +7 -0
@@ -951,6 +951,12 @@ else SPL_SIZE_CHECK = endif +ifneq ($(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT),0x0) +UBOOT_WITH_SPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_UBOOT_WITH_SPL_SIZE_LIMIT)) +else +UBOOT_WITH_SPL_SIZE_CHECK = +endif + ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0) TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT)) else
@@ -1535,6 +1541,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) + $(UBOOT_WITH_SPL_SIZE_CHECK) ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
common/spl/Kconfig +7 -0
@@ -36,6 +36,13 @@ config SPL_FRAMEWORK_BOARD_INIT_F - initialize the serial (preloader_console_init) Unless you want to provide your own board_init_f, you should say Y. +config UBOOT_WITH_SPL_SIZE_LIMIT + hex "Maximum size of u-boot-with-spl.bin" + default 0x0 + help + Specifies the maximum length of the u-boot-with-spl.bin image. + If this value is zero, it is ignored. + config SPL_SIZE_LIMIT hex "Maximum size of SPL image" default 0x11000 if ARCH_MX6 && !MX6_OCRAM_256KB
Signature · 1 line
2.39.5
Re: [PATCH v2 1/2] spl: Add size check for u-boot-with-spl.bin
Quoted 11 lines · Philip Oberfichtner
Introduce another
SIZE_CHECKmacro for u-boot-with-spl.bin.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v2: noneMakefile | 7 +++++++ common/spl/Kconfig | 7 +++++++ 2 files changed, 14 insertions(+)
So, for u-boot-with-spl.imx we use BOARD_SIZE_CHECK and CONFIG_BOARD_SIZE_LIMIT. I think for consistency it would be better to re-use that option here and expand the help text on CONFIG_BOARD_SIZE_LIMIT to note which build targets make use of it.
Signature · 1 line
Tom
Re: [PATCH v2 1/2] spl: Add size check for u-boot-with-spl.bin
Hi Tom,
Quoted 10 lines · Tom Rini
Quoted 8 lines · Philip Oberfichtner
Introduce another
SIZE_CHECKmacro for u-boot-with-spl.bin.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v2: none
Quoted 8 lines
Quoted 3 lines
Makefile | 7 +++++++ common/spl/Kconfig | 7 +++++++ 2 files changed, 14 insertions(+)So, for u-boot-with-spl.imx we use
BOARD_SIZE_CHECKandCONFIG_BOARD_SIZE_LIMIT. I think for consistency it would be better to re-use that option here and expand the help text onCONFIG_BOARD_SIZE_LIMITto note which build targets make use of it.
Thanks for the feedback! I've tried that, but I have the following issue:
- 402K for u-boot-nodtb.bin
- 152K for u-boot-lzma.img
- 191K for u-boot-with-spl.bin
The end result, u-boot-with-spl.bin, meets the size restriction of 192K. Nevertheless, an intermediary (uncompressed) artifact, u-boot-nodtb.bin, causes the build to fail.
Instead of introducing a new Kconfig option, it should be fine to reuse CONFIG_SPL_SIZE_LIMIT for u-boot-with-spl.bin. I'm not sure which way is better. What do you think?
Best regards,
Philip
Quoted 3 lines
Signature · 2 lines
-- Tom
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-22 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
Re: [PATCH v2 1/2] spl: Add size check for u-boot-with-spl.bin
Quoted 28 lines · Philip Oberfichtner
Hi Tom,
Quoted 10 lines · Tom Rini
Quoted 8 lines · Philip Oberfichtner
Introduce another
SIZE_CHECKmacro for u-boot-with-spl.bin.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v2: noneQuoted 8 lines
Quoted 3 lines
Makefile | 7 +++++++ common/spl/Kconfig | 7 +++++++ 2 files changed, 14 insertions(+)So, for u-boot-with-spl.imx we use
BOARD_SIZE_CHECKandCONFIG_BOARD_SIZE_LIMIT. I think for consistency it would be better to re-use that option here and expand the help text onCONFIG_BOARD_SIZE_LIMITto note which build targets make use of it.Thanks for the feedback! I've tried that, but I have the following issue:
- 402K for u-boot-nodtb.bin
- 152K for u-boot-lzma.img
- 191K for u-boot-with-spl.bin
Quoted 8 lines
The end result, u-boot-with-spl.bin, meets the size restriction of 192K. Nevertheless, an intermediary (uncompressed) artifact, u-boot-nodtb.bin, causes the build to fail.
Instead of introducing a new
Kconfigoption, it should be fine to reuseCONFIG_SPL_SIZE_LIMITfor u-boot-with-spl.bin. I'm not sure which way is better. What do you think?
Ah, OK, I wasn't quite sure and it's unfortunate that the various size check options are all slightly differently named. Yes, if you can use SPL_SIZE_LIMIT here to catch the problem, that's the right one.
Signature · 1 line
Tom
PATCH v2 2/2 mips: mt7628: Add Onion Omega2/2+ board support
In reply to Philip OberfichtnerThe 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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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