2 Star 2 Fork 1

OPENFANS/buildroot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 2.09 KB
一键复制 编辑 原始数据 按行查看 历史
Liu Yibin 提交于 2021-01-29 17:29 . boot/opensbi: Bump to v0.8
BR2_VERSION = 9d1d4818c39d97ad7a1cdf6e075b9acae6dfff71
BRW_ROOT = $(PWD)
BRW_SITE = https://github.com/buildroot/buildroot/archive/$(BR2_VERSION).tar.gz
BRW_FILE = $(BR2_DL_DIR)/buildroot-$(BR2_VERSION).tar.gz
BRW_DIR = $(BRW_ROOT)/buildroot-$(BR2_VERSION)
BRW_PATCH_DIR = $(BRW_ROOT)/patches
ifneq ($(INSIDE_SITE),)
BRW_SITE = $(INSIDE_SITE)/buildroot-$(BR2_VERSION).tar.gz
endif
O ?= $(CONF)
BR2_DL_DIR ?= $(BRW_ROOT)/dl
define DOWNLOAD
mkdir -p $(BR2_DL_DIR); \
if [ ! -f $(BRW_FILE) ]; then \
wget -c $(BRW_SITE) -O $(BRW_FILE); \
fi
endef
define COPYFILES
set -e; \
if [ ! -d $(BRW_DIR) ]; then \
tar xf $(BRW_FILE) -C $(BRW_ROOT); \
cp $(BRW_ROOT)/package/* $(BRW_DIR)/package/ -raf; \
cp $(BRW_ROOT)/board/* $(BRW_DIR)/board/ -raf; \
cp $(BRW_ROOT)/fs/* $(BRW_DIR)/fs/ -raf; \
rm -rf package/ncurses/*.patch; \
if [ -f ~/.gitconfig ]; then \
cd $(BRW_DIR); \
git init .; git add . > /dev/null; \
git commit -m "$(BR2_VERSION)" > /dev/null; \
git am $(BRW_PATCH_DIR)/*.patch; \
else \
$(BRW_DIR)/support/scripts/apply-patches.sh $(BRW_DIR) $(BRW_PATCH_DIR); \
fi; \
fi; \
echo "DL_DIR=$(BR2_DL_DIR)" >> $(BRW_DIR)/Makefile; \
if [ "$(INSIDE_SITE)" != "" ];then \
sed -i '/^BR2_PRIMARY_SITE.*/d' $(BRW_ROOT)/configs_enhanced/* ;\
echo "BR2_PRIMARY_SITE=\"$(INSIDE_SITE)/\"" | tee -a $(BRW_ROOT)/configs_enhanced/* ; \
fi; \
if [ -f $(BRW_ROOT)/configs/$(CONF) ];then \
cp $(BRW_ROOT)/configs/$(CONF) $(BRW_DIR)/configs/ -f; \
echo "the file name is $(BRW_DIR)/configs/$(CONF)"; \
cat $(BRW_ROOT)/configs/base_defconfig.fragment >> $(BRW_DIR)/configs/$(CONF); \
elif [ -f $(BRW_ROOT)/configs_enhanced/$(CONF) ];then \
cp $(BRW_ROOT)/configs_enhanced/$(CONF) $(BRW_DIR)/configs/ -f; \
echo "the file name is $(BRW_DIR)/configs_enhanced/$(CONF)"; \
cat $(BRW_ROOT)/configs_enhanced/base_enhanced_defconfig.fragment >> $(BRW_DIR)/configs/$(CONF); \
else \
echo "This config is from origin buildroot: $(CONF)"; \
fi; \
endef
.PHONY: all
all .DEFAULT:
@$(call DOWNLOAD)
@$(call COPYFILES)
make -C $(BRW_DIR) $(CONF) O=$(BRW_ROOT)/$(O)
make -C $(BRW_ROOT)/$(O) $@
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openfans-community/buildroot.git
git@gitee.com:openfans-community/buildroot.git
openfans-community
buildroot
buildroot
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385