Implement an ARCH_PACKAGES variable which defaults to BOARD but can be overridden on a per-subtarget basis. This is intended for targets such as adm5120 and malta which support both big and little endianess and will replace the target specific exceptions in package-defaults and Image Builder.
SVN-Revision: 23029
This commit is contained in:
parent
78539bfa4f
commit
064e7c8f00
4 changed files with 15 additions and 3 deletions
|
@ -23,10 +23,10 @@ define Package/Default
|
||||||
else
|
else
|
||||||
VERSION:=$(PKG_RELEASE)
|
VERSION:=$(PKG_RELEASE)
|
||||||
endif
|
endif
|
||||||
ifneq ($(CONFIG_TARGET_adm5120),y)
|
ifneq ($(ARCH_PACKAGES),)
|
||||||
PKGARCH:=$(BOARD)
|
PKGARCH:=$(ARCH_PACKAGES)
|
||||||
else
|
else
|
||||||
PKGARCH:=$(BOARD)_$(ARCH)
|
PKGARCH:=$(BOARD)
|
||||||
endif
|
endif
|
||||||
PRIORITY:=optional
|
PRIORITY:=optional
|
||||||
DEFAULT:=
|
DEFAULT:=
|
||||||
|
|
|
@ -178,6 +178,7 @@ define BuildTargets/DumpCurrent
|
||||||
echo 'Target-Name: $(BOARDNAME)$(if $(SUBTARGETS),$(if $(SUBTARGET),))'; \
|
echo 'Target-Name: $(BOARDNAME)$(if $(SUBTARGETS),$(if $(SUBTARGET),))'; \
|
||||||
echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'; \
|
echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'; \
|
||||||
echo 'Target-Arch: $(ARCH)'; \
|
echo 'Target-Arch: $(ARCH)'; \
|
||||||
|
echo 'Target-Arch-Packages: $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD))'; \
|
||||||
echo 'Target-Features: $(FEATURES)'; \
|
echo 'Target-Features: $(FEATURES)'; \
|
||||||
echo 'Target-Depends: $(DEPENDS)'; \
|
echo 'Target-Depends: $(DEPENDS)'; \
|
||||||
echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \
|
echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \
|
||||||
|
|
1
rules.mk
1
rules.mk
|
@ -31,6 +31,7 @@ strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))
|
||||||
_SINGLE=export MAKEFLAGS=$(space);
|
_SINGLE=export MAKEFLAGS=$(space);
|
||||||
CFLAGS:=
|
CFLAGS:=
|
||||||
ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH)))))
|
ARCH:=$(subst i486,i386,$(subst i586,i386,$(subst i686,i386,$(call qstrip,$(CONFIG_ARCH)))))
|
||||||
|
ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))
|
||||||
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
|
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
|
||||||
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
|
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
|
||||||
TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
|
TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
|
||||||
|
|
|
@ -49,6 +49,7 @@ sub parse_target_metadata() {
|
||||||
/^Target-Name:\s*(.+)\s*$/ and $target->{name} = $1;
|
/^Target-Name:\s*(.+)\s*$/ and $target->{name} = $1;
|
||||||
/^Target-Path:\s*(.+)\s*$/ and $target->{path} = $1;
|
/^Target-Path:\s*(.+)\s*$/ and $target->{path} = $1;
|
||||||
/^Target-Arch:\s*(.+)\s*$/ and $target->{arch} = $1;
|
/^Target-Arch:\s*(.+)\s*$/ and $target->{arch} = $1;
|
||||||
|
/^Target-Arch-Packages:\s*(.+)\s*$/ and $target->{arch_packages} = $1;
|
||||||
/^Target-Features:\s*(.+)\s*$/ and $target->{features} = [ split(/\s+/, $1) ];
|
/^Target-Features:\s*(.+)\s*$/ and $target->{features} = [ split(/\s+/, $1) ];
|
||||||
/^Target-Depends:\s*(.+)\s*$/ and $target->{depends} = [ split(/\s+/, $1) ];
|
/^Target-Depends:\s*(.+)\s*$/ and $target->{depends} = [ split(/\s+/, $1) ];
|
||||||
/^Target-Description:/ and $target->{desc} = get_multiline(*FILE);
|
/^Target-Description:/ and $target->{desc} = get_multiline(*FILE);
|
||||||
|
@ -335,6 +336,15 @@ EOF
|
||||||
$target->{subtarget} or print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
|
$target->{subtarget} or print "\t\tdefault \"".$target->{board}."\" if TARGET_".$target->{conf}."\n";
|
||||||
}
|
}
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
|
config TARGET_ARCH_PACKAGES
|
||||||
|
string
|
||||||
|
|
||||||
|
EOF
|
||||||
|
foreach my $target (@target) {
|
||||||
|
next if @{$target->{subtargets}} > 0;
|
||||||
|
print "\t\tdefault \"".($target->{arch_packages} || $target->{board})."\" if TARGET_".$target->{conf}."\n";
|
||||||
|
}
|
||||||
|
print <<EOF;
|
||||||
|
|
||||||
config DEFAULT_TARGET_OPTIMIZATION
|
config DEFAULT_TARGET_OPTIMIZATION
|
||||||
string
|
string
|
||||||
|
|
Loading…
Reference in a new issue