From fd5a23417ba2f551109fc319f452004e330180e6 Mon Sep 17 00:00:00 2001 From: Antony Rheneus Date: Fri, 2 Aug 2019 15:56:09 +0530 Subject: [PATCH 1/5] [Makefile/slave docker] ARM arch doesn't support few packages iproute2 is missing for ARM sonic-slave docker Signed-off-by: Antony Rheneus --- build_debian.sh | 21 +++++++++++++------ .../docker-syncd-mrvl/Dockerfile.j2 | 2 +- slave.mk | 2 +- sonic-slave-stretch/Dockerfile.j2 | 13 ++++++++++++ 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/build_debian.sh b/build_debian.sh index fcb26f16b525..9ff6fa019dfb 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -214,9 +214,11 @@ sudo LANG=C chroot $FILESYSTEM_ROOT useradd -G sudo,docker $USERNAME -c "$DEFAUL ## Create password for the default user echo "$USERNAME:$PASSWORD" | sudo LANG=C chroot $FILESYSTEM_ROOT chpasswd -## Pre-install hardware drivers -sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install \ - firmware-linux-nonfree +if [[ $CONFIGURED_ARCH == amd64 ]]; then + ## Pre-install hardware drivers + sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install \ + firmware-linux-nonfree +fi ## Pre-install the fundamental packages ## Note: gdisk is needed for sgdisk in install.sh @@ -268,9 +270,14 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in tcptraceroute \ mtr-tiny \ locales \ + cgroup-tools + +if [[ $CONFIGURED_ARCH == amd64 ]]; then +## Pre-install the fundamental packages for amd64 (x86) +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \ flashrom \ - cgroup-tools \ mcelog +fi #Adds a locale to a debian system in non-interactive mode sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \ @@ -403,8 +410,10 @@ set /files/etc/sysctl.conf/net.core.rmem_max 2097152 set /files/etc/sysctl.conf/net.core.wmem_max 2097152 " -r $FILESYSTEM_ROOT -# Configure mcelog to log machine checks to syslog -sudo sed -i 's/^#syslog = yes/syslog = yes/' $FILESYSTEM_ROOT/etc/mcelog/mcelog.conf +if [[ $CONFIGURED_ARCH == amd64 ]]; then + # Configure mcelog to log machine checks to syslog + sudo sed -i 's/^#syslog = yes/syslog = yes/' $FILESYSTEM_ROOT/etc/mcelog/mcelog.conf +fi ## docker-py is needed by Ansible docker module sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT easy_install pip diff --git a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 index b3942414c027..201d52284361 100755 --- a/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 +++ b/platform/marvell-armhf/docker-syncd-mrvl/Dockerfile.j2 @@ -26,7 +26,7 @@ RUN dpkg -i \ debs/{{ deb }}{{' '}} {%- endfor %} -COPY ["start.sh", "syncd.sh", "/usr/bin/"] +COPY ["start.sh", "/usr/bin/"] COPY ["supervisord.conf", "/etc/supervisor/conf.d/"] ## Clean up diff --git a/slave.mk b/slave.mk index a80c1125682c..9bebb0935f05 100644 --- a/slave.mk +++ b/slave.mk @@ -604,7 +604,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ $(LIBNSS_TACPLUS)) \ $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \ $$(addprefix $(FILES_PATH)/,$$($$*_FILES)) \ - $(addprefix $(STRETCH_FILES_PATH)/,$(IXGBE_DRIVER)) \ + $(addprefix $(STRETCH_FILES_PATH)/, $(if $(filter $(CONFIGURED_ARCH),amd64), $(IXGBE_DRIVER))) \ $(addprefix $(PYTHON_DEBS_PATH)/,$(SONIC_UTILS)) \ $(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) \ $(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2)) \ diff --git a/sonic-slave-stretch/Dockerfile.j2 b/sonic-slave-stretch/Dockerfile.j2 index fc7066361e13..c6da444644f8 100644 --- a/sonic-slave-stretch/Dockerfile.j2 +++ b/sonic-slave-stretch/Dockerfile.j2 @@ -249,6 +249,19 @@ RUN apt-get update && apt-get install -y \ cmake \ # For pam_tacplus build autoconf-archive \ +{%- if CONFIGURED_ARCH == "armhf" %} +# For iproute2 + cm-super-minimal \ + libatm1-dev \ + libelf-dev \ + libmnl-dev \ + libselinux1-dev \ + linuxdoc-tools \ + lynx \ + texlive-latex-extra \ + texlive-latex-recommended \ + iproute2 \ +{%- endif %} # For python-click build python-sphinx \ python-docutils \ From ddf0f6be892f90172c4ea5b90601c111f24201ab Mon Sep 17 00:00:00 2001 From: Antony Rheneus Date: Fri, 2 Aug 2019 17:39:02 +0530 Subject: [PATCH 2/5] [platform] uboot setting for ECC should be default 8 Signed-off-by: Antony Rheneus --- installer/armhf/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/installer/armhf/install.sh b/installer/armhf/install.sh index ef5779b06e52..6398436ebb6e 100644 --- a/installer/armhf/install.sh +++ b/installer/armhf/install.sh @@ -90,8 +90,7 @@ umount $demo_mount echo "Updating U-Boot environment variables" #global uboot enviroment settings -#FW_ENV='/dev/mtd0 \t\t 0x00500000 \t 0x80000 \t 0x100000 \t 8' -FW_ENV='/dev/mtd0 \t\t 0x00500000 \t 0x80000 \t 0x100000 \t 2' +FW_ENV='/dev/mtd0 \t\t 0x00500000 \t 0x80000 \t 0x100000 \t 8' kernel_addr=0x1100000 fdt_addr=0x1000000 From 29658712c74aa66910b2889a0299bc61e5c6c9bb Mon Sep 17 00:00:00 2001 From: Antony Rheneus Date: Fri, 2 Aug 2019 22:06:24 +0530 Subject: [PATCH 3/5] [Platform] updated execute permision for script Signed-off-by: Antony Rheneus --- installer/armhf/install.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 installer/armhf/install.sh diff --git a/installer/armhf/install.sh b/installer/armhf/install.sh old mode 100644 new mode 100755 From c7615a8d99aaf20a4e87fa318bbad73dc64736eb Mon Sep 17 00:00:00 2001 From: Antony Rheneus Date: Mon, 5 Aug 2019 16:56:02 +0530 Subject: [PATCH 4/5] [sonic-slave] Making iproute2 install common for all arch Signed-off-by: Antony Rheneus --- sonic-slave-stretch/Dockerfile.j2 | 2 -- 1 file changed, 2 deletions(-) diff --git a/sonic-slave-stretch/Dockerfile.j2 b/sonic-slave-stretch/Dockerfile.j2 index c6da444644f8..5c1739c49d50 100644 --- a/sonic-slave-stretch/Dockerfile.j2 +++ b/sonic-slave-stretch/Dockerfile.j2 @@ -249,7 +249,6 @@ RUN apt-get update && apt-get install -y \ cmake \ # For pam_tacplus build autoconf-archive \ -{%- if CONFIGURED_ARCH == "armhf" %} # For iproute2 cm-super-minimal \ libatm1-dev \ @@ -261,7 +260,6 @@ RUN apt-get update && apt-get install -y \ texlive-latex-extra \ texlive-latex-recommended \ iproute2 \ -{%- endif %} # For python-click build python-sphinx \ python-docutils \ From 8688f27793aa725da628a262c4cefafc3925eb84 Mon Sep 17 00:00:00 2001 From: Antony Rheneus Date: Mon, 5 Aug 2019 19:05:58 +0530 Subject: [PATCH 5/5] [platform] Added default_sku file for hwsku ET6448M Signed-off-by: Antony Rheneus --- device/marvell/armhf-marvell_et6448m_52x-r0/default_sku | 1 + 1 file changed, 1 insertion(+) create mode 100644 device/marvell/armhf-marvell_et6448m_52x-r0/default_sku diff --git a/device/marvell/armhf-marvell_et6448m_52x-r0/default_sku b/device/marvell/armhf-marvell_et6448m_52x-r0/default_sku new file mode 100644 index 000000000000..4f0da7a26939 --- /dev/null +++ b/device/marvell/armhf-marvell_et6448m_52x-r0/default_sku @@ -0,0 +1 @@ +et6448m t1