Add new Skeleton.
This commit is contained in:
30
bsp/include/buildroot.mk
Normal file
30
bsp/include/buildroot.mk
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
BR2_EXTERNAL ?= $(AW_PROJECT)/../../bsp/buildroot_external/
|
||||
|
||||
BR_ENV = BR2_EXTERNAL=$(BR2_EXTERNAL) O=$(AW_STAGING)/buildroot/ WORKSPACE_DIR=$(AW_STAGING) BUILDS_ROOT=$(AW_LOCAL_BUILDS_ROOT) BOARD=$(AW_BOARD) PROJECT=$(AW_PROJECT)
|
||||
|
||||
buildroot.menuconfig: buildroot.config
|
||||
$(MAKE) $(BR_ENV) -C $(AW_PROJECT)/../../bsp/buildroot/ menuconfig
|
||||
cmp -s $(AW_STAGING)/buildroot/.config $(AW_PROJECT)/configs/buildroot.config; \
|
||||
if test $$? -ne 0; then echo "Config Files has changed......"; \
|
||||
cp $(AW_STAGING)/buildroot/.config $(AW_PROJECT)/configs/buildroot.config; \
|
||||
fi
|
||||
|
||||
buildroot: buildroot.config
|
||||
$(MAKE) $(BR_ENV) -C $(AW_PROJECT)/../../bsp/buildroot/
|
||||
|
||||
buildroot.shell: buildroot.config
|
||||
$(eval export $(BR_ENV))
|
||||
cd $(AW_STAGING)/buildroot/; $(BR_ENV) bash
|
||||
|
||||
buildroot.config:
|
||||
@mkdir -p $(AW_STAGING)/buildroot/
|
||||
ifeq ("$(wildcard $(AW_STAGING)/buildroot/.config)","")
|
||||
@cp $(AW_PROJECT)/configs/buildroot.config $(AW_STAGING)/buildroot/.config
|
||||
else
|
||||
cmp -s $(AW_PROJECT)/configs/buildroot.config $(AW_STAGING)/buildroot/.config; \
|
||||
if test $$? -ne 0; then echo "Config Files has changed......"; \
|
||||
cp $(AW_PROJECT)/configs/buildroot.config $(AW_STAGING)/buildroot/.config; \
|
||||
fi
|
||||
endif
|
||||
23
bsp/include/rules.mk
Normal file
23
bsp/include/rules.mk
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
msg:
|
||||
@echo "Building $(AW_PROJECT_NAME) Firmware."
|
||||
|
||||
clean:
|
||||
rm -rf $(AW_STAGING)
|
||||
|
||||
export DEBUG ?= 0
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
$(warning "DEBUG")
|
||||
BUILD_DIR := -debug
|
||||
BUILD_TYPE := Debug
|
||||
export BR2_ENABLE_DEBUG=y
|
||||
else
|
||||
$(warning "RELEASE")
|
||||
BUILD_DIR := -release
|
||||
BUILD_TYPE := Release
|
||||
endif
|
||||
|
||||
export BUILD_TYPE
|
||||
export AW_LOCAL_BUILDS_ROOT ?= $(AW_PROJECT)/../../_builds
|
||||
export AW_STAGING ?= $(AW_LOCAL_BUILDS_ROOT)/$(AW_PROJECT_NAME)$(BUILD_DIR)/
|
||||
Reference in New Issue
Block a user