Adjust makefile usage printout (#673)

Co-authored-by: Viktor <viktorxda@users.noreply.github.com>
pull/683/head
viktorxda 2023-03-18 18:28:06 +01:00 committed by GitHub
parent b4f96e47d3
commit 00a6f16077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 16 deletions

View File

@ -14,6 +14,8 @@ else
FAMILY := $(shell grep "/board/" $(FULL_PATH) | head -1 | cut -d "/" -f 3) FAMILY := $(shell grep "/board/" $(FULL_PATH) | head -1 | cut -d "/" -f 3)
ifeq ($(FAMILY),hi3516cv500) ifeq ($(FAMILY),hi3516cv500)
BR_VER ?= 2022.08 BR_VER ?= 2022.08
else ifeq ($(FAMILY),infinity6e)
BR_VER ?= 2023.02
endif endif
endif endif
endif endif
@ -28,20 +30,23 @@ BR_DIR := $(ROOT_DIR)/buildroot-$(BR_VER)
.PHONY: usage help clean distclean prepare install-deps all toolchain-params run-tests overlayed-rootfs-% .PHONY: usage help clean distclean prepare install-deps all toolchain-params run-tests overlayed-rootfs-%
usage help: usage help:
@echo "\n\ @printf "\n \
BR-OpenIPC usage:\n\ BR-OpenIPC usage:\n \
- make help|usage - print this help\n\ - make help | usage - print this help\n \
- make install-deps - install system deps\n\ - make install-deps - install system deps\n \
- make prepare - download and unpack buildroot\n\ - make prepare - download and unpack buildroot\n \
- make list-configs - show available hardware configs list\n\ - make list-configs - show available hardware configs list\n \
- make BOARD=<BOARD-ID> board-info - write to stdout information about selected board\n\ - make BOARD=<BOARD-ID> board-info - show information about\n \
- make BOARD=<BOARD-ID> all - build all needed for a board (toolchain, kernel and rootfs images)\n\ selected board\n \
- make clean - cleaning before reassembly\n\ - make BOARD=<BOARD-ID> all - build all needed for a board\n \
- make distclean - switching to the factory state\n\ (toolchain, kernel and rootfs images)\n \
- make overlayed-rootfs-<FS-TYPE> ROOTFS_OVERLAYS=... - create rootfs image that contains original Buildroot target dir overlayed by some custom layers.\n\ - make clean - cleaning before reassembly\n \
Example:\n\ - make distclean - switching to the factory state\n \
make overlayed-rootfs-squashfs ROOTFS_OVERLAYS=./examples/echo_server/overlay\n\ - make overlayed-rootfs-<FS-TYPE> ROOTFS_OVERLAYS=... - create rootfs\n \
" image that contains original Buildroot target dir overlayed\n \
by some custom layers\n\n \
Example:\n \
make overlayed-rootfs-squashfs ROOTFS_OVERLAYS=./examples/echo_server/overlay\n\n"
distclean: distclean:
@rm -rf output buildroot-$(BR_VER) @rm -rf output buildroot-$(BR_VER)
@ -92,8 +97,13 @@ toolname:
@$(SCRIPTS_DIR)/show_toolchains.sh $(FULL_PATH) $(BR_VER) @$(SCRIPTS_DIR)/show_toolchains.sh $(FULL_PATH) $(BR_VER)
list-configs: list-configs:
ifndef BOARD
$(error Variable BOARD must be defined to list configs)
else
@echo @echo
@ls -1 $(BR_EXT_DIR)/configs @ls -1 $(BR_EXT_DIR)/configs
@echo
endif
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
@ -113,9 +123,10 @@ endef
# ------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------
$(OUT_DIR)/.config: $(OUT_DIR)/.config:
ifndef BOARD ifndef BOARD
@echo "Variable BOARD must be defined to initialize output directory" >&2 && exit 1 $(error Variable BOARD must be defined to initialize output directory)
endif else
$(BOARD_MAKE) BR2_DEFCONFIG=$(BR_EXT_DIR)/configs/$(BOARD)_defconfig defconfig $(BOARD_MAKE) BR2_DEFCONFIG=$(BR_EXT_DIR)/configs/$(BOARD)_defconfig defconfig
endif
$(OUT_DIR)/toolchain-params.mk: $(OUT_DIR)/.config $(SCRIPTS_DIR)/create_toolchain_binding.sh $(OUT_DIR)/toolchain-params.mk: $(OUT_DIR)/.config $(SCRIPTS_DIR)/create_toolchain_binding.sh