Makefile: update usage and add dependencies

pull/889/head
Viktor 2023-06-28 23:34:13 +02:00 committed by viktorxda
parent 7a9e4cb54c
commit f693cd9e9d
4 changed files with 12 additions and 12 deletions

View File

@ -5,22 +5,22 @@ BR_FILE = /tmp/buildroot-$(BR_VER).tar.gz
TARGET ?= $(PWD)/output
ifdef BOARD
CONFIG = $(shell find br-ext-chip-*/configs -type f,l | grep -m1 $(BOARD))
CONFIG = $(shell find br-ext-chip-*/configs | grep -m1 $(BOARD))
endif
ifeq ($(CONFIG),)
CONFIG = $(error variable BOARD must be defined to initialize build)
endif
.PHONY: all clean defconfig distclean help prepare toolname
.PHONY: all clean defconfig deps distclean help prepare toolname
help:
@echo -e "BR-OpenIPC usage:\n \
@printf "BR-OpenIPC usage:\n \
- make deps - install build dependencies\n \
- make clean - remove defconfig and target folder\n \
- make distclean - remove buildroot and output folder\n \
- make list - show available device configurations\n \
- make info BOARD=<config> - show device information\n \
- make all BOARD=<config> - builds the selected device\n"
- make all BOARD=<config> - builds the selected device\n\n"
all: defconfig
@$(BR_MAKE) all
@ -38,9 +38,6 @@ prepare:
toolname:
@general/scripts/show_toolchains.sh $(CONFIG)
buildroot-version:
@echo $(BR_VER)
clean:
@rm -rf $(TARGET)/target $(TARGET)/.config
@ -49,3 +46,6 @@ distclean:
list:
@ls -1 br-ext-chip-*/configs
deps:
sudo apt-get install -y automake autotools-dev bc build-essential cpio curl file fzf git libncurses-dev libtool lzop make rsync unzip wget

View File

@ -97,7 +97,7 @@ clone() {
}
fresh() {
BR_VER=$1
BR_VER=2023.02.1
if [ -d "$SRC_CACHE_DIR" ]; then
echo_c 36 "Found cache directory."
@ -226,7 +226,7 @@ uni_build() {
echo_c 33 "\n SoC: $SOC\nBoard: $BOARD\n"
if [ "all" = "${COMMAND}" ]; then
fresh $(make BOARD=${BOARD} buildroot-version)
fresh $(make BOARD=${BOARD})
fi
log_and_run "make BOARD=${BOARD} ${COMMAND}"

View File

@ -21,7 +21,7 @@ define SIGMASTAR_OSDRV_INFINITY6B0_INSTALL_TARGET_CMDS
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors/venc_fw $(SIGMASTAR_OSDRV_INFINITY6B0_PKGDIR)/files/sensor/venc_fw/chagall.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(SIGMASTAR_OSDRV_INFINITY6B0_PKGDIR)/files/bin/*
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(SIGMASTAR_OSDRV_INFINITY6B0_PKGDIR)/files/script/*
endef
$(eval $(generic-package))

View File

@ -21,7 +21,7 @@ define SIGMASTAR_OSDRV_INFINITY6E_INSTALL_TARGET_CMDS
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors/venc_fw $(SIGMASTAR_OSDRV_INFINITY6E_PKGDIR)/files/sensor/venc_fw/chagall.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(SIGMASTAR_OSDRV_INFINITY6E_PKGDIR)/files/bin/*
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(SIGMASTAR_OSDRV_INFINITY6E_PKGDIR)/files/script/*
endef
$(eval $(generic-package))