Skip to content

Commit

Permalink
[build]: changing debian names based on Architecture (sonic-net#4508)
Browse files Browse the repository at this point in the history
Replacing "amd64" with $PLATFORM_ARCH variable
Fix for compiling marvell-armhf arch

Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
  • Loading branch information
Sabareesh-Kumar-Anandan authored Apr 30, 2020
1 parent 352a397 commit 81f4c81
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion rules/iccpd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ICCPD_VERSION = 0.0.5

ICCPD = iccpd_$(ICCPD_VERSION)_amd64.deb
ICCPD = iccpd_$(ICCPD_VERSION)_$(CONFIGURED_ARCH).deb
$(ICCPD)_DEPENDS += $(LIBNL_GENL3_DEV) $(LIBNL_CLI_DEV)
$(ICCPD)_RDEPENDS += $(LIBNL_GENL3) $(LIBNL_CLI)
$(ICCPD)_SRC_PATH = $(SRC_PATH)/iccpd
Expand Down
10 changes: 5 additions & 5 deletions rules/iptables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ IPTABLES_VERSION = 1.6.0+snapshot20161117
IPTABLES_VERSION_SUFFIX = 6
IPTABLES_VERSION_FULL = $(IPTABLES_VERSION)-$(IPTABLES_VERSION_SUFFIX)

IPTABLES = iptables_$(IPTABLES_VERSION_FULL)_amd64.deb
IPTABLES = iptables_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb
$(IPTABLES)_SRC_PATH = $(SRC_PATH)/iptables
SONIC_MAKE_DEBS += $(IPTABLES)

IPTABLESIP4TC = libip4tc0_$(IPTABLES_VERSION_FULL)_amd64.deb
IPTABLESIP4TC = libip4tc0_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(IPTABLES),$(IPTABLESIP4TC)))

IPTABLESIP6TC = libip6tc0_$(IPTABLES_VERSION_FULL)_amd64.deb
IPTABLESIP6TC = libip6tc0_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(IPTABLES),$(IPTABLESIP6TC)))

IPTABLESIPTC = libiptc0_$(IPTABLES_VERSION_FULL)_amd64.deb
IPTABLESIPTC = libiptc0_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(IPTABLES),$(IPTABLESIPTC)))

IPXTABLES12 = libxtables12_$(IPTABLES_VERSION_FULL)_amd64.deb
IPXTABLES12 = libxtables12_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb
$(eval $(call add_derived_package,$(IPTABLES),$(IPXTABLES12)))

# Export these variables so they can be used in a sub-make
Expand Down
4 changes: 2 additions & 2 deletions rules/sonic-mgmt-framework.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

ifeq ($(ENABLE_MGMT_FRAMEWORK), y)

SONIC_MGMT_FRAMEWORK = sonic-mgmt-framework_1.0-01_amd64.deb
SONIC_MGMT_FRAMEWORK = sonic-mgmt-framework_1.0-01_$(CONFIGURED_ARCH).deb
$(SONIC_MGMT_FRAMEWORK)_SRC_PATH = $(SRC_PATH)/sonic-mgmt-framework
$(SONIC_MGMT_FRAMEWORK)_DEPENDS = $(LIBYANG_DEV) $(LIBYANG)
$(SONIC_MGMT_FRAMEWORK)_RDEPENDS = $(LIBYANG)
SONIC_DPKG_DEBS += $(SONIC_MGMT_FRAMEWORK)

SONIC_MGMT_FRAMEWORK_DBG = sonic-mgmt-framework-dbg_1.0-01_amd64.deb
SONIC_MGMT_FRAMEWORK_DBG = sonic-mgmt-framework-dbg_1.0-01_$(CONFIGURED_ARCH).deb
$(SONIC_MGMT_FRAMEWORK_DBG)_DEPENDS += $(SONIC_MGMT_FRAMEWORK)
$(SONIC_MGMT_FRAMEWORK_DBG)_RDEPENDS += $(SONIC_MGMT_FRAMEWORK)
$(eval $(call add_derived_package,$(SONIC_MGMT_FRAMEWORK),$(SONIC_MGMT_FRAMEWORK_DBG)))
Expand Down
4 changes: 3 additions & 1 deletion src/iccpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = iccpd_$(ICCPD_VERSION)_amd64.deb
MAIN_TARGET = iccpd_$(ICCPD_VERSION)_$(CONFIGURED_ARCH).deb
DEB_PATH = debian

all: iccpd-build mclagdctl-build
Expand All @@ -24,6 +24,8 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
chmod +x $(DEB_PATH)/usr/bin/mclagdctl
md5sum $(DEB_PATH)/usr/bin/iccpd > $(DEB_PATH)/DEBIAN/md5sums
md5sum $(DEB_PATH)/usr/bin/mclagdctl >> $(DEB_PATH)/DEBIAN/md5sums
sed -i "s/Package: .*/Package: iccpd-$(ICCPD_VERSION)-$(CONFIGURED_ARCH)/g" $(DEB_PATH)/DEBIAN/control
sed -i "s/Architecture: .*/Architecture: $(CONFIGURED_ARCH)/g" $(DEB_PATH)/DEBIAN/control
dpkg-deb -b $(DEB_PATH) $(DEST)/$(MAIN_TARGET)

clean: iccpd-clean mclagdctl-clean
Expand Down
8 changes: 4 additions & 4 deletions src/iptables/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = $(IPTABLES)
DERIVED_TARGETS = libip4tc0_$(IPTABLES_VERSION_FULL)_amd64.deb \
libip6tc0_$(IPTABLES_VERSION_FULL)_amd64.deb \
libiptc0_$(IPTABLES_VERSION_FULL)_amd64.deb \
libxtables12_$(IPTABLES_VERSION_FULL)_amd64.deb
DERIVED_TARGETS = libip4tc0_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libip6tc0_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libiptc0_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb \
libxtables12_$(IPTABLES_VERSION_FULL)_$(CONFIGURED_ARCH).deb

IPTABLES_URL = http://deb.debian.org/debian/pool/main/i/iptables

Expand Down

0 comments on commit 81f4c81

Please sign in to comment.