Browse Source

top: Rename "blob" to "firmware" everywhere

This patch renames "blob" to "firmware" everywhere for better
and intutive naming.

Signed-off-by: Anup Patel <anup@brainfault.org>
Anup Patel 5 years ago
parent
commit
b023176c17

+ 17 - 17
Makefile

@@ -62,7 +62,7 @@ export plat_dir=$(CURDIR)/$(plat_subdir)
 export plat_common_dir=$(CURDIR)/plat/common
 export include_dir=$(CURDIR)/include
 export lib_dir=$(CURDIR)/lib
-export blob_dir=$(CURDIR)/blob
+export firmware_dir=$(CURDIR)/firmware
 
 # Setup list of objects.mk files
 ifdef PLAT
@@ -70,7 +70,7 @@ plat-object-mks=$(shell if [ -d $(plat_dir) ]; then find $(plat_dir) -iname "obj
 plat-common-object-mks=$(shell if [ -d $(plat_common_dir) ]; then find $(plat_common_dir) -iname "objects.mk" | sort -r; fi)
 endif
 lib-object-mks=$(shell if [ -d $(lib_dir) ]; then find $(lib_dir) -iname "objects.mk" | sort -r; fi)
-blob-object-mks=$(shell if [ -d $(blob_dir) ]; then find $(blob_dir) -iname "objects.mk" | sort -r; fi)
+firmware-object-mks=$(shell if [ -d $(firmware_dir) ]; then find $(firmware_dir) -iname "objects.mk" | sort -r; fi)
 
 # Include platform specifig config.mk
 ifdef PLAT
@@ -83,23 +83,23 @@ include $(plat-object-mks)
 include $(plat-common-object-mks)
 endif
 include $(lib-object-mks)
-include $(blob-object-mks)
+include $(firmware-object-mks)
 
 # Setup list of objects
 lib-objs-path-y=$(foreach obj,$(lib-objs-y),$(build_dir)/lib/$(obj))
 ifdef PLAT
 plat-objs-path-y=$(foreach obj,$(plat-objs-y),$(build_dir)/$(plat_subdir)/$(obj))
 plat-common-objs-path-y=$(foreach obj,$(plat-common-objs-y),$(build_dir)/plat/common/$(obj))
-blob-bins-path-y=$(foreach bin,$(blob-bins-y),$(build_dir)/$(plat_subdir)/blob/$(bin))
+firmware-bins-path-y=$(foreach bin,$(firmware-bins-y),$(build_dir)/$(plat_subdir)/firmware/$(bin))
 endif
-blob-elfs-path-y=$(blob-bins-path-y:.bin=.elf)
-blob-objs-path-y=$(blob-bins-path-y:.bin=.o)
+firmware-elfs-path-y=$(firmware-bins-path-y:.bin=.elf)
+firmware-objs-path-y=$(firmware-bins-path-y:.bin=.o)
 
 # Setup list of deps files for objects
 deps-y=$(plat-objs-path-y:.o=.dep)
 deps-y+=$(plat-common-objs-path-y:.o=.dep)
 deps-y+=$(lib-objs-path-y:.o=.dep)
-deps-y+=$(blob-objs-path-y:.o=.dep)
+deps-y+=$(firmware-objs-path-y:.o=.dep)
 
 # Setup compilation environment
 cpp=$(CROSS_COMPILE)cpp
@@ -109,14 +109,14 @@ cppflags+=-I$(plat_dir)/include
 cppflags+=-I$(plat_common_dir)/include
 cppflags+=-I$(include_dir)
 cppflags+=$(plat-cppflags-y)
-cppflags+=$(blob-cppflags-y)
+cppflags+=$(firmware-cppflags-y)
 cc=$(CROSS_COMPILE)gcc
 cflags=-g -Wall -Werror -nostdlib -fno-strict-aliasing -O2
 cflags+=-fno-omit-frame-pointer -fno-optimize-sibling-calls
 cflags+=-mno-save-restore -mstrict-align
 cflags+=$(cppflags)
 cflags+=$(plat-cflags-y)
-cflags+=$(blob-cflags-y)
+cflags+=$(firmware-cflags-y)
 cflags+=$(EXTRA_CFLAGS)
 as=$(CROSS_COMPILE)gcc
 asflags=-g -Wall -nostdlib -D__ASSEMBLY__
@@ -124,14 +124,14 @@ asflags+=-fno-omit-frame-pointer -fno-optimize-sibling-calls
 asflags+=-mno-save-restore -mstrict-align
 asflags+=$(cppflags)
 asflags+=$(plat-asflags-y)
-asflags+=$(blob-asflags-y)
+asflags+=$(firmware-asflags-y)
 asflags+=$(EXTRA_ASFLAGS)
 ar=$(CROSS_COMPILE)ar
 arflags=rcs
 ld=$(CROSS_COMPILE)gcc
 ldflags=-g -Wall -nostdlib -Wl,--build-id=none
 ldflags+=$(plat-ldflags-y)
-ldflags+=$(blob-ldflags-y)
+ldflags+=$(firmware-ldflags-y)
 merge=$(CROSS_COMPILE)ld
 mergeflags=-r
 objcopy=$(CROSS_COMPILE)objcopy
@@ -195,7 +195,7 @@ targets-y  = $(build_dir)/lib/libsbi.a
 ifdef PLAT
 targets-y += $(build_dir)/$(plat_subdir)/lib/libplatsbi.a
 endif
-targets-y += $(blob-bins-path-y)
+targets-y += $(firmware-bins-path-y)
 
 # Default rule "make" should always be first rule
 .PHONY: all
@@ -252,7 +252,7 @@ all-deps-2 = $(if $(findstring clean,$(MAKECMDGOALS)),,$(all-deps-1))
 install_targets-y  = install_libsbi
 ifdef PLAT
 install_targets-y += install_libplatsbi
-install_targets-y += install_blobs
+install_targets-y += install_firmwares
 endif
 
 # Rule for "make install"
@@ -269,10 +269,10 @@ install_libplatsbi: $(build_dir)/$(plat_subdir)/lib/libplatsbi.a $(build_dir)/li
 	$(call inst_header_dir,$(install_dir)/$(plat_subdir)/include,$(include_dir)/sbi)
 	$(call inst_file,$(install_dir)/$(plat_subdir)/lib/libplatsbi.a,$(build_dir)/$(plat_subdir)/lib/libplatsbi.a)
 
-.PHONY: install_blobs
-install_blobs: $(build_dir)/$(plat_subdir)/lib/libplatsbi.a $(build_dir)/lib/libsbi.a $(blob-bins-path-y)
-	$(call inst_file_list,$(install_dir)/$(plat_subdir)/blob,$(plat_subdir)/blob,$(blob-elfs-path-y))
-	$(call inst_file_list,$(install_dir)/$(plat_subdir)/blob,$(plat_subdir)/blob,$(blob-bins-path-y))
+.PHONY: install_firmwares
+install_firmwares: $(build_dir)/$(plat_subdir)/lib/libplatsbi.a $(build_dir)/lib/libsbi.a $(firmware-bins-path-y)
+	$(call inst_file_list,$(install_dir)/$(plat_subdir)/firmware,$(plat_subdir)/firmware,$(firmware-elfs-path-y))
+	$(call inst_file_list,$(install_dir)/$(plat_subdir)/firmware,$(plat_subdir)/firmware,$(firmware-bins-path-y))
 
 # Rule for "make clean"
 .PHONY: clean

+ 7 - 7
README.md

@@ -23,7 +23,7 @@ We can create three things using the RISC-V OpenSBI project:
 2. **libplatsbi.a** - Platform specific OpenSBI static library
    (It is libsbi.a plus platform specific hooks represented
     by "platform" symbol)
-3. **blobs** - Platform specific firware blobs
+3. **firmwares** - Platform specific firmware binaries
 
 How to Build?
 -------------
@@ -31,7 +31,7 @@ How to Build?
 For cross-compiling, please ensure that CROSS_COMPILE environment
 variable is set before starting build system.
 
-The libplatsbi.a and blobs are optional and only built when
+The libplatsbi.a and firmwares are optional and only built when
 `PLAT=<platform_subdir>` parameter is specified to top-level make.
 (**NOTE**: `<platform_subdir>` is sub-directory under plat/ directory)
 
@@ -46,14 +46,14 @@ OR
 OR
 `make I=<install_directory> install`
 
-To build and install platform specific OpenSBI library and blobs
+To build and install platform specific OpenSBI library and firmwares
 do the following:
 
-1. Build **libsbi, libplatsbi, and blobs**:
+1. Build **libsbi, libplatsbi, and firmwares**:
 `make PLAT=<platform_subdir>`
 OR
 `make PLAT=<platform_subdir> O=<build_directory>`
-2. Install **libsbi, headers, libplatsbi, and blobs**:
+2. Install **libsbi, headers, libplatsbi, and firmwares**:
 `make PLAT=<platform_subdir> install`
 OR
 `make PLAT=<platform_subdir> I=<install_directory> install`
@@ -61,7 +61,7 @@ OR
 In addition, we can also specify platform specific command-line
 options to top-level make (such as `PLAT_<xyz>` or `FW_<abc>`)
 which are described under `docs/plat/<platform_name>.md` OR
-`docs/blob/<blob_name>.md`.
+`docs/firmware/<firmware_name>.md`.
 
 Documentation
 -------------
@@ -72,7 +72,7 @@ manner:
 * `docs/platform_guide.md` - Guidelines for adding new platform support
 * `docs/library_usage.md` - Guidelines for using static library
 * `docs/plat/<platform_name>.md` - Documentation for `<platform_name>` platform
-* `docs/blob/<blob_name>.md` - Documentation for firmware blob `<blob_name>`
+* `docs/firmware/<firmware_name>.md` - Documentation for firmware `<firmware_name>`
 
 We also prefer source level documentation, so wherever possible we describe
 stuff directly in the source code. This helps us maintain source and its

+ 0 - 39
blob/objects.mk

@@ -1,39 +0,0 @@
-#
-# Copyright (c) 2018 Western Digital Corporation or its affiliates.
-#
-# Authors:
-#   Anup Patel <anup.patel@wdc.com>
-#
-# SPDX-License-Identifier: BSD-2-Clause
-#
-
-blob-cppflags-y =
-blob-cflags-y =
-blob-asflags-y =
-blob-ldflags-y =
-
-ifdef FW_TEXT_START
-blob-cppflags-y += -DFW_TEXT_START=$(FW_TEXT_START)
-endif
-
-blob-bins-$(FW_JUMP) += fw_jump.bin
-ifdef FW_JUMP_ADDR
-blob-cppflags-$(FW_JUMP) += -DFW_JUMP_ADDR=$(FW_JUMP_ADDR)
-endif
-ifdef FW_JUMP_FDT_ADDR
-blob-cppflags-$(FW_JUMP) += -DFW_JUMP_FDT_ADDR=$(FW_JUMP_FDT_ADDR)
-endif
-
-blob-bins-$(FW_PAYLOAD) += fw_payload.bin
-ifdef FW_PAYLOAD_PATH
-blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_PATH=$(FW_PAYLOAD_PATH)
-endif
-ifdef FW_PAYLOAD_OFFSET
-blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_OFFSET=$(FW_PAYLOAD_OFFSET)
-endif
-ifdef FW_PAYLOAD_FDT_PATH
-blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_PATH=$(FW_PAYLOAD_FDT_PATH)
-endif
-ifdef FW_PAYLOAD_FDT_ADDR
-blob-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_ADDR=$(FW_PAYLOAD_FDT_ADDR)
-endif

+ 0 - 0
docs/blob/fw_jump.md → docs/firmware/fw_jump.md


+ 0 - 0
docs/blob/fw_payload.md → docs/firmware/fw_payload.md


+ 0 - 0
blob/fw_common.S → firmware/fw_common.S


+ 0 - 0
blob/fw_common.ldS → firmware/fw_common.ldS


+ 0 - 0
blob/fw_jump.S → firmware/fw_jump.S


+ 0 - 0
blob/fw_jump.elf.ldS → firmware/fw_jump.elf.ldS


+ 0 - 0
blob/fw_payload.S → firmware/fw_payload.S


+ 0 - 0
blob/fw_payload.elf.ldS → firmware/fw_payload.elf.ldS


+ 39 - 0
firmware/objects.mk

@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2018 Western Digital Corporation or its affiliates.
+#
+# Authors:
+#   Anup Patel <anup.patel@wdc.com>
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+
+firmware-cppflags-y =
+firmware-cflags-y =
+firmware-asflags-y =
+firmware-ldflags-y =
+
+ifdef FW_TEXT_START
+firmware-cppflags-y += -DFW_TEXT_START=$(FW_TEXT_START)
+endif
+
+firmware-bins-$(FW_JUMP) += fw_jump.bin
+ifdef FW_JUMP_ADDR
+firmware-cppflags-$(FW_JUMP) += -DFW_JUMP_ADDR=$(FW_JUMP_ADDR)
+endif
+ifdef FW_JUMP_FDT_ADDR
+firmware-cppflags-$(FW_JUMP) += -DFW_JUMP_FDT_ADDR=$(FW_JUMP_FDT_ADDR)
+endif
+
+firmware-bins-$(FW_PAYLOAD) += fw_payload.bin
+ifdef FW_PAYLOAD_PATH
+firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_PATH=$(FW_PAYLOAD_PATH)
+endif
+ifdef FW_PAYLOAD_OFFSET
+firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_OFFSET=$(FW_PAYLOAD_OFFSET)
+endif
+ifdef FW_PAYLOAD_FDT_PATH
+firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_PATH=$(FW_PAYLOAD_FDT_PATH)
+endif
+ifdef FW_PAYLOAD_FDT_ADDR
+firmware-cppflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_ADDR=$(FW_PAYLOAD_FDT_ADDR)
+endif