Revisió 4ecdf50f
Afegit per Roger Pueyo Centelles fa aproximadament 8 anys
Makefile | ||
---|---|---|
# [qMp] firmware generator (http://qmp.cat)
|
||
|
||
# Copyright (C) 2011-2015 Routek S.L. (http://routek.net)
|
||
|
||
# Copyright (C) 2011-2016 Routek S.L. (http://routek.net)
|
||
#
|
||
# This program is free software: you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License as published by
|
||
... | ... | |
J ?= 1
|
||
V ?= 0
|
||
T ?= ar71xx
|
||
MPT ?= ar71xx-generic-mp
|
||
MAKE_SRC = -j$(J) V=$(V)
|
||
|
||
IMAGEOPT ?= true
|
||
... | ... | |
COMMUNITY ?= qMp
|
||
EXTRA_PACKS =
|
||
|
||
include targets.mk
|
||
TINYPKG ?= qmp-tiny-node
|
||
SMALLPKG ?= qmp-small-node
|
||
BIGPKG ?= qmp-big-node
|
||
|
||
include targets.mk mp-targets.mk
|
||
|
||
PROFILE ?= ath-qmp-tiny-node
|
||
TIMESTAMP = $(shell date +%Y%m%d-%H%M)
|
||
... | ... | |
#Define TARGET_CONFIGS and TARGET
|
||
$(eval $(if $(TARGET_MASTER),TARGET_CONFIGS=$(TARGET_MASTER),TARGET_CONFIGS=$(T)))
|
||
$(eval $(if $(TARGET),,TARGET=$(T)))
|
||
$(eval $(if $(MPTARGET),,MPTARGET=$(MPT)))
|
||
|
||
#Define BUILD_PATH based on TBUILD (defined in targets.mk)
|
||
$(eval $(if $(TBUILD),,TBUILD=$(TARGET)))
|
||
... | ... | |
define update_feeds
|
||
@echo "Updating feed $(1)"
|
||
./$(BUILD_DIR)/$(1)/scripts/feeds update -a
|
||
|
||
|
||
./$(BUILD_DIR)/$(1)/scripts/feeds install -a
|
||
endef
|
||
|
||
... | ... | |
cp -f $(CONFIG) $(MY_CONFIGS)/$(TARGET)/config
|
||
endef
|
||
|
||
define mp-target-config
|
||
cp -f $(CONFIG_DIR)/$(ARCH)-$(SUBARCH)-multiprofile mpconfig
|
||
|
||
@for DEVICE in $(TINY); do \
|
||
echo $(DEVPKG)$$DEVICE=\"$(TINYPKG)\" >> mpconfig ;\
|
||
done
|
||
|
||
@for DEVICE in $(SMALL); do \
|
||
echo $(DEVPKG)$$DEVICE=\"$(SMALLPKG)\" >> mpconfig ; \
|
||
done
|
||
|
||
@for DEVICE in $(BIG); do \
|
||
echo $(DEVPKG)$$DEVICE=\"$(BIGPKG)\" >> mpconfig ; \
|
||
done
|
||
endef
|
||
|
||
define kmenuconfig_owrt
|
||
make -C $(BUILD_PATH) kernel_menuconfig
|
||
mkdir -p $(MY_CONFIGS)/$(TARGET)
|
||
... | ... | |
menuconfig: checkout sync_config
|
||
$(call menuconfig_owrt)
|
||
|
||
mp-target-config:
|
||
$(call mp-target-config)
|
||
|
||
kernel_menuconfig: checkout sync_config
|
||
$(call kmenuconfig_owrt)
|
||
|
configs/ar71xx-generic-multiprofile | ||
---|---|---|
CONFIG_TARGET_ar71xx=y
|
||
CONFIG_TARGET_ar71xx_generic=y
|
||
CONFIG_TARGET_MULTI_PROFILE=y
|
||
CONFIG_TARGET_ALL_PROFILES=y
|
||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||
CONFIG_PACKAGE_qmp-system=y
|
||
CONFIG_PACKAGE_qmp-tiny-node=m
|
||
CONFIG_PACKAGE_qmp-small-node=m
|
||
CONFIG_PACKAGE_qmp-big-node=m
|
configs/ramips-mt7620-multiprofile | ||
---|---|---|
CONFIG_TARGET_ramips=y
|
||
CONFIG_TARGET_ramips_mt7620=y
|
||
CONFIG_TARGET_MULTI_PROFILE=y
|
||
CONFIG_TARGET_ALL_PROFILES=y
|
||
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
|
||
CONFIG_PACKAGE_qmp-system=y
|
||
CONFIG_PACKAGE_qmp-tiny-node=m
|
||
CONFIG_PACKAGE_qmp-small-node=m
|
||
CONFIG_PACKAGE_qmp-big-node=m
|
mp-targets.mk | ||
---|---|---|
# targets.mk
|
||
# Copyright (C) 2011-2016 qmp.cat
|
||
#
|
||
# This is free software, licensed under the GNU General Public License v3.
|
||
# See LICENSE for more information.
|
||
#
|
||
# ToDo: document this file once the multi-profile
|
||
|
||
MP_ARCHS := ar71xx-generic-mp ramips-mt7620-mp
|
||
TBUILD_LIST := lede
|
||
|
||
ifeq ($(MPT),ar71xx-generic-mp)
|
||
TBUILD:=lede
|
||
ARCH:=ar71xx
|
||
SUBARCH:=generic
|
||
DEVPKG:=CONFIG_TARGET_DEVICE_PACKAGES_$(ARCH)_$(SUBARCH)_DEVICE_
|
||
TINY:=tl-wr841-v7 tl-wr841-v8 tl-wr841-v9 tl-wr841-v10 tl-wr842n-v1 tl-wr703n-v1 tl-mr3020-v1 tl-mr3040-v1 tl-wa7510n tl-wr743nd-v1 tl-wr740n-v1
|
||
SMALL:=ALFANX tl-wr2543-v1 ubnt-bullet-m ubnt-nano-m ubnt-nano-m-xw ubnt-loco-m-xw ubnt-rocket-m-xw ubnt-rocket-m mc-mac1200r WPE72_8M dragino2 ubnt-unifi ubnt-uap-pro
|
||
BIG:=ubnt-rs ubnt-rspro tl-wdr3500-v1 tl-wdr3600-v1 tl-wdr4300-v1
|
||
endif
|
||
|
||
ifeq ($(MPT),ramips-mt7620-mp)
|
||
TBUILD:=lede
|
||
ARCH:=ramips
|
||
SUBARCH:=mt7620
|
||
DEVPKG:=CONFIG_TARGET_DEVICE_PACKAGES_$(ARCH)_$(SUBARCH)_DEVICE_$(DEVICE)
|
||
TINY:=wt3020-4M
|
||
SMALL:=cf-wr800n microwrt wrtnode wt3020-8M miwifi-mini dir-810l
|
||
BIG:=
|
||
endif
|
També disponible a: Unified diff
[multiprofile] Convert ar71xx-generic and ramips-mt7620 to multiprofile and start Makefile adaption