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>
This commit is contained in:
Anup Patel 2018-12-21 09:52:27 +05:30 committed by Anup Patel
parent ab5b228ff5
commit b023176c17
12 changed files with 63 additions and 63 deletions

View File

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

View File

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

View File

@ -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

39
firmware/objects.mk Normal file
View File

@ -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