Skip to content

Commit

Permalink
firmware: Remove FW_PAYLOAD_FDT and related documentation
Browse files Browse the repository at this point in the history
Now that no platform is using FW_PAYLOAD_FDT mechanism, we
remove related code from Makefile and related documentation.

Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
  • Loading branch information
avpatel committed Jun 5, 2020
1 parent 72019ee commit 51f0e4a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 26 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ libsbi-objs-path-y=$(foreach obj,$(libsbi-objs-y),$(build_dir)/lib/sbi/$(obj))
libsbiutils-objs-path-y=$(foreach obj,$(libsbiutils-objs-y),$(build_dir)/lib/utils/$(obj))
ifdef PLATFORM
platform-objs-path-y=$(foreach obj,$(platform-objs-y),$(platform_build_dir)/$(obj))
platform-dtb-path-y=$(foreach obj,$(platform-dtb-y),$(platform_build_dir)/$(obj))
firmware-bins-path-y=$(foreach bin,$(firmware-bins-y),$(platform_build_dir)/firmware/$(bin))
endif
firmware-elfs-path-y=$(firmware-bins-path-y:.bin=.elf)
Expand Down Expand Up @@ -301,7 +300,6 @@ targets-y = $(build_dir)/lib/libsbi.a
targets-y += $(build_dir)/lib/libsbiutils.a
ifdef PLATFORM
targets-y += $(platform_build_dir)/lib/libplatsbi.a
targets-y += $(platform-dtb-path-y)
endif
targets-y += $(firmware-bins-path-y)
Expand Down
16 changes: 2 additions & 14 deletions docs/firmware/fw_payload.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,8 @@ file. The parameters currently defined are as follows:

* **FW_PAYLOAD_FDT_PATH** - Path to an external flattened device tree binary
file to be embedded in the *.text* section of the final firmware. If this
option is not provided and no internal device tree file is specified by the
platform (c.f. *FW_PAYLOAD_FDT*), then the firmware will expect the FDT to
be passed as an argument by the prior booting stage.

* **FW_PAYLOAD_FDT** - Path to an internal flattened device tree binary file
defined by the platform code. The file name must match the DTB file name
specified in the platform *objects.mk* file with the *platform-dtb-y* entry.
This option results in *FW_PAYLOAD_FDT_PATH* to be automatically set.
Specifying *FW_PAYLOAD_FDT_PATH* on the `make` command line disables
*FW_PAYLOAD_FDT* and the command line specified device tree binary file is
used for building the final firmware.
option is not provided then the firmware will expect the FDT to be passed
as an argument by the prior booting stage.

* **FW_PAYLOAD_FDT_ADDR** - Address where the FDT passed by the prior booting
stage or specified by the *FW_PAYLOAD_FDT_PATH* parameter and embedded in
Expand All @@ -83,7 +74,4 @@ The *[qemu/virt]* platforms illustrate how to configure and use a *FW_PAYLOAD*
firmware. Detailed information regarding these platforms can be found in the
platform documentation files.

The *kendryte/k210* platform also enables a build of a *FW_PAYLOAD* using an
internally defined device tree file (*FW_PAYLOAD_FDT*).

[qemu/virt]: ../platform/qemu_virt.md
5 changes: 0 additions & 5 deletions firmware/objects.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ ifdef FW_PAYLOAD_ALIGN
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_ALIGN=$(FW_PAYLOAD_ALIGN)
endif

ifndef FW_PAYLOAD_FDT_PATH
ifdef FW_PAYLOAD_FDT
FW_PAYLOAD_FDT_PATH=$(platform_build_dir)/$(FW_PAYLOAD_FDT)
endif
endif
ifdef FW_PAYLOAD_FDT_PATH
firmware-genflags-$(FW_PAYLOAD) += -DFW_PAYLOAD_FDT_PATH=\"$(FW_PAYLOAD_FDT_PATH)\"
endif
Expand Down
1 change: 0 additions & 1 deletion platform/template/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,4 @@ endif
# FW_PAYLOAD_ALIGN=0x1000
# FW_PAYLOAD_PATH="path to next boot stage binary image file"
# FW_PAYLOAD_FDT_PATH="path to platform flattened device tree file"
# FW_PAYLOAD_FDT="name of the platform defined flattened device tree file"
# FW_PAYLOAD_FDT_ADDR=0x82200000
8 changes: 4 additions & 4 deletions platform/template/objects.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
platform-objs-y += platform.o

#
# If the platform support requires a device tree file, the name of the device
# tree compiled file should be specified here. The device tree source file
# be in the form <dt file name>.dts
# If the platform support requires a builtin device tree file, the name of
# the device tree compiled file should be specified here. The device tree
# source file be in the form <dt file name>.dts
#
# platform-dtb-y += <dt file name>.dtb
# platform-objs-y += <dt file name>.o

0 comments on commit 51f0e4a

Please sign in to comment.