Add Onion Omega2/2+ board support
Subsystems (3)
v4 cover Add Onion Omega2/2+ board support
Add support for the MediaTek based boards by Onion. Commit one and two are rather generic, whereas the third commit adds the actual board support.
Changes in v4:
- Rebase board support to v2025.07
- Add new commit to silence warning in arch/mips/
Changes in v3:
- Simplify image size check
Changes in v2:
- I forgot to run checkpatch in v1. Fix some style issues in v2.
Philip Oberfichtner (3):
Makefile: Add size check for u-boot-with-spl.bin
mips: serial: Silence "unused variable" warning
mips: mt7628: Add Onion Omega2/2+ board support
Makefile | 1 + arch/mips/dts/Makefile | 1 + arch/mips/dts/onion-omega2p.dts | 58 ++++++++++ arch/mips/mach-mtmips/mt7620/serial.c | 2 +- arch/mips/mach-mtmips/mt7621/spl/serial.c | 2 +- arch/mips/mach-mtmips/mt7628/Kconfig | 7 ++ arch/mips/mach-mtmips/mt7628/serial.c | 2 +- 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 | 32 ++++++ common/spl/Kconfig | 2 +- configs/onion-omega2p_defconfig | 82 +++++++++++++ include/configs/onion-omega2p.h | 15 +++ 15 files changed, 359 insertions(+), 4 deletions(-) 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 v4 1/3 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 v4: none
Changes in v3:
Reuse existing SPL_SIZE_LIMIT instead of implementing a new option
Changes in v2: none
Makefile | 1 + common/spl/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Makefile +1 -0
@@ -1545,6 +1545,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
@@ -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
Re: [PATCH v4 1/3] Makefile: Add size check for u-boot-with-spl.bin
Hi Philip,
Quoted 24 lines · Philip Oberfichtner
Like other images, u-boot-with-spl.bin may be subject to size restrictions. Extend
CONFIG_SPL_SIZE_LIMITto handle this case.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v4: noneChanges in v3:
Reuse existingSPL_SIZE_LIMITinstead of implementing a new optionChanges in v2: none
Makefile | 1 + common/spl/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)Makefile +0
-0
Makefile OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ · line 1548
Quoted 4 lines
Makefile +1
-0@@ -1545,6 +1545,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)
There's a rule in the Makefile
ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0)SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit)) elseSPL_SIZE_CHECK =
endif
and
isn't this running?
Thanks
/Ilias
Quoted 19 lines
Makefile +0
-0ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)common/spl/Kconfig +1
-2@@ -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 --2.39.5
Re: [PATCH v4 1/3] Makefile: Add size check for u-boot-with-spl.bin
Hi Ilias,
Thanks for having a look at this!
Quoted 17 lines · Ilias Apalodimas
Makefile OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ · line 1548
Quoted 9 lines
Makefile +1
-0@@ -1545,6 +1545,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)There's a rule in the
Makefile
ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0)SPL_SIZE_CHECK= @$(call size_check,$@,$$(tools/spl_size_limit)) elseSPL_SIZE_CHECK=
endif
Quoted 3 lines
and
isn't this running?
Well, before this patch it only ran for the u-boot-spl.bin target. But I also need it for the combined u-boot-with-spl.bin image.
I'm not sure if this answers your question?
Just for reference I'll put a link to the previous discussion with Tom:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Best regards,
Philip
Quoted 4 lines
Thanks
/Ilias
Ilias Apalodimas
Acked-byRe: [PATCH v4 1/3] Makefile: Add size check for u-boot-with-spl.bin
Hi Philip
Quoted 25 lines · Philip Oberfichtner
Hi Ilias,
Thanks for having a look at this!
Quoted 19 lines · Ilias Apalodimas
Makefile OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ · line 1548
Quoted 9 lines
Makefile +1
-0@@ -1545,6 +1545,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)There's a rule in the
Makefile
ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0)SPL_SIZE_CHECK= @$(call size_check,$@,$$(tools/spl_size_limit)) elseSPL_SIZE_CHECK=
endifand
Quoted 7 lines
Quoted 1 line
isn't this running?
Well, before this patch it only ran for the u-boot-spl.bin target. But I also need it for the combined u-boot-with-spl.bin image.
I'm not sure if this answers your question?
It does, I misread your email
Quoted 4 lines
Just for reference I'll put a link to the previous discussion with Tom:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Thanks for the reference
/Ilias
Quoted 9 lines
Best regards,
PhilipQuoted 4 lines
Thanks
/Ilias
Re: [PATCH v4 1/3] Makefile: Add size check for u-boot-with-spl.bin
In reply to Philip OberfichtnerQuoted 9 lines · Philip Oberfichtner
Like other images, u-boot-with-spl.bin may be subject to size restrictions. Extend
CONFIG_SPL_SIZE_LIMITto handle this case.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v4: none
Quoted 8 lines
Changes in v3:
Reuse existingSPL_SIZE_LIMITinstead of implementing a new optionChanges in v2: none
Makefile | 1 + common/spl/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
This is not quite right enough, sorry. This causes a number of boards (evb-ast2600 ibm-sbp1 stm32746g-eval_spl stm32f746-disco_spl stm32f769-disco_spl) which have size checks and are fine to now fail their size checks, presumably because they're checking the "wrong" file now or similar. So if you can't see a way to fix both them and your board then sigh, I was wrong initially and we will need another size check method like you proposed to start with.
Signature · 1 line
Tom
Re: [PATCH v4 1/3] Makefile: Add size check for u-boot-with-spl.bin
Hi Tom,
Quoted 20 lines · Tom Rini
Quoted 9 lines · Philip Oberfichtner
Like other images, u-boot-with-spl.bin may be subject to size restrictions. Extend
CONFIG_SPL_SIZE_LIMITto handle this case.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v4: noneQuoted 8 lines
Changes in v3:
Reuse existingSPL_SIZE_LIMITinstead of implementing a new optionChanges in v2: none
Makefile | 1 + common/spl/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
Quoted 5 lines
This is not quite right enough, sorry. This causes a number of boards (evb-ast2600 ibm-sbp1 stm32746g-eval_spl stm32f746-disco_spl stm32f769-disco_spl) which have size checks and are fine to now fail their size checks, presumably because they're checking the "wrong" file now or similar.
Thanks for pointing that out. To sum it up: If those boards use SPL_SIZE_LIMIT to restrict the size of an SPL-only image, then u-boot-with-spl.bin, of course, can be too large and the build fails.
Plus in our previous discussion, we figured out why using BOARD_SIZE_LIMIT also isn't suitable:
https://lore.kernel.org/u-boot/aD2EflR9DRYG-MY5@antares/
So from here I really don't see any better way than introducing yet another CONFIG_*SIZE_LIMIT option.
But maybe we can however simplify and deduplicate some of the code. What do you think about something like that (I have not yet tested it, just a rough idea so far):
Makefile +11 -35
@@ -372,7 +372,7 @@ endif define size_check actual=$$( wc -c $1 | awk '{print $$1}'); \ limit=$$( printf "%d" $2 ); \ - if test $$actual -gt $$limit; then \ + if test $$limit -gt 0 && test $$actual -gt $$limit; then \ echo "$1 exceeds file size limit:" >&2; \ echo " limit: $$(printf %#x $$limit) bytes" >&2; \ echo " actual: $$(printf %#x $$actual) bytes" >&2; \
@@ -939,30 +939,6 @@ LDPPFLAGS += \ ######################################################################### ######################################################################### -ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) -BOARD_SIZE_CHECK= @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) -else -BOARD_SIZE_CHECK = -endif - -ifneq ($(CONFIG_SPL_SIZE_LIMIT),0x0) -SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit)) -else -SPL_SIZE_CHECK = -endif - -ifneq ($(CONFIG_TPL_SIZE_LIMIT),0x0) -TPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT)) -else -TPL_SIZE_CHECK = -endif - -ifneq ($(CONFIG_VPL_SIZE_LIMIT),0x0) -VPL_SIZE_CHECK = @$(call size_check,$@,$(CONFIG_VPL_SIZE_LIMIT)) -else -VPL_SIZE_CHECK = -endif - # Statically apply RELA-style relocations (currently arm64 only) # This is useful for arm64 where static relocation needs to be performed on # the raw binary, but certain simulators only accept an ELF file (but don't
@@ -1266,7 +1242,7 @@ endif %.imx: $(IMX_DEPS) %.bin $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ - $(BOARD_SIZE_CHECK) + @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) %.vyb: %.imx $(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@
@@ -1367,12 +1343,12 @@ endif u-boot-nodtb.bin: u-boot FORCE $(call if_changed,objcopy_uboot) - $(BOARD_SIZE_CHECK) + @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) u-boot.ldr: u-boot $(CREATE_LDR_ENV) $(LDR) -T $(CONFIG_LDR_CPU) -c $@ $< $(LDR_FLAGS) - $(BOARD_SIZE_CHECK) + @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) # binman # ---------------------------------------------------------------------------
@@ -1498,7 +1474,7 @@ u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \ $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SANDBOX),dts/dt.dtb) \ ,$(UBOOT_BIN)) FORCE $(call if_changed,mkimage) - $(BOARD_SIZE_CHECK) + @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) ifeq ($(CONFIG_SPL_LOAD_FIT_FULL),y) MKIMAGEFLAGS_u-boot.itb =
@@ -1513,12 +1489,12 @@ u-boot.itb: u-boot-nodtb.bin \ $(if $(CONFIG_MULTI_DTB_FIT),$(FINAL_DTB_CONTAINER)) \ $(U_BOOT_ITS) FORCE $(call if_changed,mkfitimage) - $(BOARD_SIZE_CHECK) + @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) endif u-boot-with-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE $(call if_changed,mkimage) - $(BOARD_SIZE_CHECK) + @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) u-boot.dis: u-boot $(OBJDUMP) -d $< > $@
@@ -1535,7 +1511,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) + @$(call size_check,$@,$$(tools/spl_size_limit)) ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
@@ -2108,7 +2084,7 @@ u-boot.lds: $(LDSCRIPT) prepare FORCE spl/u-boot-spl.bin: spl/u-boot-spl @: - $(SPL_SIZE_CHECK) + @$(call size_check,$@,$$(tools/spl_size_limit)) spl/u-boot-spl-dtb.bin: spl/u-boot-spl @:
@@ -2133,14 +2109,14 @@ spl/boot.bin: spl/u-boot-spl tpl/u-boot-tpl.bin: tpl/u-boot-tpl @: - $(TPL_SIZE_CHECK) + @$(call size_check,$@,$(CONFIG_TPL_SIZE_LIMIT)) tpl/u-boot-tpl: tools prepare $(if $(CONFIG_TPL_OF_CONTROL),dts/dt.dtb) $(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.xpl all vpl/u-boot-vpl.bin: vpl/u-boot-vpl @: - $(VPL_SIZE_CHECK) + @$(call size_check,$@,$(CONFIG_VPL_SIZE_LIMIT)) vpl/u-boot-vpl: tools prepare $(if $(CONFIG_TPL_OF_CONTROL),dts/dt.dtb) $(Q)$(MAKE) obj=vpl -f $(srctree)/scripts/Makefile.xpl all
Re: [PATCH v4 1/3] Makefile: Add size check for u-boot-with-spl.bin
Quoted 37 lines · Philip Oberfichtner
Hi Tom,
Quoted 20 lines · Tom Rini
Quoted 9 lines · Philip Oberfichtner
Like other images, u-boot-with-spl.bin may be subject to size restrictions. Extend
CONFIG_SPL_SIZE_LIMITto handle this case.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v4: noneQuoted 8 lines
Changes in v3:
Reuse existingSPL_SIZE_LIMITinstead of implementing a new optionChanges in v2: none
Makefile | 1 + common/spl/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)Quoted 5 lines
This is not quite right enough, sorry. This causes a number of boards (evb-ast2600 ibm-sbp1 stm32746g-eval_spl stm32f746-disco_spl stm32f769-disco_spl) which have size checks and are fine to now fail their size checks, presumably because they're checking the "wrong" file now or similar.
Thanks for pointing that out. To sum it up: If those boards use
SPL_SIZE_LIMITto restrict the size of an SPL-only image, then u-boot-with-spl.bin, of course, can be too large and the build fails.Plus in our previous discussion, we figured out why using
BOARD_SIZE_LIMITalso isn't suitable:
https://lore.kernel.org/u-boot/aD2EflR9DRYG-MY5@antares/
Quoted 7 lines
So from here I really don't see any better way than introducing yet another CONFIG_*SIZE_LIMIT option.
But maybe we can however simplify and deduplicate some of the code. What do you think about something like that (I have not yet tested it, just a rough idea so far):
That sounds like a good idea, so long as it works :) Thanks!
Signature · 1 line
Tom
Re: [PATCH v4 1/3] Makefile: Add size check for u-boot-with-spl.bin
Quoted 42 lines · Tom Rini
Quoted 41 lines · Philip Oberfichtner
Hi Tom,
Quoted 20 lines · Tom Rini
Quoted 9 lines · Philip Oberfichtner
Like other images, u-boot-with-spl.bin may be subject to size restrictions. Extend
CONFIG_SPL_SIZE_LIMITto handle this case.Signed-off-by Philip Oberfichtner <[email protected]>---
Notes:
Changes in v4: noneQuoted 8 lines
Changes in v3:
Reuse existingSPL_SIZE_LIMITinstead of implementing a new optionChanges in v2: none
Makefile | 1 + common/spl/Kconfig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)Quoted 5 lines
This is not quite right enough, sorry. This causes a number of boards (evb-ast2600 ibm-sbp1 stm32746g-eval_spl stm32f746-disco_spl stm32f769-disco_spl) which have size checks and are fine to now fail their size checks, presumably because they're checking the "wrong" file now or similar.
Thanks for pointing that out. To sum it up: If those boards use
SPL_SIZE_LIMITto restrict the size of an SPL-only image, then u-boot-with-spl.bin, of course, can be too large and the build fails.Plus in our previous discussion, we figured out why using
BOARD_SIZE_LIMITalso isn't suitable:
https://lore.kernel.org/u-boot/aD2EflR9DRYG-MY5@antares/So from here I really don't see any better way than introducing yet another CONFIG_*SIZE_LIMIT option.
Quoted 6 lines
Quoted 3 lines
But maybe we can however simplify and deduplicate some of the code. What do you think about something like that (I have not yet tested it, just a rough idea so far):
That sounds like a good idea, so long as it works :) Thanks!
So I've tested it for multiple board/image combinations. Should be fine now. v5 is on the way.
Best regards,
Philip
Quoted 2 lines
Signature · 1 line
Tom
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Johanna Denk, Tabea Lutz HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany =====================================================================
PATCH v4 2/3 mips: serial: Silence "unused variable" warning
In reply to Philip OberfichtnerBefore this commit, mtmips_spl_serial_init() caused the following warning:
arch/mips/mach-mtmips/mt7628/serial.c:14:23: warning: unused variable ‘base’ [-Wunused-variable]
14 | void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);
| ^~~~This happens whenever CONFIG_SPECIFY_CONSOLE_INDEX is unset, which leads to an effectively empty function:
void mtmips_spl_serial_init(void)
{
void __iomem *base = ioremap_nocache(SYSCTL_BASE, SYSCTL_SIZE);}
Add the __maybe_unused attribute to silence this warning.
---
Notes:
Changes in v4: new
arch/mips/mach-mtmips/mt7620/serial.c | 2 +- arch/mips/mach-mtmips/mt7621/spl/serial.c | 2 +- arch/mips/mach-mtmips/mt7628/serial.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
arch/mips/mach-mtmips/mt7620/serial.c +1 -1
@@ -24,7 +24,7 @@ void board_debug_uart_init(void)void mtmips_spl_serial_init (void ) {#ifdef CONFIG_SPL_SERIAL -void __iomem *base =ioremap_nocache (SYSCTL_BASE ,SYSCTL_SIZE ); +void __iomem __maybe_unused *base =ioremap_nocache (SYSCTL_BASE ,SYSCTL_SIZE );#if CONFIG_CONS_INDEX ==1 clrbits_32 (base +SYSCTL_GPIOMODE_REG ,UARTL_GPIO_MODE );
arch/mips/mach-mtmips/mt7621/spl/serial.c +1 -1
@@ -11,7 +11,7 @@void mtmips_spl_serial_init (void ) {#ifdef CONFIG_SPL_SERIAL -void __iomem *base =ioremap_nocache (SYSCTL_BASE ,SYSCTL_SIZE ); +void __iomem __maybe_unused *base =ioremap_nocache (SYSCTL_BASE ,SYSCTL_SIZE );#if CONFIG_CONS_INDEX ==1 clrbits_32 (base +SYSCTL_GPIOMODE_REG ,UART1_MODE );
arch/mips/mach-mtmips/mt7628/serial.c +1 -1
@@ -11,7 +11,7 @@void mtmips_spl_serial_init (void ) {#ifdef CONFIG_SPL_SERIAL -void __iomem *base =ioremap_nocache (SYSCTL_BASE ,SYSCTL_SIZE ); +void __iomem __maybe_unused *base =ioremap_nocache (SYSCTL_BASE ,SYSCTL_SIZE );#if CONFIG_CONS_INDEX ==1 clrbits_32 (base +SYSCTL_GPIO_MODE1_REG ,UART0_MODE_M );
Signature · 1 line
2.39.5
PATCH v4 3/3 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 v4:
- Adapt bootcmd
- Rebase defconfig
Changes in v3:
- Adapt defconfig to [PATCH 1/2] (SPL_SIZE_LIMIT)
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 | 32 +++++++ configs/onion-omega2p_defconfig | 82 ++++++++++++++++ include/configs/onion-omega2p.h | 15 +++ 10 files changed, 354 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 +32 -0
@@ -0,0 +1,32 @@ +# 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 + +# unset temporary variable and make the environment persist if necessary. +env_check= \ + env set reset_pressed; \ + if env info -p -d -q; then \ + echo "No valid environment found on flash. Write out the defaults."; \ + env save; \ + fi + +bootcmd= \ + if test -z "${reset_pressed}"; then \ + run env_check; \ + run boot_linux; \ + else \ + run env_check; \ + 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 +82 -0
82 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
Hi all,
It's been a while since my first submission of this patch set (end of May). I'd hope we could still get it in within the current merge window?
Best regards,
Philip
Quoted 46 lines · Philip Oberfichtner
Add support for the MediaTek based boards by Onion. Commit one and two are rather generic, whereas the third commit adds the actual board support.
Changes in v4:
- Rebase board support to v2025.07
- Add new commit to silence warning inarch/mips/Changes in v3:
- Simplify image size checkChanges in v2:
- I forgot to run checkpatch in v1. Fix some style issues in v2.Philip Oberfichtner (3):
Makefile: Add size check for u-boot-with-spl.bin
mips: serial: Silence "unused variable" warning
mips: mt7628: Add Onion Omega2/2+ board supportMakefile | 1 + arch/mips/dts/Makefile | 1 + arch/mips/dts/onion-omega2p.dts | 58 ++++++++++ arch/mips/mach-mtmips/mt7620/serial.c | 2 +- arch/mips/mach-mtmips/mt7621/spl/serial.c | 2 +- arch/mips/mach-mtmips/mt7628/Kconfig | 7 ++ arch/mips/mach-mtmips/mt7628/serial.c | 2 +- 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 | 32 ++++++ common/spl/Kconfig | 2 +- configs/onion-omega2p_defconfig | 82 +++++++++++++ include/configs/onion-omega2p.h | 15 +++ 15 files changed, 359 insertions(+), 4 deletions(-) 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.hSignature · 1 line
2.39.5
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Johanna Denk, Tabea Lutz HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany =====================================================================