Skip to content

Commit

Permalink
[CENTEC] Fix compile issues for centec x86 platform image build under…
Browse files Browse the repository at this point in the history
… 4.19 (#4605)

* centec x86 update for buster
* optimize dal code
  • Loading branch information
taocy001 authored May 15, 2020
1 parent d90fdbf commit edde122
Show file tree
Hide file tree
Showing 21 changed files with 14 additions and 4,893 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -580,25 +580,6 @@ _dal_set_msi_enabe(unsigned int lchip, unsigned int irq_num)
msi_irq_base[lchip] = dal_dev[lchip].pci_dev->irq;
msi_irq_num[lchip] = 1;
}
else
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 79))
ret = pci_enable_msi_exact(dal_dev[lchip].pci_dev, irq_num);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 26, 32))
ret = pci_enable_msi_block(dal_dev[lchip].pci_dev, irq_num);
#else
ret = -1;
#endif
if (ret)
{
printk ("msi enable failed!!! lchip = %d, irq_num = %d\n", lchip, irq_num);
pci_disable_msi(dal_dev[lchip].pci_dev);
msi_used = 0;
}

msi_irq_base[lchip] = dal_dev[lchip].pci_dev->irq;
msi_irq_num[lchip] = irq_num;
}

return ret;
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion platform/centec/docker-syncd-centec-rpc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ $(DOCKER_SYNCD_CENTEC_RPC)_DEPENDS += $(SYNCD_RPC_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_CENTEC_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_CENTEC)
$(DOCKER_SYNCD_CENTEC_RPC)_LOAD_DOCKERS += $(DOCKER_SYNCD_BASE)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC)
SONIC_STRETCH_DOCKERS += $(DOCKER_SYNCD_CENTEC_RPC)
ifeq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC_RPC)
endif
Expand Down
18 changes: 6 additions & 12 deletions platform/centec/docker-syncd-centec.mk
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# docker image for centec syncd

DOCKER_SYNCD_CENTEC = docker-syncd-centec.gz
$(DOCKER_SYNCD_CENTEC)_PATH = $(PLATFORM_PATH)/docker-syncd-centec
$(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD)
$(DOCKER_SYNCD_CENTEC)_FILES += $(SUPERVISOR_PROC_EXIT_LISTENER_SCRIPT)
ifeq ($(INSTALL_DEBUG_TOOLS), y)
DOCKER_SYNCD_PLATFORM_CODE = centec
include $(PLATFORM_PATH)/../template/docker-syncd-base.mk

$(DOCKER_SYNCD_BASE)_DEPENDS += $(SYNCD)

$(DOCKER_SYNCD_CENTEC)_DEPENDS += $(SYNCD_DBG) \
$(LIBSWSSCOMMON_DBG) \
$(LIBSAIMETADATA_DBG) \
$(LIBSAIREDIS_DBG)
endif
$(DOCKER_SYNCD_CENTEC)_LOAD_DOCKERS += $(DOCKER_CONFIG_ENGINE_STRETCH)
SONIC_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
ifneq ($(ENABLE_SYNCD_RPC),y)
SONIC_INSTALL_DOCKER_IMAGES += $(DOCKER_SYNCD_CENTEC)
endif

$(DOCKER_SYNCD_CENTEC)_CONTAINER_NAME = syncd

$(DOCKER_SYNCD_CENTEC)_RUN_OPT += --privileged -t
$(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /host/machine.conf:/etc/machine.conf
$(DOCKER_SYNCD_CENTEC)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd
Expand Down
3 changes: 1 addition & 2 deletions platform/centec/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ include $(PLATFORM_PATH)/one-image.mk
include $(PLATFORM_PATH)/libsaithrift-dev.mk
include $(PLATFORM_PATH)/docker-ptf-centec.mk

SONIC_ALL += $(SONIC_ONE_IMAGE) \
$(DOCKER_SYNCD_CENTEC_RPC)
SONIC_ALL += $(SONIC_ONE_IMAGE)

# Inject centec sai into sairedis
$(LIBSAIREDIS)_DEPENDS += $(CENTEC_SAI)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
obj-m := centec_e582_48x2q4z_platform.o dal.o centec_at24c64.o
dal-y := dal_kernel.o dal_mpool.o
obj-m := centec_e582_48x2q4z_platform.o centec_at24c64.o
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
obj-m := centec_e582_48x6q_platform.o dal.o centec_at24c64.o
dal-y := dal_kernel.o dal_mpool.o
obj-m := centec_e582_48x6q_platform.o centec_at24c64.o
Loading

0 comments on commit edde122

Please sign in to comment.