[PATCH] MIPS: remove non-functional zbarebox.bin target
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
Date: 2026-05-22 08:38:03
Subsystem:
generic include/asm header files, mips, the rest · Maintainers:
Arnd Bergmann, Thomas Bogendoerfer, Linus Torvalds
To be able to build zbarebox.bin, HEAD_TEXT_BASE must be defined, but
HEAD_TEXT_BASE is dependent on MALLOC_BASE and this has not been defined
for MIPS since commit 2eecaafe20ff ("MIPS: relocation: do not use
configurable memory layout"). This is more than 6 years ago, so it's
safe to assume this is not needed, so just delete all of it and then
remove HEAD_TEXT_BASE and MALLOC_BASE that are now unused.
This leaves following files in the documentation dangling: uemd.rst and
img-ci20 as they reference the zbarebox.bin file, but I am not sure what
the modern alternative is if any. On the bright side, it's not any more
broken than what it was before..
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/mips/Makefile | 14 ---------
arch/mips/boot/uncompress.c | 2 +-
arch/mips/pbl/.gitignore | 11 -------
arch/mips/pbl/Makefile | 44 --------------------------
arch/mips/pbl/piggy.gzip.S | 8 -----
arch/mips/pbl/piggy.lz4.S | 8 -----
arch/mips/pbl/piggy.lzo.S | 8 -----
arch/mips/pbl/piggy.shipped.S | 8 -----
arch/mips/pbl/piggy.xzkern.S | 8 -----
arch/mips/pbl/zbarebox.lds.S | 48 -----------------------------
common/Kconfig | 5 ---
include/asm-generic/memory_layout.h | 3 --
12 files changed, 1 insertion(+), 166 deletions(-)
delete mode 100644 arch/mips/pbl/.gitignore
delete mode 100644 arch/mips/pbl/Makefile
delete mode 100644 arch/mips/pbl/piggy.gzip.S
delete mode 100644 arch/mips/pbl/piggy.lz4.S
delete mode 100644 arch/mips/pbl/piggy.lzo.S
delete mode 100644 arch/mips/pbl/piggy.shipped.S
delete mode 100644 arch/mips/pbl/piggy.xzkern.S
delete mode 100644 arch/mips/pbl/zbarebox.lds.S
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 8001bb54bed5..702acd83892b 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile@@ -79,14 +79,7 @@ KBUILD_CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS_barebox += -static --gc-sections --emit-relocs endif -ifdef CONFIG_IMAGE_COMPRESSION -KBUILD_BINARY := arch/mips/pbl/zbarebox.bin -KBUILD_TARGET := zbarebox.bin -$(KBUILD_BINARY): $(KBUILD_TARGET) -else KBUILD_BINARY := barebox.bin -KBUILD_TARGET := barebox.bin -endif machine-$(CONFIG_MACH_MIPS_MALTA) := malta machine-$(CONFIG_MACH_MIPS_AR231X) := ar231x
@@ -123,13 +116,6 @@ cmd_barebox__ ?= $(LD) $(LDFLAGS_barebox) -o $@ \ CLEAN_FILES += arch/mips/lib/barebox.lds barebox.map barebox.S -pbl := arch/mips/pbl -zbarebox.S zbarebox.bin zbarebox: barebox.bin - $(Q)$(MAKE) $(build)=$(pbl) $(pbl)/$@ - -archclean: - $(MAKE) $(clean)=$(pbl) - dts := arch/mips/dts %.dtb: scripts
diff --git a/arch/mips/boot/uncompress.c b/arch/mips/boot/uncompress.c
index 7530054cc24e..c1b429df5c8f 100644
--- a/arch/mips/boot/uncompress.c
+++ b/arch/mips/boot/uncompress.c@@ -30,7 +30,7 @@ void __section(.text_entry) barebox_pbl_start(void *fdt, void *fdt_end, /* clear bss */ memset(__bss_start, 0, __bss_stop - __bss_start); - /* set 128 KiB at the end of the MALLOC_BASE for early malloc */ + /* set 128 KiB at the end of the malloc area for early malloc */ pbl_malloc_init(TEXT_BASE - PBL_MALLOC_SIZE, PBL_MALLOC_SIZE); piggy_len = (unsigned long)&input_data_end - (unsigned long)&input_data;
diff --git a/arch/mips/pbl/.gitignore b/arch/mips/pbl/.gitignore
deleted file mode 100644
index 667b44eaf356..000000000000
--- a/arch/mips/pbl/.gitignore
+++ /dev/null@@ -1,11 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -piggy.gzip -piggy.lzo -piggy.lz4 -piggy.xzkern -piggy.shipped -zbarebox -zbarebox.bin -zbarebox.lds -zbarebox.map
diff --git a/arch/mips/pbl/Makefile b/arch/mips/pbl/Makefile
deleted file mode 100644
index 38dfbd47243c..000000000000
--- a/arch/mips/pbl/Makefile
+++ /dev/null@@ -1,44 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -suffix_$(CONFIG_IMAGE_COMPRESSION_GZIP) = gzip -suffix_$(CONFIG_IMAGE_COMPRESSION_LZO) = lzo -suffix_$(CONFIG_IMAGE_COMPRESSION_LZ4) = lz4 -suffix_$(CONFIG_IMAGE_COMPRESSION_XZKERN) = xzkern -suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = shipped - -OBJCOPYFLAGS_zbarebox.bin = -O binary -piggy_o := piggy.$(suffix_y).o - -targets := zbarebox.lds zbarebox zbarebox.bin zbarebox.S \ - $(piggy_o) piggy.$(suffix_y) - -# Make sure files are removed during clean -extra-y += piggy.gzip piggy.lz4 piggy.lzo piggy.lzma piggy.xzkern piggy.shipped zbarebox.map - -$(obj)/zbarebox.bin: $(obj)/zbarebox FORCE - $(call if_changed,objcopy) - $(call cmd,check_file_size,$@,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE)) - $(Q)$(kecho) ' Barebox: $@ is ready' - -$(obj)/zbarebox.S: $(obj)/zbarebox FORCE - $(call if_changed,disasm) - -PBL_CPPFLAGS += -fdata-sections -ffunction-sections -LDFLAGS_zbarebox := -Map $(obj)/zbarebox.map -LDFLAGS_zbarebox += -static --gc-sections -zbarebox-common := $(BAREBOX_PBL_OBJS) $(obj)/$(piggy_o) -zbarebox-lds := $(obj)/zbarebox.lds - -quiet_cmd_zbarebox__ ?= LD $@ - cmd_zbarebox__ ?= $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_zbarebox) -o $@ \ - -T $(zbarebox-lds) \ - --whole-archive $(zbarebox-common) --no-whole-archive \ - $(filter-out $(zbarebox-lds) $(zbarebox-common) FORCE ,$^) - -$(obj)/zbarebox: $(zbarebox-lds) $(zbarebox-common) FORCE - $(call if_changed,zbarebox__) - -$(obj)/piggy.$(suffix_y): $(obj)/../../../barebox.bin FORCE - $(call if_changed,$(suffix_y)) - -$(obj)/$(piggy_o): $(obj)/piggy.$(suffix_y) FORCE
diff --git a/arch/mips/pbl/piggy.gzip.S b/arch/mips/pbl/piggy.gzip.S
deleted file mode 100644
index b99ba8aeab6f..000000000000
--- a/arch/mips/pbl/piggy.gzip.S
+++ /dev/null@@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <asm/asm.h> - - .section .data -EXPORT(input_data) - .incbin "arch/mips/pbl/piggy.gzip" -EXPORT(input_data_end)
diff --git a/arch/mips/pbl/piggy.lz4.S b/arch/mips/pbl/piggy.lz4.S
deleted file mode 100644
index c3ddbdace01f..000000000000
--- a/arch/mips/pbl/piggy.lz4.S
+++ /dev/null@@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <asm/asm.h> - - .section .data -EXPORT(input_data) - .incbin "arch/mips/pbl/piggy.lz4" -EXPORT(input_data_end)
diff --git a/arch/mips/pbl/piggy.lzo.S b/arch/mips/pbl/piggy.lzo.S
deleted file mode 100644
index 2c1f4cb34edc..000000000000
--- a/arch/mips/pbl/piggy.lzo.S
+++ /dev/null@@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <asm/asm.h> - - .section .data -EXPORT(input_data) - .incbin "arch/mips/pbl/piggy.lzo" -EXPORT(input_data_end)
diff --git a/arch/mips/pbl/piggy.shipped.S b/arch/mips/pbl/piggy.shipped.S
deleted file mode 100644
index fc2859e6739f..000000000000
--- a/arch/mips/pbl/piggy.shipped.S
+++ /dev/null@@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <asm/asm.h> - - .section .data -EXPORT(input_data) - .incbin "arch/mips/pbl/piggy.shipped" -EXPORT(input_data_end)
diff --git a/arch/mips/pbl/piggy.xzkern.S b/arch/mips/pbl/piggy.xzkern.S
deleted file mode 100644
index 8c99d959f80c..000000000000
--- a/arch/mips/pbl/piggy.xzkern.S
+++ /dev/null@@ -1,8 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#include <asm/asm.h> - - .section .data -EXPORT(input_data) - .incbin "arch/mips/pbl/piggy.xzkern" -EXPORT(input_data_end)
diff --git a/arch/mips/pbl/zbarebox.lds.S b/arch/mips/pbl/zbarebox.lds.S
deleted file mode 100644
index 97d77229b6fb..000000000000
--- a/arch/mips/pbl/zbarebox.lds.S
+++ /dev/null@@ -1,48 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * (C) Copyright 2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix - */ - -#include <asm/barebox.lds.h> -#include <asm-generic/memory_layout.h> - -OUTPUT_ARCH(BAREBOX_OUTPUT_ARCH) -ENTRY(pbl_start) -SECTIONS -{ - . = HEAD_TEXT_BASE; - - PRE_IMAGE - - . = ALIGN(4); - .text : - { - _stext = .; - _text = .; - *(.text_head_entry*) - __bare_init_start = .; - *(.text_bare_init*) - __bare_init_end = .; - *(.text*) - } - - BAREBOX_BARE_INIT_SIZE - - . = ALIGN(4); - __start_rodata = .; - .rodata : { *(.rodata*) } - - .barebox_imd : { BAREBOX_IMD } - - __end_rodata = .; - _etext = .; - - . = ALIGN(4); - .data : { *(.data*) } - - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss*) } - __bss_stop = .; - _end = .; -}
diff --git a/common/Kconfig b/common/Kconfig
index 4bed5644c280..077c00f19026 100644
--- a/common/Kconfig
+++ b/common/Kconfig@@ -289,11 +289,6 @@ config STACK_SIZE default 0x8000 prompt "Stack size" -config MALLOC_BASE - depends on MEMORY_LAYOUT_FIXED - hex - prompt "MALLOC_BASE" - config MALLOC_SIZE hex default 0x400000
diff --git a/include/asm-generic/memory_layout.h b/include/asm-generic/memory_layout.h
index d477f7bbdbf7..b5a0306975be 100644
--- a/include/asm-generic/memory_layout.h
+++ b/include/asm-generic/memory_layout.h@@ -4,13 +4,11 @@ #define __ASM_GENERIC_MEMORY_LAYOUT_H #ifdef CONFIG_MEMORY_LAYOUT_DEFAULT -#define MALLOC_BASE (TEXT_BASE - CONFIG_MALLOC_SIZE) #define STACK_BASE (TEXT_BASE - CONFIG_MALLOC_SIZE - CONFIG_STACK_SIZE) #endif #ifdef CONFIG_MEMORY_LAYOUT_FIXED #define STACK_BASE CONFIG_STACK_BASE -#define MALLOC_BASE CONFIG_MALLOC_BASE #endif #ifdef CONFIG_OPTEE_SIZE
@@ -31,7 +29,6 @@ #define PBL_OPTEE_DTB_MAX_SIZE 0 #endif -#define HEAD_TEXT_BASE MALLOC_BASE #define MALLOC_SIZE CONFIG_MALLOC_SIZE #define STACK_SIZE CONFIG_STACK_SIZE #define SCRATCH_SIZE CONFIG_SCRATCH_SIZE
--
2.47.3