From 38f1e758ffa159449a540ee89c54f771d566c787 Mon Sep 17 00:00:00 2001 From: Yu-Ping Wu Date: Wed, 9 Apr 2025 07:39:39 +0800 Subject: [PATCH] util/mtkheader: Rename to util/mediatek To allow adding more scripts to the util/mtkheader folder, rename it to util/mediatek. Also update description.md and regenerate Documentation/util.md and util/README.md by util_readme.sh. Change-Id: Ibc6ef9dddc541d2dd471898af431cadde231edca Signed-off-by: Yu-Ping Wu Reviewed-on: https://review.coreboot.org/c/coreboot/+/87225 Tested-by: build bot (Jenkins) Reviewed-by: Yidi Lin --- Documentation/util.md | 4 +++- src/soc/mediatek/mt8173/Makefile.mk | 2 +- src/soc/mediatek/mt8183/Makefile.mk | 2 +- src/soc/mediatek/mt8186/Makefile.mk | 2 +- src/soc/mediatek/mt8188/Makefile.mk | 2 +- src/soc/mediatek/mt8189/Makefile.mk | 2 +- src/soc/mediatek/mt8192/Makefile.mk | 2 +- src/soc/mediatek/mt8195/Makefile.mk | 2 +- src/soc/mediatek/mt8196/Makefile.mk | 2 +- util/README.md | 4 +++- util/cbfstool/platform_fixups.c | 2 +- util/mediatek/description.md | 2 ++ util/{mtkheader => mediatek}/gen-bl-img.py | 0 util/mtkheader/description.md | 1 - 14 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 util/mediatek/description.md rename util/{mtkheader => mediatek}/gen-bl-img.py (100%) delete mode 100644 util/mtkheader/description.md diff --git a/Documentation/util.md b/Documentation/util.md index 341a4c5751..ba4618fa69 100644 --- a/Documentation/util.md +++ b/Documentation/util.md @@ -87,9 +87,11 @@ image for testing purposes and for working on firmware. `Bash` * __marvell__ - Add U-Boot boot loader for Marvell ARMADA38X `C` * __[me_cleaner](https://github.com/corna/me_cleaner)__ - Tool for partial deblobbing of Intel ME/TXE firmware images `Python` +* __mediatek__ + * gen-bl-img.py - Generate MediaTek bootloader header. +`Python3` * __mma__ - Memory Margin Analysis automation tests `Bash` * __msrtool__ - Dumps chipset-specific MSR registers. `C` -* __mtkheader__ - Generate MediaTek bootload header. `Python3` * __nvidia__ - nvidia blob parsers * __nvramtool__ - Reads and writes coreboot parameters and displaying information from the coreboot table in CMOS/NVRAM. `C` diff --git a/src/soc/mediatek/mt8173/Makefile.mk b/src/soc/mediatek/mt8173/Makefile.mk index ee698b72ff..49861a71ac 100644 --- a/src/soc/mediatek/mt8173/Makefile.mk +++ b/src/soc/mediatek/mt8173/Makefile.mk @@ -79,7 +79,7 @@ BL31_MAKEARGS += PLAT=mt8173 # Generate the actual coreboot bootblock code $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8173 sf $< $@ + ./util/mediatek/gen-bl-img.py mt8173 sf $< $@ CPPFLAGS_common += -Isrc/soc/mediatek/mt8173/include CPPFLAGS_common += -Isrc/soc/mediatek/common/include diff --git a/src/soc/mediatek/mt8183/Makefile.mk b/src/soc/mediatek/mt8183/Makefile.mk index bd50780045..c1fd3b8a7a 100644 --- a/src/soc/mediatek/mt8183/Makefile.mk +++ b/src/soc/mediatek/mt8183/Makefile.mk @@ -96,6 +96,6 @@ CPPFLAGS_common += -Isrc/soc/mediatek/mt8183/include CPPFLAGS_common += -Isrc/soc/mediatek/common/include $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 emmc $< $@ + ./util/mediatek/gen-bl-img.py mt8183 emmc $< $@ endif diff --git a/src/soc/mediatek/mt8186/Makefile.mk b/src/soc/mediatek/mt8186/Makefile.mk index ea4bcfc25a..c6c47fdd92 100644 --- a/src/soc/mediatek/mt8186/Makefile.mk +++ b/src/soc/mediatek/mt8186/Makefile.mk @@ -81,6 +81,6 @@ $(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) cbfs-files-y += $(DRAM_CBFS) $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + ./util/mediatek/gen-bl-img.py mt8183 sf $< $@ endif diff --git a/src/soc/mediatek/mt8188/Makefile.mk b/src/soc/mediatek/mt8188/Makefile.mk index 2c8379ec57..dc6b649299 100644 --- a/src/soc/mediatek/mt8188/Makefile.mk +++ b/src/soc/mediatek/mt8188/Makefile.mk @@ -91,6 +91,6 @@ $(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) cbfs-files-y += $(DRAM_CBFS) $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + ./util/mediatek/gen-bl-img.py mt8183 sf $< $@ endif diff --git a/src/soc/mediatek/mt8189/Makefile.mk b/src/soc/mediatek/mt8189/Makefile.mk index 7631bc6118..592734f9e4 100644 --- a/src/soc/mediatek/mt8189/Makefile.mk +++ b/src/soc/mediatek/mt8189/Makefile.mk @@ -39,6 +39,6 @@ ifneq ($(wildcard $($(DRAM_CBFS)-file)),) cbfs-files-y += $(DRAM_CBFS) endif $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8189 sf $< $@ + ./util/mediatek/gen-bl-img.py mt8189 sf $< $@ endif diff --git a/src/soc/mediatek/mt8192/Makefile.mk b/src/soc/mediatek/mt8192/Makefile.mk index b2c3ced1ad..90a4e6d807 100644 --- a/src/soc/mediatek/mt8192/Makefile.mk +++ b/src/soc/mediatek/mt8192/Makefile.mk @@ -83,6 +83,6 @@ $(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) cbfs-files-y += $(DRAM_CBFS) $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + ./util/mediatek/gen-bl-img.py mt8183 sf $< $@ endif diff --git a/src/soc/mediatek/mt8195/Makefile.mk b/src/soc/mediatek/mt8195/Makefile.mk index ecc69657f9..c460d5894f 100644 --- a/src/soc/mediatek/mt8195/Makefile.mk +++ b/src/soc/mediatek/mt8195/Makefile.mk @@ -101,6 +101,6 @@ $(DRAM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG) cbfs-files-y += $(DRAM_CBFS) $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8183 sf $< $@ + ./util/mediatek/gen-bl-img.py mt8183 sf $< $@ endif diff --git a/src/soc/mediatek/mt8196/Makefile.mk b/src/soc/mediatek/mt8196/Makefile.mk index fa0e3fe0be..903f57b01b 100644 --- a/src/soc/mediatek/mt8196/Makefile.mk +++ b/src/soc/mediatek/mt8196/Makefile.mk @@ -135,6 +135,6 @@ $(FSP_RAMSTAGE_CBFS)-compression := $(CBFS_COMPRESS_FLAG) cbfs-files-y += $(FSP_RAMSTAGE_CBFS) $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.bin - ./util/mtkheader/gen-bl-img.py mt8196 sf $< $@ + ./util/mediatek/gen-bl-img.py mt8196 sf $< $@ endif diff --git a/util/README.md b/util/README.md index f40036babf..7c9394794a 100644 --- a/util/README.md +++ b/util/README.md @@ -78,9 +78,11 @@ image for testing purposes and for working on firmware. `Bash` * __marvell__ - Add U-Boot boot loader for Marvell ARMADA38X `C` * __[me_cleaner](https://github.com/corna/me_cleaner)__ - Tool for partial deblobbing of Intel ME/TXE firmware images `Python` +* __mediatek__ + * gen-bl-img.py - Generate MediaTek bootloader header. +`Python3` * __mma__ - Memory Margin Analysis automation tests `Bash` * __msrtool__ - Dumps chipset-specific MSR registers. `C` -* __mtkheader__ - Generate MediaTek bootload header. `Python3` * __nvidia__ - nvidia blob parsers * __nvramtool__ - Reads and writes coreboot parameters and displaying information from the coreboot table in CMOS/NVRAM. `C` diff --git a/util/cbfstool/platform_fixups.c b/util/cbfstool/platform_fixups.c index 12a5ad7371..74035bbcd8 100644 --- a/util/cbfstool/platform_fixups.c +++ b/util/cbfstool/platform_fixups.c @@ -109,7 +109,7 @@ static int qualcomm_fixup(struct buffer *buffer, size_t offset) } /* - * MediaTek bootblock.bin layout (see util/mtkheader/gen-bl-img.py): + * MediaTek bootblock.bin layout (see util/mediatek/gen-bl-img.py): * header 2048 bytes * gfh info 176 bytes, where bytes 32-35 (in little endian) is the * total size excluding the header (gfh info + data + hash) diff --git a/util/mediatek/description.md b/util/mediatek/description.md new file mode 100644 index 0000000000..67ff39022b --- /dev/null +++ b/util/mediatek/description.md @@ -0,0 +1,2 @@ +__mediatek__ + * gen-bl-img.py - Generate MediaTek bootloader header. `Python3` diff --git a/util/mtkheader/gen-bl-img.py b/util/mediatek/gen-bl-img.py similarity index 100% rename from util/mtkheader/gen-bl-img.py rename to util/mediatek/gen-bl-img.py diff --git a/util/mtkheader/description.md b/util/mtkheader/description.md deleted file mode 100644 index 01c0776c3c..0000000000 --- a/util/mtkheader/description.md +++ /dev/null @@ -1 +0,0 @@ -Generate MediaTek bootload header. `Python3`